summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Added LLVM copyright notice to Makefiles.John Criswell2003-10-207-0/+56
| | | | llvm-svn: 9312
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-2064-0/+448
| | | | | | Header files will be on the way. llvm-svn: 9298
* Reorder for minor efficiency gainChris Lattner2003-10-201-1/+1
| | | | llvm-svn: 9285
* Change the Opcode enum for PHI nodes from "Instruction::PHINode" to ↵Chris Lattner2003-10-194-7/+7
| | | | | | "Instruction::PHI" to be more consistent with the other instructions. llvm-svn: 9269
* Fix PR#50Chris Lattner2003-10-181-6/+6
| | | | llvm-svn: 9227
* ADd support for the new varargs instructionsChris Lattner2003-10-181-1/+2
| | | | llvm-svn: 9225
* Do not crash on empty structuresChris Lattner2003-10-171-0/+5
| | | | llvm-svn: 9195
* Add support for 'weak' linkage.Chris Lattner2003-10-161-5/+32
| | | | llvm-svn: 9171
* This code does not require random access use_listsChris Lattner2003-10-161-7/+2
| | | | llvm-svn: 9156
* Eliminate using declarationChris Lattner2003-10-161-29/+35
| | | | | | Rewrite code to work with use_lists what are either random access or bidirectional llvm-svn: 9155
* Decrease usage of use_size()Chris Lattner2003-10-155-18/+18
| | | | llvm-svn: 9135
* CleanupChris Lattner2003-10-151-5/+2
| | | | llvm-svn: 9133
* Do not move variable sized allocations to the top of the caller, which mightChris Lattner2003-10-141-7/+5
| | | | | | | | break dominance relationships, and is otherwise bad. This fixes bug: Inline/2003-10-13-AllocaDominanceProblem.ll. This also fixes miscompilation of 3 176.gcc source files (reload1.c, global.c, flow.c) llvm-svn: 9109
* Whoops, we inserted into the wrong set. What's up with the dead set anyway?Chris Lattner2003-10-131-4/+2
| | | | llvm-svn: 9094
* Use external df iterators to avoid revisiting blocks in functions withChris Lattner2003-10-131-1/+3
| | | | | | multiple setjmp calls. llvm-svn: 9093
* Wrap code at 80 columnsChris Lattner2003-10-131-6/+10
| | | | llvm-svn: 9073
* Regularize header file commentsChris Lattner2003-10-1313-35/+37
| | | | llvm-svn: 9071
* Regularize header file comment, eliminate using'sChris Lattner2003-10-131-22/+20
| | | | llvm-svn: 9069
* Minor cleanupsChris Lattner2003-10-131-5/+3
| | | | llvm-svn: 9067
* Checkin an improvement contributed by Bill:Chris Lattner2003-10-131-6/+30
| | | | | | | | | | | Only transform call sites in a setjmp'ing function which are reachable from the setjmp. If the call dominates the setjmp (for example), the called function cannot longjmp to the setjmp. This dramatically reduces the number of invoke instructions created in some large testcases. llvm-svn: 9066
* Add support to the loop canonicalization pass to make it transform loops toChris Lattner2003-10-131-21/+163
| | | | | | | | have a SINGLE backedge. This is useful to, for example, the -indvars pass. This implements testcase LoopSimplify/single-backedge.ll and closes PR#34 llvm-svn: 9065
* Rename loop preheaders pass to loop simplifyChris Lattner2003-10-124-5/+7
| | | | llvm-svn: 9061
* File is renamed to LoopSimplify.cppChris Lattner2003-10-121-1/+1
| | | | llvm-svn: 9059
* First step in renaming the preheaders pass to loopsimplifyChris Lattner2003-10-121-16/+21
| | | | llvm-svn: 9058
* The preheader insertion pass only depends on the CFG. Mark it as such, whichChris Lattner2003-10-121-1/+2
| | | | | | allows GCCAS to only run it once. llvm-svn: 9056
* Include <cstdio> instead of <stdio.h>.Brian Gaeke2003-10-101-1/+1
| | | | llvm-svn: 9032
* Don't include Config/stdio.h or <stdio.h>.Brian Gaeke2003-10-101-1/+0
| | | | llvm-svn: 9031
* Fix spelling.Misha Brukman2003-10-1023-48/+48
| | | | llvm-svn: 9027
* Fixing the spelling of this filename.Misha Brukman2003-10-101-669/+0
| | | | llvm-svn: 9009
* Update commentChris Lattner2003-10-081-2/+2
| | | | llvm-svn: 8965
* Use a set to keep track of which edges have been noticed as executable alreadyChris Lattner2003-10-081-15/+27
| | | | | | | to avoid reprocessing PHI nodes needlessly. This speeds up the big bad PHI testcase 43%: from 104.9826 to 73.5157s llvm-svn: 8964
* Minor fixes here and thereChris Lattner2003-10-081-22/+21
| | | | llvm-svn: 8963
* Avoid building data structures we don't really need. This improves the runtimeChris Lattner2003-10-081-10/+39
| | | | | | | | of a test that Bill Wendling sent me from 228.5s to 105s. Obviously there is more improvement to be had, but this is a nice speedup which should be "felt" by many programs. llvm-svn: 8962
* whoops, don't accidentally lose variable namesChris Lattner2003-10-071-1/+1
| | | | llvm-svn: 8955
* Fix bug: InstCombine/cast.ll:test11 / PR#7Chris Lattner2003-10-071-1/+23
| | | | llvm-svn: 8954
* Refactor code a bitChris Lattner2003-10-071-4/+12
| | | | llvm-svn: 8952
* Fix bugzilla bug #5Chris Lattner2003-10-071-1/+6
| | | | llvm-svn: 8930
* Bill contributed this major rewrite of the -lowerswitch pass to make it generateChris Lattner2003-10-071-44/+144
| | | | | | logarithmic conditional branch sequences instead of linear sequences. Thanks Bill! llvm-svn: 8928
* Fix bug in previous checkinChris Lattner2003-10-071-0/+1
| | | | llvm-svn: 8922
* Minor speedups for the instcombine passChris Lattner2003-10-061-17/+26
| | | | llvm-svn: 8894
* Speed up the predicate used to decide when to inline by caching the sizeChris Lattner2003-10-061-13/+28
| | | | | | | | | | | | | | | | of callees between executions. On eon, in release mode, this changes the inliner from taking 11.5712s to taking 2.2066s. In debug mode, it went from taking 14.4148s to taking 7.0745s. In release mode, this is a 24.7% speedup of gccas, in debug mode, it's a total speedup of 11.7%. This also makes it slightly more aggressive. This could be because we are not judging the size of the functions quite as accurately as before. When we start looking at the performance of the generated code, this can be investigated further. llvm-svn: 8893
* 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. llvm-svn: 8890
* 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. llvm-svn: 8884
* Change the interface to PromoteMemToReg to also take a DominatorTreeChris Lattner2003-10-054-5/+14
| | | | llvm-svn: 8883
* 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. llvm-svn: 8881
* Initial checkin of the LLVM->LLVM transform to support code generators whichChris Lattner2003-10-051-0/+74
| | | | | | do not support stack unwinding yet llvm-svn: 8869
* simplify-cfg is really a function passChris Lattner2003-10-051-1/+1
| | | | llvm-svn: 8868
* The first PHI node may be null, scan for the first non-null oneChris Lattner2003-10-051-1/+4
| | | | llvm-svn: 8865
* 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. llvm-svn: 8864
* * 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. :) llvm-svn: 8863
OpenPOWER on IntegriCloud