summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a FIXME about signedness.Reid Spencer2006-12-211-0/+2
| | | | llvm-svn: 32732
* Add some comments about things that can go away once signless types are in.Reid Spencer2006-12-211-1/+8
| | | | llvm-svn: 32727
* eliminate static ctors from StatisticsChris Lattner2006-12-191-23/+19
| | | | llvm-svn: 32697
* Fix a bug in GetConstantFactor for affine expressions, in which the existingChris Lattner2006-12-191-5/+9
| | | | | | code was wrong for things like 3+4*i. llvm-svn: 32662
* Replace inferred getCast(V,Ty) calls with more strict variants.Reid Spencer2006-12-121-9/+12
| | | | | | | Rename getZeroExtend and getSignExtend to getZExt and getSExt to match the the casting mnemonics in the rest of LLVM. llvm-svn: 32514
* Get even more accurate on the casting.Reid Spencer2006-12-121-8/+5
| | | | llvm-svn: 32478
* Change inferred getCast into specific getCast. Passes all tests.Reid Spencer2006-12-121-3/+9
| | | | llvm-svn: 32469
* teach scev to analyze X*4|1 like X*4+c. This allows us to produce:Chris Lattner2006-12-121-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LBB1_1: #bb movdqa (%esi), %xmm2 movaps %xmm2, %xmm3 punpcklbw %xmm0, %xmm3 movaps %xmm3, %xmm4 punpcklwd %xmm0, %xmm4 cvtdq2ps %xmm4, %xmm4 mulps %xmm1, %xmm4 movaps %xmm4, (%edi) leal 1(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 2(,%eax,4), %ebx shll $4, %ebx punpckhbw %xmm0, %xmm2 movaps %xmm2, %xmm3 punpcklwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 3(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm2 cvtdq2ps %xmm2, %xmm2 mulps %xmm1, %xmm2 movaps %xmm2, (%edx,%ebx) addl $64, %edi incl %eax addl $16, %esi cmpl %ecx, %eax jne LBB1_1 #bb instead of: LBB1_1: #bb movdqa (%esi), %xmm2 movaps %xmm2, %xmm3 punpcklbw %xmm0, %xmm3 movaps %xmm3, %xmm4 punpcklwd %xmm0, %xmm4 cvtdq2ps %xmm4, %xmm4 mulps %xmm1, %xmm4 movaps %xmm4, (%edi) leal 1(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 2(,%eax,4), %ebx shll $4, %ebx punpckhbw %xmm0, %xmm2 movaps %xmm2, %xmm3 punpcklwd %xmm0, %xmm3 cvtdq2ps %xmm3, %xmm3 mulps %xmm1, %xmm3 movaps %xmm3, (%edx,%ebx) leal 3(,%eax,4), %ebx shll $4, %ebx punpckhwd %xmm0, %xmm2 cvtdq2ps %xmm2, %xmm2 mulps %xmm1, %xmm2 movaps %xmm2, (%edx,%ebx) addl $64, %edi incl %eax addl $16, %esi cmpl %ecx, %eax jne LBB1_1 #bb for a testcase. llvm-svn: 32463
* clarify some comments, simplify some checks, fix:Chris Lattner2006-12-111-7/+7
| | | | | | Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll llvm-svn: 32420
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-17/+17
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-5/+5
| | | | | | is 'unsigned'. llvm-svn: 32279
* Finally get the casting right in this file. Also, remove some unnecessaryReid Spencer2006-12-051-7/+6
| | | | | | casting because sdiv doesn't require operand signs to match any more. llvm-svn: 32240
* Bail on the getInferredCast idea. Remove the function and convertReid Spencer2006-12-051-9/+10
| | | | | | remaining uses to more specific casts. llvm-svn: 32231
* Fix comment grammaroReid Spencer2006-12-041-2/+2
| | | | llvm-svn: 32198
* Fix inferred casts.Reid Spencer2006-12-041-6/+9
| | | | llvm-svn: 32180
* Unbreak VC++ build.Jeff Cohen2006-12-021-0/+1
| | | | llvm-svn: 32113
* Removed some of the iostream #includes. Moved towards converting to usingBill Wendling2006-11-281-13/+14
| | | | | | llvm streams llvm-svn: 31983
* For PR950:Reid Spencer2006-11-271-37/+18
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Remove redundant <cmath>.Jim Laskey2006-11-081-1/+0
| | | | llvm-svn: 31561
* For PR950:Reid Spencer2006-11-021-1/+1
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* Make ScalarEvolution actually use a ZeroExtend expression instead ofReid Spencer2006-11-011-2/+2
| | | | | | having SCZeroExtendExpr be equivalent to SCTruncate llvm-svn: 31355
* For PR950:Reid Spencer2006-10-261-15/+14
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
* For PR950:Reid Spencer2006-10-201-14/+14
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* Fix some more static dtor issues.Chris Lattner2006-10-041-33/+36
| | | | llvm-svn: 30724
* Eliminate ConstantBool::True and ConstantBool::False. Instead, provideChris Lattner2006-09-281-4/+4
| | | | | | ConstantBool::getTrue() and ConstantBool::getFalse(). llvm-svn: 30666
* Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29921
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29911
* Use hidden visibility to make symbols in an anonymous namespace getChris Lattner2006-06-281-3/+4
| | | | | | dropped. This shrinks libllvmgcc.dylib another 67K llvm-svn: 28975
* Implement Transforms/IndVarsSimplify/complex-scev.ll, a case where we didn'tChris Lattner2006-04-261-0/+25
| | | | | | recognize some simple affine IV's. llvm-svn: 27982
* Signed shr by a constant is not the same as sdiv by 2^kChris Lattner2006-04-041-9/+0
| | | | llvm-svn: 27395
* Fix Transforms/IndVarsSimplify/2006-03-31-NegativeStride.ll andChris Lattner2006-04-011-27/+27
| | | | | | | PR726 by performing consistent signed division, not consistent unsigned division when evaluating scev's. Do not touch udivs. llvm-svn: 27326
* Add explicit iostream #includesChris Lattner2006-01-221-0/+1
| | | | llvm-svn: 25513
* Move some constant folding code shared by Analysis and Transform passesJohn Criswell2005-10-271-1/+1
| | | | | | | | into the LLVMAnalysis library. This allows LLVMTranform and LLVMTransformUtils to be archives and linked with LLVMAnalysis.a, which provides any missing definitions. llvm-svn: 24036
* wrap a long lineChris Lattner2005-09-281-1/+2
| | | | llvm-svn: 23507
* Fix Transforms/LoopStrengthReduce/2005-08-15-AddRecIV.llChris Lattner2005-08-161-2/+3
| | | | llvm-svn: 22797
* Teach LLVM to know how many times a loop executes when constructed withChris Lattner2005-08-151-2/+110
| | | | | | a < expression, e.g.: for (i = m; i < n; ++i) llvm-svn: 22793
* Fix an obvious oopsChris Lattner2005-08-101-1/+1
| | | | llvm-svn: 22742
* implement two helper methodsChris Lattner2005-08-091-0/+28
| | | | llvm-svn: 22736
* Remove trailing whitespaceMisha Brukman2005-04-211-46/+46
| | | | llvm-svn: 21416
* Don't make this require loopsimplify. It works BETTER with loop simplifyChris Lattner2005-04-061-1/+0
| | | | | | but should not require it. llvm-svn: 21123
* Export two methods for getting -X and A-B.Chris Lattner2005-03-091-10/+11
| | | | llvm-svn: 20527
* DCE a dead functionChris Lattner2005-02-261-19/+0
| | | | llvm-svn: 20339
* 1 + 100 + 51 == 152, not 52.Chris Lattner2005-02-261-0/+2
| | | | | | | | If we fold three constants together (c1+c2+c3), make sure to keep LHSC updated, instead of reusing (in this case), the 1 instead of the partial sum. llvm-svn: 20337
* Scary typo that fixes ↵Chris Lattner2005-02-171-1/+1
| | | | | | | | Regression/Transforms/IndVarsSimplify/2005-02-17-TruncateExprCrash.ll and PR515. llvm-svn: 20224
* Correct the recursive PHI node handling routines in a way that CANNOT induceChris Lattner2005-02-131-27/+83
| | | | | | | | | | | | | | | infinite loops (using the new replaceSymbolicValuesWithConcrete method). This patch reverts this patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050131/023830.html ... which was an attempted fix for this problem. Unfortunately, that patch caused test/Regression/Transforms/IndVarsSimplify/exit_value_tests.llx to fail and slightly castrated the entire analysis. This patch fixes it right. This patch is dedicated to jeffc, for making me deal with this. :) llvm-svn: 20146
* Fix a problem where we could infinitely recurse on phi nodes.Chris Lattner2005-02-011-1/+1
| | | | llvm-svn: 19955
* For PR387:\Reid Spencer2004-12-071-1/+1
| | | | | | | Make only one print method to avoid overloaded virtual warnings when \ compiled with -Woverloaded-virtual llvm-svn: 18589
* This patch prevents an infinite recursion while compiling 103.su2cor.Chris Lattner2004-12-041-3/+3
| | | | | | | All SPEC CFP 95 programs now work, though the JIT isn't loading -lf2c right so they aren't testing correctly. llvm-svn: 18499
* Patch to support MSVC, contributed by Morten OfstadChris Lattner2004-10-251-1/+1
| | | | llvm-svn: 17214
* This nutty patch has been in my tree since before 1.3 went out, and it needsChris Lattner2004-10-121-20/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to go in. This patch allows us to compute the trip count of loops controlled by values loaded from constant arrays. The cannonnical example of this is strlen when passed a constant argument: for (int i = 0; "constantstring"[i]; ++i) ; return i; In this case, it will compute that the loop executes 14 times, which means that the exit value of i is 14. Because of this, the loop gets DCE'd and we are happy. This also applies to anything that does similar things, e.g. loops like this: const float Array[] = { 0.1, 2.1, 3.2, 23.21 }; for (int i = 0; Array[i] < 20; ++i) and is actually fairly general. The problem with this is that it almost never triggers. The reason is that we run indvars and the loop optimizer only at compile time, which is before things like strlen and strcpy have been inlined into the program from libc. Because of this, it almost never is used (it triggers twice in specint2k). I'm committing it because it DOES work, may be useful in the future, and doesn't slow us down at all. If/when we start running the loop optimizer at link-time (-O4?) this will be very nice indeed :) llvm-svn: 16926
OpenPOWER on IntegriCloud