summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes ↵Alexey Samsonov2013-01-201-7/+11
| | | | | | AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance. llvm-svn: 172974
* [ubsan] Add support for -fsanitize-blacklistWill Dietz2013-01-181-8/+8
| | | | llvm-svn: 172808
* Switch to asking the target machine to add any relevant analysis passsesChandler Carruth2013-01-071-19/+8
| | | | | | rather than doing it ourselves. This reflects the API changes in r171681. llvm-svn: 171683
* Companion patch to r171621 which changed the interface for creating TTIChandler Carruth2013-01-051-14/+10
| | | | | | passes to a create-pass function instead of a direct constructor call. llvm-svn: 171622
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-2/+2
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
* Re-sort #include lines using the llvm/utils/sort_includes.py script.Chandler Carruth2013-01-021-1/+1
| | | | | | | Removes a duplicate #include as well as cleaning up some sort order regressions since I last ran the script over Clang. llvm-svn: 171364
* Add proper support for -fsanitize-blacklist= flag for TSan and MSan. Clang part.Alexey Samsonov2012-12-281-4/+8
| | | | llvm-svn: 171184
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-241-1/+4
| | | | llvm-svn: 171020
* BackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"NAKAMURA Takumi2012-12-111-0/+1
| | | | | | llvm/Target/TargetMachine.h will not provide "llvm/TargetTransformInfo.h" any more. llvm-svn: 169816
* Specify if `-mno-red-zone' was used when creating the GCOV instrucmentation ↵Bill Wendling2012-12-101-1/+3
| | | | | | | | | pass. This prevents the functions generated by that pass from using the red zone. <rdar://problem/12843084> llvm-svn: 169755
* 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
OpenPOWER on IntegriCloud