[PATCH] D112113: [ObjC] type method metadata `_imp`, messenger routine at callsite with program address space

2021-12-01 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. LGTM, nice work. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112113/new/ https://reviews.llvm.org/D112113

[PATCH] D111566: [SYCL] Fix function pointer address space

2021-12-01 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. By the way, as this has already been approved by one, and you rightly applied the "speak now or forever hold your peace" principle re. OpenCL, and this clearly works better from my point of view than the old code, I wouldn't want

[PATCH] D111566: [SYCL] Fix function pointer address space

2021-12-01 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. This will product correct code from an AVR perspective where (before this patch it would have failed codegen). It is consistent with how we construct function pointers in LLVM core as well. I'm not very familiar with Clang internals, one thing that stick out to me:

[PATCH] D103136: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-seriesø

2021-06-28 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. Nope, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103136/new/ https://reviews.llvm.org/D103136

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-05-30 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. Looks good, nice and simple. Thanks @benshi001 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97669/new/ https://reviews.llvm.org/D97669

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2021-01-23 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. Great patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93579/new/ https://reviews.llvm.org/D93579

[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

2020-11-16 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. Looks good to me, thanks for the patch @benshi001 NOTE: It looks like you will need to rebase this one prior to merge. CHANGES SINCE LAST ACTION

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-10-28 Thread Dylan McKay via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG88b7b76a0b23: [AVR][clang] Pass the address of the data section to the linker for ATmega328 (authored by dylanmckay).

[PATCH] D88352: [clang][AVR] Add more devices

2020-10-28 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. Approved, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88352/new/ https://reviews.llvm.org/D88352 ___ cfe-commits

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-10-28 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Regarding TableGen; I would like to send an RFC to llvm-dev to come up with a proper API to expose backend-specific device-specific information and constants to LLVM frontends, as I can imagine that many backends could stand to benefit. I note that there is in

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-10-28 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:40 +llvm::Optional GetMcuSectionAddressData(StringRef MCU) { + return llvm::StringSwitch>(MCU) benshi001 wrote: > aykevl wrote: > > I don't think the LLVM coding style says

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-09-21 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Hey @aykevl, could you please confirm that this patch looks okay? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86629/new/ https://reviews.llvm.org/D86629 ___ cfe-commits

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-08-27 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4297 + // address space of 1. + if (T.isAMDGPU() && !DL.contains("-G") && !DL.startswith("G")) { +return DL.empty() ? std::string("G1") : (DL + "-G1").str(); dylanmckay wrote: >

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-08-27 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4297 + // address space of 1. + if (T.isAMDGPU() && !DL.contains("-G") && !DL.startswith("G")) { +return DL.empty() ? std::string("G1") : (DL + "-G1").str(); arichardson wrote: >

[PATCH] D78491: Avoid relying on address space zero default parameter in llvm/IR

2020-08-27 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Note to the readers: A recent-ish llvm-dev discussion around this patch can be found in here whrein a consensus is found on the way forward on this patch. Repository: rG LLVM Github Monorepo

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-08-26 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added a reviewer: aykevl. Herald added a subscriber: Jim. Herald added a project: clang. dylanmckay requested review of this revision. This patch modifies the Clang AVR toolchain so that it always passes the '-Tdata=0x800100' to the linker for

[PATCH] D77334: [AVR] Remove duplicate specification of lib directory

2020-06-18 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG03b0831144a9: [AVR] Remove duplicate specification of lib directory (authored by dylanmckay). Changed prior to commit: https://reviews.llvm.org/D77334?vs=254606=271915#toc Repository: rG LLVM Github

[PATCH] D77334: [AVR] Remove duplicate specification of lib directory

2020-06-18 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Sorry, I lost track of this. Committed in 01741d6dbec11c0a0c8e610f0033831735c78d1e Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77334/new/

[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

[PATCH] D78491: Avoid relying on address space zero default parameter in llvm/IR

2020-05-16 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Herald added a project: LLVM. I really like the idea behind this patch, but I suspect there is a better way to go about it. The only drawbacks to upstreaming this patch as-is is the idea that because it is implemented as a compiler define directive, it effectively

[PATCH] D78491: Avoid relying on address space zero default parameter in llvm/IR

2020-04-21 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. > should help targets such as AVR than use a non-zero program address space. It definitely will - we have the exact same problems in terms of every call to `getUnqual` on a function pointer becomes a ISel error. > I think making such bugs a compilation failure

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

2020-04-19 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

[PATCH] D77334: [AVR] Remove duplicate specification of lib directory

2020-04-11 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay accepted this revision. dylanmckay added a comment. This revision is now accepted and ready to land. Nice catch, cheers. Do you need someone to commit this for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77334/new/

[PATCH] D77119: [AVR] Fix function pointer address space

2020-04-01 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG57fd86de879c: [AVR] Fix function pointer address space (authored by vlastik, committed by dylanmckay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77119: [AVR] Fix function pointer address space

2020-03-31 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Nice work @vlastik, do you need someone to commit this for you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77119/new/ https://reviews.llvm.org/D77119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D76182: [AVR] Support aliases in non-zero address space

2020-03-31 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Nice patch by the way, the code looks fine, if we can get a basic test in here then it's good to go Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76182/new/ https://reviews.llvm.org/D76182

[PATCH] D76182: [AVR] Support aliases in non-zero address space

2020-03-31 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. I think we should add a test, it shouldn't be too hard I think. Look in `clang/tests`, grep for `alias`. Look like it is `extern const int __mod_usb_device_table __attribute__ ((alias("wacom_usb_ids")));`. If you copy paste a new test (use

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2019-05-19 Thread Dylan McKay via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC361116: [AVR] Automatically link CRT and libgcc from the system avr-gcc (authored by dylanmckay, committed by ). Herald

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2019-05-16 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Herald added a project: clang. I'm very comfortable with the AVR changes at this point, I am going to go ahead and commit the patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54334/new/ https://reviews.llvm.org/D54334

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-12-19 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked 3 inline comments as done. dylanmckay added a comment. > I'm not certain if it will be possible to devise test cases for the two > diagnostics I pointed out or not I don't think it will be. The compile warning logic works by directly querying the physical filesystem using the

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-11-16 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:44-45 +def warn_drv_avr_family_linking_stdlibs_not_implemented: Warning< + "support for linking stdlibs for microcontroller '%0' is not implemented, " + "please file an AVR backend bug

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-11-16 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 174362. dylanmckay marked an inline comment as done. dylanmckay added a comment. Run clang-format on the whole patch Repository: rC Clang https://reviews.llvm.org/D54334 Files: include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-11-16 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 174359. dylanmckay marked 6 inline comments as done. dylanmckay added a comment. - Remove link to BugZilla in diagnostic - Use StringRef for a static string array rather than std::string - Elide braces - Dereference an Optional in-place rather than

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-11-15 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. I'd like feedback on the new AVR-specific warnings, and the new warning group. I have not added a warning or error to clang before, but this seems consistent with how the other targets implement it. Repository: rC Clang https://reviews.llvm.org/D54334

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-11-12 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 173722. dylanmckay added a comment. Add the search path that Ubuntu installs libc to. Repository: rC Clang https://reviews.llvm.org/D54334 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Basic/DiagnosticGroups.td

[PATCH] D54334: [AVR] Automatically link CRT and libgcc from the system avr-gcc

2018-11-09 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added reviewers: aaron.ballman, kparzysz, asb, hfinkel. This patch modifies the AVR toolchain so that if avr-gcc and avr-libc are detected during compilation, the CRT, libgcc, libm, and libc anre linked. This matches avr-gcc's default behaviour, and

[PATCH] D37057: [clang] Require address space to be specified when creating functions (3/3)

2018-07-14 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay abandoned this revision. dylanmckay added a comment. Superseded by https://reviews.llvm.org/D47541 Repository: rC Clang https://reviews.llvm.org/D37057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37057: [clang] Require address space to be specified when creating functions (3/3)

2018-03-02 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 136734. dylanmckay added a comment. Rebase Repository: rC Clang https://reviews.llvm.org/D37057 Files: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGBuiltin.cpp lib/CodeGen/CGCUDANV.cpp lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CGException.cpp

[PATCH] D37057: [clang] Require address space to be specified when creating functions (3/3)

2018-02-27 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 136051. dylanmckay added a comment. Gentle rebase Repository: rC Clang https://reviews.llvm.org/D37057 Files: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGBuiltin.cpp lib/CodeGen/CGCUDANV.cpp lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CGException.cpp

[PATCH] D37057: [clang] Require address space to be specified when creating functions (3/3)

2017-12-09 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 126270. dylanmckay added a comment. Rebase on trunk Repository: rC Clang https://reviews.llvm.org/D37057 Files: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGBuiltin.cpp lib/CodeGen/CGCUDANV.cpp lib/CodeGen/CGDeclCXX.cpp

[PATCH] D37057: [clang] Require address space to be specified when creating functions (4/4)

2017-12-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 125887. dylanmckay added a comment. Herald added a subscriber: cfe-commits. - Remove the switch table stuff for a later patch - Rebased on top of trunk Repository: rC Clang https://reviews.llvm.org/D37057 Files: lib/CodeGen/CGBlocks.cpp

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-11 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Done, thanks for the patch @Lekensteyn! If you plan on submitting more patches, feel free to ask for commit access . Repository: rL LLVM https://reviews.llvm.org/D29817

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-11 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294869: [AVR] Fix __AVR_xxx macro definitions; authored by Peter Wu (authored by dylanmckay). Changed prior to commit: https://reviews.llvm.org/D29817?vs=88025=88104#toc Repository: rL LLVM

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-11 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Do you have commit access @Lekensteyn? https://reviews.llvm.org/D29817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-02-10 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: include/clang/Driver/Options.td:1613 def mcpu_EQ : Joined<["-"], "mcpu=">, Group; +def mmcu_EQ : Joined<["-"], "mmcu=">, Group; def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group; Lekensteyn wrote: >

[PATCH] D29817: [AVR] Fix __AVR_xxx macro definitions

2017-02-10 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Nice catch, unsure why I didn't catch this earlier. Do we also need to modify the other tests inside `target-cpu-defines`? https://reviews.llvm.org/D29817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-07 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294402: [AVR] Add support for the 'interrupt' and 'naked' attributes (authored by dylanmckay). Changed prior to commit: https://reviews.llvm.org/D28451?vs=87365=87588#toc Repository: rL LLVM

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87365. dylanmckay marked 4 inline comments as done. dylanmckay added a comment. Remove 'Attr.setInvalid()' https://reviews.llvm.org/D28451 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/TargetInfo.cpp

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: test/CodeGen/avr/attributes/interrupt.c:3 + +// CHECK: define void @foo() #0 +__attribute__((interrupt)) void foo(void) { } aaron.ballman wrote: > dylanmckay wrote: > > aaron.ballman wrote: > > > As should this. > >

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-02-06 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dylanmckay marked an inline comment as done. Closed by commit rL294177: [AVR] Allow specifying the CPU on the command line (authored by dylanmckay). Changed prior to commit:

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-02-06 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294176: [AVR] Add support for the full set of inline asm constraints (authored by dylanmckay). Changed prior to commit: https://reviews.llvm.org/D28344?vs=87191=87194#toc Repository: rL LLVM

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-02-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87191. dylanmckay removed a reviewer: asl. dylanmckay added a comment. Add tests - Add multichar constraint tests - Add 'unsupported constraint' tests https://reviews.llvm.org/D28344 Files: lib/Basic/Targets.cpp

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-02-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87190. dylanmckay marked an inline comment as done. dylanmckay added a comment. Add tests - Add multichar constraint tests - Add 'unsupported constraint' tests https://reviews.llvm.org/D28344 Files: lib/Basic/Targets.cpp

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked 4 inline comments as done. dylanmckay added inline comments. Comment at: test/CodeGen/avr/attributes/interrupt.m:4 +// CHECK: define void @_Z3foov() #0 +void foo() __attribute__((interrupt)) { } + aaron.ballman wrote: > This is not an

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5137 + if (!checkAttributeNumArgs(S, Attr, 0)) +Attr.setInvalid(); + aaron.ballman wrote: > This should simply return rather than attempt to attach an invalid attribute > to the

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87174. dylanmckay marked 2 inline comments as done. dylanmckay added a comment. Code review - Remove support for ObjC methods. We shouldn't do this as it doesn't really make sense - Move some tests to `Sema` - Don't attach invalid attributes when it

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-02-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked 2 inline comments as done. dylanmckay added inline comments. Comment at: test/CodeGen/avr/target-cpu-defines/atmega328p.c:1 +// RUN: %clang_cc1 -triple avr-unknown-unknown -target-cpu atmega328p -emit-llvm %s -o - | FileCheck %s + asl wrote: >

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-02-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87172. dylanmckay added a comment. Clean up the tests - Dump all defines and search for specific ones - Remove some unrelated tests. I will commit them separately, as they don't actually test any behaviour modified in this change.

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87164. dylanmckay marked 2 inline comments as done. dylanmckay added a comment. Verify that no arguments are given to the attributes Also adds a bunch of tests. https://reviews.llvm.org/D28451 Files: include/clang/Basic/Attr.td

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87054. dylanmckay marked 5 inline comments as done. dylanmckay added a comment. Code review comments - Add 'Subjects = [ObjCMethod]' to attributes - Use 'auto' keyword in one place - Move complex attr parsing logic into static function

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked an inline comment as done. dylanmckay added a comment. Ping https://reviews.llvm.org/D28344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked an inline comment as done. dylanmckay added a comment. Ping https://reviews.llvm.org/D28344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Ping https://reviews.llvm.org/D28346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-19 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5145 +if (!isFunctionOrMethod(D)) { + S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) + << "'interrupt'" << ExpectedFunctionOrMethod; I'm pretty sure that

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-19 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 85053. dylanmckay added a comment. Add 'Subjects' field to 'AVRSignal' https://reviews.llvm.org/D28451 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/TargetInfo.cpp lib/Sema/SemaDeclAttr.cpp

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-19 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 85052. dylanmckay added a comment. Remove a test for the 'naked' attribute https://reviews.llvm.org/D28451 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/TargetInfo.cpp lib/Sema/SemaDeclAttr.cpp

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-19 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 85051. dylanmckay marked 5 inline comments as done. dylanmckay added a comment. Code review from Aaron - Use 'handleSimpleAttribute' rather than duplicating it - Use 'auto' where a type is explicitly casted - Add warnings for when the attribute is not on

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-10 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: include/clang/Basic/Attr.td:488 + +def AVRSignal : InheritableAttr, TargetSpecificAttr { + let Spellings = [GNU<"signal">]; aaron.ballman wrote: > Does this attribute appertain to any specific subjects, or can you

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-10 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83913. dylanmckay marked 2 inline comments as done. dylanmckay added a comment. [AVR] Document the 'interrupt' and 'naked' attributes https://reviews.llvm.org/D28451 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-07 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83544. dylanmckay added a comment. Lower the 'signal' attribute correctly I had forgotten to lower this attribute and so it would not have been lowered to IR at all. Now it works fine. https://reviews.llvm.org/D28451 Files:

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-01-07 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added a reviewer: aaron.ballman. dylanmckay added a subscriber: cfe-commits. This teaches clang how to parse and lower the 'interrupt' and 'naked' attributes. This allows interrupt signal handlers to be written. https://reviews.llvm.org/D28451

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked an inline comment as done. dylanmckay added inline comments. Comment at: lib/Basic/Targets.cpp:8506 + case 'N': // Integer constant (Range: -1) +Info.setRequiresImmediate(-1); + case 'O': // Integer constant (Range: 8, 16, 24)

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83507. dylanmckay added a comment. Add tests for inline assembly constraints https://reviews.llvm.org/D28344 Files: lib/Basic/Targets.cpp test/CodeGen/avr-inline-asm-constraints.c Index: test/CodeGen/avr-inline-asm-constraints.c

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83504. dylanmckay added a comment. Fix a few cases of unintentional switch fallthrough https://reviews.llvm.org/D28344 Files: lib/Basic/Targets.cpp Index: lib/Basic/Targets.cpp === ---

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-01-06 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 83496. dylanmckay added a comment. Add tests This also defines the '__AVR' and 'AVR' values for all devices, to match what AVR-GCC does. https://reviews.llvm.org/D28346 Files: lib/Basic/Targets.cpp test/CodeGen/avr/target-cpu-defines/atmega328p.c

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-01-05 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added a reviewer: jroelofs. dylanmckay added a subscriber: cfe-commits. This tells clang about all of the different AVR microcontrollers. It also adds code to define the correct preprocessor macros for each device. https://reviews.llvm.org/D28346

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-01-04 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added a reviewer: jroelofs. dylanmckay added subscribers: cfe-commits, saaadhu. Previously the method would simply return false, causing every single inline assembly constraint to trigger a compile error. This adds inline assembly constraint support

[PATCH] D28343: [AVR] Fix register numbers for in getGCCAddlRegNames()

2017-01-04 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay created this revision. dylanmckay added a reviewer: saaadhu. dylanmckay added a subscriber: cfe-commits. These do not match up with the register numbers defined in LLVM's AVRRegisterInfo.td Adding Senthil as a reviewer as he originally implemented this.

[PATCH] D27123: Add AVR target and toolchain to Clang

2017-01-04 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291082: Add AVR target and toolchain to Clang (authored by dylanmckay). Changed prior to commit: https://reviews.llvm.org/D27123?vs=80721=83191#toc Repository: rL LLVM

[PATCH] D27123: Add AVR target and toolchain to Clang

2017-01-04 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Signed off by Jonathan Roelofs via cfe-commits https://reviews.llvm.org/D27123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27123: Add AVR target and toolchain to Clang

2016-12-10 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added inline comments. Comment at: lib/Basic/Targets.cpp:8543 + case llvm::Triple::avr: +return new AVRTargetInfo(Triple, Opts); case llvm::Triple::bpfeb: If we build clang without `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR`, how will this work?