summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-032-2/+2
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* Move EliminateDuplicatePHINodes() from SimplifyCFG.cpp to Local.cppJim Grosbach2009-12-022-63/+62
| | | | llvm-svn: 90324
* Cheap, mostly strict, stable sorting.Andreas Neustifter2009-12-021-0/+13
| | | | | | This is necessary for tests so the results are comparable. llvm-svn: 90320
* Cleanup/remove some parts of the lifetime region handling code in memdep and ↵Owen Anderson2009-12-021-8/+6
| | | | | | | | GVN, per Chris' comments. Adjust testcases to match. llvm-svn: 90304
* factor some code better.Chris Lattner2009-12-021-10/+10
| | | | llvm-svn: 90299
* formatting cleanups.Chris Lattner2009-12-021-20/+22
| | | | llvm-svn: 90298
* tidy up, remove dependence on order of evaluation of function args from ↵Chris Lattner2009-12-021-15/+12
| | | | | | EmitMemCpy. llvm-svn: 90297
* fix PR5640 by tracking whether a block is the header of a loop moreChris Lattner2009-12-011-3/+9
| | | | | | precisely, which prevents us from infinitely peeling the loop. llvm-svn: 90211
* Revert r90089 for now, it's breaking selfhost.Benjamin Kramer2009-11-291-3/+5
| | | | llvm-svn: 90097
* Fix two FIXMEs.Benjamin Kramer2009-11-291-5/+3
| | | | llvm-svn: 90089
* add testcases for the foo_with_overflow op xforms added recently andChris Lattner2009-11-291-12/+15
| | | | | | fix bugs exposed by the tests. Testcases from Alastair Lynn! llvm-svn: 90056
* Implement PR5634.Chris Lattner2009-11-291-10/+54
| | | | llvm-svn: 90046
* reenable load address insertion in load pre. This allows us toChris Lattner2009-11-281-11/+19
| | | | | | | | | | | | | handle cases like this: void test(int N, double* G) { long j; for (j = 1; j < N - 1; j++) G[j+1] = G[j] + G[j+1]; } where G[1] isn't live into the loop. llvm-svn: 90041
* Enhance InsertPHITranslatedPointer to be able to return a list of newlyChris Lattner2009-11-281-1/+3
| | | | | | inserted instructions. No functionality change until someone starts using it. llvm-svn: 90039
* disable value insertion for now, I need to figure out howChris Lattner2009-11-271-1/+7
| | | | | | | to inform GVN about the newly inserted values. This fixes PR5631. llvm-svn: 90022
* Rework InsertPHITranslatedPointer to handle the recursive case, this Chris Lattner2009-11-271-24/+14
| | | | | | | fixes PR5630 and sets the stage for the next phase of goodness (testcase pending). llvm-svn: 90019
* factor some logic out of instcombine into a new SimplifyAddInst method.Chris Lattner2009-11-271-11/+7
| | | | llvm-svn: 90011
* fix PR5436 by making the 'simple' case of SRoA not promote out of range Chris Lattner2009-11-271-8/+34
| | | | | | | | | | array indexes. The "complex" case of SRoA still handles them, and correctly. This fixes a weirdness where we'd correctly avoid transforming A[0][42] if the 42 was too large, but we'd only do it if it was one gep, not two separate ones. llvm-svn: 90007
* teach GVN's load PRE to insert computations of the address in predecessorsChris Lattner2009-11-271-18/+26
| | | | | | | where it is not available. It's unclear how to get this inserted computation into GVN's scalar availability sets, Owen, help? :) llvm-svn: 89997
* Fix phi translation in load PRE to agree with the phi Chris Lattner2009-11-271-2/+8
| | | | | | | translation done by memdep, and reenable gep translation again. llvm-svn: 89992
* factor some instcombine simplifications for getelementptr out to a new Chris Lattner2009-11-271-10/+9
| | | | | | SimplifyGEPInst method in InstructionSimplify.h. No functionality change. llvm-svn: 89980
* fix crash on Transforms/InstCombine/intrinsics.ll introduced by r89970 Chris Lattner2009-11-261-1/+4
| | | | llvm-svn: 89972
* Fix PR5471 by removing an instcombine xform. Some pieces of the codeChris Lattner2009-11-261-6/+0
| | | | | | | | generates store to undef and some generates store to null as the idiom for undefined behavior. Since simplifycfg zaps both, don't remove the undefined behavior in instcombine. llvm-svn: 89971
* implement a bunch of xforms for overflow intrinsics, based on a patchChris Lattner2009-11-261-0/+114
| | | | | | by Alastair Lynn. llvm-svn: 89970
* Reverting patch in revision 89758, initial attempt at fixing PR5373 has ↵Edward O'Callaghan2009-11-251-0/+1
| | | | | | proven to be bogus. llvm-svn: 89844
* Fix for PR5373, Credit to Jakub Staszak.Edward O'Callaghan2009-11-241-1/+0
| | | | llvm-svn: 89758
* Make ConstantFoldConstantExpression recursively visit the entireDan Gohman2009-11-231-0/+9
| | | | | | | | | | ConstantExpr, not just the top-level operator. This allows it to fold many more constants. Also, make GlobalOpt call ConstantFoldConstantExpression on GlobalVariable initializers. llvm-svn: 89659
* Fix a use of an invalidated iterator in the case where there are multipleDan Gohman2009-11-231-1/+5
| | | | | | adjacent uses of a dead basic block from the same user. This fixes PR5596. llvm-svn: 89658
* Pull LLVMContext out of PromoteMemToReg.Nick Lewycky2009-11-234-12/+8
| | | | llvm-svn: 89645
* Remove LLVMContext and its include.Nick Lewycky2009-11-231-7/+5
| | | | llvm-svn: 89644
* Remove unused LLVMContext.Nick Lewycky2009-11-231-5/+2
| | | | llvm-svn: 89642
* Reapply r88830 with a bugfix: this transform only applies to icmp eq/ne. ThisNick Lewycky2009-11-231-0/+30
| | | | | | fixes part of PR5438. llvm-svn: 89639
* Add more optimizations for object size checking, enable handling ofEric Christopher2009-11-211-35/+144
| | | | | | | object size intrinsic and verify return type is correct. Collect various code in one place. llvm-svn: 89523
* Make Loop::getLoopLatch() work on loops which don't have preheaders, asDan Gohman2009-11-201-1/+6
| | | | | | | | | | | | it may be used in contexts where preheader insertion may have failed due to an indirectbr. Make LoopSimplify's LoopSimplify::SeparateNestedLoop properly fail in the case that it would require splitting an indirectbr edge. These fix PR5502. llvm-svn: 89484
* Fix IPSCCP's code for deleting dead blocks to tolerate outstandingDan Gohman2009-11-201-2/+6
| | | | | | blockaddress users. This fixes PR5569. llvm-svn: 89483
* Revert "Add some rough optimizations for checking routines.", it buildeth not.Daniel Dunbar2009-11-201-119/+12
| | | | llvm-svn: 89482
* Add some rough optimizations for checking routines.Eric Christopher2009-11-201-12/+119
| | | | llvm-svn: 89479
* Fix PR5563, an expensive checks failure when running onDuncan Sands2009-11-201-1/+1
| | | | | | | | | | | | | tests/Transforms/InstCombine/shufflemask-undef.ll. If anyone cares, the use of 2*e here (and the equivalent all over the place in instcombine) seems wrong, though harmless: it should really be twice the length of the input vector. I think shufflevector used to require that the mask have the same length as the input, but I don't think that's true any more. I don't care enough about vectors to do anything about this... llvm-svn: 89456
* Extend CaptureTracking to indicate when a value is never stored, evenDan Gohman2009-11-191-2/+2
| | | | | | | | if it is not ultimately captured. Teach BasicAliasAnalysis that a local object address which does not escape and is never stored does not alias with a value resulting from a load. llvm-svn: 89398
* Enable hoisting of loads from constant memory by default. In cases whereDan Gohman2009-11-191-11/+1
| | | | | | | | they are lowered to instruction sequences more complex than a simple load, such that CodeGen cannot rematerialize them, a reload from a spill slot is likely to be cheaper than the complex sequence. llvm-svn: 89374
* Eliminate duplicate phi nodes in loops. Loop rotation, for example, can ↵Jim Grosbach2009-11-191-0/+6
| | | | | | introduce these, and it's beneficial to later passes to clean them up. llvm-svn: 89298
* Make EliminateDuplicatePHINodes() available as a utility functionJim Grosbach2009-11-191-1/+1
| | | | llvm-svn: 89297
* grammarJim Grosbach2009-11-171-2/+2
| | | | llvm-svn: 89145
* 80-column violationsJim Grosbach2009-11-171-8/+11
| | | | llvm-svn: 89123
* Generalize OptimizeLoopTermCond to optimize more loop terminating icmp to ↵Evan Cheng2009-11-171-87/+99
| | | | | | use postinc iv. llvm-svn: 89116
* Remove trailing whitespaceJim Grosbach2009-11-171-74/+74
| | | | llvm-svn: 89110
* Remove debug info attached with an instruction.Devang Patel2009-11-171-36/+18
| | | | llvm-svn: 89016
* Fix an expensive-checks error.David Greene2009-11-161-20/+24
| | | | | | | The Mask and LHSMask may not be of the same size, so don't do the transformation if they're different. llvm-svn: 88972
* CreateIntCast takes an "isSigned" parameter. Pass "true" for it, rather thanDuncan Sands2009-11-161-1/+3
| | | | | | a name. llvm-svn: 88908
* make PRE of loads preserve the alignment of the moved load instruction.Chris Lattner2009-11-151-5/+8
| | | | llvm-svn: 88865
OpenPOWER on IntegriCloud