summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PHIElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Exposed PHIElimination pass within CodeGen.Lang Hames2009-07-211-74/+21
| | | | llvm-svn: 76688
* Revert 74898. It broke several tests.Evan Cheng2009-07-071-9/+3
| | | | llvm-svn: 74925
* if the terminator is a branch depending upon the side effects of aSanjiv Gupta2009-07-071-3/+9
| | | | | | | | previous cmp; a copy can not be inserted here if the copy insn also has side effects. We don't have access to the attributes of copy insn here; so just play safe by finding a safe locations for branch terminators. llvm-svn: 74898
* LiveVariables::VarInfo contains an AliveBlocks BitVector, which has as manyJeffrey Yasskin2009-05-261-4/+2
| | | | | | | | | | entries as there are basic blocks in the function. LiveVariables::getVarInfo creates a VarInfo struct for every register in the function, leading to quadratic space use. This patch changes the BitVector to a SparseBitVector, which doesn't help the worst-case memory use but does reduce the actual use in very long functions with short-lived variables. llvm-svn: 72426
* Eliminate VarInfo::UsedBlocks.Evan Cheng2009-05-261-3/+0
| | | | llvm-svn: 72411
* Reapply r67049, with the test adjusted for darwinDuncan Sands2009-03-171-39/+61
| | | | | | (which produces "call L_f$stub" rather than "call f"). llvm-svn: 67079
* --- Reverse-merging (from foreign repository) r67049 into '.':Bill Wendling2009-03-161-61/+39
| | | | | | | | | | | | | | | | U test/CodeGen/X86/2009-03-13-PHIElimBug.ll D test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll U lib/CodeGen/PHIElimination.cpp r67049 was causing this failure: Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll for PR3784 Failed with exit(1) at line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll | llc -march=x86 | /usr/bin/grep -A 2 {call f} | /usr/bin/grep movl child process exited abnormally llvm-svn: 67051
* Tweak the fix for PR3784: be less sensitive about justDuncan Sands2009-03-161-39/+61
| | | | | | | | | | | | | | | | | | how invokes are set up. The fix could be disturbed by register copies coming after the EH_LABEL, and also didn't behave quite right when it was the invoke result that was used in a phi node. Also (see new testcase) fix another phi elimination bug while there: register copies in the landing pad need to come after the EH_LABEL, because that's where execution branches to when unwinding. If they come before the EH_LABEL then they will never be executed... Also tweak the original testcase so it doesn't use a no-longer existing counter. The accumulated phi elimination changes fix two of seven Ada testsuite failures that turned up after landing pad critical edge splitting was turned off. So there's probably more to come. llvm-svn: 67049
* Fix PR3784: If the source of a phi comes from a bb ended with an invoke, ↵Evan Cheng2009-03-131-0/+40
| | | | | | | | make sure the copy is inserted before the try range (unless it's used as an input to the invoke, then insert it after the last use), not at the end of the bb. Also re-apply r66140 which was disabled as a workaround. llvm-svn: 66976
* Explicitly pass in debug location information to BuildMI.Bill Wendling2009-02-031-1/+1
| | | | llvm-svn: 63599
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-1/+1
| | | | llvm-svn: 63198
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-1/+1
| | | | | | | | | | | 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
* - Remove calls to copyKillDeadInfo which is an N^2 function. Instead, ↵Evan Cheng2008-07-031-17/+23
| | | | | | | | propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc. - Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list. llvm-svn: 53097
* Cosmetic changes.Evan Cheng2008-06-191-3/+5
| | | | llvm-svn: 52479
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-131-1/+1
| | | | | | | | | | | 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
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Constify isSourceDefinedByImplicitDef function. Otherwise, just formattingBill Wendling2008-05-121-45/+38
| | | | | | changes that don't change functionality. llvm-svn: 51004
* If all sources of a PHI node are defined by an implicit_def, just emit an ↵Evan Cheng2008-05-101-7/+11
| | | | | | implicit_def instead of a copy. llvm-svn: 50927
* If a PHI node has a single implicit_def source, replace it with an ↵Evan Cheng2008-04-111-5/+19
| | | | | | implicit_def instead of a copy. llvm-svn: 49543
* Undo PHI elimination copy placement patch. This causes coalescing ↵Evan Cheng2008-04-041-30/+1
| | | | | | (performace) issues. llvm-svn: 49198
* - PHI elimination also eliminates implicit_def that fits into a PHI node ↵Evan Cheng2008-04-031-42/+84
| | | | | | | | rather than copying it. - Be (slightly) smarter about where to place the copies. llvm-svn: 49165
* Remove #include<map> from LiveVariables.h. Not referenced.Evan Cheng2008-04-021-1/+2
| | | | llvm-svn: 49099
* Refactor code. Remove duplicated functions that basically do the same thing asEvan Cheng2008-03-051-1/+1
| | | | | | findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. llvm-svn: 47927
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-1/+1
| | | | llvm-svn: 46930
* Remove DefInst from LiveVariables::VarInfo. Use the facilities on ↵Owen Anderson2008-01-151-4/+0
| | | | | | MachineRegisterInfo instead. llvm-svn: 46016
* Don't recalculate the loop info and loop dominators analyses if they'reBill Wendling2008-01-041-0/+2
| | | | | | preserved. llvm-svn: 45596
* Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of theOwen Anderson2007-12-311-3/+3
| | | | | | Machine-level API cleanup instigated by Chris. llvm-svn: 45470
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-311-3/+3
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-301-7/+5
| | | | | | | | | | | | e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. llvm-svn: 45464
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Bring UsedBlocks back. StrongPHIElimination needs this information.Owen Anderson2007-11-081-0/+3
| | | | llvm-svn: 43866
* Allow copyRegToReg to emit cross register classes copies.Evan Cheng2007-09-261-2/+2
| | | | | | Tested with "make check"! llvm-svn: 42346
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* VarInfo::UsedBlocks is no longer used. Remove.Evan Cheng2007-04-181-3/+0
| | | | llvm-svn: 36250
* Increment use count of new virtuals created during PHI elimination.Evan Cheng2007-04-181-0/+3
| | | | llvm-svn: 36233
* Keep UsedBlocks info accurate.Evan Cheng2007-03-181-0/+3
| | | | llvm-svn: 35140
* rename DenseMap to IndexedMap.Chris Lattner2007-02-011-1/+0
| | | | llvm-svn: 33749
* Eliminate static ctors from StatisticsChris Lattner2006-12-191-3/+4
| | | | llvm-svn: 32698
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-2/+2
| | | | | | is 'unsigned'. llvm-svn: 32279
* "Once more into the breach, dear friends, once more, or fill the wall upBill Wendling2006-09-281-26/+42
| | | | | | | | | | with our English dead." No! Really! Serious this time...It was how the vreg uses were being adjusted that was causing hte Olden tests to fail. I corrected this and the Olden and Regression tests all passed. llvm-svn: 30644
* re-re-revert this, back to the right revision. It currently breaks bisort/mstChris Lattner2006-09-281-44/+24
| | | | | | in olden among others. llvm-svn: 30637
* re-revert this patch, bisort and mst are still broken in Olden.Chris Lattner2006-09-281-3/+3
| | | | llvm-svn: 30634
* Reapplying this patch. With the newest commits, the error in Olden/bisortBill Wendling2006-09-271-24/+44
| | | | | | has disappeared. llvm-svn: 30633
* Temporarily revert this. This breaks Olden/bisort on PPCChris Lattner2006-09-271-44/+24
| | | | llvm-svn: 30628
* PR878: Instead of calculating the vreg to PHI use count everytime we getBill Wendling2006-09-271-24/+44
| | | | | | | | a function, do it up front in linear time (going through all of the instructions once). We create a map out of them. Then it's no problem to use the information in it during elimination... llvm-svn: 30624
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29911
OpenPOWER on IntegriCloud