summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* 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
* fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.Chris Lattner2009-09-081-6/+9
| | | | | | This fixes PR4905 llvm-svn: 81174
* add some comments to describe the invariants.Chris Lattner2009-09-081-0/+12
| | | | llvm-svn: 81173
* Do not try to override non-virtual methods, especiallyDuncan Sands2009-09-061-13/+0
| | | | | | | when the new method gives the same result as the original (as far as I can see). This will hopefully pacify icc. llvm-svn: 81131
* Mark more constants unsigned, as warned about by icc (#68).Duncan Sands2009-09-061-4/+4
| | | | | | Patch by Erick Tryzelaar. llvm-svn: 81116
* Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng2009-09-061-10/+0
| | | | | | tests significantly. llvm-svn: 81101
* Prevent warnings on compilers for which its not clear that assert won't return.Andreas Neustifter2009-09-041-0/+1
| | | | llvm-svn: 81044
* Cleaned up ProfileVerifierPass.Andreas Neustifter2009-09-041-57/+78
| | | | | | (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086219.html) llvm-svn: 81007
* Revert "--- Reverse-merging r80908 into '.':", I already "fixed" this.Daniel Dunbar2009-09-031-1/+1
| | | | llvm-svn: 80970
* Revert 80959. It isn't sufficient to solve the full problem. And itDan Gohman2009-09-031-12/+6
| | | | | | introduced regressions in the Ocaml bindings tests. llvm-svn: 80969
* --- Reverse-merging r80908 into '.':Bill Wendling2009-09-031-1/+1
| | | | | | | | | | | D test/Analysis/Profiling --- Reverse-merging r80907 into '.': U lib/Analysis/ProfileInfoLoaderPass.cpp Attempt to remove failure in the self-hosting build bot. llvm-svn: 80966
* Remove the API for creating ConstantExprs with the nsw, nuw, inbounds,Dan Gohman2009-09-031-6/+12
| | | | | | | | | | | | | | | and exact flags. Because ConstantExprs are uniqued, creating an expression with this flag causes all expressions with the same operands to have the same flag, which may not be safe. Add, sub, mul, and sdiv ConstantExprs are usually folded anyway, so the main interesting flag here is inbounds, and the constant folder already knows how to set the inbounds flag automatically in most cases, so there isn't an urgent need for the API support. This can be reconsidered in the future, but for now just removing these API bits eliminates a source of potential trouble with little downside. llvm-svn: 80959
* Smallvectorize switchExitBlocks.Dan Gohman2009-09-031-1/+1
| | | | llvm-svn: 80942
* Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman2009-09-031-0/+10
| | | | | | | | | that these passes are properly preserved. Fix several transformation passes that claimed to preserve LoopSimplify form but weren't. llvm-svn: 80926
* Move getUniqueExitBlocks from LoopBase to Loop, since they depend onDan Gohman2009-09-031-0/+68
| | | | | | | LoopSimplify form, which is currently only available on Loops (and not MachineLoops). Also, move the code out of the header file. llvm-svn: 80923
* Don't try to verify a LoopPass analysis if the loop has been deleted.Dan Gohman2009-09-031-1/+3
| | | | llvm-svn: 80919
* Remove references to expression "handles", which are no longer used.Dan Gohman2009-09-031-1/+1
| | | | llvm-svn: 80918
* Fix build warning.Andreas Neustifter2009-09-031-1/+1
| | | | llvm-svn: 80912
* Code Cleanup.Andreas Neustifter2009-09-031-16/+9
| | | | | | (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086139.html) llvm-svn: 80909
* Remove undefined behavior when loading optimal edge profile info.Daniel Dunbar2009-09-031-1/+1
| | | | llvm-svn: 80907
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-032-2/+2
| | | | | | buildbot's stage 2 configure llvm-svn: 80871
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-032-2/+2
| | | | | | this time. I'll back out if needed... llvm-svn: 80858
* Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification inTorok Edwin2009-09-021-0/+5
| | | | | | r80406, and readd a -print-dbginfo test. llvm-svn: 80778
* fix PR4848 an infinite loop when indexing down through a recursive gepChris Lattner2009-09-021-1/+1
| | | | | | | and we get the original pointer type. This doesn't mean that we're at the first pointer being indexed. Correct the predicate. llvm-svn: 80762
OpenPOWER on IntegriCloud