Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Clean ups for loop deletion based on Chris' feedback. | Owen Anderson | 2008-05-16 | 1 | -28/+32 |
| | | | | | | | Also, use SCEV to determine the trip count of the loop, which is more powerful and accurate that Loop::getTripCount. llvm-svn: 51179 | ||||
* | implement PR2328. | Chris Lattner | 2008-05-16 | 1 | -0/+4 |
| | | | | llvm-svn: 51176 | ||||
* | Fix a bug in LoopStrengthReduce that caused it to emit IR with | Dan Gohman | 2008-05-15 | 1 | -3/+21 |
| | | | | | | | | | | | | | | | | | use-before-def. The problem comes up in code with multiple PHIs where one PHI is being rewritten in terms of the other, but the other needs to be casted first. LLVM rules requre the cast instruction to be inserted after any PHI instructions, but when instructions were inserted to replace the second PHI value with a function of the first, they were ended up going before the cast instruction. Avoid this problem by remembering the location of the cast instruction, when one is needed, and inserting the expansion of the new value after it. This fixes a bug that surfaced in 255.vortex on x86-64 when instcombine was removed from the middle of the loop optimization passes. llvm-svn: 51169 | ||||
* | Remove useless check. | Devang Patel | 2008-05-15 | 1 | -6/+2 |
| | | | | | | Patch by Matthijs Kooijman. llvm-svn: 51154 | ||||
* | Use of UINT_MAX requires climits, at least when | Duncan Sands | 2008-05-15 | 1 | -0/+1 |
| | | | | | | compiling with gcc 4.3. llvm-svn: 51145 | ||||
* | Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵ | Gabor Greif | 2008-05-15 | 10 | -23/+38 |
| | | | | | | makefile targets to find these better. llvm-svn: 51143 | ||||
* | Situations can arise when you have a function called that returns a 'void', but | Bill Wendling | 2008-05-14 | 1 | -2/+2 |
| | | | | | | | | | | is bitcast to return a floating point value. The result of the instruction may not be used by the program afterwards, and LLVM will happily remove all instructions except the call. But, on some platforms, if a value is returned as a floating point, it may need to be removed from the stack (like x87). Thus, we can't get rid of the bitcast even if there isn't a use of the value. llvm-svn: 51134 | ||||
* | rename SimplifyCFG.cpp -> SimplifyCFGPass.cpp | Chris Lattner | 2008-05-14 | 1 | -1/+1 |
| | | | | llvm-svn: 51130 | ||||
* | Simplify internalize pass. Add test case. | Devang Patel | 2008-05-14 | 1 | -19/+21 |
| | | | | | | Patch by Matthijs Kooijman! llvm-svn: 51114 | ||||
* | Split the loop unroll mechanism logic out into a utility function. | Dan Gohman | 2008-05-14 | 2 | -379/+385 |
| | | | | | | Patch by Matthijs Kooijman! llvm-svn: 51083 | ||||
* | Fix Analysis/BasicAA/pure-const-dce.ll. This turned out to be a correctness | Owen Anderson | 2008-05-13 | 1 | -1/+38 |
| | | | | | | | | bug as well as a missed optimization. We weren't properly checking for local dependencies before moving on to non-local ones when doing non-local read-only call CSE. llvm-svn: 51082 | ||||
* | Fix for PR 2323, infinite loop in tail dup. | Dale Johannesen | 2008-05-13 | 1 | -4/+15 |
| | | | | llvm-svn: 51063 | ||||
* | Make the non-local CSE safety checks slightly more thorough. | Owen Anderson | 2008-05-13 | 1 | -6/+8 |
| | | | | llvm-svn: 51035 | ||||
* | Add support for non-local CSE of read-only calls. | Owen Anderson | 2008-05-13 | 1 | -12/+45 |
| | | | | llvm-svn: 51024 | ||||
* | Change class' public PassInfo variables to by initialized with the | Dan Gohman | 2008-05-13 | 8 | -8/+8 |
| | | | | | | | | | | | address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. llvm-svn: 51022 | ||||
* | 80 col / tabs fixes | Nate Begeman | 2008-05-13 | 2 | -6/+7 |
| | | | | llvm-svn: 51021 | ||||
* | Clean up the use of static and anonymous namespaces. This turned up | Dan Gohman | 2008-05-13 | 57 | -254/+307 |
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017 | ||||
* | Go back to passing the analyses around as parameters. | Owen Anderson | 2008-05-12 | 1 | -21/+33 |
| | | | | llvm-svn: 50995 | ||||
* | Move the various analyses used by GVN into static variables so we don't have ↵ | Owen Anderson | 2008-05-12 | 1 | -30/+21 |
| | | | | | | to keep passing them around or refetching them. llvm-svn: 50963 | ||||
* | Fix various DOUTs to not call the extremely expensive Value::getName() | Chris Lattner | 2008-05-11 | 1 | -5/+5 |
| | | | | | | | | method. DOUT statements are disabled when assertions are off, but the side effects of getName() are still evaluated. Just call getNameSTart, which is close enough and doesn't cause heap traffic. llvm-svn: 50958 | ||||
* | Simplify code by using SwitchInst::findCaseValue instead of reimplementing it. | Chris Lattner | 2008-05-10 | 1 | -14/+2 |
| | | | | llvm-svn: 50957 | ||||
* | don't sink invokes, even if they are readonly. This fixes a | Chris Lattner | 2008-05-09 | 1 | -1/+2 |
| | | | | | | crash on kimwitu++. llvm-svn: 50901 | ||||
* | Fix a type and formatting. | Duncan Sands | 2008-05-09 | 1 | -2/+2 |
| | | | | llvm-svn: 50900 | ||||
* | Implement PR2298. This transforms: | Chris Lattner | 2008-05-09 | 1 | -0/+13 |
| | | | | | | | ~x < ~y --> y < x -x == -y --> x == y llvm-svn: 50882 | ||||
* | restore doxygen comment. | Chris Lattner | 2008-05-09 | 1 | -17/+16 |
| | | | | llvm-svn: 50881 | ||||
* | Improve pass documentation and comments. | Gordon Henriksen | 2008-05-08 | 5 | -26/+38 |
| | | | | | | Patch by Matthijs Kooijman! llvm-svn: 50861 | ||||
* | More than just loads can read from memory: readonly calls like strlen | Chris Lattner | 2008-05-08 | 1 | -4/+4 |
| | | | | | | | also need to be checked for memory modifying instructions before we can sink them. THis fixes the second half of PR2297. llvm-svn: 50860 | ||||
* | Make instcombine's DSE respect loads as well as stores. It is not safe to | Chris Lattner | 2008-05-08 | 1 | -1/+1 |
| | | | | | | | | | | | | delete the first store in: store x -> p load p store y -> p This is for PR2297. llvm-svn: 50859 | ||||
* | Check linkage. | Devang Patel | 2008-05-08 | 1 | -1/+1 |
| | | | | llvm-svn: 50851 | ||||
* | Turn StripPointerCast() into a method | Anton Korobeynikov | 2008-05-07 | 1 | -1/+1 |
| | | | | llvm-svn: 50836 | ||||
* | Fix a bug in the ComputeMaskedBits logic for multiply. | Dan Gohman | 2008-05-07 | 1 | -2/+2 |
| | | | | llvm-svn: 50793 | ||||
* | Make StripPointerCast a common function (should we mak it method of Value ↵ | Anton Korobeynikov | 2008-05-06 | 1 | -2/+1 |
| | | | | | | instead?) llvm-svn: 50775 | ||||
* | We need to update PHIs containing the exiting block, not the exit block. We ↵ | Owen Anderson | 2008-05-06 | 1 | -3/+8 |
| | | | | | | really should come up with better names for these. llvm-svn: 50770 | ||||
* | Fix typo. | Devang Patel | 2008-05-06 | 1 | -1/+1 |
| | | | | llvm-svn: 50713 | ||||
* | fix typo Duncan noticed | Chris Lattner | 2008-05-06 | 1 | -1/+1 |
| | | | | llvm-svn: 50699 | ||||
* | Make several variable declarations static. | Dan Gohman | 2008-05-06 | 8 | -10/+10 |
| | | | | llvm-svn: 50696 | ||||
* | Remove uses of llvm/System/IncludeFile.h that are no longer needed. | Dan Gohman | 2008-05-06 | 1 | -2/+0 |
| | | | | llvm-svn: 50695 | ||||
* | Correct the value of LowBits in srem and urem handling in | Dan Gohman | 2008-05-06 | 1 | -6/+6 |
| | | | | | | ComputeMaskedBits. llvm-svn: 50692 | ||||
* | Fix: Some classes were derived from a class in an anonymous namespace, but they | Bill Wendling | 2008-05-05 | 1 | -0/+2 |
| | | | | | | themselves weren't in the anonymous namespace. llvm-svn: 50673 | ||||
* | Fix a crash when threading a block that includes a MRV call result. | Chris Lattner | 2008-05-05 | 1 | -4/+19 |
| | | | | | | | | | DemoteRegToStack doesn't work with MRVs yet, because it relies on the ability to load/store things. This fixes PR2285. llvm-svn: 50667 | ||||
* | processStore may delete the instruction, avoid | Torok Edwin | 2008-05-04 | 1 | -2/+1 |
| | | | | | | using dyn_cast<> on already freed memory. llvm-svn: 50618 | ||||
* | Handle multiple return values. | Devang Patel | 2008-05-03 | 1 | -1/+23 |
| | | | | llvm-svn: 50604 | ||||
* | Do not sink getresult. | Devang Patel | 2008-05-03 | 1 | -1/+3 |
| | | | | llvm-svn: 50600 | ||||
* | Fix a mistake in the computation of leading zeros for udiv. | Dan Gohman | 2008-05-02 | 1 | -3/+5 |
| | | | | llvm-svn: 50591 | ||||
* | strength reduce exp2 into ldexp, rdar://5852514 | Chris Lattner | 2008-05-02 | 1 | -1/+52 |
| | | | | llvm-svn: 50586 | ||||
* | add a FIXME so we remember to eventually remove this code. | Chris Lattner | 2008-05-02 | 1 | -5/+6 |
| | | | | llvm-svn: 50582 | ||||
* | Porting r50563 from Tak to mainline. | Bill Wendling | 2008-05-02 | 1 | -0/+5 |
| | | | | llvm-svn: 50564 | ||||
* | Don't try to create PHIs of struct types. Fallout | Dale Johannesen | 2008-05-01 | 1 | -8/+31 |
| | | | | | | from x86-64 calling convention work. llvm-svn: 50545 | ||||
* | Fix an overaggressive SimplifyDemandedBits optimization on urem. This | Dan Gohman | 2008-05-01 | 1 | -4/+5 |
| | | | | | | fixes the 254.gap regression on x86 and the 403.gcc regression on x86-64. llvm-svn: 50537 | ||||
* | 1) add '-debug' output | Chris Lattner | 2008-05-01 | 1 | -11/+19 |
| | | | | | | | 2) Return NULL instead of false in several places for tidiness. 3) fix a bug optimizing sprintf(p, "%c", x) llvm-svn: 50521 |