mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Replace PROLOG_LABEL with a new CFI_INSTRUCTION.
The old system was fairly convoluted: * A temporary label was created. * A single PROLOG_LABEL was created with it. * A few MCCFIInstructions were created with the same label. The semantics were that the cfi instructions were mapped to the PROLOG_LABEL via the temporary label. The output position was that of the PROLOG_LABEL. The temporary label itself was used only for doing the mapping. The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to one by holding an index into the CFI instructions of this function. I did consider removing MMI.getFrameInstructions completelly and having CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non trivial constructors and destructors and are somewhat big, so the this setup is probably better. The net result is that we don't create temporary labels that are never used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203204 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -637,19 +637,19 @@ public:
|
||||
/// bundle remain bundled.
|
||||
void eraseFromBundle();
|
||||
|
||||
/// isLabel - Returns true if the MachineInstr represents a label.
|
||||
///
|
||||
bool isLabel() const {
|
||||
return getOpcode() == TargetOpcode::PROLOG_LABEL ||
|
||||
getOpcode() == TargetOpcode::EH_LABEL ||
|
||||
getOpcode() == TargetOpcode::GC_LABEL;
|
||||
}
|
||||
|
||||
bool isPrologLabel() const {
|
||||
return getOpcode() == TargetOpcode::PROLOG_LABEL;
|
||||
}
|
||||
bool isEHLabel() const { return getOpcode() == TargetOpcode::EH_LABEL; }
|
||||
bool isGCLabel() const { return getOpcode() == TargetOpcode::GC_LABEL; }
|
||||
|
||||
/// isLabel - Returns true if the MachineInstr represents a label.
|
||||
///
|
||||
bool isLabel() const { return isEHLabel() || isGCLabel(); }
|
||||
bool isCFIInstruction() const {
|
||||
return getOpcode() == TargetOpcode::CFI_INSTRUCTION;
|
||||
}
|
||||
|
||||
// True if the instruction represents a position in the function.
|
||||
bool isPosition() const { return isLabel() || isCFIInstruction(); }
|
||||
|
||||
bool isDebugValue() const { return getOpcode() == TargetOpcode::DBG_VALUE; }
|
||||
/// A DBG_VALUE is indirect iff the first operand is a register and
|
||||
/// the second operand is an immediate.
|
||||
@@ -715,7 +715,7 @@ public:
|
||||
// Pseudo-instructions that don't produce any real output.
|
||||
case TargetOpcode::IMPLICIT_DEF:
|
||||
case TargetOpcode::KILL:
|
||||
case TargetOpcode::PROLOG_LABEL:
|
||||
case TargetOpcode::CFI_INSTRUCTION:
|
||||
case TargetOpcode::EH_LABEL:
|
||||
case TargetOpcode::GC_LABEL:
|
||||
case TargetOpcode::DBG_VALUE:
|
||||
|
Reference in New Issue
Block a user