summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCExpr.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-03 00:55:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-03 00:55:40 +0000
commit32a006e606742b1c5401e49607e33717bb5441f0 (patch)
treea0f3328f54b7df420f636fcd4ece07f4accd2f6c /include/llvm/MC/MCExpr.h
parent0bdf0c05b990b4f2d29719b34f4ce44f16176f09 (diff)
downloadllvm-32a006e606742b1c5401e49607e33717bb5441f0.tar.gz
llvm-32a006e606742b1c5401e49607e33717bb5441f0.tar.bz2
llvm-32a006e606742b1c5401e49607e33717bb5441f0.tar.xz
Try to resolve symbol differences early, and if successful create a plain
data fragment. This reduces the time to assemble the test in 8711 from 60s to 54s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCExpr.h')
-rw-r--r--include/llvm/MC/MCExpr.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h
index fc9d18bf3a..e953a11186 100644
--- a/include/llvm/MC/MCExpr.h
+++ b/include/llvm/MC/MCExpr.h
@@ -16,6 +16,7 @@
namespace llvm {
class MCAsmInfo;
class MCAsmLayout;
+class MCAssembler;
class MCContext;
class MCSymbol;
class MCValue;
@@ -43,7 +44,8 @@ private:
protected:
explicit MCExpr(ExprKind _Kind) : Kind(_Kind) {}
- bool EvaluateAsRelocatableImpl(MCValue &Res, const MCAsmLayout *Layout,
+ bool EvaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
+ const MCAsmLayout *Layout,
bool InSet) const;
public:
/// @name Accessors
@@ -69,7 +71,11 @@ public:
/// values. If not given, then only non-symbolic expressions will be
/// evaluated.
/// @result - True on success.
- bool EvaluateAsAbsolute(int64_t &Res, const MCAsmLayout *Layout = 0) const;
+ bool EvaluateAsAbsolute(int64_t &Res) const;
+ bool EvaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm) const;
+ bool EvaluateAsAbsolute(int64_t &Res, const MCAsmLayout *Layout) const;
+ bool EvaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm,
+ const MCAsmLayout *Layout) const;
/// EvaluateAsRelocatable - Try to evaluate the expression to a relocatable
/// value, i.e. an expression of the fixed form (a - b + constant).