summaryrefslogtreecommitdiff
path: root/lib/CodeGen/BackendUtil.cpp
Commit message (Collapse)AuthorAge
* Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier2012-11-09
| | | | | | | us from having to make any backend changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167623 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier2012-11-09
| | | | | | rdar://12340498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167619 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-05
| | | | | | | *Sanitizer to Sanitize* in preparation for later patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405 91177308-0d34-0410-b5e6-96231b3b80d8
* Clang now attempts to create a TargetMachine whenever a triple is given.Nadav Rotem2012-10-24
| | | | | | | | | | Many of our tests specify triples that are not built into clang. In this commit we allow clang to fail loading the triple if we are only using clang to emit llvm ir. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166543 91177308-0d34-0410-b5e6-96231b3b80d8
* Change EmitAssemblyHelper to create the target machine earlyNadav Rotem2012-10-24
| | | | | | | | | | | and use it to initialize the TargetTransformInfo analysis pass. We need the TTI information for the loop vectorizer. rdar://12464901 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166532 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen: Initialize TargetLoweringInfo with a triple.Daniel Dunbar2012-10-19
| | | | | | | | - We create two TargetLoweringInfo instances for different pass managers, and they weren't consistent (the one for codegen didn't have the right info). I'm not sure this mattered anywhere in practice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166299 91177308-0d34-0410-b5e6-96231b3b80d8
* Reintroduce the TargetTransformInfo to the clang pass manager.Nadav Rotem2012-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166263 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert svn r165741 "Add TargetTransformInfo to the clang driver."Bob Wilson2012-10-18
| | | | | | | Nadav's llvm change r165665 caused problems with an LTO bootstrap of clang, so I'm reverting it for now, along with follow-on patches like this one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166164 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. ↵Kostya Serebryany2012-10-15
| | | | | | clang part: for FunctionPass we need to run asan at a different point, otherwise it will run before inlining git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165937 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetTransformInfo to the clang driver.Nadav Rotem2012-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165741 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetData to DataLayout.Micah Villmow2012-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165395 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Add support for the --param ssp-buffer-size= driver option.Chad Rosier2012-08-21
| | | | | | | PR9673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162285 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -ffp-contract = { fast | on | off } command line option support.Lang Hames2012-07-06
| | | | | | | | | | | | | | | | | | | This flag sets the 'fp-contract' mode, which controls the formation of fused floating point operations. Available modes are: - Fast: Form fused operations anywhere. - On: Form fused operations where allowed by FP_CONTRACT. This is the default mode. - Off: Don't form fused operations (in future this may be relaxed to forming fused operations where it can be proved that the result won't be affected). Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off' modes are equivalent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159794 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a -fuse-init-array option to cc1 and map to the UseInitArray targetRafael Espindola2012-06-19
| | | | | | | | | option. On the driver, check if we are using libraries from gcc 4.7 or newer and if so pass -fuse-init-array to the frontend. The crtbegin*.o files in gcc 4.7 no longer call the constructors listed in .ctors, so we have to use .init_array. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158694 91177308-0d34-0410-b5e6-96231b3b80d8
* wire -fbounds-checking to the new LLVM bounds checking passNuno Lopes2012-05-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157262 91177308-0d34-0410-b5e6-96231b3b80d8
* Use enum to set debug info size generated by ClangAlexey Samsonov2012-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155697 91177308-0d34-0410-b5e6-96231b3b80d8
* Wire up -fpie and -fPIE to LLVM's newly added TargetOptions. No testChandler Carruth2012-04-08
| | | | | | | | | | | case as we don't currently have any way of dumping target options or otherwise observing this. Another small step toward fixing PR12380. With this we generate TLS accesses using the static model instead of the dynamic model, but we're still generating suboptimal code under the mistaken assumption that the TLS offset might be greater than 2^32, and therefor not viable as an immediate offset of a segment register. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154298 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an oversight: don't run ARC optimization cleanup at -O0.Dan Gohman2012-04-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154052 91177308-0d34-0410-b5e6-96231b3b80d8
* use EP_OptimizerLast instead of EP_ScalarOptimizerLate for ThreadSanitizerKostya Serebryany2012-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153356 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a flag -fthread-sanitizer.Kostya Serebryany2012-03-01
| | | | | | | | | | | This flag enables ThreadSanitizer instrumentation committed to llvm as r150423. The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer. This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet committed and it's structure in compiler-rt is not 100% clear. The users manual wil be changed in a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151846 91177308-0d34-0410-b5e6-96231b3b80d8
* Allocate TargetLibraryInfo for the CodeGen passes. Otherwise, it's instantiatedChad Rosier2012-02-29
| | | | | | | | | | by the BAA pass, which uses the default TargetLibraryInfo constructor. Unfortunately, the default TargetLibraryInfo constructor assumes all library calls are available and thus ignores -fno-builtin. rdar://10947759 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151745 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent llvm.lifetime intrinsics from being emitted at -O0.Chad Rosier2012-02-25
| | | | | | | | rdar://10921594 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151430 91177308-0d34-0410-b5e6-96231b3b80d8
* Make use of const-correct ParseCommandLineOptionsDavid Blaikie2012-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150000 91177308-0d34-0410-b5e6-96231b3b80d8
* Reserve a moderate amount of space for the back-end arguments.Bill Wendling2012-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149973 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>Bob Wilson2012-02-03
| | | | | | | | | That llvm change removed the -trap-func backend option, so that using -ftrap-function with clang would cause the backend to complain. Fix it by adding the trap function name to the CodeGenOptions and passing it through to the TargetOptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149679 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -fno-optimize-sibling-calls. Currently only implemented in theNick Lewycky2012-01-23
| | | | | | | X86 backend in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148689 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the new ObjC ARC autorelease pool elimination pass.Dan Gohman2012-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148331 91177308-0d34-0410-b5e6-96231b3b80d8
* Per discussion on the list, remove BitcodeVerify pass to reimplement as a ↵Chad Rosier2011-12-14
| | | | | | free function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146530 91177308-0d34-0410-b5e6-96231b3b80d8
* Add frontend flags to enable bitcode verifier pass.Chad Rosier2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146441 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack realignment is a tristate. Add -mno-stackrealign to turn off all stackNick Lewycky2011-12-06
| | | | | | | realignment, even with locals with alignment exceeding the ABI guarantee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145909 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -mstack-alignment=X and fix -mstackrealign handling now that theJoerg Sonnenberger2011-12-05
| | | | | | | backend options are gone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145868 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for change to LLVM TargetMachine API in r145714.Nick Lewycky2011-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145715 91177308-0d34-0410-b5e6-96231b3b80d8
* make asan work at -O0, clang part. Patch by glider@google.comKostya Serebryany2011-11-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145531 91177308-0d34-0410-b5e6-96231b3b80d8
* implement __has_feature(address_sanitizer); also use ↵Kostya Serebryany2011-11-22
| | | | | | LangOpts.AddressSanitizer instead of CodeGenOpts.AddressSanitizer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -f[no-]address-sanitizer flagKostya Serebryany2011-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144800 91177308-0d34-0410-b5e6-96231b3b80d8
* Match LLVM API change.Evan Cheng2011-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144789 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn on the new .file directive when appropriate, instead of turning it off.Nick Lewycky2011-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143327 91177308-0d34-0410-b5e6-96231b3b80d8
* Wire up support for the controlling the extended dwarf .file directive. WithNick Lewycky2011-10-17
| | | | | | | | r142300 but not this patch, clang -S may emit .s files that assemblers other than llvm-mc can't parse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142301 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Add -mglobal-merge/-mno-global-merge machine options to ↵Chad Rosier2011-08-26
| | | | | | | | | enable/disable merging of globals during codegen. Fixes <rdar://problem/10017909>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138612 91177308-0d34-0410-b5e6-96231b3b80d8
* Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.Evan Cheng2011-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138451 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for LLVM change in PassManagerBuilder.Rafael Espindola2011-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136728 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak build after API change.Benjamin Kramer2011-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135585 91177308-0d34-0410-b5e6-96231b3b80d8
* Match createTargetMachine API change.Evan Cheng2011-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135469 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the ObjC ARC optimization passes manually, now that they're notDan Gohman2011-07-05
| | | | | | | hardwired into the default pass list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134445 91177308-0d34-0410-b5e6-96231b3b80d8
* createTargetMachine now takes a CPU string.Evan Cheng2011-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134128 91177308-0d34-0410-b5e6-96231b3b80d8
* SubtargetFeature.h has been moved to MC.Evan Cheng2011-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134050 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -Wa,--noexecstack when building from a non-assembly file. ForNick Lewycky2011-06-21
| | | | | | | | an assembly file it worked correctly, while for a .c file it would given an error about how --noexecstack is not a supported argument to -Wa. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133489 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for llvm api change.Rafael Espindola2011-05-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132034 91177308-0d34-0410-b5e6-96231b3b80d8