aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetAsmBackend.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-23 03:13:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-23 03:13:05 +0000
commit337055e62f28f18a9a8c4a090633cae1c2256ae1 (patch)
tree18a00928afa5902aa07967f5e3f2492e6f59b97c /include/llvm/Target/TargetAsmBackend.h
parent8f9b80e5df12779a56d763ebf20864dad2bc72da (diff)
downloadexternal_llvm-337055e62f28f18a9a8c4a090633cae1c2256ae1.tar.gz
external_llvm-337055e62f28f18a9a8c4a090633cae1c2256ae1.tar.bz2
external_llvm-337055e62f28f18a9a8c4a090633cae1c2256ae1.zip
MC: Add TargetAsmBackend::MayNeedRelaxation, for checking whether a particular instruction + fixups might need relaxation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetAsmBackend.h')
-rw-r--r--include/llvm/Target/TargetAsmBackend.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetAsmBackend.h b/include/llvm/Target/TargetAsmBackend.h
index 16f33c32f4..f350ecc410 100644
--- a/include/llvm/Target/TargetAsmBackend.h
+++ b/include/llvm/Target/TargetAsmBackend.h
@@ -19,6 +19,8 @@ class MCInst;
class MCInstFragment;
class MCObjectWriter;
class MCSection;
+template<typename T>
+class SmallVectorImpl;
class Target;
class raw_ostream;
@@ -98,6 +100,15 @@ public:
virtual void ApplyFixup(const MCAsmFixup &Fixup, MCDataFragment &Fragment,
uint64_t Value) const = 0;
+ /// MayNeedRelaxation - Check whether the given instruction may need
+ /// relaxation.
+ ///
+ /// \arg Inst - The instruction to test.
+ /// \arg Fixups - The actual fixups this instruction encoded to, for potential
+ /// use by the target backend.
+ virtual bool MayNeedRelaxation(const MCInst &Inst,
+ const SmallVectorImpl<MCAsmFixup> &Fixups) const = 0;
+
/// RelaxInstruction - Relax the instruction in the given fragment to the next
/// wider instruction.
virtual void RelaxInstruction(const MCInstFragment *IF,