diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-25 19:21:35 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-25 19:21:35 +0000 |
commit | c291e2f5780c3a8470113a2a58c1fa680cd54b20 (patch) | |
tree | 616b34f57b194d1781beae1b1c6a650888cdda96 /include/llvm/MC/MCInstrDesc.h | |
parent | 0eba4fe292a0bb343da5fb2667850a39459cef0b (diff) | |
download | llvm-c291e2f5780c3a8470113a2a58c1fa680cd54b20.tar.gz llvm-c291e2f5780c3a8470113a2a58c1fa680cd54b20.tar.bz2 llvm-c291e2f5780c3a8470113a2a58c1fa680cd54b20.tar.xz |
Add target hook for pseudo instruction expansion.
Many targets use pseudo instructions to help register allocation. Like
the COPY instruction, these pseudos can be expanded after register
allocation. The early expansion can make life easier for PEI and the
post-ra scheduler.
This patch adds a hook that is called for all remaining pseudo
instructions from the ExpandPostRAPseudos pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCInstrDesc.h')
-rw-r--r-- | include/llvm/MC/MCInstrDesc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/MC/MCInstrDesc.h b/include/llvm/MC/MCInstrDesc.h index 7061fcb012..aafa800c1a 100644 --- a/include/llvm/MC/MCInstrDesc.h +++ b/include/llvm/MC/MCInstrDesc.h @@ -97,6 +97,7 @@ namespace MCID { enum { Variadic = 0, HasOptionalDef, + Pseudo, Return, Call, Barrier, @@ -275,6 +276,13 @@ public: return Size; } + /// isPseudo - Return true if this is a pseudo instruction that doesn't + /// correspond to a real machine instruction. + /// + bool isPseudo() const { + return Flags & (1 << MCID::Pseudo); + } + bool isReturn() const { return Flags & (1 << MCID::Return); } |