mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 16:25:18 +00:00
move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -77,7 +77,7 @@ bool MachineSinking::AllUsesDominatedByBlock(unsigned Reg,
|
||||
// Determine the block of the use.
|
||||
MachineInstr *UseInst = &*I;
|
||||
MachineBasicBlock *UseBlock = UseInst->getParent();
|
||||
if (UseInst->getOpcode() == TargetInstrInfo::PHI) {
|
||||
if (UseInst->isPHI()) {
|
||||
// PHI nodes use the operand in the predecessor block, not the block with
|
||||
// the PHI.
|
||||
UseBlock = UseInst->getOperand(I.getOperandNo()+1).getMBB();
|
||||
@@ -269,8 +269,7 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) {
|
||||
|
||||
// Determine where to insert into. Skip phi nodes.
|
||||
MachineBasicBlock::iterator InsertPos = SuccToSinkTo->begin();
|
||||
while (InsertPos != SuccToSinkTo->end() &&
|
||||
InsertPos->getOpcode() == TargetInstrInfo::PHI)
|
||||
while (InsertPos != SuccToSinkTo->end() && InsertPos->isPHI())
|
||||
++InsertPos;
|
||||
|
||||
// Move the instruction.
|
||||
|
Reference in New Issue
Block a user