summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Turn copies into references as suggested by clang-tidy's ↵Benjamin Kramer2016-05-271-1/+1
| | | | | | performance-unnecessary-copy-initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270994 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fixed processing of '-fopenmp-version=' option and test.Alexey Bataev2016-05-271-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270962 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Add option '-fopenmp-version=[31|40|45]' allowing choosingAlexey Bataev2016-05-261-12/+17
| | | | | | | | | | OpenMP version. If '-fopenmp' option is provided '-fopenmp-version=' allows to control, which version of OpenMP must be supported. Currently it affects only the value of _OPENMP define. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270838 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Add support for -finline-functions and /Ob2 flagsHans Wennborg2016-05-241-2/+6
| | | | | | | | | | | | | | | | | | -finline-functions and /Ob2 are currently ignored by Clang. The only way to enable inlining is to use the global O flags, which also enable other options, or to emit LLVM bitcode using Clang, then running opt by hand with the inline pass. This patch allows to simply use the -finline-functions flag (same as GCC) or /Ob2 in clang-cl mode to enable inlining without other optimizations. This is the first patch of a serie to improve support for the /Ob flags. Patch by Rudy Pons <rudy.pons@ilod.org>! Differential Revision: http://reviews.llvm.org/D20576 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270609 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Add -fcuda-approx-transcendentals flag.Justin Lebar2016-05-231-0/+3
| | | | | | | | | | | | | | Summary: This lets us emit e.g. sin.approx.f32. See http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin Reviewers: rnk Subscribers: tra, cfe-commits Differential Revision: http://reviews.llvm.org/D20493 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270484 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Enable fusing FP ops (-ffp-contract=fast) for CUDA by default.Artem Belevich2016-05-191-4/+9
| | | | | | | | | This matches default nvcc behavior and gives substantial performance boost on GPU where fmad is much cheaper compared to add+mul. Differential Revision: http://reviews.llvm.org/D20341 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270094 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply^3 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-191-1/+2
| | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270021 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for MSVS default calling convention options (/Gd, /Gz, /Gv,Alexey Bataev2016-05-181-1/+43
| | | | | | | | | /Gr), by Alexander Makarov Patch for bug #27711 Differential Revision: http://reviews.llvm.org/D20171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269891 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Reapply^2 "[ProfileData] (clang) Use Error in InstrProf and ↵Vedant Kumar2016-05-161-2/+1
| | | | | | | | Coverage, NFC"" This reverts commit r269695. The llvm commit does not pass the MSVC bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269701 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply^2 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-161-1/+2
| | | | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". Differential Revision: http://reviews.llvm.org/D19902 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269695 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, ↵Chandler Carruth2016-05-141-2/+1
| | | | | | | | | | NFC"" This reverts commit r269492 as the corresponding LLVM commit was reverted due to lots of warnings. See the review thread for the original LLVM commit (r269491) for details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269549 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-131-1/+2
| | | | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". Differential Revision: http://reviews.llvm.org/D19902 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269492 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-131-2/+1
| | | | | | This reverts commit r269463. It fails two llvm-profdata tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269468 91177308-0d34-0410-b5e6-96231b3b80d8
* [ProfileData] (clang) Use Error in InstrProf and Coverage, NFCVedant Kumar2016-05-131-1/+2
| | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269463 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Add -fsanitize-undefined-strip-path-components=NFilipe Cabecinhas2016-05-121-0/+3
| | | | | | | | | | | | | | | | | | | Summary: This option allows the user to control how much of the file name is emitted by UBSan. Tuning this option allows one to save space in the resulting binary, which is helpful for restricted execution environments. With a positive N, UBSan skips the first N path components. With a negative N, UBSan only keeps the last N path components. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19666 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269309 91177308-0d34-0410-b5e6-96231b3b80d8
* Embed bitcode in object file (clang cc1 part)Steven Wu2016-05-111-0/+39
| | | | | | | | | | | | | | | | | | | Summary: Teach clang to embed bitcode inside bitcode. When -fembed-bitcode cc1 option is used, clang will embed both the input bitcode and cc1 commandline into the bitcode in special sections before compiling to the object file. Using -fembed-bitcode-marker will only introduce a marker in both sections. Depends on D17390 Reviewers: rsmith Subscribers: yaron.keren, vsk, cfe-commits Differential Revision: http://reviews.llvm.org/D17392 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269202 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: support -I=path for sysroot expansionSaleem Abdulrasool2016-05-061-2/+14
| | | | | | | | | | | | | | | | | | From the GCC manpage: -I dir ... If dir begins with =, then the = will be replaced by the sysroot prefix; see --sysroot and -isysroot. Add support to expand the `=` as a prefix of the include path with the sysroot if specified. `-isysroot` takes precedence over `--sysroot` as the normal argument behaviour occurs. The ordering of the `-isysroot` is relevant to the path substituted. If no `--sysroot=` or `-isysroot` option is present, the = is not expanded. Resolves PR26965! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268777 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add -mbackchain option.Marcin Koscielnicki2016-05-041-0/+2
| | | | | | | | | This option, like the corresponding gcc option, is SystemZ-specific and enables storing frame backchain links, as specified in the ABI. Differential Revision: http://reviews.llvm.org/D19891 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268575 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not disable completely loop unroll when optimizing for size.Marianne Mailhot-Sarrasin2016-05-041-1/+1
| | | | | | | | Let the loop unroll pass handle /Os. It already checks that option and adjust its thresholds accordingly. Also, will allow the #pragma unroll to have an effect in /Os. Differential Revision: http://reviews.llvm.org/D19827 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268509 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Add -malign-double supportReid Kleckner2016-05-041-0/+1
| | | | | | | | | | | | | | | | | The -malign-double flag causes i64 and f64 types to have alignment 8 instead of 4. On x86-64, the behavior of -malign-double is enabled by default. Rebases and cleans phosek's work here: http://reviews.llvm.org/D12860 Patch by Sean Klein Reviewers: rnk Subscribers: rnk, jfb, dschuff, phosek Differential Revision: http://reviews.llvm.org/D19734 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268473 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Copy host builtin types to NVPTXTargetInfo.Justin Lebar2016-04-291-0/+6
| | | | | | | | | | | | | | | | | Summary: Host and device types must match, otherwise when we pass values back and forth between the host and device, we will get the wrong result. This patch makes NVPTXTargetInfo inherit most of its type information from the host's target info. Reviewers: rsmith Subscribers: cfe-commits, jhen, tra Differential Revision: http://reviews.llvm.org/D19346 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268131 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r267784, r267824 and r267830.Peter Collingbourne2016-04-281-2/+1
| | | | | | I have updated the compiler-rt tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267903 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r267784, r267824 and r267830.Benjamin Kramer2016-04-281-1/+2
| | | | | | | | | | It makes compiler-rt tests fail if the gold plugin is enabled. Revert "Rework interface for bitset-using features to use a notion of LTO visibility." Revert "Driver: only produce CFI -fvisibility= error when compiling." Revert "clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267871 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework interface for bitset-using features to use a notion of LTO visibility.Peter Collingbourne2016-04-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitsets, and the compiler features they rely on (vtable opt, CFI), only have visibility within the LTO'd part of the linkage unit. Therefore, only enable these features for classes with hidden LTO visibility. This notion is based on object file visibility or (on Windows) dllimport/dllexport attributes. We provide the [[clang::lto_visibility_public]] attribute to override the compiler's LTO visibility inference in cases where the class is defined in the non-LTO'd part of the linkage unit, or where the ABI supports calling classes derived from abstract base classes with hidden visibility in other linkage units (e.g. COM on Windows). If the cross-DSO CFI mode is enabled, bitset checks are emitted even for classes with public LTO visibility, as that mode uses a separate mechanism to cause bitsets to be exported. This mechanism replaces the whole-program-vtables blacklist, so remove the -fwhole-program-vtables-blacklist flag. Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the support for the special attr:uuid blacklist entry is removed. Differential Revision: http://reviews.llvm.org/D18635 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267784 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the default C standard to C99 when targeting the PS4.Sunil Srivastava2016-04-271-3/+8
| | | | | | | | | Patch by Douglas Yung! Differential Revision: http://reviews.llvm.org/D19003 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267772 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add predefined macros.Yaxun Liu2016-04-261-3/+2
| | | | | | | | | | | | OpenCL spec requires __OPENCL_C_VERSION__ to be defined based on -cl-std option. This patch implements that. The patch also defines __FAST_RELAXED_MATH__ based on -cl-fast-relaxed-math option. Also fixed a test using -std=c99 for OpenCL program. Limit allowed language standard of OpenCL to be OpenCL standards. Differential Revision: http://reviews.llvm.org/D19071 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267590 91177308-0d34-0410-b5e6-96231b3b80d8
* Always have clang pass -pie-level and -pic-level values to the code generator.Wei Mi2016-04-081-7/+12
| | | | | | | | | Patch by tmsriram! Differential Revision: http://reviews.llvm.org/D18843 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265816 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EABIVersion from CodeGenOptions to TargetOptionsSaleem Abdulrasool2016-04-081-16/+17
| | | | | | | | | It is possible to argue that the EABIVersion field is similar in spirit to the ABI field in TargetOptions. It represents the embedded ABI that the target follows. This will allow us to thread this information into the target information construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265807 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace Sema-level implementation of -fassume-sane-operator-new with aRichard Smith2016-04-071-1/+1
| | | | | | | | | | | | | | | CodeGen-level implementation. Instead of adding an attribute to clang's FunctionDecl, add the IR attribute directly. This means a module built with this flag is now compatible with code built without it and vice versa. This change also results in the 'noalias' attribute no longer being added to calls to operator new in the IR; it's now only added to the declaration. It also fixes a bug where we failed to add the attribute to the 'nothrow' versions (because we didn't implicitly declare them, there was no good time to inject a fake attribute). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265728 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Set the default C standard to C99 when targeting the PS4."Sean Silva2016-04-061-8/+3
| | | | | | | | | | | | | | | | | This reverts r265359. It breaks - llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast - llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast Failing Tests (5): Clang :: FixIt/fixit-errors.c Clang :: Preprocessor/init.c Clang :: Sema/attr-deprecated.c Clang :: Sema/nullability.c Clang :: SemaObjC/objcbridge-attribute-arc.m git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265601 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Add -fcuda-flush-denormals-to-zero.Justin Lebar2016-04-051-0/+3
| | | | | | | | | | | | | | | | | | Summary: Setting this flag causes all functions are annotated with the "nvvm-f32ftz" = "true" attribute. In addition, we annotate the module with "nvvm-reflect-ftz" set to 0 or 1, depending on whether -cuda-flush-denormals-to-zero is set. This is read by the NVVMReflect pass. Reviewers: tra, rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265435 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fno-jump-tables and-fjump-tables flagsNirav Dave2016-04-051-0/+2
| | | | | | | | | | | | | Add no-jump-tables flag to disable use of jump tables when lowering switch statements Reviewers: echristo, hans Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18407 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265425 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the default C standard to C99 when targeting the PS4.Sunil Srivastava2016-04-041-3/+8
| | | | | | | | | Patch by Douglas Yung! Differential Revision: http://reviews.llvm.org/D18708 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265359 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Make unattributed constexpr functions implicitly host+device.Justin Lebar2016-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | With this patch, by a constexpr function is implicitly host+device unless: a) it's a variadic function (variadic functions are not allowed on the device side), or b) it's preceeded by a __device__ overload in a system header. The restriction on overloading __host__ __device__ functions on the basis of their CUDA attributes remains in place, but we use (b) to allow us to define __device__ overloads for constexpr functions in cmath, which would otherwise be __host__ __device__ and thus not overloadable. You can disable this behavior with -fno-cuda-host-device-constexpr. Reviewers: tra, rnk, rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18380 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264964 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Remove three obsolete CUDA cc1 flags.Justin Lebar2016-03-291-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: * -fcuda-target-overloads Previously unconditionally set to true by the driver. Necessary for correct functioning of the compiler -- our CUDA headers wrapper won't compile without this. * -fcuda-disable-target-call-checks Previously unconditionally set to true by the driver. Necessary to compile almost any external CUDA code -- almost all libraries assume that host+device code can call host or device functions. * -fcuda-allow-host-calls-from-host-device No effect when target overloading is enabled. Reviewers: tra Subscribers: rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D18416 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264739 91177308-0d34-0410-b5e6-96231b3b80d8
* The time when -faltivec (or, on clang only, -maltivec) will magicallyEric Christopher2016-03-241-4/+0
| | | | | | | | | include altivec.h has come and gone. Rationale: This causes modules, rewrite-includes, etc to be sad and people should just include altivec.h in their source. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264235 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Convert some ObjC msgSends to runtime calls."Pete Cooper2016-03-211-3/+0
| | | | | | | | | | | | | | This reverts commit r263607. This change caused more objc_retain/objc_release calls in the IR but those are then incorrectly optimized by the ARC optimizer. Work is going to have to be done to ensure the ARC optimizer doesn't optimize user written RR, but that should land before this change. This change will also need to be updated to take account for any changes required to ensure that user written calls to RR are distinct from those inserted by ARC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263984 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply [2] [VFS] Add 'overlay-relative' field to YAML filesBruno Cardoso Lopes2016-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies r261552 and r263748. Fixed testcase to reapply. The VFS overlay mapping between virtual paths and real paths is done through the 'external-contents' entries in YAML files, which contains hardcoded paths to the real files. When a module compilation crashes, headers are dumped into <name>.cache/vfs directory and are mapped via the <name>.cache/vfs/vfs.yaml. The script generated for reproduction uses -ivfsoverlay pointing to file to gather the mapping between virtual paths and files inside <name>.cache/vfs. Currently, we are only capable of reproducing such crashes in the same machine as they happen, because of the hardcoded paths in 'external-contents'. To be able to reproduce a crash in another machine, this patch introduces a new option in the VFS yaml file called 'overlay-relative'. When it's equal to 'true' it means that the provided path to the YAML file through the -ivfsoverlay option should also be used to prefix the final path for every 'external-contents'. Example, given the invocation snippet "... -ivfsoverlay <name>.cache/vfs/vfs.yaml" and the following entry in the yaml file: "overlay-relative": "true", "roots": [ ... "type": "directory", "name": "/usr/include", "contents": [ { "type": "file", "name": "stdio.h", "external-contents": "/usr/include/stdio.h" }, ... Here, a file manager request for virtual "/usr/include/stdio.h", that will map into real path "/<absolute_path_to>/<name>.cache/vfs/usr/include/stdio.h. This is a useful feature for debugging module crashes in machines other than the one where the error happened. Differential Revision: http://reviews.llvm.org/D17457 rdar://problem/24499339 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263893 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fnative-half-arguments-and-returnsPirama Arumuga Nainar2016-03-181-1/+6
| | | | | | | | | | | | | | | | | | Summary: r246764 handled __fp16 arguments and returns for AAPCS, but skipped this handling for OpenCL. Simlar to OpenCL, RenderScript also handles __fp16 type natively. This patch adds the -fnative-half-arguments-and-returns command line flag to allow such languages to skip this coercion of __fp16. Reviewers: srhines, olista01 Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18138 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263795 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Reapply [VFS] Add 'overlay-relative' field to YAML files"Bruno Cardoso Lopes2016-03-171-2/+2
| | | | | | | | | Tests failing on http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/46102 This reverts commit a1683cd6c9e07359c09f86e98a4db6b4e1bc51fc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263750 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply [VFS] Add 'overlay-relative' field to YAML filesBruno Cardoso Lopes2016-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapplies r261552. The VFS overlay mapping between virtual paths and real paths is done through the 'external-contents' entries in YAML files, which contains hardcoded paths to the real files. When a module compilation crashes, headers are dumped into <name>.cache/vfs directory and are mapped via the <name>.cache/vfs/vfs.yaml. The script generated for reproduction uses -ivfsoverlay pointing to file to gather the mapping between virtual paths and files inside <name>.cache/vfs. Currently, we are only capable of reproducing such crashes in the same machine as they happen, because of the hardcoded paths in 'external-contents'. To be able to reproduce a crash in another machine, this patch introduces a new option in the VFS yaml file called 'overlay-relative'. When it's equal to 'true' it means that the provided path to the YAML file through the -ivfsoverlay option should also be used to prefix the final path for every 'external-contents'. Example, given the invocation snippet "... -ivfsoverlay <name>.cache/vfs/vfs.yaml" and the following entry in the yaml file: "overlay-relative": "true", "roots": [ ... "type": "directory", "name": "/usr/include", "contents": [ { "type": "file", "name": "stdio.h", "external-contents": "/usr/include/stdio.h" }, ... Here, a file manager request for virtual "/usr/include/stdio.h", that will map into real path "/<absolute_path_to>/<name>.cache/vfs/usr/include/stdio.h. This is a useful feature for debugging module crashes in machines other than the one where the error happened. Differential Revision: http://reviews.llvm.org/D17457 rdar://problem/24499339 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263748 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some ObjC msgSends to runtime calls.Pete Cooper2016-03-161-0/+3
| | | | | | | | | | | | | | It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions. This patch adds support for converting messages to retain/release/alloc/autorelease to their equivalent runtime calls. Tests included for the positive case of applying this transformation, negative tests that we ensure we only convert "alloc" to objc_alloc, not "alloc2", and also a driver test to ensure we enable this only for supported runtime versions. Reviewed by John McCall. Differential Revision: http://reviews.llvm.org/D14737 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263607 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible for AST plugins to enable themselves by defaultJohn Brawn2016-03-151-10/+2
| | | | | | | | | | | | | Currently when an AST plugin is loaded it must then be enabled by passing -plugin pluginname or -add-plugin pluginname to the -cc1 command line. This patch adds a method to PluginASTAction which allows it to declare that the action happens before, instead of, or after the main AST action, plus the relevant changes to make the plugin action happen at that time automatically. Differential Revision: http://reviews.llvm.org/D17959 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263546 91177308-0d34-0410-b5e6-96231b3b80d8
* Restrict the hack from r263429 to asan and msan.Benjamin Kramer2016-03-151-2/+4
| | | | | | | The other sanitizers don't have backend passes that rely on value names. Avoid paying the compile time cost of names there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263541 91177308-0d34-0410-b5e6-96231b3b80d8
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-151-1/+1
| | | | | | | | | This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. (Recommit after fixing LLVM side to add back missed file) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263514 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[ThinLTO] Clang side of renaming of function index (NFC)"Teresa Johnson2016-03-141-1/+1
| | | | | | This reverts commit r263491. Missed a file on the LLVM side. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263494 91177308-0d34-0410-b5e6-96231b3b80d8
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-141-1/+1
| | | | | | | This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263491 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Replace offloading option that start with -o with -fo.Samuel Antao2016-03-141-2/+2
| | | | | | | | | | | | | | | Summary: The current offloading implementation is using -omptargets and -omp-host-ir-file-path options in the frontend. This causes the user a lot of trouble due to to the conflicts with the -o option. E.g. if the user misspells omptargets he will end up with a file with a weird name. This patches replaces these two options with -fomptargets and -fomp-host-ir-file-path to avoid these issues, and it is also more consistent with the other options like -fopenmp. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D18112 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263442 91177308-0d34-0410-b5e6-96231b3b80d8
* [Frontend] Disable value name discarding for all sanitizers.Benjamin Kramer2016-03-141-6/+7
| | | | | | | | ASan also relies on names on allocas and will emit unhelpful output if they're not present. Just force-enable value names for now. Should unbreak release builds of asan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263429 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily make discard value names depend on whether or not we'reEric Christopher2016-03-141-1/+6
| | | | | | | | | | trying to track origins in the memory sanitizer since the backend instrumentation pass currently takes names from the Instruction. Fixes all of the origin tracking tests in compiler-rt after the -discard-value-name option was added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263412 91177308-0d34-0410-b5e6-96231b3b80d8