summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Speed up addRegisterDead by adding more fast checks before performing the ↵Owen Anderson2008-08-141-1/+3
| | | | | | | | | expensive subregister query, and by increasing the size of the subregister hashtable so that there are fewer collisions. llvm-svn: 54781
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-281-5/+4
| | | | | | | | | | | | | | | | a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. llvm-svn: 54146
* Now that the MachineInstr leaks are fixed, enable leak checkingDan Gohman2008-07-211-0/+2
| | | | | | in the MachineInstr clone code. llvm-svn: 53868
* Fix a memory leak in LiveIntervalAnalysis.Evan Cheng2008-07-191-7/+5
| | | | llvm-svn: 53779
* Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.Dan Gohman2008-07-171-0/+8
| | | | | | | Fix a leak that this turned up in LowerSubregs.cpp. And, comment a leak in LiveIntervalAnalysis.cpp. llvm-svn: 53746
* Add an assert to check for empty flags for MachineMemOperand.Dan Gohman2008-07-161-0/+1
| | | | llvm-svn: 53680
* Trim unnecessary #includes.Dan Gohman2008-07-111-1/+0
| | | | llvm-svn: 53471
* - Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply ↵Evan Cheng2008-07-101-13/+8
| | | | | | | | the operand index of def machineoperand and at most one full scan of non-implicit operands is needed. - Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel. llvm-svn: 53394
* It's no longer necessary to test if a MachineBasicBlock'sDan Gohman2008-07-081-2/+1
| | | | | | parent is non-null. It now always is. llvm-svn: 53263
* Verify that MachineMemOperand alignment is a non-zero power of 2.Dan Gohman2008-07-081-0/+1
| | | | llvm-svn: 53262
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-17/+34
| | | | | | | | | | | 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
* Move MachineMemOperand's constructor out of line, to avoid aDan Gohman2008-07-071-0/+11
| | | | | | #include dependency on Support/MathExtras.h in the header file. llvm-svn: 53200
* - Remove calls to copyKillDeadInfo which is an N^2 function. Instead, ↵Evan Cheng2008-07-031-27/+3
| | | | | | | | 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
* Reapply r52988, "Simplify addRegisterKilled and addRegisterDead." TheDan Gohman2008-07-031-18/+18
| | | | | | 254.gap failure was not due to this mod. llvm-svn: 53068
* Revert r52988. It broke 254.gap on x86-64.Dan Gohman2008-07-021-18/+18
| | | | llvm-svn: 53050
* Simplify addRegisterKilled and addRegisterDead.Evan Cheng2008-07-011-18/+18
| | | | llvm-svn: 52988
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-011-1/+9
| | | | | | | | | | | | | | | | the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. llvm-svn: 52943
* Looks like this condition is inverted.Evan Cheng2008-06-271-2/+2
| | | | llvm-svn: 52841
* Don't perform expensive queries checking for super and sub registers when we ↵Owen Anderson2008-06-271-1/+2
| | | | | | | | know that there aren't any. This speed up LiveVariables on instcombine at -O0 -g from 0.3855s to 0.3503s. Look for more improvements in this area soon! llvm-svn: 52804
* Add a flag to indicate that an instruction is as cheap (or cheaper) than a moveBill Wendling2008-05-281-3/+3
| | | | | | | | | instruction to execute. This can be used for transformations (like two-address conversion) to remat an instruction instead of generating a "move" instruction. The idea is to decrease the live ranges and register pressure and all that jazz. llvm-svn: 51660
* Fix a broken doxygen comment, and reword it for clarity.Dan Gohman2008-05-061-2/+3
| | | | llvm-svn: 50687
* Code clean up.Evan Cheng2008-04-161-70/+54
| | | | llvm-svn: 49783
* Rename MemOperand to MachineMemOperand. This was suggested byDan Gohman2008-04-071-1/+1
| | | | | | | review feedback from Chris quite a while ago. No functionality change. llvm-svn: 49348
* detabify llvm, patch by Mike Stump!Chris Lattner2008-03-201-15/+15
| | | | llvm-svn: 48577
* Refactor some code out of MachineSink into a MachineInstr query.Evan Cheng2008-03-131-6/+36
| | | | llvm-svn: 48311
* Refactor code. Remove duplicated functions that basically do the same thing asEvan Cheng2008-03-051-9/+29
| | | | | | findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. llvm-svn: 47927
* Did I say 'e = getNumOperands()'? I meant --e, of course.Bill Wendling2008-03-041-1/+1
| | | | llvm-svn: 47875
* Miscellaneous clean-ups based on Evan's feedback:Bill Wendling2008-03-031-23/+27
| | | | | | | | | - Cleaned up how the prologue-epilogue inserter loops over the instructions. - Instead of restarting the processing of an instruction if we remove an implicit kill, just update the end iterator and make sure that the iterator isn't incremented. llvm-svn: 47870
* Go through the machine instruction's operands to make sure that we're notBill Wendling2008-03-031-12/+52
| | | | | | | marking both a super- and sub-register as "killed". This removes implicit uses that are marked as "killed". llvm-svn: 47862
* Rename PrintableName to Name.Bill Wendling2008-02-261-1/+1
| | | | llvm-svn: 47629
* Some platforms use the same name for 32-bit and 64-bit registers (likeBill Wendling2008-02-241-4/+4
| | | | | | | | | %r3 on PPC) in their ASM files. However, it's hard for humans to read during debugging. Adding a new field to the register data that lets you specify a different name to be printed than the one that goes into the ASM file -- %x3 instead of %r3, for instance. llvm-svn: 47534
* Support a new type of MachineOperand, MO_FPImmediate, used for holdingNate Begeman2008-02-141-0/+10
| | | | | | FP Immediates, crazily enough llvm-svn: 47117
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-10/+10
| | | | llvm-svn: 46930
* Also print alignment.Evan Cheng2008-02-081-1/+1
| | | | llvm-svn: 46895
* Don't abort if a MemOperand is missing a SourceValue; just print itDan Gohman2008-02-071-9/+13
| | | | | | | as <unknown>. And make some minor adjustments to the MemOperand dump format. llvm-svn: 46853
* Re-apply the memory operand changes, with a fix for the staticDan Gohman2008-02-061-0/+31
| | | | | | | | initializer problem, a minor tweak to the way the DAGISelEmitter finds load/store nodes, and a renaming of the new PseudoSourceValue objects. llvm-svn: 46827
* Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and ↵Evan Cheng2008-01-311-31/+0
| | | | | | re-commit. llvm-svn: 46623
* Add an extra operand to LABEL nodes which distinguishes between debug, EH, ↵Evan Cheng2008-01-311-0/+7
| | | | | | or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution. llvm-svn: 46609
* Create a new class, MemOperand, for describing memory referencesDan Gohman2008-01-311-0/+31
| | | | | | | | | | | | | | | | in the backend. Introduce a new SDNode type, MemOperandSDNode, for holding a MemOperand in the SelectionDAG IR, and add a MemOperand list to MachineInstr, and code to manage them. Remove the offset field from SrcValueSDNode; uses of SrcValueSDNode that were using it are all all using MemOperandSDNode now. Also, begin updating some getLoad and getStore calls to use the PseudoSourceValue objects. Most of this was written by Florian Brander, some reorganization and updating to TOT by me. llvm-svn: 46585
* Move some functionality for adding flags to MachineInstr's into methods on ↵Owen Anderson2008-01-241-0/+90
| | | | | | MachineInstr rather than LiveVariables. llvm-svn: 46295
* remove #includageChris Lattner2008-01-071-1/+1
| | | | llvm-svn: 45697
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-13/+13
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* rename hasVariableOperands() -> isVariadic(). Add some comments.Chris Lattner2008-01-071-3/+2
| | | | | | | Evan, please review the comments I added to getNumDefs to make sure that they are accurate, thx. llvm-svn: 45687
* Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptorChris Lattner2008-01-071-12/+12
| | | | llvm-svn: 45680
* Add predicates methods to TargetOperandInfo, and switch all clients Chris Lattner2008-01-071-2/+2
| | | | | | | over to using them, instead of diddling Flags directly. Change the various flags from const variables to enums. llvm-svn: 45677
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-7/+7
| | | | | | | | | | | | | | | 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
* Make MachineRegisterInfo::getVRegDef more efficient by aiming the keep the ↵Chris Lattner2008-01-011-4/+10
| | | | | | def of the vreg at the start of the list, so the list doesn't need to be traversed. llvm-svn: 45483
* switch the register iterator to act more like hte LLVM value iterator: ↵Chris Lattner2008-01-011-1/+1
| | | | | | | | | | | dereferencing it now returns the machineinstr of the use. To get the operand, use I.getOperand(). Add a new MachineRegisterInfo::replaceRegWith, which is basically like Value::replaceAllUsesWith. llvm-svn: 45482
* Implement automatically updated def/use lists for all MachineInstr register Chris Lattner2008-01-011-3/+249
| | | | | | | operands. The lists are currently kept in MachineRegisterInfo, but it does not yet provide an iterator interface to them. llvm-svn: 45477
* properly encapsulate the parent field of MBB and MI with get/set accessors.Chris Lattner2007-12-311-6/+6
| | | | llvm-svn: 45469
OpenPOWER on IntegriCloud