This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add option to specify preferable loop alignment
ClosedPublic

Authored by skatkov on Feb 26 2017, 9:26 PM.

Details

Summary

Loop alignment can cause a significant change of
the perfromance for short loops.
To be able to evaluate the impact of loop alignment this change
introduces the new option x86-experimental-pref-loop-alignment.
The alignment will be 2^Value bytes, the default value is 4.

Diff Detail

Event Timeline

skatkov created this revision.Feb 26 2017, 9:26 PM
craig.topper added inline comments.Feb 26 2017, 9:46 PM
lib/Target/X86/X86ISelLowering.cpp
75

prefereable should be spelled preferable.

Probably shouldn't use "ExperimentalPrefLoopAlignment" in the description since that's an variable name and this text is printed to the command line help.

skatkov updated this revision to Diff 89840.Feb 26 2017, 10:17 PM
skatkov retitled this revision from [X86] Add Experimental option to specify preferable loop alignment to [X86] Add option to specify preferable loop alignment.

Craig, Thank you for the review.

I've updated a change.

skatkov marked an inline comment as done.Feb 26 2017, 10:18 PM

Ooops, bad change. Will upload a new one.

skatkov updated this revision to Diff 89841.Feb 26 2017, 10:30 PM

This one should be better. make check passed.

sanjoy added a subscriber: sanjoy.Mar 3 2017, 11:49 AM
sanjoy added inline comments.
lib/Target/X86/X86ISelLowering.cpp
76

I think what @craig.topper wanted to say is that the description should be "the last x86-pref-loop-alignment bits of the ..."

skatkov updated this revision to Diff 90636.Mar 5 2017, 7:40 PM
skatkov marked an inline comment as done.
This revision is now accepted and ready to land.Mar 6 2017, 9:45 AM
This revision was automatically updated to reflect the committed changes.