summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Move the dominator verification code out of special code embedded withinDan Gohman2009-09-282-4/+33
| | | | | | | | | | | | the PassManager code into a regular verifyAnalysis method. Also, reorganize loop verification. Make the LoopPass infrastructure call verifyLoop as needed instead of having LoopInfo::verifyAnalysis check every loop in the function after each looop pass. Add a new command-line argument, -verify-loop-info, to enable the expensive full checking. llvm-svn: 82952
* Move this assert to check the condition as soon as it is known.Dan Gohman2009-09-281-1/+1
| | | | llvm-svn: 82951
* Extend the StartPassTimer and StopPassTimer functions so that theDan Gohman2009-09-282-6/+6
| | | | | | | | code that stops the timer doesn't have to search to find the timer object before it stops the timer. This avoids a lock acquisition and a few other things done with the timer running. llvm-svn: 82949
* Fix an old copy+pasto.Dan Gohman2009-09-271-1/+1
| | | | llvm-svn: 82947
* Extract the code for inserting a loop into the loop queue intoDan Gohman2009-09-271-3/+7
| | | | | | a separate function. llvm-svn: 82946
* When a loop is deleted, immediately release all of the activeDan Gohman2009-09-271-0/+9
| | | | | | | | LoopPasses for that loop. This avoids trouble with the PassManager trying to call verifyAnalysis on them, and frees up some memory sooner rather than later. llvm-svn: 82945
* Delete a bogus comment.Dan Gohman2009-09-271-1/+0
| | | | llvm-svn: 82908
* Fix SCEVExpander's canonical addrec expansion code to work on loops thatDan Gohman2009-09-271-19/+12
| | | | | | | | aren't in canonical loop-simplify form, since it doesn't itself depend on LoopSimplify. This means handling loops without preheaders and loops with multiple backedges. llvm-svn: 82905
* Instead of testing whether an instruction dominates the loop preheader,Dan Gohman2009-09-271-3/+3
| | | | | | | | | test whether it properly dominates the loop header. This is equivalent when the loop has a preheader, and has the advantage of working when the loop doesn't have a preheader. Since IVUsers doesn't Require LoopSimplify, the loop isn't guaranteed to have a preheader. llvm-svn: 82899
* Add a properlyDominates member function to ScalarEvolution.Dan Gohman2009-09-271-0/+22
| | | | llvm-svn: 82898
* Remove a redundant #include.Dan Gohman2009-09-271-1/+0
| | | | llvm-svn: 82897
* Fix a case where ScalarEvolution was expanding pointer arithmeticDan Gohman2009-09-261-3/+20
| | | | | | to inttoptr/ptrtoint unnecessarily. llvm-svn: 82864
* Handle sqrt in CannotBeNegativeZero. absf and abslDale Johannesen2009-09-251-3/+7
| | | | | | appear to be misspellings, removed in favor of fabs*. llvm-svn: 82796
* No need to verify that malloc's return type is i8*.Victor Hernandez2009-09-221-1/+1
| | | | llvm-svn: 82561
* Switch DIDescriptor to use a TrackingVH. - This makes it much safer to work ↵Daniel Dunbar2009-09-221-3/+12
| | | | | | with debug info, since it was extraordinarily easy to have dangling pointers thanks to MDNode uniquing. llvm-svn: 82507
* Revert r82404, it is causing a bootstrap miscompile. This is very very Chris Lattner2009-09-201-14/+1
| | | | | | scary, as it indicates a lurking bug. yay. llvm-svn: 82411
* improve memdep to eliminate bitcasts (and aliases, and noop geps) Chris Lattner2009-09-201-1/+14
| | | | | | | early for the stated reasons: this allows it to find more equivalences and depend less on code layout. llvm-svn: 82404
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-2/+2
| | | | llvm-svn: 82355
* Strip trailing whitespace.Daniel Dunbar2009-09-191-58/+58
| | | | llvm-svn: 82332
* Add a comment explaining why you would ever want to do this.Nick Lewycky2009-09-191-0/+3
| | | | llvm-svn: 82319
* Lett users of sparse propagation do their own thing with phi nodes if they wantNick Lewycky2009-09-191-0/+7
| | | | | | | to. This can be combined with LCSSA or SSI form to store more information on a PHINode than can be computed by looking at its incoming values. llvm-svn: 82317
* The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".Duncan Sands2009-09-191-1/+1
| | | | | | | It prints the content of all bbs, instead of printing empty bbs to make the CFG more readable. Fix this. Patch by Tobias Grosser. llvm-svn: 82315
* Enhance analysis passes so that they apply the same analysis to malloc calls ↵Victor Hernandez2009-09-185-12/+50
| | | | | | | | as to MallocInst. Reviewed by Eli Friedman. llvm-svn: 82281
* Update malloc call creation code (AllocType is now the element type of the ↵Victor Hernandez2009-09-181-41/+55
| | | | | | | | | | | | | | | | | | malloc, not the resulting type). In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants. Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array. Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type. Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls. Add verification for malloc calls. Reviewed by Dan Gohman. llvm-svn: 82257
* Add newlines.Nick Lewycky2009-09-181-2/+2
| | | | llvm-svn: 82206
* Teach ScalarEvolution how to reason about no-wrap flags on loopsDan Gohman2009-09-171-15/+37
| | | | | | | | where the induction variable has a non-unit stride, such as {0,+,2}, and there are expressions such as {1,+,2} inside the loop formed with or or add nsw operators. llvm-svn: 82151
* Provide a way to extract location info from DILocation.Devang Patel2009-09-161-0/+23
| | | | llvm-svn: 82064
* Reapplied r81355 with the problems fixed.Andreas Neustifter2009-09-162-10/+22
| | | | | | | (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086737.html and http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086746.html) llvm-svn: 82039
* simplify some codeChris Lattner2009-09-161-6/+5
| | | | llvm-svn: 81961
* Teach ValueTracking how to look through GlobalAliases. GlobalAliases areDan Gohman2009-09-151-0/+12
| | | | | | | not folded in the constant folder because the constant folder doesn't simplify ConstantExpr operands. llvm-svn: 81864
* add a new CallGraphNode::replaceCallEdge method and use it fromChris Lattner2009-09-151-0/+17
| | | | | | | | argpromote to avoid invalidating an iterator. This fixes PR4977. All clang tests now pass with expensive checking (on my system at least). llvm-svn: 81843
* make -debug-pass=Executions show information about what call graph nodesChris Lattner2009-09-151-1/+14
| | | | | | are in the SCC for each execution of a CGSCC pass. llvm-svn: 81838
* Bugfix. Sorry.Andreas Neustifter2009-09-111-1/+1
| | | | llvm-svn: 81517
* Make ProfileEstimator even more robust on general CFGs.Andreas Neustifter2009-09-112-55/+112
| | | | llvm-svn: 81516
* Teach lib/VMCore/ConstantFold.cpp how to set the inbounds keyword andDan Gohman2009-09-111-6/+2
| | | | | | | | | | | | | how to fold notionally-out-of-bounds array getelementptr indices instead of just doing these in lib/Analysis/ConstantFolding.cpp, because it can be done in a fairly general way without TargetData, and because not all constants are visited by lib/Analysis/ConstantFolding.cpp. This enables more constant folding. Also, set the "inbounds" flag when the getelementptr indices are one-past-the-end. llvm-svn: 81483
* Give these files top-level comments that describe the current code.Dan Gohman2009-09-101-3/+7
| | | | llvm-svn: 81473
* Fix uppercaseo.Dale Johannesen2009-09-101-1/+1
| | | | llvm-svn: 81463
* Fit code within 80 columnsVictor Hernandez2009-09-101-2/+4
| | | | llvm-svn: 81459
* Make ProfileEstimator more robust on general CFGs.Andreas Neustifter2009-09-102-44/+69
| | | | llvm-svn: 81450
* Add some braces to make newer GCCs happy and update CMakeLists.Benjamin Kramer2009-09-102-1/+2
| | | | llvm-svn: 81443
* Cleaned up code by factoring out common portions of edge loading into function.Andreas Neustifter2009-09-101-50/+44
| | | | llvm-svn: 81438
* Add malloc call utility functions. Patch by Victor Hernandez.Evan Cheng2009-09-101-0/+202
| | | | llvm-svn: 81426
* Reverted r81358.Andreas Neustifter2009-09-091-22/+27
| | | | llvm-svn: 81364
* Fix build, add missing simicolon.Benjamin Kramer2009-09-091-1/+1
| | | | llvm-svn: 81362
* Add the first functions for updating ProfileInfo.Andreas Neustifter2009-09-091-0/+83
| | | | llvm-svn: 81359
* Cleaned up code by factoring out common portions of edge loading into funcion.Andreas Neustifter2009-09-091-27/+22
| | | | llvm-svn: 81358
* revert r81335, which breaks the build.Chris Lattner2009-09-092-27/+9
| | | | llvm-svn: 81347
* Fixed wrong storage option for ProfileVerifierDisableAssertions.Andreas Neustifter2009-09-091-36/+107
| | | | | | | | | | Fixed non working -profile-verifier-noassert option. Fixed missing newline in debugEntry(). Cleaned up assert messages. (assert(0 && Message) is still shown, but the message is printed before.) When verifiying loaded profiles the ProfileVerifier got confused when block was a setjmp target, this is checked now. When verifiying loaded profiles the ProfileVerifier got confused when block eventually reaching an exit(), this is checked now. llvm-svn: 81338
* Updated ProfileInfo to have clean seperation between different sentinels.Andreas Neustifter2009-09-092-9/+27
| | | | llvm-svn: 81335
* Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman2009-09-081-0/+10
| | | | | | | | | | | | | | | that get created during loop unswitching, and fix SplitBlockPredecessors' LCSSA updating code to create new PHIs instead of trying to just move existing ones. Also, optimize Loop::verifyLoop, since it gets called a lot. Use searches on a sorted list of blocks instead of calling the "contains" function, as is done in other places in the Loop class, since "contains" does a linear search. Also, don't call verifyLoop from LoopSimplify or LCSSA, as the PassManager is already calling verifyLoop as part of LoopInfo's verifyAnalysis. llvm-svn: 81221
OpenPOWER on IntegriCloud