summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
Commit message (Collapse)AuthorAgeFilesLines
* For PR1205:Reid Spencer2007-02-281-4/+5
| | | | | | | First round of ConstantRange changes. This makes all CR constructors use only APInt and not use ConstantInt. Clients are adjusted accordingly. llvm-svn: 34756
* Use efficient container SmallPtrSetDevang Patel2007-02-261-3/+4
| | | | llvm-svn: 34640
* Do not unswitch loop on same value again and again.Devang Patel2007-02-261-0/+7
| | | | llvm-svn: 34638
* Fix InstCombine/2007-02-23-PhiFoldInfLoop.ll and PR1217Chris Lattner2007-02-241-1/+2
| | | | llvm-svn: 34546
* convert more vectors to smallvectors, 2.8% speedupChris Lattner2007-02-151-3/+3
| | | | llvm-svn: 34333
* change some vectors to smallvectors. This speeds up instcombine on 447.dealIIChris Lattner2007-02-151-3/+3
| | | | | | by 5%. llvm-svn: 34332
* switch an std::set to a SmallPtr set, this speeds up instcombine by 9.5%Chris Lattner2007-02-151-3/+4
| | | | | | on 447.dealII llvm-svn: 34323
* For PR1195:Reid Spencer2007-02-152-10/+10
| | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
* Change an assert that mentions Packed Type -> Vector Type.Reid Spencer2007-02-151-1/+1
| | | | llvm-svn: 34298
* For PR1195:Reid Spencer2007-02-155-69/+69
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* Generalize TargetData strings, to support more interesting forms of data.Chris Lattner2007-02-141-12/+13
| | | | | | Patch by Scott Michel. llvm-svn: 34266
* Eliminate use of ctors that take vectors.Chris Lattner2007-02-133-7/+8
| | | | llvm-svn: 34219
* stop using methods that take vectors.Chris Lattner2007-02-123-9/+14
| | | | llvm-svn: 34205
* Simplify code by using value::takenameChris Lattner2007-02-116-71/+61
| | | | llvm-svn: 34176
* Privatize StructLayout::MemberOffsets, adding an accessorChris Lattner2007-02-102-2/+3
| | | | llvm-svn: 34156
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-0520-32/+52
| | | | | | | 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. llvm-svn: 33939
* For PR411:Reid Spencer2007-02-051-3/+3
| | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) llvm-svn: 33922
* Fix miscompilations of consumer-typeset, telecomm-gsm, and 176.gcc.Chris Lattner2007-02-051-6/+6
| | | | llvm-svn: 33902
* fix a miscompilation of 176.gccChris Lattner2007-02-051-2/+2
| | | | llvm-svn: 33900
* rewrite shift/shift folding, now that types are not signed.Chris Lattner2007-02-051-74/+103
| | | | llvm-svn: 33892
* 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. llvm-svn: 33889
* For PR1163:Reid Spencer2007-02-042-1/+2
| | | | | | | 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. llvm-svn: 33855
* remove some dead codeChris Lattner2007-02-031-14/+3
| | | | llvm-svn: 33845
* Switch inliner over to use DenseMap instead of std::map for ValueMap. ThisChris Lattner2007-02-032-13/+13
| | | | | | speeds up the inliner 16%. llvm-svn: 33801
* Switch this back to using an std::map. DenseMap entries are getting invalidatedChris Lattner2007-02-021-5/+5
| | | | llvm-svn: 33799
* Remove more malloc thrashing, this speeds up IPSCCP on kimwitu another 6.7%.Chris Lattner2007-02-021-10/+10
| | | | llvm-svn: 33796
* Convert an std::set to SmallSet, this speeds up IPSCCP 17% on kimwitu.Chris Lattner2007-02-021-5/+5
| | | | llvm-svn: 33794
* eliminate a malloc/free for (almost) every GEP processed. This speeds upChris Lattner2007-02-021-2/+3
| | | | | | IPSCCP 3.3% on kimwitu. llvm-svn: 33793
* 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++. llvm-svn: 33792
* Remove dead code and fix indentation per Chris' review comments.Reid Spencer2007-02-021-31/+12
| | | | llvm-svn: 33785
* Use short form of binary operator create functions.Reid Spencer2007-02-022-25/+25
| | | | llvm-svn: 33783
* bugfix for reid's shift patch.Chris Lattner2007-02-021-2/+2
| | | | llvm-svn: 33779
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-024-146/+164
| | | | | | | | | | | | 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. llvm-svn: 33776
* 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). llvm-svn: 33771
* remove temporary vectors.Chris Lattner2007-01-313-13/+9
| | | | llvm-svn: 33715
* Revert another incorrectly applied chunk, which fixes ↵Chris Lattner2007-01-311-7/+0
| | | | | | InstCombine/vec_insert_to_shuffle.ll llvm-svn: 33705
* eliminate temporary vectorsChris Lattner2007-01-312-8/+13
| | | | llvm-svn: 33693
* Move symbolic constant folding code to libanalysis.Chris Lattner2007-01-311-106/+0
| | | | llvm-svn: 33688
* Adjust #includes to match movement of constant folding code from ↵Chris Lattner2007-01-308-7/+10
| | | | | | transformutils to libanalysis. llvm-svn: 33680
* pass TD to constant folding apisChris Lattner2007-01-301-2/+2
| | | | llvm-svn: 33674
* use smallvector instead of vector to make constant folding a bit more efficientChris Lattner2007-01-301-2/+3
| | | | llvm-svn: 33672
* remove some bits that are not yet meant to land.Chris Lattner2007-01-301-57/+0
| | | | llvm-svn: 33666
* Symbolically evaluate constant expressions like &A[123] - &A[4].f.Chris Lattner2007-01-301-2/+143
| | | | | | | | | | | | | | | | | | | | | | | This occurs in C++ code like: #include <iostream> #include <iterator> int a[] = { 1, 2, 3, 4, 5 }; int main() { using namespace std; copy(a, a + sizeof(a)/sizeof(a[0]), ostream_iterator<int>(cout, "\n")); return 0; } Before we would decide the loop trip count is: sdiv (i32 sub (i32 ptrtoint (i32* getelementptr ([5 x i32]* @a, i32 0, i32 5) to i32), i32 ptrtoint ([5 x i32]* @a to i32)), i32 4) Now we decide it is "5". Amazing. This code will need to be refactored, but I'm doing that as a separate commit. llvm-svn: 33665
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-304-11/+11
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Simplify names of lattice values. SGTUNE becomes SGT, for example.Nick Lewycky2007-01-291-71/+127
| | | | | | | | | | | | | Fix initializeConstant, now initializeInt. Fixes major performance bottleneck. X == Y || X->DominatedBy(Y) is redundant. Remove the X == Y part. Fix crasher in makeEqual where getOrInsertNode would add a new constant, producing an NE relationship between the two members we're trying to make equal. This now allows us to mark more BBs as unreachable. llvm-svn: 33612
* Fix test/Transforms/InstCombine/2007-01-27-AndICmp.ll, a miscompilation ofChris Lattner2007-01-271-1/+2
| | | | | | Mozilla that Anton tracked down. llvm-svn: 33591
* Inherit BasicBlockPass directly from Pass.Devang Patel2007-01-251-1/+1
| | | | llvm-svn: 33511
* Cleanup checks in the load and store of casted pointer transforms. TwoReid Spencer2007-01-221-8/+7
| | | | | | | | changes: (1) don't special case for i1 any more, (2) use the new TargetData::getTypeSizeInBits method to ensure source and dest are the same bit width. llvm-svn: 33427
* For PR970:Reid Spencer2007-01-212-29/+25
| | | | | | | Clean up handling of isFloatingPoint() and dealing with PackedType. Patch by Gordon Henriksen! llvm-svn: 33415
* Revise the store V, (cast P) -> store (cast V) -> P transform.Reid Spencer2007-01-201-9/+4
| | | | | | | | | We only want to do this if the src and destination types have the same bit width. This patch uses TargetData::getTypeSizeInBits() instead of making a special case for integer types and avoiding the transform if they don't match. llvm-svn: 33414
OpenPOWER on IntegriCloud