diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-21 20:35:18 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-21 20:35:18 +0000 |
commit | 7a45903bf40a023ce96f4da953bb6cb2cb1a1b50 (patch) | |
tree | 492f9c875e10a1466b676aeecff78fd875fdbcbf /include/llvm/MC/MCAssembler.h | |
parent | a83bf35d167c43ff2eb8c61bdea0cb660d2b07d8 (diff) |
Don't relax org or align. They change size as the relaxation happens, but they
are not actually relaxed. For example, a section with only alignments will never
needs relaxation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 7d8bae9f37..65f01e7772 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -227,9 +227,6 @@ class MCAlignFragment : public MCFragment { /// cannot be satisfied in this width then this fragment is ignored. unsigned MaxBytesToEmit; - /// Size - The current estimate of the size. - unsigned Size; - /// EmitNops - Flag to indicate that (optimal) NOPs should be emitted instead /// of using the provided value. The exact interpretation of this flag is /// target dependent. @@ -240,7 +237,7 @@ public: unsigned _MaxBytesToEmit, MCSectionData *SD = 0) : MCFragment(FT_Align, SD), Alignment(_Alignment), Value(_Value),ValueSize(_ValueSize), - MaxBytesToEmit(_MaxBytesToEmit), Size(0), EmitNops(false) {} + MaxBytesToEmit(_MaxBytesToEmit), EmitNops(false) {} /// @name Accessors /// @{ @@ -251,10 +248,6 @@ public: unsigned getValueSize() const { return ValueSize; } - unsigned getSize() const { return Size; } - - void setSize(unsigned Size_) { Size = Size_; } - unsigned getMaxBytesToEmit() const { return MaxBytesToEmit; } bool hasEmitNops() const { return EmitNops; } @@ -312,13 +305,10 @@ class MCOrgFragment : public MCFragment { /// Value - Value to use for filling bytes. int8_t Value; - /// Size - The current estimate of the size. - unsigned Size; - public: MCOrgFragment(const MCExpr &_Offset, int8_t _Value, MCSectionData *SD = 0) : MCFragment(FT_Org, SD), - Offset(&_Offset), Value(_Value), Size(0) {} + Offset(&_Offset), Value(_Value) {} /// @name Accessors /// @{ @@ -327,9 +317,6 @@ public: uint8_t getValue() const { return Value; } - unsigned getSize() const { return Size; } - - void setSize(unsigned Size_) { Size = Size_; } /// @} static bool classof(const MCFragment *F) { @@ -715,14 +702,10 @@ private: bool RelaxInstruction(MCAsmLayout &Layout, MCInstFragment &IF); - bool RelaxOrg(MCAsmLayout &Layout, MCOrgFragment &OF); - bool RelaxLEB(MCAsmLayout &Layout, MCLEBFragment &IF); bool RelaxDwarfLineAddr(MCAsmLayout &Layout, MCDwarfLineAddrFragment &DF); - bool RelaxAlignment(MCAsmLayout &Layout, MCAlignFragment &DF); - /// FinishLayout - Finalize a layout, including fragment lowering. void FinishLayout(MCAsmLayout &Layout); @@ -732,7 +715,7 @@ private: public: /// Compute the effective fragment size assuming it is layed out at the given /// \arg SectionAddress and \arg FragmentOffset. - uint64_t ComputeFragmentSize(const MCFragment &F) const; + uint64_t ComputeFragmentSize(const MCAsmLayout &Layout, const MCFragment &F) const; /// Find the symbol which defines the atom containing the given symbol, or /// null if there is no such symbol. |