Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Optimized FCMP_OEQ and FCMP_UNE for x86. | Dan Gohman | 2008-10-21 | 1 | -15/+19 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where previously LLVM might emit code like this: ucomisd %xmm1, %xmm0 setne %al setp %cl orb %al, %cl jne .LBB4_2 it now emits this: ucomisd %xmm1, %xmm0 jne .LBB4_2 jp .LBB4_2 It has fewer instructions and uses fewer registers, but it does have more branches. And in the case that this code is followed by a non-fallthrough edge, it may be followed by a jmp instruction, resulting in three branch instructions in sequence. Some effort is made to avoid this situation. To achieve this, X86ISelLowering.cpp now recognizes FCMP_OEQ and FCMP_UNE in lowered form, and replace them with code that emits two branches, except in the case where it would require converting a fall-through edge to an explicit branch. Also, X86InstrInfo.cpp's branch analysis and transform code now knows now to handle blocks with multiple conditional branches. It uses loops instead of having fixed checks for up to two instructions. It can now analyze and transform code generated from FCMP_OEQ and FCMP_UNE. llvm-svn: 57873 | ||||
* | Tidy up several unbeseeming casts from pointer to intptr_t. | Dan Gohman | 2008-09-04 | 1 | -1/+1 |
| | | | | llvm-svn: 55779 | ||||
* | Fix SmallVector's size calculation so that a size of 0 is | Dan Gohman | 2008-08-22 | 1 | -1/+1 |
| | | | | | | | handled correctly, and change a few SmallVector uses to use size 0 to more clearly reflect their intent. llvm-svn: 55181 | ||||
* | Convert uses of std::vector in TargetInstrInfo to SmallVector. This change ↵ | Owen Anderson | 2008-08-14 | 1 | -19/+20 |
| | | | | | | had to be propoagated down into all the targets and up into all clients of this API. llvm-svn: 54802 | ||||
* | Pool-allocation for MachineInstrs, MachineBasicBlocks, and | Dan Gohman | 2008-07-07 | 1 | -1/+3 |
| | | | | | | | | | | | MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212 | ||||
* | Register if-converter pass for -debug-pass. | Evan Cheng | 2008-06-04 | 1 | -1/+4 |
| | | | | llvm-svn: 51931 | ||||
* | Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to ↵ | Evan Cheng | 2008-02-28 | 1 | -1/+1 |
| | | | | | | 16-byte boundaries. llvm-svn: 47703 | ||||
* | Update gcc 4.3 warnings fix patch with recent head changes | Anton Korobeynikov | 2008-02-20 | 1 | -1/+2 |
| | | | | llvm-svn: 47368 | ||||
* | Use empty() instead of comparing size() with zero. | Dan Gohman | 2008-01-29 | 1 | -3/+3 |
| | | | | llvm-svn: 46514 | ||||
* | rename TargetInstrDescriptor -> TargetInstrDesc. | Chris Lattner | 2008-01-07 | 1 | -7/+7 |
| | | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695 | ||||
* | simplify some code using new predicates | Chris Lattner | 2008-01-07 | 1 | -21/+19 |
| | | | | llvm-svn: 45689 | ||||
* | Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects | Chris Lattner | 2008-01-07 | 1 | -10/+8 |
| | | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674 | ||||
* | Remove attribution from file headers, per discussion on llvmdev. | Chris Lattner | 2007-12-29 | 1 | -2/+2 |
| | | | | llvm-svn: 45418 | ||||
* | Somehow this wasn't committed last time. M_CLOBBERS_PRED is gone. | Evan Cheng | 2007-07-10 | 1 | -2/+5 |
| | | | | llvm-svn: 38495 | ||||
* | Teach if-conversion about instructions that were already predicated, e.g. ↵ | Evan Cheng | 2007-07-06 | 1 | -3/+14 |
| | | | | | | conditional move. llvm-svn: 37964 | ||||
* | Avoid if-converting simple block that ends with unconditional branch or ↵ | Evan Cheng | 2007-06-19 | 1 | -1/+4 |
| | | | | | | fallthrough unless it branches / falls to the 'false' block. Not profitable, may end up increasing code size. llvm-svn: 37660 | ||||
* | Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit. | Evan Cheng | 2007-06-19 | 1 | -2/+2 |
| | | | | llvm-svn: 37643 | ||||
* | Fix some fragile code wrt CFG edge updating. | Evan Cheng | 2007-06-18 | 1 | -74/+39 |
| | | | | llvm-svn: 37634 | ||||
* | Properly remove duplicate instructions as result of diamond if-conversion. ↵ | Evan Cheng | 2007-06-18 | 1 | -103/+176 |
| | | | | | | Other bug fixes. llvm-svn: 37623 | ||||
* | Really turn if-converter loose: | Evan Cheng | 2007-06-16 | 1 | -166/+211 |
| | | | | | | | | | | 1. Consider all possible ifcvt cases at once. No longer restricted to bottom up iterative approach. 2. Sort all possible cases based on a cost function. Perform the most profitable ones first invalidate others that target the same blocks. 3. Fixed a number of bugs related to block duplication. llvm-svn: 37613 | ||||
* | Not every predicable block can be safely duplicated. | Evan Cheng | 2007-06-15 | 1 | -8/+35 |
| | | | | llvm-svn: 37607 | ||||
* | MachineInstr::isPredicable() is no longer needed. | Evan Cheng | 2007-06-15 | 1 | -6/+5 |
| | | | | llvm-svn: 37599 | ||||
* | Extra edges are deleted later if needed. | Evan Cheng | 2007-06-15 | 1 | -1/+0 |
| | | | | llvm-svn: 37593 | ||||
* | Allow small blocks to be duplicated to enable if-conversion. | Evan Cheng | 2007-06-15 | 1 | -25/+99 |
| | | | | llvm-svn: 37590 | ||||
* | No really, clear predcessors states. | Evan Cheng | 2007-06-14 | 1 | -7/+8 |
| | | | | llvm-svn: 37581 | ||||
* | If BB is predicated, invalidate its predecessor(s) which would if-convert ↵ | Evan Cheng | 2007-06-14 | 1 | -3/+7 |
| | | | | | | it. It needs to be re-analyzed. llvm-svn: 37580 | ||||
* | Fix typo. | Evan Cheng | 2007-06-14 | 1 | -1/+1 |
| | | | | llvm-svn: 37577 | ||||
* | Fix some stupid bugs that have effectively disabled if-conversion. | Evan Cheng | 2007-06-14 | 1 | -1/+7 |
| | | | | llvm-svn: 37575 | ||||
* | Typo | Evan Cheng | 2007-06-13 | 1 | -1/+1 |
| | | | | llvm-svn: 37566 | ||||
* | Now if-converting all 4 variants of triangles. | Evan Cheng | 2007-06-12 | 1 | -24/+40 |
| | | | | llvm-svn: 37565 | ||||
* | Restructure code to reduce ifcvt compile time cost. | Evan Cheng | 2007-06-11 | 1 | -155/+193 |
| | | | | llvm-svn: 37543 | ||||
* | Fix the build. | Reid Spencer | 2007-06-10 | 1 | -1/+2 |
| | | | | llvm-svn: 37537 | ||||
* | Don't change CFG during analysis stage. Do so during ifcvt and invalidate ↵ | Evan Cheng | 2007-06-09 | 1 | -56/+106 |
| | | | | | | predecessors accordingly. llvm-svn: 37531 | ||||
* | Carefully remove extraneous CFG edges after each ifcvt. | Evan Cheng | 2007-06-08 | 1 | -24/+51 |
| | | | | llvm-svn: 37529 | ||||
* | Correct transfer predicate information. | Evan Cheng | 2007-06-08 | 1 | -8/+6 |
| | | | | llvm-svn: 37524 | ||||
* | Hidden options to help debugging ifcvt issues. | Evan Cheng | 2007-06-08 | 1 | -2/+32 |
| | | | | llvm-svn: 37523 | ||||
* | Allow more cmp / bcc to be predicated; clean up triangle ifcvt checking code. | Evan Cheng | 2007-06-08 | 1 | -144/+135 |
| | | | | llvm-svn: 37518 | ||||
* | Only remove the edge from entry to false if false block is merged. | Evan Cheng | 2007-06-07 | 1 | -2/+2 |
| | | | | llvm-svn: 37503 | ||||
* | ifcvt a triangle: don't merge ifcvt block with rejoin block if it can fall ↵ | Evan Cheng | 2007-06-07 | 1 | -17/+29 |
| | | | | | | through to it. If merged, the resulting block is not a candidate for iterative ifcvting since it contains both predicated and non-predicated code. llvm-svn: 37487 | ||||
* | Lots of bug fixes. Now finally in a reasonable state. | Evan Cheng | 2007-06-07 | 1 | -78/+104 |
| | | | | llvm-svn: 37485 | ||||
* | Quick patch to fix the build, based on what it appears Evan meant to write. | Owen Anderson | 2007-06-06 | 1 | -1/+1 |
| | | | | | | Evan, please check that this is in fact correct. llvm-svn: 37471 | ||||
* | Lots of bug fixes. | Evan Cheng | 2007-06-06 | 1 | -40/+76 |
| | | | | llvm-svn: 37467 | ||||
* | If a unconditional branch is added to branch to the false path during ifcvt, ↵ | Evan Cheng | 2007-06-06 | 1 | -6/+33 |
| | | | | | | the predicated block cannot be iteratively ifcvted. llvm-svn: 37456 | ||||
* | Minor statistics counting bug. | Evan Cheng | 2007-06-06 | 1 | -3/+5 |
| | | | | llvm-svn: 37451 | ||||
* | Fix a couple of typos and be smarter about order of blocks when ifcvt a diamond. | Evan Cheng | 2007-06-06 | 1 | -17/+30 |
| | | | | llvm-svn: 37449 | ||||
* | Fix diamond shape ifcvt bugs. | Evan Cheng | 2007-06-05 | 1 | -61/+41 |
| | | | | llvm-svn: 37444 | ||||
* | ReplaceUsesOfBlockWith() can modify the predecessors list. | Evan Cheng | 2007-06-05 | 1 | -3/+4 |
| | | | | llvm-svn: 37441 | ||||
* | Do not ifcvt if either true / false path is a backedge. Not profitable in ↵ | Evan Cheng | 2007-06-05 | 1 | -0/+3 |
| | | | | | | almost all cases. llvm-svn: 37440 | ||||
* | I had a senior moment. | Evan Cheng | 2007-06-05 | 1 | -3/+4 |
| | | | | llvm-svn: 37433 | ||||
* | If the predicated block requires an early exit, end the block there and add ↵ | Evan Cheng | 2007-06-05 | 1 | -2/+3 |
| | | | | | | a unconditional branch to false block. AnalyzeBranch() does not understand early exits. llvm-svn: 37430 |