aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* No need to verify that malloc's return type is i8*.Victor Hernandez2009-09-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82561 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82507 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82411 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82404 91177308-0d34-0410-b5e6-96231b3b80d8
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82355 91177308-0d34-0410-b5e6-96231b3b80d8
* Strip trailing whitespace.Daniel Dunbar2009-09-191-58/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82332 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment explaining why you would ever want to do this.Nick Lewycky2009-09-191-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82319 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82317 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82315 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82281 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82257 91177308-0d34-0410-b5e6-96231b3b80d8
* Add newlines.Nick Lewycky2009-09-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82206 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82151 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a way to extract location info from DILocation.Devang Patel2009-09-161-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82064 91177308-0d34-0410-b5e6-96231b3b80d8
* 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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82039 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some codeChris Lattner2009-09-161-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81961 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81864 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81843 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81838 91177308-0d34-0410-b5e6-96231b3b80d8
* Bugfix. Sorry.Andreas Neustifter2009-09-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81517 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ProfileEstimator even more robust on general CFGs.Andreas Neustifter2009-09-112-55/+112
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81516 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81483 91177308-0d34-0410-b5e6-96231b3b80d8
* Give these files top-level comments that describe the current code.Dan Gohman2009-09-101-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81473 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uppercaseo.Dale Johannesen2009-09-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81463 91177308-0d34-0410-b5e6-96231b3b80d8
* Fit code within 80 columnsVictor Hernandez2009-09-101-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81459 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ProfileEstimator more robust on general CFGs.Andreas Neustifter2009-09-102-44/+69
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81450 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some braces to make newer GCCs happy and update CMakeLists.Benjamin Kramer2009-09-102-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81443 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleaned up code by factoring out common portions of edge loading into function.Andreas Neustifter2009-09-101-50/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81438 91177308-0d34-0410-b5e6-96231b3b80d8
* Add malloc call utility functions. Patch by Victor Hernandez.Evan Cheng2009-09-101-0/+202
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81426 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverted r81358.Andreas Neustifter2009-09-091-22/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81364 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build, add missing simicolon.Benjamin Kramer2009-09-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81362 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the first functions for updating ProfileInfo.Andreas Neustifter2009-09-091-0/+83
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81359 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleaned up code by factoring out common portions of edge loading into funcion.Andreas Neustifter2009-09-091-27/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81358 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r81335, which breaks the build.Chris Lattner2009-09-092-27/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81347 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81338 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated ProfileInfo to have clean seperation between different sentinels.Andreas Neustifter2009-09-092-9/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81335 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81221 91177308-0d34-0410-b5e6-96231b3b80d8
* fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.Chris Lattner2009-09-081-6/+9
| | | | | | | This fixes PR4905 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81174 91177308-0d34-0410-b5e6-96231b3b80d8
* add some comments to describe the invariants.Chris Lattner2009-09-081-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81173 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81131 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark more constants unsigned, as warned about by icc (#68).Duncan Sands2009-09-061-4/+4
| | | | | | | Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81116 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng2009-09-061-10/+0
| | | | | | tests significantly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81101 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent warnings on compilers for which its not clear that assert won't return.Andreas Neustifter2009-09-041-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81044 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleaned up ProfileVerifierPass.Andreas Neustifter2009-09-041-57/+78
| | | | | | | (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086219.html) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81007 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "--- Reverse-merging r80908 into '.':", I already "fixed" this.Daniel Dunbar2009-09-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80970 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80969 91177308-0d34-0410-b5e6-96231b3b80d8
* --- 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80966 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80959 91177308-0d34-0410-b5e6-96231b3b80d8
* Smallvectorize switchExitBlocks.Dan Gohman2009-09-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80942 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80926 91177308-0d34-0410-b5e6-96231b3b80d8