summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GlobalMerge.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move GlobalMerge from Transform to CodeGen.Jiangning Liu2014-06-131-362/+0
| | | | | | | | | | This patch is to move GlobalMerge pass from Transform/Scalar to CodeGen, because GlobalMerge depends on TargetMachine. In the mean time, the macro INITIALIZE_TM_PASS is also moved to CodeGen/Passes.h. With this fix we can avoid making libScalarOpts depend on libCodeGen. llvm-svn: 210951
* Create macro INITIALIZE_TM_PASS.Jiangning Liu2014-06-111-13/+2
| | | | | | | | Pass initialization requires to initialize TargetMachine for back-end specific passes. This commit creates a new macro INITIALIZE_TM_PASS to simplify this kind of initialization. llvm-svn: 210641
* Global merge for global symbols.Jiangning Liu2014-06-111-10/+71
| | | | | | | | This commit is to improve global merge pass and support global symbol merge. The global symbol merge is not enabled by default. For aarch64, we need some more back-end fix to make it really benifit ADRP CSE. llvm-svn: 210640
* Rename global-merge to enable-global-merge.Jiangning Liu2014-06-111-1/+1
| | | | llvm-svn: 210639
* We already have a reference to the TargetMachine, use that.Eric Christopher2014-06-101-2/+1
| | | | llvm-svn: 210580
* Revert "Implement global merge optimization for global variables."Rafael Espindola2014-05-161-75/+10
| | | | | | | | | | | | This reverts commit r208934. The patch depends on aliases to GEPs with non zero offsets. That is not supported and fairly broken. The good news is that GlobalAlias is being redesigned and will have support for offsets, so this patch should be a nice match for it. llvm-svn: 208978
* Implement global merge optimization for global variables.Jiangning Liu2014-05-151-10/+75
| | | | | | | | | | | This commit implements two command line switches -global-merge-on-external and -global-merge-aligned, and both of them are false by default, so this optimization is disabled by default for all targets. For ARM64, some back-end behaviors need to be tuned to get this optimization further enabled. llvm-svn: 208934
* [C++] Use 'nullptr'. Transforms edition.Craig Topper2014-04-251-2/+3
| | | | llvm-svn: 207196
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | | | | | | | | | | | | definition below all of the header #include lines, lib/Transforms/... edition. This one is tricky for two reasons. We again have a couple of passes that define something else before the includes as well. I've sunk their name macros with the DEBUG_TYPE. Also, InstCombine contains headers that need DEBUG_TYPE, so now those headers #define and #undef DEBUG_TYPE around their code, leaving them well formed modular headers. Fixing these headers was a large motivation for all of these changes, as "leaky" macros of this form are hard on the modules implementation. llvm-svn: 206844
* Fix typo in comment: "inwoke" -> "invoke"Mark Seaborn2014-03-131-1/+1
| | | | llvm-svn: 203739
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-051-5/+5
| | | | | | class. llvm-svn: 202953
* Now that we have C++11, turn simple functors into lambdas and remove a ton ↵Benjamin Kramer2014-03-011-14/+7
| | | | | | | | of boilerplate. No intended functionality change. llvm-svn: 202588
* Rename many DataLayout variables from TD to DL.Rafael Espindola2014-02-211-10/+10
| | | | | | | | | I am really sorry for the noise, but the current state where some parts of the code use TD (from the old name: TargetData) and other parts use DL makes it hard to write a patch that changes where those variables come from and how they are passed along. llvm-svn: 201827
* GlobalMerge: move "-global-merge" option to the pass itself.Tim Northover2014-02-181-0/+8
| | | | | | | It's rather odd to have the flag enabling and disabling this pass only affect a single target. llvm-svn: 201559
* Change tabs to spaces.Jakub Staszak2013-07-221-2/+2
| | | | llvm-svn: 186877
* Access the TargetLoweringInfo from the TargetMachine object instead of ↵Bill Wendling2013-06-191-7/+7
| | | | | | caching it. The TLI may change between functions. No functionality change. llvm-svn: 184352
* Clarify that llvm.used can contain aliases.Rafael Espindola2013-04-221-3/+2
| | | | | | | Also add a check for llvm.used in the verifier and simplify clients now that they can assume they have a ConstantArray. llvm-svn: 180019
* Update global merge pass according to Duncan's advices:Quentin Colombet2013-03-191-8/+7
| | | | | | | | - Remove useless includes - Change misleading comments - Move code into doFinalization llvm-svn: 177445
* Extend global merge pass to optionally consider global constant variables.Quentin Colombet2013-03-181-5/+78
| | | | | | Also add some checks to not merge globals used within landing pad instructions or marked as "used". llvm-svn: 177331
* Make the MergeGlobals pass correctly handle the address space qualifiers of ↵Silviu Baranga2013-01-071-11/+24
| | | | | | the global variables. We partition the set of globals by their address space, and apply the same the trasnformation as before to merge them. llvm-svn: 171730
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-9/+9
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Move TargetData to DataLayout.Micah Villmow2012-10-081-5/+5
| | | | llvm-svn: 165402
* Clean whitespaces.Nadav Rotem2012-07-241-3/+3
| | | | llvm-svn: 160668
* Fix various issues (or do cleanups) found by enabling certain MSVC warnings.Ahmed Charles2012-02-131-2/+2
| | | | | | | | | - Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default. - Remove misplaced llvm_unreachable. - Add static to a declaration of a function on MSVC x86 only. - Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable. llvm-svn: 150364
* Make GlobalMerge honor the preferred alignment on globals without an ↵Eli Friedman2011-11-301-1/+1
| | | | | | | | explicitly specified alignment. <rdar://problem/10497732>. llvm-svn: 145523
* svn mv Target/ARM/ARMGlobalMerge.cpp Transforms/Scalar/GlobalMerge.cppDevang Patel2011-10-171-0/+226
There is no reason to have simple IR level pass in lib/Target. llvm-svn: 142200
OpenPOWER on IntegriCloud