#
835832d3 |
| 30-Mar-2017 |
Dean Michael Berris <dberris@google.com> |
[XRay] Add -fxray-{always,never}-instrument= flags to clang
Summary: The -fxray-always-instrument= and -fxray-never-instrument= flags take filenames that are used to imbue the XRay instrumentation a
[XRay] Add -fxray-{always,never}-instrument= flags to clang
Summary: The -fxray-always-instrument= and -fxray-never-instrument= flags take filenames that are used to imbue the XRay instrumentation attributes using a whitelist mechanism (similar to the sanitizer special cases list). We use the same syntax and semantics as the sanitizer blacklists files in the implementation.
As implemented, we respect the attributes that are already defined in the source file (i.e. those that have the [[clang::xray_{always,never}_instrument]] attributes) before applying the always/never instrument lists.
Reviewers: rsmith, chandlerc
Subscribers: jfb, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D30388
llvm-svn: 299041
show more ...
|
#
049a31d5 |
| 29-Mar-2017 |
Adam Nemet <anemet@apple.com> |
Use FPContractModeKind universally
FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the fr
Use FPContractModeKind universally
FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the front-end:
* In FPOptions (i.e. in the Sema + in the expression nodes). * In LangOpts::DefaultFPContractMode which is the option that initializes FPOptions in the Sema.
Another way to look at this change is that before fp-contractable on/off were the only states handled to the front-end: * For "on", FMA folding was performed by the front-end * For "fast", we simply forwarded the flag to TargetOptions to handle it in LLVM
Now off/on/fast are all exposed because for fast we will generate fast-math-flags during CodeGen.
This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721.
--- This is a recommit of r299027 with an adjustment to the test CodeGenCUDA/fp-contract.cu. The test assumed that even though -ffp-contract=on is passed FE-based folding of FMA won't happen.
This is obviously wrong since the user is asking for this explicitly with the option. CUDA is different that -ffp-contract=fast is on by default.
The test used to "work" because contract=fast and contract=on were maintained separately and we didn't fold in the FE because contract=fast was on due to the target-default. This patch consolidates the contract=on/fast/off state into a ternary state hence the change in behavior. ---
Differential Revision: https://reviews.llvm.org/D31167
llvm-svn: 299033
show more ...
|
#
e940f358 |
| 29-Mar-2017 |
Adam Nemet <anemet@apple.com> |
Revert "Use FPContractModeKind universally"
This reverts commit r299027.
It's causing a test failure in clang's CodeGenCUDE/fp-contract.cu
llvm-svn: 299029
|
#
32093a1c |
| 29-Mar-2017 |
Adam Nemet <anemet@apple.com> |
Use FPContractModeKind universally
FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the fr
Use FPContractModeKind universally
FPContractModeKind is the codegen option flag which is already ternary (off, on, fast). This makes it universally the type for the contractable info across the front-end:
* In FPOptions (i.e. in the Sema + in the expression nodes). * In LangOpts::DefaultFPContractMode which is the option that initializes FPOptions in the Sema.
Another way to look at this change is that before fp-contractable on/off were the only states handled to the front-end: * For "on", FMA folding was performed by the front-end * For "fast", we simply forwarded the flag to TargetOptions to handle it in LLVM
Now off/on/fast are all exposed because for fast we will generate fast-math-flags during CodeGen.
This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721.
Differential Revision: https://reviews.llvm.org/D31167
llvm-svn: 299027
show more ...
|
#
45c26ee0 |
| 27-Mar-2017 |
Egor Churaev <egor.churaev@gmail.com> |
[OpenCL] Extended mapping of parcing CodeGen arguments
Summary: Enable cl_mad_enamle and cl_no_signed_zeros options when user turns on cl_unsafe_math_optimizations or cl_fast_relaxed_math options.
[OpenCL] Extended mapping of parcing CodeGen arguments
Summary: Enable cl_mad_enamle and cl_no_signed_zeros options when user turns on cl_unsafe_math_optimizations or cl_fast_relaxed_math options.
Reviewers: Anastasia, cfe-commits
Reviewed By: Anastasia
Subscribers: bader, yaxunl
Differential Revision: https://reviews.llvm.org/D31324
llvm-svn: 298838
show more ...
|
#
671db702 |
| 24-Mar-2017 |
Anastasia Stulova <anastasia.stulova@arm.com> |
[OpenCL][Bug 10573] Don't set CXXOperatorNames flag
The flag CXXOperatorNames was overwritten unconditionally after being set for OpenCL.
There seems to be no necessity to set it, so removing the
[OpenCL][Bug 10573] Don't set CXXOperatorNames flag
The flag CXXOperatorNames was overwritten unconditionally after being set for OpenCL.
There seems to be no necessity to set it, so removing the line.
llvm-svn: 298709
show more ...
|
#
488d1dc0 |
| 23-Mar-2017 |
Teresa Johnson <tejohnson@google.com> |
[ThinLTO] Clang support for emitting minimized bitcode for thin link
Summary: Clang companion patch to LLVM patch D31027, which adds support for emitting minimized bitcode file for use in the thin l
[ThinLTO] Clang support for emitting minimized bitcode for thin link
Summary: Clang companion patch to LLVM patch D31027, which adds support for emitting minimized bitcode file for use in the thin link step. Add a cc1 option -fthin-link-bitcode=<file> to trigger this behavior.
Depends on D31027.
Reviewers: mehdi_amini, pcc
Subscribers: cfe-commits, Prazek
Differential Revision: https://reviews.llvm.org/D31050
llvm-svn: 298639
show more ...
|
#
758aad76 |
| 21-Mar-2017 |
Eric Christopher <echristo@gmail.com> |
Remove the -faltivec alias option and replace it with -maltivec everywhere. The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem wit
Remove the -faltivec alias option and replace it with -maltivec everywhere. The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem with -mno-altivec not turning off -maltivec.
Also add a diagnostic for faltivec/fno-altivec that directs users to use maltivec options and include the altivec.h file explicitly.
llvm-svn: 298449
show more ...
|
#
0ebdeac1 |
| 14-Mar-2017 |
Adrian Prantl <aprantl@apple.com> |
Canonicalize the path provided by -fmodules-cache-path.
This fixes lookup mismatches that could happen when the module cache path contained a '/./' component.
<rdar://problem/30413458>
Differentia
Canonicalize the path provided by -fmodules-cache-path.
This fixes lookup mismatches that could happen when the module cache path contained a '/./' component.
<rdar://problem/30413458>
Differential Revision: https://reviews.llvm.org/D30915
llvm-svn: 297790
show more ...
|
#
60fa2888 |
| 13-Mar-2017 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Modules: Use hash of PCM content for SIGNATURE
Change ASTFileSignature from a random 32-bit number to the hash of the PCM content.
- Move definition ASTFileSignature to Basic/Module.h so Module a
Modules: Use hash of PCM content for SIGNATURE
Change ASTFileSignature from a random 32-bit number to the hash of the PCM content.
- Move definition ASTFileSignature to Basic/Module.h so Module and ASTSourceDescriptor can use it.
- Change the signature from uint64_t to std::array<uint32_t,5>.
- Stop using (saving/reading) the size and modification time of PCM files when there is a valid SIGNATURE.
- Add UNHASHED_CONTROL_BLOCK, and use it to store the SIGNATURE record and other records that shouldn't affect the hash. Because implicit modules reuses the same file for multiple levels of -Werror, this includes DIAGNOSTIC_OPTIONS and DIAG_PRAGMA_MAPPINGS.
This helps to solve a PCH + implicit Modules dependency issue: PCH files are handled by the external build system, whereas implicit modules are handled by internal compiler build system. This prevents invalidating a PCH when the compiler overwrites a PCM file with the same content (modulo the diagnostic differences).
Design and original patch by Manman Ren!
llvm-svn: 297655
show more ...
|
#
5eb9c81d |
| 13-Mar-2017 |
Jonas Devlieghere <jonas@devlieghere.com> |
[Linker] Provide callback for internalization
Differential Revision: https://reviews.llvm.org/D30738
llvm-svn: 297649
|
#
e39fa57d |
| 13-Mar-2017 |
Alex Lorenz <arphaman@gmail.com> |
Add -iframeworkwithsysroot compiler option
This commit adds support for a new -iframeworkwithsysroot compiler option which allows the user to specify a framework path that can be prefixed with the s
Add -iframeworkwithsysroot compiler option
This commit adds support for a new -iframeworkwithsysroot compiler option which allows the user to specify a framework path that can be prefixed with the sysroot. This option is similar to the -iwithsysroot option that exists to supplement -isystem.
rdar://21316352
Differential Revision: https://reviews.llvm.org/D30183
llvm-svn: 297614
show more ...
|
#
3a36ac1a |
| 09-Mar-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -cc1 flag -ast-dump-all to perform an AST dump including entities that haven't yet been deserialized.
llvm-svn: 297412
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
18c12d53 |
| 01-Mar-2017 |
Paul Robinson <paul.robinson@sony.com> |
[PS4] Set our default dialect to C++11. NFC for other targets. Reapplies r296209 now that r296549 has fixed what really seems to be the last problematic test.
llvm-svn: 296554
|
#
7b5d910c |
| 27-Feb-2017 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add a cc1 flag for setting the existing Preprocessor option 'AllowPCHWithCompilerErrors'.
llvm-svn: 296306
|
#
40327852 |
| 25-Feb-2017 |
Paul Robinson <paul.robinson@sony.com> |
Revert r296209, still one more test to go.
llvm-svn: 296216
|
#
7c344cf2 |
| 25-Feb-2017 |
Paul Robinson <paul.robinson@sony.com> |
[PS4] Set our default dialect to C++11. NFC for other targets.
llvm-svn: 296209
|
#
222b30b9 |
| 14-Feb-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Stop asserting when a meaningless -std= flag is passed for a non-compilation input kind; go back to silently ignoring the flag.
llvm-svn: 295122
|
#
c91daf1c |
| 14-Feb-2017 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[Driver] Report available language standards on user error
In case user did not provide valid standard name for -std option, available values (with short description) will be reported.
Patch by Paw
[Driver] Report available language standards on user error
In case user did not provide valid standard name for -std option, available values (with short description) will be reported.
Patch by Paweł Żukowski!
llvm-svn: 295113
show more ...
|
#
546bc110 |
| 09-Feb-2017 |
Amjad Aboud <amjad.aboud@intel.com> |
[DebugInfo] Added support to Clang FE for generating debug info for preprocessor macros.
Added "-fdebug-macro" flag (and "-fno-debug-macro" flag) to enable (and to disable) emitting macro debug info
[DebugInfo] Added support to Clang FE for generating debug info for preprocessor macros.
Added "-fdebug-macro" flag (and "-fno-debug-macro" flag) to enable (and to disable) emitting macro debug info. Added CC1 "-debug-info-macro" flag that enables emitting macro debug info.
Differential Revision: https://reviews.llvm.org/D16135
llvm-svn: 294637
show more ...
|
Revision tags: llvmorg-4.0.0-rc2 |
|
#
0c86ccf4 |
| 31-Jan-2017 |
Nirav Dave <niravd@google.com> |
[X86] Teach Clang about -mfentry flag
Replace mcount calls with calls to fentry.
Reviewers: hfinkel, craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28001
[X86] Teach Clang about -mfentry flag
Replace mcount calls with calls to fentry.
Reviewers: hfinkel, craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28001
llvm-svn: 293649
show more ...
|
#
9ffe5a35 |
| 30-Jan-2017 |
David Blaikie <dblaikie@gmail.com> |
Prototype of modules codegen
First pass at generating weak definitions of inline functions from module files (& skipping (-O0) or emitting available_externally (optimizations) definitions where thos
Prototype of modules codegen
First pass at generating weak definitions of inline functions from module files (& skipping (-O0) or emitting available_externally (optimizations) definitions where those modules are used).
External functions defined in modules are emitted into the modular object file as well (this may turn an existing ODR violation (if that module were imported into multiple translations) into valid/linkable code).
Internal symbols (static functions, for example) are not correctly supported yet. The symbol will be produced, internal, in the modular object - unreferenceable from the users.
Reviewers: rsmith
Differential Revision: https://reviews.llvm.org/D28845
llvm-svn: 293456
show more ...
|
#
b080b630 |
| 25-Jan-2017 |
Justin Lebar <jlebar@google.com> |
[CodeGen] [CUDA] Add the ability set default attrs on functions in linked modules.
Summary: Now when you ask clang to link in a bitcode module, you can tell it to set attributes on that module's fun
[CodeGen] [CUDA] Add the ability set default attrs on functions in linked modules.
Summary: Now when you ask clang to link in a bitcode module, you can tell it to set attributes on that module's functions to match what we would have set if we'd emitted those functions ourselves.
This is particularly important for fast-math attributes in CUDA compilations.
Each CUDA compilation links in libdevice, a bitcode library provided by nvidia as part of the CUDA distribution. Without this patch, if we have a user-function F that is compiled with -ffast-math that calls a function G from libdevice, F will have the unsafe-fp-math=true (etc.) attributes, but G will have no attributes.
Since F calls G, the inliner will merge G's attributes into F's. It considers the lack of an unsafe-fp-math=true attribute on G to be tantamount to unsafe-fp-math=false, so it "merges" these by setting unsafe-fp-math=false on F.
This then continues up the call graph, until every function that (transitively) calls something in libdevice gets unsafe-fp-math=false set, thus disabling fastmath in almost all CUDA code.
Reviewers: echristo
Subscribers: hfinkel, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D28538
llvm-svn: 293097
show more ...
|
#
b3a70de7 |
| 19-Jan-2017 |
Dehao Chen <dehao@google.com> |
Add -fdebug-info-for-profiling to emit more debug info for sample pgo profile collection
Summary: SamplePGO uses profile with debug info to collect profile. Unlike the traditional debugging purpose,
Add -fdebug-info-for-profiling to emit more debug info for sample pgo profile collection
Summary: SamplePGO uses profile with debug info to collect profile. Unlike the traditional debugging purpose, sample pgo needs more accurate debug info to represent the profile. We add -femit-accurate-debug-info for this purpose. It can be combined with all debugging modes (-g, -gmlt, etc). It makes sure that the following pieces of info is always emitted:
* start line of all subprograms * linkage name of all subprograms * standalone subprograms (functions that has neither inlined nor been inlined)
The impact on speccpu2006 binary size (size increase comparing with -g0 binary, also includes data for -g binary, which does not change with this patch):
-gmlt(orig) -gmlt(patched) -g 433.milc 4.68% 5.40% 19.73% 444.namd 8.45% 8.93% 45.99% 447.dealII 97.43% 115.21% 374.89% 450.soplex 27.75% 31.88% 126.04% 453.povray 21.81% 26.16% 92.03% 470.lbm 0.60% 0.67% 1.96% 482.sphinx3 5.77% 6.47% 26.17% 400.perlbench 17.81% 19.43% 73.08% 401.bzip2 3.73% 3.92% 12.18% 403.gcc 31.75% 34.48% 122.75% 429.mcf 0.78% 0.88% 3.89% 445.gobmk 6.08% 7.92% 42.27% 456.hmmer 10.36% 11.25% 35.23% 458.sjeng 5.08% 5.42% 14.36% 462.libquantum 1.71% 1.96% 6.36% 464.h264ref 15.61% 16.56% 43.92% 471.omnetpp 11.93% 15.84% 60.09% 473.astar 3.11% 3.69% 14.18% 483.xalancbmk 56.29% 81.63% 353.22% geomean 15.60% 18.30% 57.81%
Debug info size change for -gmlt binary with this patch:
433.milc 13.46% 444.namd 5.35% 447.dealII 18.21% 450.soplex 14.68% 453.povray 19.65% 470.lbm 6.03% 482.sphinx3 11.21% 400.perlbench 8.91% 401.bzip2 4.41% 403.gcc 8.56% 429.mcf 8.24% 445.gobmk 29.47% 456.hmmer 8.19% 458.sjeng 6.05% 462.libquantum 11.23% 464.h264ref 5.93% 471.omnetpp 31.89% 473.astar 16.20% 483.xalancbmk 44.62% geomean 16.83%
Reviewers: davidxl, andreadb, rob.lougher, dblaikie, echristo
Reviewed By: dblaikie, echristo
Subscribers: hfinkel, rob.lougher, andreadb, gbedwell, cfe-commits, probinson, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25435
llvm-svn: 292458
show more ...
|
#
1e1475ac |
| 18-Jan-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Move vtable type metadata emission behind a cc1-level flag.
In ThinLTO mode, type metadata will require the module to be written as a multi-module bitcode file, which is currently incompatible with
Move vtable type metadata emission behind a cc1-level flag.
In ThinLTO mode, type metadata will require the module to be written as a multi-module bitcode file, which is currently incompatible with the Darwin linker. It is also useful to be able to enable or disable multi-module bitcode for testing purposes. This introduces a cc1-level flag, -f{,no-}lto-unit, which is used by the driver to enable multi-module bitcode on all but Darwin+ThinLTO, and can also be used to enable/disable the feature manually.
Differential Revision: https://reviews.llvm.org/D28877
llvm-svn: 292448
show more ...
|