This is an archive of the discontinued LLVM Phabricator instance.

Add command line options to force function/loop alignments.
ClosedPublic

Authored by mcrosier on Dec 18 2015, 10:16 AM.

Details

Reviewers
gberry
mcrosier
Summary

In short, these options can be used to override the target specified preferred/minimum function/loop alignments for testing purposes.

Chad

Diff Detail

Event Timeline

mcrosier updated this revision to Diff 43249.Dec 18 2015, 10:16 AM
mcrosier retitled this revision from to Add command line options to override target preferred/minimum function/loop alignments..
mcrosier updated this object.
mcrosier added a reviewer: gberry.
mcrosier added a subscriber: llvm-commits.
gberry added inline comments.Dec 18 2015, 11:00 AM
lib/CodeGen/MachineBlockPlacement.cpp
1336

If you move the max up before the if, you don't need to change the !Align check.

mcrosier updated this revision to Diff 43253.Dec 18 2015, 11:14 AM

Address Geoff's comment.

mcrosier marked an inline comment as done.Dec 18 2015, 11:14 AM
mcrosier updated this revision to Diff 43485.Dec 22 2015, 2:19 PM
mcrosier retitled this revision from Add command line options to override target preferred/minimum function/loop alignments. to Add command line options to force function/loop alignments..
mcrosier updated this object.

A more straight forward solution.

gberry edited edge metadata.Dec 22 2015, 2:35 PM

LGTM with one caveat: we should double-check that the MachineBlock emission handles the case where the padding instruction bytes could be executed (i.e. that it knows to emit nops instead of just zeros).

mcrosier accepted this revision.Dec 29 2015, 10:21 AM
mcrosier added a reviewer: mcrosier.

LGTM with one caveat: we should double-check that the MachineBlock emission handles the case where the padding instruction bytes could be executed (i.e. that it knows to emit nops instead of just zeros).

I didn't run into any issues across Spec200X. LGTM, per Geoff.

This revision is now accepted and ready to land.Dec 29 2015, 10:21 AM
mcrosier closed this revision.Dec 29 2015, 10:22 AM

Committed r256571.