aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add # of printed instructions statistic to both the SPARC and X86 LLC backends.Brian Gaeke2003-10-063-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8892 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid doing pointless work. Amazingly, this makes us go faster.Chris Lattner2003-10-062-8/+5
| | | | | | | | | | | Running the inliner on 252.eon used to take 48.4763s, now it takes 14.4148s. In release mode, it went from taking 25.8741s to taking 11.5712s. This also fixes a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8890 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the NamedRegionTimer classChris Lattner2003-10-061-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8889 91177308-0d34-0410-b5e6-96231b3b80d8
* All of our supported operating systems (so far) and FreeBSD technicallyBrian Gaeke2003-10-061-0/+1
| | | | | | | want you to include <sys/stat.h> for fstat(), struct stat, and friends. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8887 91177308-0d34-0410-b5e6-96231b3b80d8
* This changes the PromoteMemToReg function to create "pruned" SSA form, notChris Lattner2003-10-051-24/+109
| | | | | | | | | | | | | | | | | | | | | "minimal" SSA form (in other words, it doesn't insert dead PHIs). This speeds up the mem2reg pass very significantly because it doesn't have to do a lot of frivolous work in many common cases. In the 252.eon function I have been playing with, this doesn't even insert the 120 PHI nodes that it used to which were trivially dead (in the process of promoting 356 alloca instructions overall). This speeds up the mem2reg pass from 1.2459s to 0.1284s. More significantly, the DCE pass used to take 2.4138s to remove the 120 dead PHI nodes that mem2reg constructed, now it takes 0.0134s (which is the time to scan the function and decide that there is nothing dead). So overall, on this one function, we speed things up a total of 3.5179s, which is a 24.8x speedup! :) This change is tested by the Mem2Reg/2003-10-05-DeadPHIInsertion.ll test, which now passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8884 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the interface to PromoteMemToReg to also take a DominatorTreeChris Lattner2003-10-054-5/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8883 91177308-0d34-0410-b5e6-96231b3b80d8
* Speed up the mem2reg transform for allocas which are only read/written in a ↵Chris Lattner2003-10-051-5/+84
| | | | | | | | | | | | | | | | | | | | | | | | single basic block. This is amazingly common in code generated by the C/C++ front-ends. This change makes it not have to insert ANY phi nodes, whereas before it would insert a ton of dead ones which DCE would have to clean up. Thus, this fix improves compile-time performance of these trivial allocas in two ways: 1. It doesn't have to do the walking and book-keeping for renaming 2. It does not insert dead phi nodes for them which would have to subsequently be cleaned up. On my favorite testcase from 252.eon, this special case handles 305 out of 356 promoted allocas in the function. It speeds up the mem2reg pass from 7.5256s to 1.2505s. It inserts 677 fewer dead PHI nodes, which speeds up a subsequent -dce pass from 18.7524s to 2.4806s. There are still 120 trivially dead PHI nodes being inserted for variables used in multiple basic blocks, but they are not handled by this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8881 91177308-0d34-0410-b5e6-96231b3b80d8
* Move support/lib/Support back to lib/SupportChris Lattner2003-10-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8874 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the Invoke instruction by using the LowerInvoke passChris Lattner2003-10-051-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8872 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of hacking in custom support for Invoke/Unwind, use the LowerInvoke passChris Lattner2003-10-053-62/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8871 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of the LLVM->LLVM transform to support code generators whichChris Lattner2003-10-051-0/+74
| | | | | | | do not support stack unwinding yet git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8869 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify-cfg is really a function passChris Lattner2003-10-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8868 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more careful handling PHI nodes, which might be of potentially high degree.Chris Lattner2003-10-051-93/+80
| | | | | | | | This reduces the time to verify a function from eon with a large number of large PHI nodes from 22996s (6.38 hours) to 10.5499s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8866 91177308-0d34-0410-b5e6-96231b3b80d8
* The first PHI node may be null, scan for the first non-null oneChris Lattner2003-10-051-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8865 91177308-0d34-0410-b5e6-96231b3b80d8
* The VersionNumbers vector is only used during PHI placement. Turn it into ↵Chris Lattner2003-10-051-10/+6
| | | | | | an argument, allowing us to get rid of the vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8864 91177308-0d34-0410-b5e6-96231b3b80d8
* * Update file header commentChris Lattner2003-10-051-44/+64
| | | | | | | | | | | | | | *** Revamp the code which handled unreachable code in the function. Now the code is much more efficient for high-degree basic blocks, such as those that occur in the 252.eon SPEC benchmark. For the interested, the time to promote a SINGLE alloca in _ZN7mrScene4ReadERSi function used to be > 3.5s. Now it is < .075s. The function has a LOT of allocas in it, so it appeared to be infinite looping, this should make it much nicer. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8863 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the loop a bitChris Lattner2003-10-051-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8862 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no need for separate WriteSets and PhiNodeBlocks lists. It is just aChris Lattner2003-10-051-18/+8
| | | | | | | | work-list of value definitions. This allows elimination of the explicit 'iterative' step of the algorithm, and also reuses temporary memory better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8861 91177308-0d34-0410-b5e6-96231b3b80d8
* The PhiNodes 2D vector is only used during PHI node placement. It doesn'tChris Lattner2003-10-051-11/+10
| | | | | | | need to be an instance variable! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8860 91177308-0d34-0410-b5e6-96231b3b80d8
* * Document instance vars betterChris Lattner2003-10-051-20/+26
| | | | | | | | * Fuse two parallel loops * Use a more specific type for AllocaLookup git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8859 91177308-0d34-0410-b5e6-96231b3b80d8
* Two small cleanups/speedups:Chris Lattner2003-10-051-29/+31
| | | | | | | | * Do not insert a new entry into NewPhiNodes during the rename pass if there are no PHIs in a block. * Do not compute WriteSets in parallel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8858 91177308-0d34-0410-b5e6-96231b3b80d8
* * Minor cleanupsChris Lattner2003-10-051-42/+28
| | | | | | | | | * Eliminate the KillList instance variable, instead, just delete loads and stores as they are "renamed", and delete allocas when they are done * Make the 'visited' set an instance variable to avoid passing it on the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8857 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple of minor code cleanups.Chris Lattner2003-10-052-42/+32
| | | | | | | Print literal doubles using ftostr instead of <<, because it yields higher precision numbers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8855 91177308-0d34-0410-b5e6-96231b3b80d8
* Type tables are now AbstractTypeUsers. This allows them to merge togetherChris Lattner2003-10-051-135/+217
| | | | | | | | | constants as necessary due to type resolution. With this change, the following spec benchmarks now link: 176.gcc, 177.mesa, 252.eon, 253.perlbmk, & 300.twolf. IOW, all SPEC INT and FP benchmarks now link. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8853 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename AbstractModuleProvider -> ModuleProvider, to match the header file name,Chris Lattner2003-10-043-10/+8
| | | | | | | | and because, while the class used by the interface is abstract, the actual concept is not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8850 91177308-0d34-0410-b5e6-96231b3b80d8
* Transform two methods to return pointers directly instead of returning themChris Lattner2003-10-043-66/+42
| | | | | | | as 'by reference' arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8849 91177308-0d34-0410-b5e6-96231b3b80d8
* Use V for values, not D.Chris Lattner2003-10-041-16/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8848 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not leak the ModuleProvider if releaseModule() throws.Chris Lattner2003-10-041-11/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8847 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor random speedup: make Constant::getNullValue only call ConstantFOO::getChris Lattner2003-10-031-13/+45
| | | | | | | once! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8845 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicit copy ctors are no longer neededChris Lattner2003-10-031-21/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8844 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupsChris Lattner2003-10-031-31/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8843 91177308-0d34-0410-b5e6-96231b3b80d8
* This checkin basically amounts to a complete rewrite of the type-resolutionChris Lattner2003-10-032-284/+138
| | | | | | | | | | | | | | | | | | | machinery. This dramatically simplifies how things works, removes irritating little corner cases, and overall improves speed and reliability. Highlights of this change are: 1. The exponential algorithm built into the code is now gone. For example the time to disassemble one bytecode file from the mesa benchmark went from taking 12.5s to taking 0.16s. 2. The linker bugs should be dramatically reduced. The one remaining bug has to do with constant handling, which I actually introduced in "union-find" checkins. 3. The code is much easier to follow, as a result of fewer special cases. It's probably also smaller. yaay. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8842 91177308-0d34-0410-b5e6-96231b3b80d8
* These methods are dead, remove them. Because the bodies will soon beChris Lattner2003-10-031-2/+8
| | | | | | | ressurected, just ifdef them out for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8840 91177308-0d34-0410-b5e6-96231b3b80d8
* Dramatically simplify DerivedType::refineAbstractTypeToInternalChris Lattner2003-10-031-44/+25
| | | | | | | | | This makes use of the new PATypeHolder's to keep types from being deleted prematurely, instead of the wierd "self reference" garbage. This is easier to understand and more efficient as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8834 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the PATypeHolder use a simple union-find implementation to handleChris Lattner2003-10-021-22/+30
| | | | | | | | merging of types. This makes it MUCH more efficient than before, also making things simpler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8833 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no need for BytecodeParser to be an AbstractTypeUser. Instead, itChris Lattner2003-10-022-28/+3
| | | | | | | can just use PATypeHolders git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8832 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no reason for Value to be an AbstractTypeUser. This just makes thingsChris Lattner2003-10-022-18/+2
| | | | | | | | significantly more complete. Instead, just make DerivedType's AbstractTypeUser's, and make Value contain a PATypeHolder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8828 91177308-0d34-0410-b5e6-96231b3b80d8
* The objects mapped are really PATypeHolders, not PATypeHandlesChris Lattner2003-10-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8822 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved enum and command-line option in separate file. Also added function ↵Alkis Evlogimenos2003-10-022-29/+37
| | | | | | that returns the user selected register allocator to the caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8819 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement InstCombine/add.ll:test17 & 18Chris Lattner2003-10-021-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8817 91177308-0d34-0410-b5e6-96231b3b80d8
* Change llc command line for register allocatorsAlkis Evlogimenos2003-10-021-6/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8815 91177308-0d34-0410-b5e6-96231b3b80d8
* Use std::string::size_type for for ColonPos to stop gcc from giving a warningAlkis Evlogimenos2003-10-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8811 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert previous change. For some reason this went into the main branchAlkis Evlogimenos2003-10-011-19/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8805 91177308-0d34-0410-b5e6-96231b3b80d8
* Added command line option for linear scan allocatorAlkis Evlogimenos2003-10-011-2/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8804 91177308-0d34-0410-b5e6-96231b3b80d8
* The comment seems irrelevant as the pass has become a BasicBlock pass.Misha Brukman2003-10-011-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8803 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to get the definition of getRegisterAllocatorChris Lattner2003-09-301-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8801 91177308-0d34-0410-b5e6-96231b3b80d8
* RegisterAllocation.h is going awayChris Lattner2003-09-301-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8795 91177308-0d34-0410-b5e6-96231b3b80d8
* include passes.h which defines the interface this file exposesChris Lattner2003-09-302-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8793 91177308-0d34-0410-b5e6-96231b3b80d8
* Standardize header file commentsChris Lattner2003-09-303-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
* Doxygen-ified comments.Misha Brukman2003-09-301-187/+147
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8778 91177308-0d34-0410-b5e6-96231b3b80d8