This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add backend command line options to control function and loop alignment for testing.
AbandonedPublic

Authored by craig.topper on Jul 22 2021, 9:44 AM.

Details

Summary

Clang doesn't support -falign-loops or -falign-functions. This
patch adds backend options to emulate them for testing. The
names were copied from x86. In the future we may want subtarget
based defaults, but I'm leaving that until we need it.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 22 2021, 9:44 AM
craig.topper requested review of this revision.Jul 22 2021, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2021, 9:44 AM
Herald added a subscriber: MaskRay. · View Herald Transcript

(clang supports one form: -falign-functions=N . I am working on a patch to add -falign-loops=N )

(clang supports one form: -falign-functions=N . I am working on a patch to add -falign-loops=N )

Oops. I guess I didn't read the list of ignored align options very closely to see that it was jumps, labels, and loops that weren't supported, and not functions.

craig.topper abandoned this revision.Aug 4 2021, 1:51 PM

Abandon since clang now supports -falign-loops