mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-09 03:19:21 +00:00
Convert EXTRACT_SUBREG to COPY when emitting machine instrs.
EXTRACT_SUBREG no longer appears as a machine instruction. Use COPY instead. Add isCopy() checks in many places using isMoveInstr() and isExtractSubreg(). The isMoveInstr hook will be removed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107879 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -215,9 +215,6 @@ public:
|
||||
bool isKill() const { return getOpcode() == TargetOpcode::KILL; }
|
||||
bool isImplicitDef() const { return getOpcode()==TargetOpcode::IMPLICIT_DEF; }
|
||||
bool isInlineAsm() const { return getOpcode() == TargetOpcode::INLINEASM; }
|
||||
bool isExtractSubreg() const {
|
||||
return getOpcode() == TargetOpcode::EXTRACT_SUBREG;
|
||||
}
|
||||
bool isInsertSubreg() const {
|
||||
return getOpcode() == TargetOpcode::INSERT_SUBREG;
|
||||
}
|
||||
@@ -234,7 +231,13 @@ public:
|
||||
/// isCopyLike - Return true if the instruction behaves like a copy.
|
||||
/// This does not include native copy instructions.
|
||||
bool isCopyLike() const {
|
||||
return isCopy() || isSubregToReg() || isExtractSubreg() || isInsertSubreg();
|
||||
return isCopy() || isSubregToReg();
|
||||
}
|
||||
|
||||
/// isIdentityCopy - Return true is the instruction is an identity copy.
|
||||
bool isIdentityCopy() const {
|
||||
return isCopy() && getOperand(0).getReg() == getOperand(1).getReg() &&
|
||||
getOperand(0).getSubReg() == getOperand(1).getSubReg();
|
||||
}
|
||||
|
||||
/// readsRegister - Return true if the MachineInstr reads the specified
|
||||
|
||||
Reference in New Issue
Block a user