aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Set blockBegin to point to the beginning of the block,Dan Gohman2008-03-311-2/+2
| | | | | | | not the end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48999 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose Function::viewCFG and Function::viewCFGOnly to bindings.Erick Tryzelaar2008-03-311-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48982 91177308-0d34-0410-b5e6-96231b3b80d8
* minor code cleanups, allow constant folding sinf/cosf.Chris Lattner2008-03-301-20/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48961 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't include <map> in Pass.h, which doesn't need it. This requiresDan Gohman2008-03-211-0/+1
| | | | | | | adding <map> to many files that actually do need it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48667 91177308-0d34-0410-b5e6-96231b3b80d8
* These passes preserve CFG.Devang Patel2008-03-203-4/+4
| | | | | | | This patch fixes Benchmarks/Trimaran/enc-pc1/enc-pc1 failure reported by Grawp-PIC i386 nightly tester git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48623 91177308-0d34-0410-b5e6-96231b3b80d8
* enable -analyze for andersensAndrew Lenharth2008-03-201-19/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48601 91177308-0d34-0410-b5e6-96231b3b80d8
* Restore isCFGOnly property of various analysis passes.Devang Patel2008-03-2019-23/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48579 91177308-0d34-0410-b5e6-96231b3b80d8
* PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel2008-03-1920-37/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48554 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use virtual function to identify an analysis pass.Devang Patel2008-03-1910-53/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48520 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR 2160 by making sure arguments to external functions get marked as ↵Daniel Berlin2008-03-181-18/+36
| | | | | | pointing to anything git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48509 91177308-0d34-0410-b5e6-96231b3b80d8
* Dial down gcc's warnings: don't use 0UL when 0U suffices (and when theScott Michel2008-03-181-4/+4
| | | | | | | variables and methods themselves only use unsigned.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48492 91177308-0d34-0410-b5e6-96231b3b80d8
* Identify Analysis pass.Devang Patel2008-03-1810-0/+41
| | | | | | | | Do not run analysis pass again if analysis info is still available. This fixes PR1441. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48476 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Hybrid Cycle Detection to Andersen's analysis.Daniel Berlin2008-03-051-32/+272
| | | | | | | | Patch by Curtis Dunham. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47959 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix http://llvm.org/bugs/show_bug.cgi?id=2104 by ordering lexicographically ↵Gabor Greif2008-02-281-5/+12
| | | | | | what gets printed. Be const-correct in PrintResults and uninline it too git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47712 91177308-0d34-0410-b5e6-96231b3b80d8
* De-tabify.Bill Wendling2008-02-261-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47598 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily reverting 46959.Evan Cheng2008-02-251-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47542 91177308-0d34-0410-b5e6-96231b3b80d8
* Change a C-style cast to const_cast, to avoid a -Wcast-qual warning.Dan Gohman2008-02-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47437 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code, no functionality change.Nick Lewycky2008-02-211-5/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47434 91177308-0d34-0410-b5e6-96231b3b80d8
* GlobalValues are Constants, remove redundant code. Also fix typo in a comment.Nick Lewycky2008-02-211-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47433 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-204-4/+7
| | | | | | annoying warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getConstant for ConstantInts.Nick Lewycky2008-02-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47361 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'umax' similar to 'smax' SCEV. Closes PR2003.Nick Lewycky2008-02-202-45/+156
| | | | | | | | | | | | | | | | Parse reversed smax and umax as smin and umin and express them with negative or binary-not SCEVs (which are really just subtract under the hood). Parse 'xor %x, -1' as (-1 - %x). Remove dead code (ConstantInt::get always returns a ConstantInt). Don't use getIntegerSCEV(-1, Ty). The first value is an int, then it gets passed into a uint64_t. Instead, create the -1 directly from ConstantInt::getAllOnesValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47360 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a compiler warning.Duncan Sands2008-02-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47328 91177308-0d34-0410-b5e6-96231b3b80d8
* In addition to arguments passed to it, memcpy (and all other calls) can ↵Owen Anderson2008-02-191-1/+2
| | | | | | ModRef pointers that alias their arguments as well. This fixes PR2057. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47317 91177308-0d34-0410-b5e6-96231b3b80d8
* don't bother calling getUnderlyingObject for non-pointers.Chris Lattner2008-02-181-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47272 91177308-0d34-0410-b5e6-96231b3b80d8
* Since we're not checking for the more general AllocationInst first, we need ↵Owen Anderson2008-02-181-1/+1
| | | | | | | | | to explicitly check that Object is an Argument before casting it to one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47268 91177308-0d34-0410-b5e6-96231b3b80d8
* This check is not correct for mallocs, so exclude them earlier.Owen Anderson2008-02-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47263 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment, and a bug where we weren't applying the tail call logic in ↵Owen Anderson2008-02-181-6/+8
| | | | | | cases that failed the first test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47253 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bugs that Chris noticed in my last patch.Owen Anderson2008-02-181-9/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47252 91177308-0d34-0410-b5e6-96231b3b80d8
* bitcasts of pointers are always pointers.Chris Lattner2008-02-181-5/+2
| | | | | | | | If we see a memcpy of a pointer, make sure to check later uses of the pointer as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47250 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach getModRefInfo that memcpy, memmove, and memset don't "capture" memory ↵Owen Anderson2008-02-171-3/+13
| | | | | | | | | | addresses. Also, noalias arguments are be considered "like" stack allocated ones for this purpose, because the only way they can be modref'ed is if they escape somewhere in the current function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47247 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo. Thanks to Duncan for noticing.Wojciech Matyjewicz2008-02-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47062 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments as per review feedback.Wojciech Matyjewicz2008-02-131-5/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47061 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply the patch to improve the optimizations of memcpy's, with severalOwen Anderson2008-02-121-1/+41
| | | | | | | bugs fixed. This now passes PPC bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47026 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2002. Suppose n is the initial value for the induction Wojciech Matyjewicz2008-02-121-6/+4
| | | | | | | | | | | variable (with step 1) and m is its final value. Then, the correct trip count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may overflow and can't in general be interpreted as signed. Patch by Nick Lewycky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47007 91177308-0d34-0410-b5e6-96231b3b80d8
* If the LHS of the comparison is a loop-invariant we also want to move it Wojciech Matyjewicz2008-02-111-2/+2
| | | | | | | | | to the RHS. This simple change allows to compute loop iteration count for loops with condition similar to the one in the testcase (which seems to be quite common). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46959 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an Wojciech Matyjewicz2008-02-111-49/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | arbitrary iteration. The patch: 1) changes SCEVSDivExpr into SCEVUDivExpr, 2) replaces PartialFact() function with BinomialCoefficient(); the computations (essentially, the division) in BinomialCoefficient() are performed with the apprioprate bitwidth necessary to avoid overflow; unsigned division is used instead of the signed one. Computations in BinomialCoefficient() require support from the code generator for APInts. Currently, we use a hack rounding up the neccessary bitwidth to the nearest power of 2. The hack is easy to turn off in future. One remaining issue: we assume the divisor of the binomial coefficient formula can be computed accurately using 16 bits. It means we can handle AddRecs of length up to 9. In future, we should use APInts to evaluate the divisor. Thanks to Nicholas for cooperation! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46955 91177308-0d34-0410-b5e6-96231b3b80d8
* We should check that existing cast operation has the appropriate opcode ↵Wojciech Matyjewicz2008-02-091-19/+21
| | | | | | before we reuse it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46908 91177308-0d34-0410-b5e6-96231b3b80d8
* Throttle the non-local dependence analysis for basic blocks with more than ↵Tanya Lattner2008-02-061-7/+20
| | | | | | 50 predecessors. Added command line option to play with this threshold. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46790 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an obscure read-after-free bug that Duncan found.Owen Anderson2008-02-051-10/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46738 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid unnecessarily casting away const, fixing a FIXME.Dan Gohman2008-01-312-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46591 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an issue where, under very specific circumstances, memdep could end up ↵Owen Anderson2008-01-301-2/+2
| | | | | | | | | dereferencing the end of one of its internal maps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46541 91177308-0d34-0410-b5e6-96231b3b80d8
* getUnderlyingObject can return null, handle this.Chris Lattner2008-01-241-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46318 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach basicaa that 'byval' arguments define a new memory location thatChris Lattner2008-01-241-34/+34
| | | | | | | | can't be aliased to other known objects. This allows us to know that byval pointer args don't alias globals, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46315 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't be rude, emit debugging info where asked to.Nick Lewycky2008-01-021-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45485 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-2929-58/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attribution from lib Makefiles.Chris Lattner2007-12-292-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45415 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding bindings for memory buffers and module providers. SwitchingGordon Henriksen2007-12-191-4/+0
| | | | | | to exceptions rather than variants for error handling in Ocaml. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45226 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords, and fix a minor typo that they uncovered.Dan Gohman2007-12-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45034 91177308-0d34-0410-b5e6-96231b3b80d8
* Make these loops follow GetGEPOperands() behavior.Wojciech Matyjewicz2007-12-131-11/+13
| | | | | | | | | Let: %q = GEP %p, X, ... If %p is a GEP, we can chase baseptr further, only if X==0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44999 91177308-0d34-0410-b5e6-96231b3b80d8