[PATCH] D139305: [clang][driver] Support option '-mcpu' on target AVR.

2022-12-22 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I think having `-mcpu` as an alias for `-mmcu` on AVR is fine, but I don't think it's very useful to be honest. The `-mmcu` (or `-mcpu`) flag is inherently specific to that particular chip anyway so compatibility is not an issue. In fact, having two flags may even

[PATCH] D138681: [AVR] Fix broken bitcast for aliases in non-zero address space

2022-11-27 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG131cddcba2c4: [AVR] Fix broken bitcast for aliases in non-zero address space (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138681/new/

[PATCH] D138681: [AVR] Fix broken bitcast for aliases in non-zero address space

2022-11-24 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 477828. aykevl added a comment. - now _actually_ add that `CHECK` line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138681/new/ https://reviews.llvm.org/D138681 Files: clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D138681: [AVR] Fix broken bitcast for aliases in non-zero address space

2022-11-24 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 477827. aykevl added a comment. - add `CHECK:` line that I forgot Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138681/new/ https://reviews.llvm.org/D138681 Files: clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D138681: [AVR] Fix broken bitcast for aliases in non-zero address space

2022-11-24 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: benshi001, dylanmckay, rjmccall, MaskRay. Herald added subscribers: jeroen.dobbelaere, StephenFan, Jim, arichardson. Herald added a project: All. aykevl requested review of this revision. Herald added a project: clang. Herald added a

[PATCH] D137572: [AVR][Clang] Implement __AVR_HAVE_*__ macros

2022-11-22 Thread Ayke via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa8efcb96e6db: [AVR][Clang] Implement __AVR_HAVE_*__ macros (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138125: [clang] Fix wrong ABI on AVRTiny

2022-11-16 Thread Ayke via Phabricator via cfe-commits
aykevl added inline comments. Comment at: clang/test/CodeGen/avr/struct.c:37 +long long fooi64(void) { + return 0xaa5533; +} benshi001 wrote: > This file should be renamed to return.c instead of current struct.c, I will > do that in another patch, just let you

[PATCH] D137521: [AVR][Clang] Implement __AVR_ARCH__ macro

2022-11-15 Thread Ayke via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG09ab9d4d111f: [AVR][Clang] Implement __AVR_ARCH__ macro (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137520: [AVR][Clang] Move family names into MCU list

2022-11-15 Thread Ayke via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd2563775cd6e: [AVR][Clang] Move family names into MCU list (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137572: [AVR][Clang] Implement __AVR_HAVE_*__ macros

2022-11-15 Thread Ayke via Phabricator via cfe-commits
aykevl added inline comments. Comment at: clang/lib/Basic/Targets/AVR.cpp:355 +.Cases("31", "51", "6", true) +.Cases("104", "105", "106", "107", true) +.Default(false); benshi001 wrote: > benshi001 wrote: > > ATxmega16a4 with family code 102 also

[PATCH] D137572: [AVR][Clang] Implement __AVR_HAVE_*__ macros

2022-11-15 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 475419. aykevl added a comment. - Fix ArchHas3BytePC to remove arch 107 (of which no chips have more than 128kB flash) - Fix ArchHasELPM/ArchHasELPMX to add arch 102 (it does support elpm even though avr-gcc claims it doesn't). - Add notes where the provided

[PATCH] D137572: [AVR][Clang] Implement __AVR_HAVE_*__ macros

2022-11-07 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: benshi001, dylanmckay. Herald added a subscriber: Jim. Herald added a project: All. aykevl requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. These macros are defined in avr-gcc and are

[PATCH] D137521: [AVR][Clang] Implement __AVR_ARCH__ macro

2022-11-06 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, benshi001. Herald added a subscriber: Jim. Herald added a project: All. aykevl requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This macro is defined in avr-gcc, and is very

[PATCH] D137520: [AVR][Clang] Move family names into MCU list

2022-11-06 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, benshi001. Herald added a subscriber: Jim. Herald added a project: All. aykevl requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This simplifies the code by avoiding some

[PATCH] D128133: [Driver] Support linking to compiler-rt for target AVR

2022-08-13 Thread Ayke via Phabricator via cfe-commits
aykevl accepted this revision. aykevl added a comment. This revision is now accepted and ready to land. Looks good to me! Comment at: clang/lib/Driver/ToolChains/AVR.cpp:539 +// Link to compiler-rt. We directly put the libclang.builtins.a +// as input file, other than

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-29 Thread Ayke via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG75d12e49c729: [libclang] Fall back to getMainExecutable when dladdr fails (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-11 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. This file is also linked to `libclang.a`. When linking `libclang.a` on Alpine Linux, `dladdr` is not available and the only fallback I can think of is `getMainExecutable`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D123200: [compiler-rt][builtins] Add several helper functions for AVR

2022-05-05 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @benshi001 I have been looking through the GCC code and I think avr-gcc also has a special calling convention for many other functions, including `__mulqi3` and `__mulhi3`. Source: 1. I think this is where the ABI is specified in the compiler:

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-02 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: MaskRay, rsmith. Herald added subscribers: StephenFan, arphaman. Herald added a project: All. aykevl requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. musl-libc doesn't support dladdr in

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-07 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. What about chip families other than avr2? Some have a different PC pointer size (1-3 bytes, therefore affecting the ABI), some have different instructions, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123200/new/

[PATCH] D118095: [clang][AVR] Reject non assembly source files for the avr1 family

2022-03-25 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Herald added a subscriber: StephenFan. @MaskRay it was my suggestion to move this from the toolchain specific file to the generic file, because it makes the implementation much simpler. See my comment D117423#3251110 for

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-10 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @mehdi_amini thanks for explaining! D119342 moves slightly closer to removing SizeLevel from the pass pipeline setup. --- In other news, I found a workaround that can be used to avoid the size increase due to LoopRotate (until D119342

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. After some more testing on a larger amount of code (many small programs, together over 1MB of code), LoopRotate indeed seems to be the culprit. I'm now looking into a patch to LoopRotate to respect the `optsize` function attribute. Repository: rG LLVM Github Monorepo

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Apparently there is also another patch that tries to do something very similar: D81223 . In D72404#3305275 , @mehdi_amini wrote: > Why can't you build the object files with `-Os` in the first

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-08 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Herald added a reviewer: MaskRay. I would be very interested in this patch, because for me to use ThinLTO without size regressions I need to set the optimization size level in the linker (`PassManagerBuilder.SizeLevel` etc). This patch seems mostly correct to me, except

[PATCH] D115982: [clang][AVR] Implement '__flashN' for variables on different flash banks

2022-01-18 Thread Ayke via Phabricator via cfe-commits
aykevl accepted this revision. aykevl added a comment. This revision is now accepted and ready to land. Herald added a subscriber: jacquesguan. Looks good to me! Comment at: clang/lib/Basic/Targets/AVR.cpp:27 const char *DefineName; + const int MaxFlashBank; // -1 means

[PATCH] D117423: [AVR][clang] Reject non assembly source files for the avr1 family

2022-01-18 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I'm not sure this is the correct location for these checks. You're essentially checking whether the compilation looks like a C/C++ compilation or an assembly compilation based on the flags and the file name. However, the Clang driver already does something like this: it

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2022-01-17 Thread Ayke via Phabricator via cfe-commits
aykevl added inline comments. Comment at: compiler-rt/lib/builtins/fp_extend.h:32-39 #if defined __LP64__ return __builtin_clzl(a); #else if (a & REP_C(0x)) -return __builtin_clz(a >> 32); +return clzsi(a >> 32); else +return 32 + clzsi(a &

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2022-01-17 Thread Ayke via Phabricator via cfe-commits
aykevl accepted this revision. aykevl added a comment. This revision is now accepted and ready to land. Looks good to me. Comment at: compiler-rt/lib/builtins/fp_extend.h:32-39 #if defined __LP64__ return __builtin_clzl(a); #else if (a & REP_C(0x)) -

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2022-01-17 Thread Ayke via Phabricator via cfe-commits
aykevl accepted this revision. aykevl added a comment. This revision is now accepted and ready to land. I've looked through the code again. It looks correct and (in past testing) it fixed a bug I had, so I'm going to accept this. @atrosinenko do you have commit access? If not, I can commit it

[PATCH] D115982: [clang][AVR] Implement '__flashN' for variables on different flash banks

2022-01-03 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. avr-gcc checks whether the device supports the flash bank used. For example: $ cat test.c int d = 5; const int ro = 5; __flash const int f = 5; __flash1 const int f1 = 5; __flash2 const int f2 = 5; $ avr-gcc -mmcu=attiny84 -Os -c -o test.o test.c

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

2021-03-01 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Looks reasonable to me. But again, I would like this to be reviewed also by someone familiar with the internals of Clang (I'm not). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97669/new/ https://reviews.llvm.org/D97669

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-02-20 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I am not very familiar with Clang so I can't say much about it. Although I wonder whether the macro is the right way to implement this? Is there something similar in other targets? (GPUs tend to have lots of address spaces, you could take a look there).

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2021-02-11 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I checked this, and it seems good to me although I would like someone else to also take a look. In D86547#2287353 , @atrosinenko wrote: > In D86547#2284095 , @MaskRay wrote: > >> The

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2021-02-11 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. This looks good to me, although I would like someone else to take a look as well. I can confirm that these changes fix an issue on AVR: this patch (together with D86547 ) make `__floatsisf` correct on AVR while it would previously do

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Yeah I was wondering the same thing when I saw the failure. Unfortunately such design is a bit outside of my LLVM knowledge. I would just like to use cc1as_main.cpp functionality outside of LLVM without needing to update my copy of cc1as with every LLVM update.

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @echristo do you have an idea what's going on or how to fix this? I suspect I'm not including a required dependency or maybe I've put `AssemblerInvocation` in the wrong directory/library. I'm not very familiar with CMake or C++ so I'm not sure how to best fix this.

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Well that didn't quite work. I get errors like this: tools/clang/lib/Frontend/CMakeFiles/obj.clangFrontend.dir/AssemblerInvocation.cpp.o:(.toc+0x0): undefined reference to `vtable for llvm::MCSubtargetInfo'

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Thanks! I have updated this patch to match LLVM main and committed it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2325157c0568: [Clang] Move assembler into a separate file (authored by aykevl). Changed prior to commit: https://reviews.llvm.org/D63852?vs=206769=318750#toc Repository: rG LLVM Github Monorepo

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

2020-10-31 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I haven't verified this all but this looks reasonable to me, at least until a better way is figured out to store MCU specific information in the compiler. The tests may be a little bit excessive though, they all seem to be testing the same thing. CHANGES SINCE LAST

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-10-31 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2020-09-21 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Looks reasonable to me, although I can't really comment on the contents of this as I'm not very familiar with this code. I would like to see just a single MCU table that contains all the information (including start addresses). Maybe it can even be generated from ATDF

[PATCH] D81282: [builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

2020-06-25 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Look reasonable from my POV, but I don't know enough about CMake or the compiler-rt build system to LGTM this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81282/new/ https://reviews.llvm.org/D81282

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-06-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. (sorry, I missed your comment) I basically want to run `clang` by linking to it and calling it directly, without invoking any external commands. You can see here how I did it: https://github.com/tinygo-org/tinygo/blob/master/builder/clang.cpp I copied the cc1as code in

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-06-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. The reason to not call into LLVM directly is because I want to use the compiler driver, to be compatible with all the compiler flags. Reimplementing the assembler driver would be a pain. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-19 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. In D81285#2102948 , @atrosinenko wrote: > On renaming fixed width integer types to their traditional names: I would > prefer sending such patch afterwards, it would probably be as simple as just > running `sed --in-place` several

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-10 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I need to recompile LLVM to test this patch so it might take a while. In D81285#2082517 , @atrosinenko wrote: > In D81285#2082394 , @aykevl wrote: > > > Also note that the libgcc

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-06-10 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @echristo any chance you could take a look at this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I'm not sure whether `native_int` is any clearer than just `int`. I'm afraid it only introduces more complexity ("What's `native_int`? Oh, it's just `int`"). Perhaps a controversial idea: what about changing to use stdint.h types? `si_int` -> `int32_t` `su_int` ->

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I tested this patch against my local testing system to make sure it didn't break anything, and I get the same number of failures (most of which are due to a missing complex.h file, which is unrelated). So it looks fine from my point of view, although I know not enough

[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] D78163: [AVR][NFC] Move preprocessor tests to Preprocessor directory

2020-04-25 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGceba881aeac1: [AVR][NFC] Move preprocessor tests to Preprocessor directory (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78163/new/

[PATCH] D78163: [AVR][NFC] Move preprocessor tests to Preprocessor directory

2020-04-23 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 259621. aykevl added a comment. - moved test files out of the AVR-specific directory - removed the `REQUIRES:` line In D78163#1984210 , @rjmccall wrote: > I don't think the REQUIRES is needed unless there's something

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

2020-04-20 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I can't give an LGTM but at least from my perspective I very much welcome this change. I am still hitting problems with non-zero address spaces on AVR. One nit in an inline comment. Do you plan on eventually removing `LLVM_NO_IMPLICIT_ADDRESS_SPACE` when the transition

[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

[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/

[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

2020-04-15 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG215dc2e20334: [AVR] Use the correct address space for non-prototyped function calls (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D78163: [AVR][NFC] Move preprocessor tests to Preprocessor directory

2020-04-15 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Honestly I don't know the convention but I agree with @rjmccall that the convention appears to be to not use a separate subdirectory (I don't see any other arch-specific subdirectories). So, should the files be moved to clang/test/Preprocessor/avr-*.c (e.g.

[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

2020-04-15 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 257687. aykevl marked an inline comment as done. aykevl added a comment. - added comment explaining the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78125/new/ https://reviews.llvm.org/D78125 Files:

[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. In D78125#1982471 , @MaskRay wrote: > > This fix is necessary to let Clang compile compiler-rt for AVR. > > This suggests that some compiler-rt declarations do not follow the best > practice... What are they? The calls come from

[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 257548. aykevl added a comment. Update to use the function pointer address space from the function declaration. (This is slightly different from what @rjmccall suggested but I think this is more readable). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Okay, I have committed this patch and created a new patch to move the files: https://reviews.llvm.org/D78163 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78117/new/ https://reviews.llvm.org/D78117

[PATCH] D78163: [AVR][NFC] Move preprocessor tests to Preprocessor directory

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, rjmccall, MaskRay. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. MaskRay added a comment. Not sure we need `target-cpu-defines/` You can add a `lit.local.cfg` to avoid `REQUIRES: avr-registered-target`

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfe06e231ff15: [AVR] Define __ELF__ (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78117/new/ https://reviews.llvm.org/D78117 Files:

[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, rjmccall, MaskRay. aykevl added a project: LLVM. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. aykevl edited the summary of this revision. Some function declarations like this: void foo(); do not

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 257358. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78117/new/ https://reviews.llvm.org/D78117 Files: clang/lib/Basic/Targets/AVR.cpp clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, rjmccall, MaskRay. aykevl added a project: LLVM. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. aykevl updated this revision to Diff 257358. This symbol is defined in avr-gcc. Because AVR normally uses

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

2020-04-13 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcfc002714a20: [AVR] Support aliases in non-zero address space (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76182/new/

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

2020-04-13 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 256977. aykevl added a comment. - added test - using `getPointerAddressSpace` instead of a cast This is now ready for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76182/new/

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2020-04-05 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @xbolva00 I could, but to me this is not trivial (I'm not familiar with the code and I'm not sure what I would break). If it's easy for you, then please do (otherwise I can send a patch for review). I have already worked around this issue in a different way (by running

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-04-05 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Ping? I'm not sure who to add as a reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2020-04-02 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I have the same issue as @wenju. The second time I call `ExecuteCompilerInvocation` it will give the error above, leading me to believe some memory isn't properly cleared. Note: the `--pgo-warn-misexpect` option is not passed in the compiler invocation. Repository:

[PATCH] D76181: [AVR] Add support for the -mdouble=x flag

2020-03-17 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4add24920550: [AVR] Add support for the -mdouble=x flag (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76181/new/

[PATCH] D76181: [AVR] Add support for the -mdouble=x flag

2020-03-15 Thread Ayke via Phabricator via cfe-commits
aykevl marked 3 inline comments as done. aykevl added a comment. In D76181#1923176 , @MaskRay wrote: > The GCC side commits can be found on > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92055 > So it seems that we will have both

[PATCH] D76181: [AVR] Add support for the -mdouble=x flag

2020-03-15 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 250418. aykevl added a comment. Fixed nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76181/new/ https://reviews.llvm.org/D76181 Files: clang/include/clang/Basic/LangOptions.def

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

2020-03-14 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, rsmith, rjmccall. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. This fixes code like the following on AVR: void foo(void) { } void bar(void) __attribute__((alias("foo"))); Code like this is

[PATCH] D76181: [AVR] Add support for the -mdouble=x flag

2020-03-14 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, MaskRay, hfinkel, rnk, rsmith. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. This flag is used by avr-gcc (starting with v10) to set the width of the double type. The double type is by default

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-12-03 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Ping? This would be super useful to have: it avoids copying most of cc1as. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-08-17 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. *friendly ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-07-17 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-06-26 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 206769. aykevl added a comment. - removed useless anonymous namespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 Files:

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-06-26 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added a reviewer: chandlerc. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. This change adds an AssemblerInvocation class, similar to the CompilerInvocation class. It can be used to invoke cc1as directly. The project I'm