aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-02-01 21:07:55 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-02-01 21:07:55 +0000
commit4a6a1ccbecd7e34f40b05b4ba0a05d0031dd1eff (patch)
treebd998e25df07b7abd964ad088180d19152336f8d /include
parenta096e0bdf6cfa020569afca490d8e4c9ac8ebb01 (diff)
Notes
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ValueTracking.h3
-rw-r--r--include/llvm/MC/MCFragment.h15
-rw-r--r--include/llvm/MC/MCObjectStreamer.h1
-rw-r--r--include/llvm/MC/MCStreamer.h2
4 files changed, 14 insertions, 7 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h
index 1c51523b15730..1fdb3cff5372b 100644
--- a/include/llvm/Analysis/ValueTracking.h
+++ b/include/llvm/Analysis/ValueTracking.h
@@ -508,7 +508,8 @@ class Value;
/// -> LHS = %a, RHS = i32 4, *CastOp = Instruction::SExt
///
SelectPatternResult matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
- Instruction::CastOps *CastOp = nullptr);
+ Instruction::CastOps *CastOp = nullptr,
+ unsigned Depth = 0);
inline SelectPatternResult
matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS,
Instruction::CastOps *CastOp = nullptr) {
diff --git a/include/llvm/MC/MCFragment.h b/include/llvm/MC/MCFragment.h
index 7ebde03a758c5..85b55e85469a1 100644
--- a/include/llvm/MC/MCFragment.h
+++ b/include/llvm/MC/MCFragment.h
@@ -422,14 +422,21 @@ class MCFillFragment : public MCFragment {
uint8_t Value;
/// The number of bytes to insert.
- uint64_t Size;
+ const MCExpr &Size;
+
+ /// Source location of the directive that this fragment was created for.
+ SMLoc Loc;
public:
- MCFillFragment(uint8_t Value, uint64_t Size, MCSection *Sec = nullptr)
- : MCFragment(FT_Fill, false, 0, Sec), Value(Value), Size(Size) {}
+ MCFillFragment(uint8_t Value, const MCExpr &Size, SMLoc Loc,
+ MCSection *Sec = nullptr)
+ : MCFragment(FT_Fill, false, 0, Sec), Value(Value), Size(Size), Loc(Loc) {
+ }
uint8_t getValue() const { return Value; }
- uint64_t getSize() const { return Size; }
+ const MCExpr &getSize() const { return Size; }
+
+ SMLoc getLoc() const { return Loc; }
static bool classof(const MCFragment *F) {
return F->getKind() == MCFragment::FT_Fill;
diff --git a/include/llvm/MC/MCObjectStreamer.h b/include/llvm/MC/MCObjectStreamer.h
index a3dbc56ebc10f..43ed00b4a7a7f 100644
--- a/include/llvm/MC/MCObjectStreamer.h
+++ b/include/llvm/MC/MCObjectStreamer.h
@@ -161,7 +161,6 @@ public:
bool EmitRelocDirective(const MCExpr &Offset, StringRef Name,
const MCExpr *Expr, SMLoc Loc) override;
using MCStreamer::emitFill;
- void emitFill(uint64_t NumBytes, uint8_t FillValue) override;
void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
SMLoc Loc = SMLoc()) override;
void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h
index a820517007082..28b326ae9b87a 100644
--- a/include/llvm/MC/MCStreamer.h
+++ b/include/llvm/MC/MCStreamer.h
@@ -662,7 +662,7 @@ public:
/// \brief Emit NumBytes bytes worth of the value specified by FillValue.
/// This implements directives such as '.space'.
- virtual void emitFill(uint64_t NumBytes, uint8_t FillValue);
+ void emitFill(uint64_t NumBytes, uint8_t FillValue);
/// \brief Emit \p Size bytes worth of the value specified by \p FillValue.
///