summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-1/+1
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Schedule discriminator pass.Diego Novillo2014-03-031-0/+8
| | | | | | | This needs to modify a line table test to account for the new lexical block created to hold the new discriminator value. llvm-svn: 202754
* [C++11] Add #include's for OwningPtr.Ahmed Charles2014-03-031-0/+1
| | | | | | Allows removing #include's in LLVM while switching to std::unique_ptr. llvm-svn: 202677
* Update for llvm api change.Rafael Espindola2014-02-251-3/+3
| | | | llvm-svn: 202170
* Accept -no-integrated-as in -cc1 and forward it to llvm.Rafael Espindola2014-02-211-0/+3
| | | | llvm-svn: 201837
* [asan] Remove -fsanitize-address-zero-base-shadow command lineEvgeniy Stepanov2014-01-161-4/+2
| | | | | | | | | | | | | | | | flag from clang, and disable zero-base shadow support on all platforms where it is not the default behavior. - It is completely unused, as far as we know. - It is ABI-incompatible with non-zero-base shadow, which means all objects in a process must be built with the same setting. Failing to do so results in a segmentation fault at runtime. - It introduces a backward dependency of compiler-rt on user code, which is uncommon and complicates testing. This is the Clang part of a larger change. llvm-svn: 199372
* [cleanup] Update the include of Dominators.h to reflect its move to theChandler Carruth2014-01-131-1/+1
| | | | | | IR library in LLVM r199082. llvm-svn: 199083
* [PM] Update Clang to reflect the new header for the bitcode writer passChandler Carruth2014-01-131-1/+1
| | | | | | added in LLVM r199078. llvm-svn: 199079
* [PM] Update the creation of an IR printing pass to reflect the APIChandler Carruth2014-01-121-1/+1
| | | | | | update in LLVM r199044. llvm-svn: 199045
* [PM] Update Clang to follow the header rename in LLVM r199041.Chandler Carruth2014-01-121-1/+1
| | | | llvm-svn: 199042
* Update Clang for the move of headers in r198688.Chandler Carruth2014-01-071-1/+1
| | | | llvm-svn: 198689
* Verify that clang TargetInfo descriptions match DataLayout strings from LLVMAlp Toker2014-01-021-3/+16
| | | | | | | The backend string is only verified when available as it's possible to run clang IRGen for targets that haven't been built or don't exist in LLVM. llvm-svn: 198309
* Bury leaked pointers in a global array to silence a leak detector in ↵Kostya Serebryany2013-12-271-1/+2
| | | | | | | | | | | | | | | | --disable-free mode Summary: This is an alternative to http://llvm-reviews.chandlerc.com/D2475 suggested by Chandler. Reviewers: chandlerc, rnk, dblaikie CC: cfe-commits, earthdok Differential Revision: http://llvm-reviews.chandlerc.com/D2478 llvm-svn: 198073
* Move the TargetMachine instance into EmitAssemblyHelperAlp Toker2013-12-201-19/+21
| | | | | | Cleanup in preparation for enhanced DataLayout checking. llvm-svn: 197832
* Add -freroll-loops to enable loop rerollingHal Finkel2013-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable loop rerolling as part of the optimization pass manager. This transformation can enable vectorization, reduce code size (or both). Briefly, loop rerolling can transform a loop like this: for (int i = 0; i < 3200; i += 5) { a[i] += alpha * b[i]; a[i + 1] += alpha * b[i + 1]; a[i + 2] += alpha * b[i + 2]; a[i + 3] += alpha * b[i + 3]; a[i + 4] += alpha * b[i + 4]; } into this: for (int i = 0; i < 3200; ++i) { a[i] += alpha * b[i]; } Loop rerolling is currently disabled by default at all optimization levels. llvm-svn: 194967
* Add -fprofile-sample-use to Clang's driver.Diego Novillo2013-11-131-0/+12
| | | | | | | | This adds a new option -fprofile-sample-use=filename to Clang. It tells the driver to schedule the SampleProfileLoader pass and passes on the name of the profile file to use. llvm-svn: 194567
* Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-insertedRichard Smith2013-10-221-1/+1
| | | | | | | | | | | | | | check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end check which inserts traps). Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce useful diagnostics and has false positives (PR17635), and is not a good compromise position between UBSan's checks and ASan's checks. Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical behavior for that flag. llvm-svn: 193205
* Add support for -fsanitize-blacklist and default blacklists for DFSan.Peter Collingbourne2013-08-141-1/+4
| | | | | | | | Also add some documentation. Differential Revision: http://llvm-reviews.chandlerc.com/D1346 llvm-svn: 188403
* DataFlowSanitizer; Clang changes.Peter Collingbourne2013-08-071-0/+12
| | | | | | | | | | | | | DataFlowSanitizer is a generalised dynamic data flow analysis. Unlike other Sanitizer tools, this tool is not designed to detect a specific class of bugs on its own. Instead, it provides a generic dynamic data flow analysis framework to be used by clients to help detect application-specific issues within their own code. Differential Revision: http://llvm-reviews.chandlerc.com/D966 llvm-svn: 187925
* Use function attributes to indicate if we don't want to realign the stack.Bill Wendling2013-08-011-1/+0
| | | | llvm-svn: 187617
* Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.Bill Wendling2013-07-251-3/+0
| | | | llvm-svn: 187092
* Use function attributes to pass along the stack protector buffer size ↵Bill Wendling2013-07-121-1/+0
| | | | | | instead of making it a target option. llvm-svn: 186218
* 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
OpenPOWER on IntegriCloud