| #
3fe5b7a4 |
| 19-Apr-2018 |
Saleem Abdulrasool <[email protected]> |
Implement proper support for `-falign-functions`
This implements support for the previously ignored flag `-falign-functions`. This allows the frontend to request alignment on function definitions i
Implement proper support for `-falign-functions`
This implements support for the previously ignored flag `-falign-functions`. This allows the frontend to request alignment on function definitions in the translation unit where they are not explicitly requested in code. This is compatible with the GCC behaviour and the ICC behaviour.
The scalar value passed to `-falign-functions` aligns functions to a power-of-two boundary. If flag is used, the functions are aligned to 16-byte boundaries. If the scalar is specified, it must be an integer less than or equal to 4096. If the value is not a power-of-two, the driver will round it up to the nearest power of two.
llvm-svn: 330378
show more ...
|
|
Revision tags: llvmorg-6.0.1-rc1 |
|
| #
617e2615 |
| 17-Apr-2018 |
Akira Hatanaka <[email protected]> |
Add a command line option 'fregister_global_dtors_with_atexit' to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.
Register destructor functions
Add a command line option 'fregister_global_dtors_with_atexit' to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.
Register destructor functions annotated with __attribute__((destructor)) calling __cxa_atexit in a synthesized constructor function instead of emitting references to the functions in a special section.
The primary reason for adding this option is that we are planning to deprecate the __mod_term_funcs section on Darwin in the future. This feature is enabled by default only on Darwin. Users who do not want this can use command line option 'fno_register_global_dtors_with_atexit' to disable it.
rdar://problem/33887655
Differential Revision: https://reviews.llvm.org/D45578
llvm-svn: 330199
show more ...
|
| #
a3b5f71e |
| 16-Apr-2018 |
Bruno Cardoso Lopes <[email protected]> |
Use export_as for autolinking frameworks
framework module SomeKitCore { ... export_as SomeKit }
Given the module above, while generting autolink information during codegen, clang should to emit
Use export_as for autolinking frameworks
framework module SomeKitCore { ... export_as SomeKit }
Given the module above, while generting autolink information during codegen, clang should to emit '-framework SomeKitCore' only if SomeKit was not imported in the relevant TU, otherwise it should use '-framework SomeKit' instead.
rdar://problem/38269782
llvm-svn: 330152
show more ...
|
| #
1ba9d9c6 |
| 13-Apr-2018 |
Andrey Konovalov <[email protected]> |
hwasan: add -fsanitize=kernel-hwaddress flag
This patch adds -fsanitize=kernel-hwaddress flag, that essentially enables -hwasan-kernel=1 -hwasan-recover=1 -hwasan-match-all-tag=0xff.
Differential R
hwasan: add -fsanitize=kernel-hwaddress flag
This patch adds -fsanitize=kernel-hwaddress flag, that essentially enables -hwasan-kernel=1 -hwasan-recover=1 -hwasan-match-all-tag=0xff.
Differential Revision: https://reviews.llvm.org/D45046
llvm-svn: 330044
show more ...
|
| #
488f7c2b |
| 13-Apr-2018 |
Dean Michael Berris <[email protected]> |
[XRay][clang] Add flag to choose instrumentation bundles
Summary: This change addresses http://llvm.org/PR36926 by allowing users to pick which instrumentation bundles to use, when instrumenting wit
[XRay][clang] Add flag to choose instrumentation bundles
Summary: This change addresses http://llvm.org/PR36926 by allowing users to pick which instrumentation bundles to use, when instrumenting with XRay. In particular, the flag `-fxray-instrumentation-bundle=` has four valid values:
- `all`: the default, emits all instrumentation kinds - `none`: equivalent to -fnoxray-instrument - `function`: emits the entry/exit instrumentation - `custom`: emits the custom event instrumentation
These can be combined either as comma-separated values, or as repeated flag values.
Reviewers: echristo, kpw, eizan, pelikan
Reviewed By: pelikan
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D44970
llvm-svn: 329985
show more ...
|
| #
2a8c18d9 |
| 06-Apr-2018 |
Alexander Kornienko <[email protected]> |
Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of:
archtype cas classs checkk compres definit frome iff inteval ith lod metho
Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of:
archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru
Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.)
Differential revision: https://reviews.llvm.org/D44188
llvm-svn: 329399
show more ...
|
| #
03f270c9 |
| 30-Mar-2018 |
Alexey Bataev <[email protected]> |
[OPENMP] Added emission of offloading data sections for declare target variables.
Added emission of the offloading data sections for the variables within declare target regions + fixes emission of t
[OPENMP] Added emission of offloading data sections for declare target variables.
Added emission of the offloading data sections for the variables within declare target regions + fixes emission of the declare target variables marked as declare target not within the declare target region.
llvm-svn: 328888
show more ...
|
| #
c9643d8f |
| 29-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local when clearing dllimport.
llvm-svn: 328801
|
| #
b0eee29c |
| 29-Mar-2018 |
Yaxun Liu <[email protected]> |
Disable emitting static extern C aliases for amdgcn target for CUDA
Patch by Greg Rodgers. Revised and lit test added by Yaxun Liu.
Differential Revision: https://reviews.llvm.org/D44987
llvm-svn:
Disable emitting static extern C aliases for amdgcn target for CUDA
Patch by Greg Rodgers. Revised and lit test added by Yaxun Liu.
Differential Revision: https://reviews.llvm.org/D44987
llvm-svn: 328793
show more ...
|
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2 |
|
| #
c205d8cc |
| 27-Mar-2018 |
Mandeep Singh Grang <[email protected]> |
[clang] Change std::sort to llvm::sort in response to r327219
r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism c
[clang] Change std::sort to llvm::sort in response to r327219
r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
llvm-svn: 328636
show more ...
|
| #
1193c370 |
| 22-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local on builtin functions.
The difference between CreateRuntimeFunction and CreateBuiltinFunction is that CreateBuiltinFunction would not set dllimport or dso_local.
To keep the current se
Set dso_local on builtin functions.
The difference between CreateRuntimeFunction and CreateBuiltinFunction is that CreateBuiltinFunction would not set dllimport or dso_local.
To keep the current semantics, just forward to CreateRuntimeFunction with Local=true so it doesn't add dllimport.
llvm-svn: 328224
show more ...
|
| #
6ab4ae41 |
| 21-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local on runtime variables.
llvm-svn: 328068
|
| #
f4ec803c |
| 20-Mar-2018 |
Rafael Espindola <[email protected]> |
Delete BuiltinCC. NFC.
It is always identical to RuntimeCC.
llvm-svn: 328050
|
| #
0d40f125 |
| 20-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local on string literals.
llvm-svn: 328040
|
| #
3c9be62d |
| 20-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local for runtime function.
This is another case where there is special logic for adding dllimport and so we cannot use setGVProperties.
llvm-svn: 328036
|
| #
dca06024 |
| 20-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local for CFConstantStringClassReference.
This one cannot use setGVProperties since it has special logic for when it is dllimport or not.
llvm-svn: 327993
|
| #
ca08d240 |
| 20-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local for guid decls.
llvm-svn: 327991
|
|
Revision tags: llvmorg-5.0.2-rc1 |
|
| #
28103258 |
| 16-Mar-2018 |
Reid Kleckner <[email protected]> |
[MS] Fix bug in r327732 with devirtualized complete destructor calls
llvm-svn: 327754
|
| #
fb93154b |
| 16-Mar-2018 |
Reid Kleckner <[email protected]> |
[MS] Don't escape MS C++ names with \01
It is not needed after LLVM r327734. Now it will be easier to copy-paste IR symbol names from Clang.
llvm-svn: 327738
|
| #
ae9b0701 |
| 16-Mar-2018 |
Reid Kleckner <[email protected]> |
[MS] Always use base dtors in place of complete/vbase dtors when possible
Summary: Previously we tried too hard to uphold the fiction that destructor variants work like they do on Itanium throughout
[MS] Always use base dtors in place of complete/vbase dtors when possible
Summary: Previously we tried too hard to uphold the fiction that destructor variants work like they do on Itanium throughout the ABI-neutral parts of clang. This lead to MS C++ ABI incompatiblities and other bugs. Now, -mconstructor-aliases will no longer control this ABI detail, and clang -cc1's LLVM IR output will be this much closer to the clang driver's.
Based on a patch by Zahira Ammarguellat: https://reviews.llvm.org/D39063
I've tried to move the logic that Zahira added into MicrosoftCXXABI.cpp. There is only one ABI-specific detail sticking out, and that is in CodeGenModule::getAddrOfCXXStructor, where we collapse complete dtors to base dtors in the MS ABI.
This fixes PR32990.
Reviewers: erichkeane, zahiraam, majnemer, rjmccall
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D44505
llvm-svn: 327732
show more ...
|
| #
4f4bf7c3 |
| 15-Mar-2018 |
Alexey Bataev <[email protected]> |
[OPENMP] Codegen for `omp declare target` construct.
Added initial codegen for device side of declarations inside `omp declare target` construct + codegen for implicit `declare target` functions, wh
[OPENMP] Codegen for `omp declare target` construct.
Added initial codegen for device side of declarations inside `omp declare target` construct + codegen for implicit `declare target` functions, which are used in the target regions.
llvm-svn: 327636
show more ...
|
| #
3f727a8f |
| 14-Mar-2018 |
Rafael Espindola <[email protected]> |
Set dso_local on external rtti GVs.
In this particular case it would be possible to just add an else with CGM.setDSOLocal(GV), but it seems better to have as many callers as possible just call setGV
Set dso_local on external rtti GVs.
In this particular case it would be possible to just add an else with CGM.setDSOLocal(GV), but it seems better to have as many callers as possible just call setGVProperties so that we can centralize the logic there.
This patch then makes setGVProperties able to handle null Decls.
llvm-svn: 327543
show more ...
|
|
Revision tags: llvmorg-6.0.0 |
|
| #
796d4a88 |
| 02-Mar-2018 |
Rafael Espindola <[email protected]> |
Always set dso_local in CodeGenModule::setDSOLocal.
This shouldn't change any results for now, but is more consistent with how we set dllimport/dllexport and will make future changes easier.
Since
Always set dso_local in CodeGenModule::setDSOLocal.
This shouldn't change any results for now, but is more consistent with how we set dllimport/dllexport and will make future changes easier.
Since clang produces IR as it parses, it can find out mid file that something is dllimport. When that happens we have to drop dso_local. This is not a problem right now because CodeGenModule::setDSOLocal is called from relatively few places at the moment.
llvm-svn: 326527
show more ...
|
| #
00f70bd9 |
| 01-Mar-2018 |
George Burgess IV <[email protected]> |
Remove redundant casts. NFC
So I wrote a clang-tidy check to lint out redundant `isa`, `cast`, and `dyn_cast`s for fun. This is a portion of what it found for clang; I plan to do similar cleanups in
Remove redundant casts. NFC
So I wrote a clang-tidy check to lint out redundant `isa`, `cast`, and `dyn_cast`s for fun. This is a portion of what it found for clang; I plan to do similar cleanups in LLVM and other subprojects when I find time.
Because of the volume of changes, I explicitly avoided making any change that wasn't highly local and obviously correct to me (e.g. we still have a number of foo(cast<Bar>(baz)) that I didn't touch, since overloading is a thing and the cast<Bar> did actually change the type -- just up the class hierarchy).
I also tried to leave the types we were cast<>ing to somewhere nearby, in cases where it wasn't locally obvious what we were dealing with before.
llvm-svn: 326416
show more ...
|
| #
b7350046 |
| 01-Mar-2018 |
Rafael Espindola <[email protected]> |
Start setting dllimport/dllexport in setGVProperties.
This is the next step in setting dso_local for COFF.
The patches changes setGVProperties to first set dllimport/dllexport and changes a few cas
Start setting dllimport/dllexport in setGVProperties.
This is the next step in setting dso_local for COFF.
The patches changes setGVProperties to first set dllimport/dllexport and changes a few cases that were setting dllimport/dllexport manually. With this a few more GVs are marked dso_local.
llvm-svn: 326397
show more ...
|