Add FrameSetup MI flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127098 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2011-03-05 18:43:04 +00:00
parent 6647b59c92
commit 6dd97471c4
2 changed files with 54 additions and 13 deletions

View File

@@ -50,12 +50,21 @@ public:
enum CommentFlag {
ReloadReuse = 0x1
};
enum MIFlag {
NoFlags = 0,
FrameSetup = 1 << 0 // Instruction is used as a part of
// function frame setup code.
};
private:
const TargetInstrDesc *TID; // Instruction descriptor.
uint16_t NumImplicitOps; // Number of implicit operands (which
// are determined at construction time).
uint8_t Flags; // Various bits of additional
// information about machine
// instruction.
uint8_t AsmPrinterFlags; // Various bits of information used by
// the AsmPrinter to emit helpful
// comments. This is *not* semantic
@@ -140,7 +149,26 @@ public:
/// setAsmPrinterFlag - Set a flag for the AsmPrinter.
///
void setAsmPrinterFlag(CommentFlag Flag) {
AsmPrinterFlags |= (unsigned short)Flag;
AsmPrinterFlags |= (uint8_t)Flag;
}
/// getFlags - Return the MI flags bitvector.
uint8_t getFlags() const {
return Flags;
}
/// getFlag - Return whether an MI flag is set.
bool getFlag(MIFlag Flag) const {
return Flags & Flag;
}
/// setFlag - Set a MI flag.
void setFlag(MIFlag Flag) {
Flags |= (uint8_t)Flag;
}
void setFlags(unsigned flags) {
Flags = flags;
}
/// clearAsmPrinterFlag - clear specific AsmPrinter flags
@@ -152,7 +180,7 @@ public:
/// getDebugLoc - Returns the debug location id of this MachineInstr.
///
DebugLoc getDebugLoc() const { return debugLoc; }
/// getDesc - Returns the target instruction descriptor of this
/// MachineInstr.
const TargetInstrDesc &getDesc() const { return *TID; }