aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetAsmBackend.h
diff options
context:
space:
mode:
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,