summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2013-02-05 17:55:27 +0000
committerDerek Schuff <dschuff@google.com>2013-02-05 17:55:27 +0000
commitf918d7fd7393049bc87bc03fda2d2cd3cec1dacb (patch)
tree1a4d4eb30a7e87383e67c3e47147fec66c04044c /include
parenta499d2bcef0c1001c60d752d356e50eed2402ca8 (diff)
downloadllvm-f918d7fd7393049bc87bc03fda2d2cd3cec1dacb.tar.gz
llvm-f918d7fd7393049bc87bc03fda2d2cd3cec1dacb.tar.bz2
llvm-f918d7fd7393049bc87bc03fda2d2cd3cec1dacb.tar.xz
[MC] Bundle alignment: Invalidate relaxed fragments
Currently, when a fragment is relaxed, its size is modified, but its offset is not (it gets laid out as a side effect of checking whether it needs relaxation), then all subsequent fragments are invalidated because their offsets need to change. When bundling is enabled, relaxed fragments need to get laid out again, because the increase in size may push it over a bundle boundary. So instead of only invalidating subsequent fragments, also invalidate the fragment that gets relaxed, which causes it to get laid out again. This patch also fixes some trailing whitespace and fixes the bundling-related debug output of MCFragments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCAsmLayout.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/MC/MCAsmLayout.h b/include/llvm/MC/MCAsmLayout.h
index 8cb4601283..3058b7b487 100644
--- a/include/llvm/MC/MCAsmLayout.h
+++ b/include/llvm/MC/MCAsmLayout.h
@@ -60,9 +60,10 @@ public:
/// Get the assembler object this is a layout for.
MCAssembler &getAssembler() const { return Assembler; }
- /// \brief Invalidate the fragments after F because it has been resized.
- /// The fragment's size should have already been updated.
- void invalidateFragmentsAfter(MCFragment *F);
+ /// \brief Invalidate the fragments starting with F because it has been
+ /// resized. The fragment's size should have already been updated, but
+ /// its bundle padding will be recomputed.
+ void invalidateFragmentsFrom(MCFragment *F);
/// \brief Perform layout for a single fragment, assuming that the previous
/// fragment has already been laid out correctly, and the parent section has