summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make -vectorize-... proper cc1 flags instead of abusing -backend-option. FixesNick Lewycky2013-06-251-0/+3
| | | | | | usage of clang as a library. llvm-svn: 184812
* Fix a leak of TargetMachine in clang. We'll continue to leak it on purpose ifNick Lewycky2013-06-211-0/+1
| | | | | | given -disable-free. (Reviewed by John McCall over IRC.) llvm-svn: 184595
* CodeGen: Don't set 'PMBuilder.DisableSimplifyLibCalls'Meador Inge2013-06-201-1/+0
| | | | | | | | | | The simplify-libcalls pass has been removed from LLVM. Thus 'PMBuilder.DisableSimplifyLibCalls' does not exist anymore. The disabling/enabling of library call simplifications is done through the TargetLibraryInfo which is already wired up in Clang. llvm-svn: 184458
* Plumb through the -fsplit-stack option using the existing backendEric Christopher2013-04-041-0/+1
| | | | | | | | | support. Caveat: Other than the existing segmented stacks support, no claims are made of this working. llvm-svn: 178744
* If we're unable to create the TargetMachine, then just quit producing theChad Rosier2013-03-271-1/+2
| | | | | | | backend output; there's no need to report a fatal error. This reverts r178042. Part of rdar://13295753 and rdar://13401547 llvm-svn: 178102
* Fix a crasher by reporting a fatal error if we're unable to create the targetChad Rosier2013-03-261-1/+1
| | | | | | | machine and one is required. Part of rdar://13295753 llvm-svn: 178042
* The flag "-coverage-function-names-in-data" is actually backwards -- we doNick Lewycky2013-03-201-2/+1
| | | | | | | | | | emit function names in .gcda files by default, and the flag turns that off! Rename the flag to make it match what it actually does. This keeps the default format compatible with gcc 4.2. Also add a test for this flag. llvm-svn: 177475
* Make clang emit linkage names in debug info for subprograms when coverage infoNick Lewycky2013-03-201-1/+2
| | | | | | | is enabled. Also add a new -test-coverage cc1 flag which makes testing coverage possible and add our first clang-side coverage test. llvm-svn: 177470
* Update GCOVProfiling pass creation for API change in r177002. No ↵Nick Lewycky2013-03-141-7/+12
| | | | | | functionality change. llvm-svn: 177004
* Fix build with clang, this was supposed to be part of r176617.Nick Lewycky2013-03-071-3/+3
| | | | llvm-svn: 176619
* Update clang for LLVM API change. No functionality change.Nick Lewycky2013-02-271-1/+2
| | | | llvm-svn: 176174
* [msan] Run more optimizations after MemorySanitizer pass.Evgeniy Stepanov2013-01-311-0/+12
| | | | | | | | | | | | MSan instrumentation is driven by the original code. We take every incoming instruction and emit another instruction (or ten) next to it, operating on the shadow values (but sometimes on the real values, too). Two programs in one, essentially. There can be any kinds of redundancies in the second one, so we just run whatever is normally run at -O2, and then exclude some passes that do not help much with benchmarks. llvm-svn: 174049
* Since ObjCARC has been refactored into its own library with its own ↵Michael Gottesman2013-01-281-0/+1
| | | | | | declaration header, we need to include the declaration header alongside Scalar.h in BackendUtil. llvm-svn: 173648
* 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
OpenPOWER on IntegriCloud