mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 07:29:55 +00:00
add a convenient TargetInstrDesc::getNumImplicitUses/Defs method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99446 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4020670195
commit
375cf52638
@ -204,6 +204,16 @@ public:
|
||||
return ImplicitUses;
|
||||
}
|
||||
|
||||
/// getNumImplicitUses - Return the number of implicit uses this instruction
|
||||
/// has.
|
||||
unsigned getNumImplicitUses() const {
|
||||
if (ImplicitUses == 0) return 0;
|
||||
unsigned i = 0;
|
||||
for (; ImplicitUses[i]; ++i) /*empty*/;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/// getImplicitDefs - Return a list of registers that are potentially
|
||||
/// written by any instance of this machine instruction. For example, on X86,
|
||||
/// many instructions implicitly set the flags register. In this case, they
|
||||
@ -218,6 +228,15 @@ public:
|
||||
return ImplicitDefs;
|
||||
}
|
||||
|
||||
/// getNumImplicitDefs - Return the number of implicit defs this instruction
|
||||
/// has.
|
||||
unsigned getNumImplicitDefs() const {
|
||||
if (ImplicitDefs == 0) return 0;
|
||||
unsigned i = 0;
|
||||
for (; ImplicitDefs[i]; ++i) /*empty*/;
|
||||
return i;
|
||||
}
|
||||
|
||||
/// hasImplicitUseOfPhysReg - Return true if this instruction implicitly
|
||||
/// uses the specified physical register.
|
||||
bool hasImplicitUseOfPhysReg(unsigned Reg) const {
|
||||
|
Loading…
Reference in New Issue
Block a user