[MC] Bundle alignment: Invalidate relaxed fragments
authorDerek Schuff <dschuff@google.com>
Tue, 5 Feb 2013 17:55:27 +0000 (17:55 +0000)
committerDerek Schuff <dschuff@google.com>
Tue, 5 Feb 2013 17:55:27 +0000 (17:55 +0000)
commit90aa1d8abeff8269efcdcbe1f70658387e29e625
tree0659f404d0dfaeba86d4fdde03122fd947a73081
parentfdc37670f64615d2d84d3beddee074d7d8151b96
[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.

llvm-svn: 174401
llvm/include/llvm/MC/MCAsmLayout.h
llvm/lib/MC/MCAssembler.cpp
llvm/test/MC/X86/AlignedBundling/relax-at-bundle-end.s [new file with mode: 0644]