summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Teach instcombine to respect and preserve inbounds. Add inboundsDan Gohman2009-07-281-1/+3
| | | | | | to a few tests where it is required for the expected transformation. llvm-svn: 77290
* Move ConstantStruct back to 2.5 API.Owen Anderson2009-07-271-20/+10
| | | | llvm-svn: 77266
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-271-6/+6
| | | | llvm-svn: 77247
* Fix wording in comments.Dan Gohman2009-07-271-1/+1
| | | | llvm-svn: 77193
* Remove Value::getName{Start,End}, the last of the old Name APIs.Daniel Dunbar2009-07-263-8/+9
| | | | llvm-svn: 77152
* Remove Value::getNameLenDaniel Dunbar2009-07-263-91/+50
| | | | llvm-svn: 77148
* SCEV objects are no longer reference-counted.Dan Gohman2009-07-251-3/+2
| | | | llvm-svn: 77080
* When attempting to sign-extend an addrec by interpretingDan Gohman2009-07-251-2/+2
| | | | | | | the step value as unsigned, the start value and the addrec itself still need to be treated as signed. llvm-svn: 77078
* Convert DOUT to DEBUG.Andreas Bolka2009-07-251-5/+5
| | | | llvm-svn: 77065
* Teach ScalarEvolution to make use of no-overflow flags whenDan Gohman2009-07-251-2/+37
| | | | | | analyzing add recurrences. llvm-svn: 77034
* Instead of eagerly creating new SCEVs to replace all SCEVs that areDan Gohman2009-07-251-103/+56
| | | | | | | | | | | | affected after a PHI node has been analyzed, just remove affected SCEVs from the Scalars map, so that they'll be (lazily) recreated as needed. This avoids creating SCEV objects that aren't actually needed. Also, rewrite the associated def-use walking code to be non-recursive and to continue traversing past Instructions that don't have an entry in the Scalars map. llvm-svn: 77032
* Make AliasAnalysis and related classes useDan Gohman2009-07-255-39/+43
| | | | | | getAnalysisIfAvailable<TargetData>(). llvm-svn: 77028
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-254-38/+38
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Forward-declare raw_ostream.Andreas Bolka2009-07-241-0/+2
| | | | llvm-svn: 77014
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-245-66/+66
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Move to raw_ostream.Daniel Dunbar2009-07-241-33/+34
| | | | llvm-svn: 76963
* Switch to getNameStr().Daniel Dunbar2009-07-241-6/+6
| | | | llvm-svn: 76962
* Fix whitespace.Dan Gohman2009-07-241-1/+1
| | | | llvm-svn: 76929
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-231-1/+1
| | | | | | | | | | | | - Yay for '-'s and simplifications! - I kept StringMap::GetOrCreateValue for compatibility purposes, this can eventually go away. Likewise the StringMapEntry Create functions still follow the old style. - NIFC. llvm-svn: 76888
* Cache dependence computation using FoldingSet.Andreas Bolka2009-07-231-23/+65
| | | | | | | | | This introduces an LDA-internal DependencePair class. The intention is, that this is a place where dependence testers can store various results such as SCEVs describing conflicting iterations, breaking conditions, distance/direction vectors, etc. llvm-svn: 76877
* Minor cosmetics: indentation, formatting, naming.Andreas Bolka2009-07-231-18/+18
| | | | llvm-svn: 76839
* Fix thinko.Devang Patel2009-07-221-1/+1
| | | | llvm-svn: 76769
* Add replaceAllUsesWith() to FE replace debug info constructs while building ↵Devang Patel2009-07-221-0/+12
| | | | | | complex types. llvm-svn: 76765
* Get rid of the Pass+Context magic.Owen Anderson2009-07-227-137/+140
| | | | llvm-svn: 76702
* Replace the original ad-hoc code for determining whether (v pred w) impliesDan Gohman2009-07-211-104/+197
| | | | | | | | (x pred y) with more thorough code that does more complete canonicalization before resorting to range checks. This helps it find more cases where the canonicalized expressions match. llvm-svn: 76671
* Rename getConstantInt{True|False} to get{True|False} at Chris' behest.Owen Anderson2009-07-211-1/+1
| | | | llvm-svn: 76598
* Make the range calculations for addrecs to be more conservative,Dan Gohman2009-07-211-3/+9
| | | | | | | as they aren't currently prepared to handle complicated overflow cases. llvm-svn: 76524
* Whitespace cleanups.Dan Gohman2009-07-211-3/+3
| | | | llvm-svn: 76523
* Minor code simplification.Dan Gohman2009-07-211-1/+1
| | | | llvm-svn: 76521
* Add a comment to clarify why there isn't any code in this spot.Dan Gohman2009-07-201-0/+2
| | | | llvm-svn: 76505
* Remove the code that tried to evaluate whether (A pred B) is knownDan Gohman2009-07-201-42/+0
| | | | | | | by determining if (B pred (B-A)) is known, as it doesn't handle overflow correctly. llvm-svn: 76504
* Minor code simplification.Dan Gohman2009-07-201-1/+1
| | | | llvm-svn: 76496
* The upper argument of ConstantRange is exclusive, not inclusive.Dan Gohman2009-07-201-1/+3
| | | | llvm-svn: 76492
* Update this comment.Dan Gohman2009-07-201-7/+5
| | | | llvm-svn: 76438
* Revert the addition of hasNoPointerOverflow to GEPOperator.Dan Gohman2009-07-202-16/+6
| | | | | | | | | | | | Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437
* Replace intersectWith with maximalIntersectWith. The latter guarantees thatNick Lewycky2009-07-181-5/+4
| | | | | | | | all values belonging to the intersection will belong to the resulting range. The former was inconsistent about that point (either way is fine, just pick one.) This is part of PR4545. llvm-svn: 76289
* Make BasicAliasAnalysis and Value::getUnderlyingObject useDan Gohman2009-07-171-4/+6
| | | | | | | | GEPOperator's hasNoPointer0verflow(), and make a few places in instcombine that create GEPs that may overflow clear the NoOverflow value. Among other things, this partially addresses PR2831. llvm-svn: 76252
* Add a new Operator class, for handling Instructions and ConstantExprsDan Gohman2009-07-172-22/+12
| | | | | | | | | in a convenient manner, factoring out some common code from InstructionCombining and ValueTracking. Move the contents of BinaryOperators.h into Operator.h and use Operator to generalize them to support ConstantExprs as well as Instructions. llvm-svn: 76232
* Replace isTrapping with a new, similar method called Eli Friedman2009-07-171-7/+2
| | | | | | | | | | isSafeToSpeculativelyExecute. The new method is a bit closer to what the callers actually care about in that it rejects more things callers don't want. It also adds more precise handling for integer division, and unifies code for analyzing the legality of a speculative load. llvm-svn: 76150
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-162-6/+10
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Fill in some holes in ScalarEvolution's loop iteration conditionDan Gohman2009-07-161-2/+27
| | | | | | | analysis. This allows indvars to emit a simpler loop trip count expression. llvm-svn: 76085
* Add an isLoopSimplifyForm() predicate, following the example ofDan Gohman2009-07-161-0/+24
| | | | | | | isLCSSAForm(), to test whether a loop is in the form guaranteed by the LoopSimplify pass. llvm-svn: 76077
* Lexically order files in CMakeLists.txt files.Ted Kremenek2009-07-151-2/+2
| | | | llvm-svn: 75831
* Make makeLoopInvariant report whether it made any changes or not,Dan Gohman2009-07-151-4/+7
| | | | | | and use this to simplify more code. llvm-svn: 75722
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-4/+5
| | | | llvm-svn: 75703
* Fix the expansion of umax and smax in the case where one or more ofDan Gohman2009-07-141-6/+26
| | | | | | | | the operands have pointer type, so that the resulting type matches the original SCEV type, and so that unnecessary ptrtoints are avoided in common cases. llvm-svn: 75680
* Update CMake file.Ted Kremenek2009-07-141-0/+1
| | | | llvm-svn: 75666
* Introduce a pointertracking pass.Torok Edwin2009-07-141-0/+261
| | | | | | | | For now this only computes the allocated size of the memory pointed to by a pointer, and offset a pointer from allocated pointer. The actual checkLimits part will come later, after another round of review. llvm-svn: 75657
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-148-24/+24
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Make SCEVCallbackVH::allUsesReplacedWith more thorough in removingDan Gohman2009-07-141-4/+8
| | | | | | users from the Scalars map. llvm-svn: 75634
OpenPOWER on IntegriCloud