[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-05-16 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. @aykevl > A thought: should the AVR family be included in the target triple? Like > avr5-unknown-unknown (similar to armv6m-none-eabi, armv7m-none-eabi, etc). > The different variations do sometimes change the architecture in > incompatible ways, such as with the ca

[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-04-29 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. A thought: should the AVR family be included in the target triple? Like `avr5-unknown-unknown` (similar to `armv6m-none-eabi`, `armv7m-none-eabi`, etc). The different variations do sometimes change the

[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-04-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Patch generally looks good, but I agree that it could use some basic tests. You don't need to do specifically test all 20 million releases, but make sure you cover the first and last in the array as well as something in the middle, just to make sure your scans are wor

[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-04-20 Thread Ayke via Phabricator via cfe-commits
aykevl added inline comments. Comment at: clang/lib/Basic/Targets/AVR.cpp:35 +auto FamilyInfo = llvm::AVR::getFamilyInfo(Family.getValue()); +Builder.defineMacro("__AVR_ARCH__", Twine(FamilyInfo.Number)); + } This should have tests. Take a look at D78117

[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-04-19 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Great! I was considering writing something like this but this patch is much better than what I had in mind. Note that this might conflict with D78117 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77221/new/ https://reviews.llv

[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-04-18 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay requested changes to this revision. dylanmckay added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Basic/Targets/AVR.h:21 +#include "llvm/Support/AVRTargetParser.h" + Order this `#include` alphabetically with t

[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-04-02 Thread Vlastimil Labsky via Phabricator via cfe-commits
vlastik updated this revision to Diff 254456. vlastik added a comment. Fix regression introduced by patch Failed unit tests: - Clang.Driver::avr-link-mcu-family-unimplemented.c - Clang.Misc::target-invalid-cpu-note.c CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77221/new/ https://rev

[PATCH] D77221: [AVR] Rework MCU family detection to support more AVR MCUs

2020-04-01 Thread Vlastimil Labsky via Phabricator via cfe-commits
vlastik created this revision. vlastik added a reviewer: dylanmckay. Herald added subscribers: cfe-commits, Jim, hiraditya, mgorny. Herald added a project: clang. AVR port now supports only ATmega328. This patch makes more MCUs work with clang Repository: rG LLVM Github Monorepo https://revie