summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-5/+5
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this ↵Alexey Samsonov2012-12-031-5/+11
| | | | | | flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object. llvm-svn: 169144
* Add -fsanitize=memory.Evgeniy Stepanov2012-12-031-0/+12
| | | | llvm-svn: 169124
* This patch exposes to Clang users three more sanitizers are experimental ↵Alexey Samsonov2012-11-291-8/+24
| | | | | | | | | | | | | | features of ASan: 1) init-order sanitizer: initialization-order checker. Status: usable, but may produce false positives w/o proper blacklisting. 2) use-after-return sanitizer Status: implemented, but heavily understed. Should be optional, as it significanlty slows program down. 3) use-after-scope sanitizer Status: in progress. llvm-svn: 168950
* [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), ↵Kostya Serebryany2012-11-281-1/+2
| | | | | | Clang part. llvm-svn: 168782
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-231-4/+2
| | | | llvm-svn: 168510
* Make -ffp-contract a codegen option, rather than a laguage option. This makesLang Hames2012-11-151-4/+4
| | | | | | | more sense anyway - it determines how expressions are codegen'd. It also ensures that -ffp-contract=fast has the intended effect when compiling LLVM IR. llvm-svn: 168027
* Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier2012-11-091-1/+0
| | | | | | us from having to make any backend changes. llvm-svn: 167623
* [driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier2012-11-091-0/+1
| | | | | | rdar://12340498 llvm-svn: 167619
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-051-2/+2
| | | | | | *Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
* Clang now attempts to create a TargetMachine whenever a triple is given.Nadav Rotem2012-10-241-8/+17
| | | | | | | | 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. llvm-svn: 166543
* Change EmitAssemblyHelper to create the target machine earlyNadav Rotem2012-10-241-17/+49
| | | | | | | | | and use it to initialize the TargetTransformInfo analysis pass. We need the TTI information for the loop vectorizer. rdar://12464901 llvm-svn: 166532
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-231-2/+2
| | | | llvm-svn: 166497
* IRgen: Initialize TargetLoweringInfo with a triple.Daniel Dunbar2012-10-191-1/+2
| | | | | | | | - 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. llvm-svn: 166299
* Reintroduce the TargetTransformInfo to the clang pass manager.Nadav Rotem2012-10-191-1/+5
| | | | llvm-svn: 166263
* Revert svn r165741 "Add TargetTransformInfo to the clang driver."Bob Wilson2012-10-181-5/+1
| | | | | | | 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. llvm-svn: 166164
* [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. ↵Kostya Serebryany2012-10-151-1/+1
| | | | | | clang part: for FunctionPass we need to run asan at a different point, otherwise it will run before inlining llvm-svn: 165937
* Add TargetTransformInfo to the clang driver.Nadav Rotem2012-10-111-1/+5
| | | | llvm-svn: 165741
* Move TargetData to DataLayout.Micah Villmow2012-10-081-4/+4
| | | | llvm-svn: 165395
* [driver] Add support for the --param ssp-buffer-size= driver option.Chad Rosier2012-08-211-0/+1
| | | | | | PR9673 llvm-svn: 162285
* Add -ffp-contract = { fast | on | off } command line option support.Lang Hames2012-07-061-0/+13
| | | | | | | | | | | | | | | | | 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. llvm-svn: 159794
* Add a -fuse-init-array option to cc1 and map to the UseInitArray targetRafael Espindola2012-06-191-0/+3
| | | | | | | | | 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. llvm-svn: 158694
* wire -fbounds-checking to the new LLVM bounds checking passNuno Lopes2012-05-221-0/+14
| | | | llvm-svn: 157262
* Use enum to set debug info size generated by ClangAlexey Samsonov2012-04-271-1/+1
| | | | llvm-svn: 155697
* Wire up -fpie and -fPIE to LLVM's newly added TargetOptions. No testChandler Carruth2012-04-081-0/+1
| | | | | | | | | | | 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. llvm-svn: 154298
* Fix an oversight: don't run ARC optimization cleanup at -O0.Dan Gohman2012-04-041-1/+2
| | | | llvm-svn: 154052
* use EP_OptimizerLast instead of EP_ScalarOptimizerLate for ThreadSanitizerKostya Serebryany2012-03-231-1/+1
| | | | llvm-svn: 153356
* Add a flag -fthread-sanitizer.Kostya Serebryany2012-03-011-1/+13
| | | | | | | | | | 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. llvm-svn: 151846
* Allocate TargetLibraryInfo for the CodeGen passes. Otherwise, it's instantiatedChad Rosier2012-02-291-0/+6
| | | | | | | | | 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 llvm-svn: 151745
* Prevent llvm.lifetime intrinsics from being emitted at -O0.Chad Rosier2012-02-251-1/+5
| | | | | | rdar://10921594 llvm-svn: 151430
* Make use of const-correct ParseCommandLineOptionsDavid Blaikie2012-02-071-3/+2
| | | | llvm-svn: 150000
* Reserve a moderate amount of space for the back-end arguments.Bill Wendling2012-02-071-0/+1
| | | | llvm-svn: 149973
* Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>Bob Wilson2012-02-031-0/+1
| | | | | | | | | 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. llvm-svn: 149679
* Add support for -fno-optimize-sibling-calls. Currently only implemented in theNick Lewycky2012-01-231-0/+1
| | | | | | X86 backend in LLVM. llvm-svn: 148689
* Enable the new ObjC ARC autorelease pool elimination pass.Dan Gohman2012-01-171-0/+7
| | | | llvm-svn: 148331
* Per discussion on the list, remove BitcodeVerify pass to reimplement as a ↵Chad Rosier2011-12-141-3/+0
| | | | | | free function. llvm-svn: 146530
* Add frontend flags to enable bitcode verifier pass.Chad Rosier2011-12-121-0/+3
| | | | llvm-svn: 146441
* Stack realignment is a tristate. Add -mno-stackrealign to turn off all stackNick Lewycky2011-12-061-5/+2
| | | | | | realignment, even with locals with alignment exceeding the ABI guarantee. llvm-svn: 145909
* Add -mstack-alignment=X and fix -mstackrealign handling now that theJoerg Sonnenberger2011-12-051-0/+5
| | | | | | backend options are gone. llvm-svn: 145868
* Update for change to LLVM TargetMachine API in r145714.Nick Lewycky2011-12-021-34/+37
| | | | llvm-svn: 145715
* make asan work at -O0, clang part. Patch by glider@google.comKostya Serebryany2011-11-301-0/+2
| | | | llvm-svn: 145531
* implement __has_feature(address_sanitizer); also use ↵Kostya Serebryany2011-11-221-1/+1
| | | | | | LangOpts.AddressSanitizer instead of CodeGenOpts.AddressSanitizer llvm-svn: 145054
* Add -f[no-]address-sanitizer flagKostya Serebryany2011-11-161-0/+10
| | | | llvm-svn: 144800
* Match LLVM API change.Evan Cheng2011-11-161-9/+10
| | | | llvm-svn: 144789
* Turn on the new .file directive when appropriate, instead of turning it off.Nick Lewycky2011-10-311-2/+2
| | | | llvm-svn: 143327
* Wire up support for the controlling the extended dwarf .file directive. WithNick Lewycky2011-10-171-0/+2
| | | | | | | r142300 but not this patch, clang -S may emit .s files that assemblers other than llvm-mc can't parse. llvm-svn: 142301
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-3/+4
| | | | llvm-svn: 140478
* [driver] Add -mglobal-merge/-mno-global-merge machine options to ↵Chad Rosier2011-08-261-0/+2
| | | | | | | | | enable/disable merging of globals during codegen. Fixes <rdar://problem/10017909>. llvm-svn: 138612
* Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.Evan Cheng2011-08-241-1/+1
| | | | llvm-svn: 138451
* Update for LLVM change in PassManagerBuilder.Rafael Espindola2011-08-021-1/+5
| | | | llvm-svn: 136728
OpenPOWER on IntegriCloud