[PATCH][MC] If bundle alignment is enabled, do not add data to a fragment containing instructions
Eli Bendersky
eliben at google.com
Wed Feb 13 08:59:54 PST 2013
On Tue, Feb 12, 2013 at 4:58 PM, Derek Schuff <dschuff at google.com> wrote:
> With bundle alignment, instructions all get their own MCFragments
> (unless they are in a bundle-locked group). For instructions with
> fixups, this is an MCDataFragment. Emitting actual data (e.g. for
> .long) attempts to re-use MCDataFragments, which we don't want int
> this case since it leads to fragments which exceed the bundle size.
> So, don't reuse them in this case.
> Also adds a test and fixes some formatting.
>
Just a small note:
- DF = getOrCreateDataFragment();
+ DF = cast<MCDataFragment>(getCurrentFragment());
A short comment explaining why we know a fragment exists (and
effectively assert it with cast<>) would probably be beneficial.
LGTM otherwise.
Eli
More information about the llvm-commits
mailing list