summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add a comment about why ScalarEvolution doesn't recognize non-loop PHIsDan Gohman2009-07-141-0/+4
| | | | | | even when they're obvious. llvm-svn: 75632
* ProfileInfo interface tweaks.Daniel Dunbar2009-07-141-6/+10
| | | | | | | | | | | | - Add getExecutionCount(const Function). - Add helper Edge type. - constify. - No functionality change. llvm-svn: 75623
* Introduce a new LoopInfo utility function makeLoopInvariant, whichDan Gohman2009-07-141-1/+62
| | | | | | | | | | | works similar to isLoopInvariant, except that it will do trivial hoisting to try to make the value loop invariant if it isn't already. This makes it easier for transformation passes to clear trivial instructions out of the way (the regular LICM pass doesn't run until relatively late). This is code factored out of LoopSimplify and other places. llvm-svn: 75578
* Add a newline, now that Value's operator<< doesn't print one.Dan Gohman2009-07-141-0/+1
| | | | llvm-svn: 75568
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-1/+1
| | | | llvm-svn: 75559
* Print a newline after printing a Value, now that Value's operator<<Dan Gohman2009-07-131-1/+1
| | | | | | doesn't print a newline. llvm-svn: 75543
* Fix a few assertion strings.Dan Gohman2009-07-131-2/+2
| | | | llvm-svn: 75530
* Forward-declare Loop and LoopInfo instead of #including LoopInfo.h.Dan Gohman2009-07-131-0/+7
| | | | llvm-svn: 75529
* Whitespace cleanups.Dan Gohman2009-07-131-5/+5
| | | | llvm-svn: 75525
* Fix an 80-column violation.Dan Gohman2009-07-131-4/+4
| | | | llvm-svn: 75524
* Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,Dan Gohman2009-07-131-0/+178
| | | | | | | | and related functions out of LoopBase and into Loop, since they are specific to BasicBlock-based loops. This also allows the code to be moved out-of-line. llvm-svn: 75523
* Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,Dan Gohman2009-07-131-1/+1
| | | | | | | | | | using the Curiously Recurring Template Pattern with LoopBase. This will help further refactoring, and future functionality for Loop. Also, Headers can now foward-declare Loop, instead of pulling in LoopInfo.h or doing tricks. llvm-svn: 75519
* Reapply 75252, with a fix to avoid the infinite recursion case. TheDan Gohman2009-07-131-114/+527
| | | | | | | check for avoiding re-analyzing a widening cast needed to happen earlier, as getSCEV itself may result in a isLoopGuardedByCond query. llvm-svn: 75511
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-3/+6
| | | | llvm-svn: 75497
* Move the memoization check for SCEVSignExtendExpr andDan Gohman2009-07-131-10/+22
| | | | | | | | SCEVZeroExtendExpr ahead of the most expensive analysis. This speeds up analysis and helps avoid pathologically bad behavior on the testcase in PR4534. llvm-svn: 75496
* Convert SCEV from FoldingSetNode to FastFoldingSetNode. This eliminatesDan Gohman2009-07-131-67/+33
| | | | | | | a bunch of redundent code in Profile methods, and prepares for upcoming changes to do improved memoization. llvm-svn: 75494
* factor the 'optimized sort' code out into a static helper functionChris Lattner2009-07-131-28/+38
| | | | | | and use it from one more place. Patch by Jakub Staszak! llvm-svn: 75478
* Move the re-sort of invalidated NonLocalPointerDeps cache earlierChris Lattner2009-07-131-14/+14
| | | | | | | | | | | so that all code paths get it. PR4256 was about a case where the phi translation loop would find all preds in the Visited cache, so it could get by without re-sorting the NonLocalPointerDeps cache. Fix this by resorting it earlier, there is no reason not to do this. This patch inspired by Jakub Staszak's patch. llvm-svn: 75476
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-133-7/+8
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* Revert r75252 which was causing some crashes at compile time.Nick Lewycky2009-07-111-521/+111
| | | | llvm-svn: 75384
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-117-24/+30
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-112-2/+4
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Remove ScalarEvolution::hasSCEV, which isn't being used, and whichDan Gohman2009-07-101-8/+2
| | | | | | breaks encapsulation. Also remove a dead prototype for setSCEV. llvm-svn: 75272
* Generalize ScalarEvolution's cast-folding code to support more kindsDan Gohman2009-07-101-111/+521
| | | | | | | of loops. Add several new functions to for working with ScalarEvolution's add-hoc value-range analysis functionality. llvm-svn: 75252
* Make the code that updates ScalarEvolution's internal state in responseDan Gohman2009-07-081-30/+70
| | | | | | | | | | | | to a loop deletion more thorough. Don't prune the def-use tree search at instructions that don't have SCEVs computed, because an instruction with a user that has a computed SCEV may itself lack a computed SCEV. Also, remove loop-related values from the ValuesAtScopes and ConstantEvolutionLoopExitValues maps as well. This fixes a regression in 483.xalancbmk. llvm-svn: 75030
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-24/+24
| | | | | | module is required. llvm-svn: 75025
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-2/+0
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-12/+12
| | | | llvm-svn: 74985
* Re-LLVMContext-ize DebugInfo, now with less breakage.Owen Anderson2009-07-071-58/+72
| | | | llvm-svn: 74920
* Change all SCEV* to SCEV *.Dan Gohman2009-07-074-256/+256
| | | | llvm-svn: 74918
* Revert part of r74873 that broke Clang's debug info generation.Owen Anderson2009-07-071-81/+57
| | | | llvm-svn: 74910
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-064-15/+15
| | | | llvm-svn: 74878
* Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's ↵Owen Anderson2009-07-066-97/+139
| | | | | | through the ValueTracking API. llvm-svn: 74873
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-063-121/+147
| | | | | | files. llvm-svn: 74844
* When comparing constants, consider a less wide constant to be "less complex"Nick Lewycky2009-07-041-0/+2
| | | | | | | than a wider one, before trying to compare their contents which will crash if their sizes are different. llvm-svn: 74792
* Minor improvement to the LDA debug output.Andreas Bolka2009-07-031-2/+7
| | | | llvm-svn: 74754
* Simplify debug info intrisinc lowering.Devang Patel2009-07-021-6/+0
| | | | llvm-svn: 74733
* Fix typo.Devang Patel2009-07-021-5/+5
| | | | | | Thanks Duncan! llvm-svn: 74706
* do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. ↵Chris Lattner2009-07-021-1/+4
| | | | | | | | | While we could do this, doing so requires adjusting the demanded mask and the code isn't doing that yet. This fixes PR4495 llvm-svn: 74699
OpenPOWER on IntegriCloud