summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-6/+6
| | | | | | | | | | | | | | | | | | | | | 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-12/+12
| | | | | | | | | | | | | | | | | 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
* Fix typo.Julien Lerouge2012-10-231-1/+1
| | | | llvm-svn: 166456
* Explain why DenseMap is still used here instead of MapVector.Julien Lerouge2012-10-231-1/+9
| | | | llvm-svn: 166454
* Iterating over a DenseMap<std::pair<BasicBlock*, unsigned>, PHINode*> is notJulien Lerouge2012-10-221-4/+4
| | | | | | | | | deterministic, replace it with a DenseMap<std::pair<unsigned, unsigned>, PHINode*> (we already have a map from BasicBlock to unsigned). <rdar://problem/12541389> llvm-svn: 166435
* The DIBuilder class is just a wrapper around debug info creationBill Wendling2012-06-291-1/+1
| | | | | | | (a.k.a. MDNodes). The module doesn't belong in Analysis. Move it to the VMCore instead. llvm-svn: 159414
* Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling2012-06-281-1/+1
| | | | | | | | | include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. llvm-svn: 159312
* Switch mem2reg to use the new hashing infrastructure.Chandler Carruth2012-03-051-1/+3
| | | | llvm-svn: 152026
* Fix 80-column violation.Chad Rosier2012-02-201-1/+2
| | | | llvm-svn: 150998
* Propagate TargetLibraryInfo throughout ConstantFolding.cpp and Chad Rosier2011-12-011-1/+1
| | | | | | | InstructionSimplify.cpp. Other fixups as needed. Part of rdar://10500969 llvm-svn: 145559
* Add comments and test for atomic load/store and mem2reg.Eli Friedman2011-08-151-0/+4
| | | | llvm-svn: 137690
* Move onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by otherNick Lewycky2011-06-271-16/+1
| | | | | | passes as well. llvm-svn: 133904
* When promoting an alloca to registers discard any lifetime intrinsics.Nick Lewycky2011-06-171-0/+59
| | | | llvm-svn: 133251
* Make LoadAndStorePromoter preserve debug info and create llvm.dbg.values whenCameron Zwarich2011-05-241-12/+0
| | | | | | promoting allocas to SSA variables. Fixes <rdar://problem/9479036>. llvm-svn: 131953
* Remove unused STL header includes.Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130068
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-211-1/+1
| | | | llvm-svn: 129932
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* Refactor into a separate utility function.Devang Patel2011-03-171-29/+14
| | | | llvm-svn: 127832
* Do not use DIFactory. Use DIBuilder.Devang Patel2011-02-241-6/+7
| | | | llvm-svn: 126398
* Convert two std::vectors to SmallVectors for a 3.4% speedup running -scalarreplCameron Zwarich2011-01-231-2/+2
| | | | | | on test-suite + SPEC2000 & SPEC2006. llvm-svn: 124068
* Convert a std::map to a DenseMap for another 1.7% speedup on -scalarrepl.Cameron Zwarich2011-01-181-3/+3
| | | | llvm-svn: 123732
* Make a std::vector a SmallVector<*, 32> like the other vectors in the sameCameron Zwarich2011-01-181-1/+1
| | | | | | | function. This seems to be about a 1.5% speedup of -scalarrepl on test-suite with SPEC2000 and SPEC2006. llvm-svn: 123731
* Remove outdated references to dominance frontiers.Cameron Zwarich2011-01-181-7/+7
| | | | llvm-svn: 123724
* Roll r123609 back in with two changes that fix test failures with expensiveCameron Zwarich2011-01-171-50/+119
| | | | | | | | | | | | | | checks enabled: 1) Use '<' to compare integers in a comparison function rather than '<='. 2) Use the uniqued set DefBlocks rather than Info.DefiningBlocks to initialize the priority queue. The speedup of scalarrepl on test-suite + SPEC2000 + SPEC2006 is a bit less, at just under 16% rather than 17%. llvm-svn: 123662
* Roll out r123609 due to failures on the llvm-x86_64-linux-checks bot.Cameron Zwarich2011-01-171-118/+49
| | | | llvm-svn: 123618
* Eliminate the use of dominance frontiers in PromoteMemToReg. In addition toCameron Zwarich2011-01-171-49/+118
| | | | | | | | | | | | | eliminating a potentially quadratic data structure, this also gives a 17% speedup when running -scalarrepl on test-suite + SPEC2000 + SPEC2006. My initial experiment gave a greater speedup around 25%, but I moved the dominator tree level computation from dominator tree construction to PromoteMemToReg. Since this approach to computing IDFs has a much lower overhead than the old code using precomputed DFs, it is worth looking at using this new code for the second scalarrepl pass as well. llvm-svn: 123609
* split dom frontier handling stuff out to its own DominanceFrontier header,Chris Lattner2011-01-021-1/+1
| | | | | | so that Dominators.h is *just* domtree. Also prune #includes a bit. llvm-svn: 122714
* Don't keep track of inserted phis in PromoteMemoryToRegister: the informationDuncan Sands2010-11-221-8/+3
| | | | | | is never used. Patch by Cameron Zwarich. llvm-svn: 119963
* Have a few places that want to simplify phi nodes use SimplifyInstructionDuncan Sands2010-11-161-3/+4
| | | | | | rather than calling hasConstantValue. No intended functionality change. llvm-svn: 119352
* remove some dead code.Chris Lattner2010-08-181-8/+0
| | | | llvm-svn: 111344
* Don't look up the "dbg" metadata kind by name.Dan Gohman2010-07-201-4/+5
| | | | llvm-svn: 108961
* cache result of operator*Gabor Greif2010-07-091-3/+5
| | | | llvm-svn: 107966
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-211-3/+2
| | | | | | SmallVector, and other SmallVector simplifications. llvm-svn: 106452
* Copy location info for current function argument from dbg.declare if ↵Devang Patel2010-06-041-4/+2
| | | | | | respective store instruction does not have any location info. llvm-svn: 105490
* Fix typo.Devang Patel2010-05-281-1/+1
| | | | llvm-svn: 104914
* Fix typo.Devang Patel2010-05-281-1/+1
| | | | llvm-svn: 104913
* Do not drop location info for inlined function args.Devang Patel2010-05-271-0/+5
| | | | llvm-svn: 104884
* Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!Douglas Gregor2010-05-111-1/+1
| | | | llvm-svn: 103457
* Wrap const MDNode * inside DIDescriptor.Devang Patel2010-05-071-1/+1
| | | | llvm-svn: 103295
* Use overloaded operators instead of DIDescriptor::getNode()Devang Patel2010-05-071-1/+1
| | | | llvm-svn: 103276
* rename use_const_iterator to const_use_iterator for consistency's sakeGabor Greif2010-03-251-1/+1
| | | | llvm-svn: 99564
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-6/+6
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* mem2reg erases the dbg.declare intrinsics that it converts to dbg.val intrinsicsVictor Hernandez2010-01-291-3/+13
| | | | llvm-svn: 94763
* some cleanups.Chris Lattner2010-01-271-14/+15
| | | | llvm-svn: 94649
* no need to check for nullChris Lattner2010-01-271-1/+1
| | | | llvm-svn: 94648
* When converting dbg.declare to dbg.value, attach promoted store's debug ↵Victor Hernandez2010-01-271-1/+4
| | | | | | metadata to dbg.value llvm-svn: 94634
* Switch AllocaDbgDeclares to SmallVector and don't leak DIFactoryVictor Hernandez2010-01-261-1/+4
| | | | llvm-svn: 94567
* In mem2reg, for all alloca/stores that get promoted where the alloca has an ↵Victor Hernandez2010-01-261-1/+52
| | | | | | associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store. llvm-svn: 94493
* Revert r94260 until findDbgDeclare() is made more efficientVictor Hernandez2010-01-251-38/+3
| | | | llvm-svn: 94432
* In mem2reg, for all alloca/stores that get promoted where the alloca has an ↵Victor Hernandez2010-01-231-3/+38
| | | | | | associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store llvm-svn: 94260
OpenPOWER on IntegriCloud