aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-121-1/+1
| | | | | | | | | | std::map<std::string, Value*> as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify code by using Value::takeNameChris Lattner2007-02-114-32/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34177 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code by using value::takenameChris Lattner2007-02-116-71/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34176 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify name juggling through the use of Value::takeName.Chris Lattner2007-02-116-34/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34175 91177308-0d34-0410-b5e6-96231b3b80d8
* Privatize StructLayout::MemberOffsets, adding an accessorChris Lattner2007-02-102-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Transforms/DeadArgElim/2007-02-07-FuncRename.ll, fallout from PR411.Chris Lattner2007-02-071-2/+4
| | | | | | | | | | This happened because deadargelim now causes VMCore to auto-rename every function that it hacks arguments out of. Because it hacks arguments out of functions in a non-deterministic order, this caused the resultant numbering to be nondet. The fix is to just be careful to not rename functions! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34005 91177308-0d34-0410-b5e6-96231b3b80d8
* shrink vmcore by moving symbol table stripping support out of VMCore intoChris Lattner2007-02-071-2/+23
| | | | | | | the one IPO pass that uses it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33990 91177308-0d34-0410-b5e6-96231b3b80d8
* redesign the primary datastructure used by mem2reg to eliminate anChris Lattner2007-02-071-103/+156
| | | | | | | std::map of std::vector's (ouch!). This speeds up mem2reg by 10% on 176.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33974 91177308-0d34-0410-b5e6-96231b3b80d8
* With the last change, we no longer need both directions of mapping fromChris Lattner2007-02-051-4/+8
| | | | | | | | | BBNumbers. Instead of using a bi-directional mapping, just use a single densemap. This speeds up mem2reg on 176.gcc by 8%, from 1.3489 to 1.2485s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33940 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-0546-97/+146
| | | | | | | | the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33939 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify use of DFBlocks, this makes no noticable performance difference,Chris Lattner2007-02-051-3/+3
| | | | | | | but paves the way to eliminate BBNumbers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33938 91177308-0d34-0410-b5e6-96231b3b80d8
* This file should have been removed when -raise was removed. It isn'tReid Spencer2007-02-051-134/+0
| | | | | | | used any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33937 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch InsertedPHINodes back to SmallPtrSet now that the SmallPtrSet::eraseChris Lattner2007-02-051-6/+6
| | | | | | | bug is fixed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33932 91177308-0d34-0410-b5e6-96231b3b80d8
* switch a SmallPtrSet back to an std::set for now, this caused problems.Chris Lattner2007-02-051-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33930 91177308-0d34-0410-b5e6-96231b3b80d8
* switch an std::set over to a SmallPtrSet, speeding up mem2reg 6% on 176.gcc.Chris Lattner2007-02-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33929 91177308-0d34-0410-b5e6-96231b3b80d8
* switch an std::set over to SmallPtrSet, speeding up mem2reg 3.4% on 176.gcc.Chris Lattner2007-02-051-16/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33928 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate some malloc traffic, this speeds up mem2reg by 3.4%.Chris Lattner2007-02-051-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33927 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing and needed #include.Reid Spencer2007-02-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33926 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the class VISIBILITY_HIDDEN.Reid Spencer2007-02-051-3/+3
| | | | | | | Reduce lexical size of the anonymous namespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33925 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-059-18/+18
| | | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-054-40/+58
| | | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-051-363/+0
| | | | | | | This pass is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33917 91177308-0d34-0410-b5e6-96231b3b80d8
* Create a pass to strip dead function declarations (prototypes). This isReid Spencer2007-02-051-0/+61
| | | | | | | for use by llvm-extract and bugpoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33916 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix miscompilations of consumer-typeset, telecomm-gsm, and 176.gcc.Chris Lattner2007-02-051-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33902 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1177:Reid Spencer2007-02-051-4/+4
| | | | | | | Revert last patch which caused iteration invalidation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33901 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a miscompilation of 176.gccChris Lattner2007-02-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33900 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DenseMap for pointer->pointer maps.Owen Anderson2007-02-051-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33897 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite shift/shift folding, now that types are not signed.Chris Lattner2007-02-051-74/+103
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33892 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indenting, remove tabs.Nick Lewycky2007-02-041-32/+90
| | | | | | | | | | | | | Learn from sext and zext. The destination value falls within the range of the source type. Generalize properties regarding constant ints. Get smarter about marking blocks as unreachable. If 1 >= 2 in order for this block to execute, then it isn't reachable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33889 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1163:Reid Spencer2007-02-044-1/+4
| | | | | | | | Make the Module's dependent library use a std::vector instead of SetVector adjust #includes in .cpp files because SetVector.h is no longer included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33855 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some dead codeChris Lattner2007-02-031-14/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33845 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1072:Reid Spencer2007-02-034-1544/+0
| | | | | | | | Removing -raise has neglible positive or negative side effects so we are opting to remove it. See the PR for comparison details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33844 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch inliner over to use DenseMap instead of std::map for ValueMap. ThisChris Lattner2007-02-038-38/+41
| | | | | | | speeds up the inliner 16%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33801 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch this back to using an std::map. DenseMap entries are getting invalidatedChris Lattner2007-02-021-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33799 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more malloc thrashing, this speeds up IPSCCP on kimwitu another 6.7%.Chris Lattner2007-02-021-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33796 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert an std::set to SmallSet, this speeds up IPSCCP 17% on kimwitu.Chris Lattner2007-02-021-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33794 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a malloc/free for (almost) every GEP processed. This speeds upChris Lattner2007-02-021-2/+3
| | | | | | | IPSCCP 3.3% on kimwitu. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33793 91177308-0d34-0410-b5e6-96231b3b80d8
* switch hash_map's over to DenseMap in SCCP. This speeds up SCCP by 30% inChris Lattner2007-02-021-19/+21
| | | | | | | a release-assert build on kimwitu++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33792 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code and fix indentation per Chris' review comments.Reid Spencer2007-02-021-31/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33785 91177308-0d34-0410-b5e6-96231b3b80d8
* Use short form of binary operator create functions.Reid Spencer2007-02-022-25/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33783 91177308-0d34-0410-b5e6-96231b3b80d8
* bugfix for reid's shift patch.Chris Lattner2007-02-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33779 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-026-155/+169
| | | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Transforms/InstCombine/2007-02-01-LoadSinkAlloca.ll, a serious codeChris Lattner2007-02-011-0/+24
| | | | | | | | pessimization where instcombine can sink a load (good for code size) that prevents an alloca from being promoted by mem2reg (bad for everything). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33771 91177308-0d34-0410-b5e6-96231b3b80d8
* Ensure that ConvertOperandToType generates a result conversion byReid Spencer2007-02-011-1/+3
| | | | | | | | initializing the Res variable to 0 and asserting it is not zero after the result should have been created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33761 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bugs in the inliner having to do with single-entry phi nodes and valuemapChris Lattner2007-02-011-12/+12
| | | | | | | | | updating. These were exposed by Devang's recent passmgr changes (with non-default passorderings) because now the inliner can be interleved with the LCSSA pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33760 91177308-0d34-0410-b5e6-96231b3b80d8
* remove temporary vectors.Chris Lattner2007-01-313-13/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33715 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate temporary vectorsChris Lattner2007-01-311-16/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33713 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate temporary vectorsChris Lattner2007-01-312-12/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33712 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert another incorrectly applied chunk, which fixes ↵Chris Lattner2007-01-311-7/+0
| | | | | | InstCombine/vec_insert_to_shuffle.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33705 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate temporary vectorsChris Lattner2007-01-313-17/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33693 91177308-0d34-0410-b5e6-96231b3b80d8