diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index b577f92ae8..713e890660 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -532,18 +532,26 @@ private: unsigned HasInstructions : 1; // @LOCALMOD-BEGIN - bool BundlingEnabled; - bool BundleLocked; + bool BundlingEnabled : 1; + bool BundleLocked : 1; // Because ".bundle_lock" occurs before the fragment it applies to exists, // we need to keep this flag around so we know to mark the next fragment // as the start of a bundle group. A similar flag is not necessary for the // last fragment, because when a .bundle_unlock occurs, the last fragment // in the group already exists and can be marked directly. - bool BundleGroupFirstFrag; + bool BundleGroupFirstFrag : 1; typedef MCFragment::BundleAlignType BundleAlignType; - BundleAlignType BundleAlignNext; + BundleAlignType BundleAlignNext : 2; + + // Optimization to reduce the number of fragments generated (for memory + // savings). Keep track of when we know the offset of the next point to + // emit an instruction. If we know the offset from a known alignment point, + // we can just append to the previous fragment. + bool BundleOffsetKnown : 1; + unsigned BundleSize; + unsigned BundleOffset; // @LOCALMOD-END /// @} @@ -579,6 +587,11 @@ public: BundleAlignType getBundleAlignNext() const { return BundleAlignNext; } void setBundleAlignNext(BundleAlignType Value) { BundleAlignNext = Value; } + + void MarkBundleOffsetUnknown(); + bool ShouldCreateNewFragment(size_t Size); + void UpdateBundleOffset(size_t Size); + void AlignBundleOffsetTo(size_t AlignBase); // @LOCALMOD-END /// @name Fragment Access |