mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Do not model all INLINEASM instructions as having unmodelled side effects.
Instead encode llvm IR level property "HasSideEffects" in an operand (shared with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check the operand when the instruction is an INLINEASM. This allows memory instructions to be moved around INLINEASM instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123044 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -237,6 +237,7 @@ public:
|
||||
bool isKill() const { return getOpcode() == TargetOpcode::KILL; }
|
||||
bool isImplicitDef() const { return getOpcode()==TargetOpcode::IMPLICIT_DEF; }
|
||||
bool isInlineAsm() const { return getOpcode() == TargetOpcode::INLINEASM; }
|
||||
bool isStackAligningInlineAsm() const;
|
||||
bool isInsertSubreg() const {
|
||||
return getOpcode() == TargetOpcode::INSERT_SUBREG;
|
||||
}
|
||||
@@ -432,6 +433,15 @@ public:
|
||||
/// return 0.
|
||||
unsigned isConstantValuePHI() const;
|
||||
|
||||
/// hasUnmodeledSideEffects - Return true if this instruction has side
|
||||
/// effects that are not modeled by mayLoad / mayStore, etc.
|
||||
/// For all instructions, the property is encoded in TargetInstrDesc::Flags
|
||||
/// (see TargetInstrDesc::hasUnmodeledSideEffects(). The only exception is
|
||||
/// INLINEASM instruction, in which case the side effect property is encoded
|
||||
/// in one of its operands (see InlineAsm::Extra_HasSideEffect).
|
||||
///
|
||||
bool hasUnmodeledSideEffects() const;
|
||||
|
||||
/// allDefsAreDead - Return true if all the defs of this instruction are dead.
|
||||
///
|
||||
bool allDefsAreDead() const;
|
||||
|
||||
Reference in New Issue
Block a user