This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Removed the narrow load merging code in the ld/st optimizer.
ClosedPublic

Authored by mcrosier on Nov 2 2016, 9:03 AM.

Details

Summary

This feature has been disabled for some time now due to reports of performance regressions. Since no one has complained and we've moved on to 4.0 I'd like to remove this code permanently.

This should be a NFC for all AArch64 subtargets.

The FeatureMergeNarrowLd used to control merging of both narrow loads and narrow zero stores (which was a bit misleading). I've renamed it to FeatureMergeNarrowSt to be more inline with what's actually happening.

Currently, narrow zero stores are only merged for Kryo and Cortex-A57. I suspect this would benefit other subtargets, but I'll leave that to the respective owners to decide.

Chad

Diff Detail

Event Timeline

mcrosier updated this revision to Diff 76714.Nov 2 2016, 9:03 AM
mcrosier retitled this revision from to [AArch64] Removed the narrow load merging code in the ld/st optimizer..
mcrosier updated this object.
mcrosier added a reviewer: junbuml.
junbuml edited edge metadata.Nov 2 2016, 11:20 AM

LGTM. Just minor inline comments.
Thanks Chad for handling this.

lib/Target/AArch64/AArch64.td
64–67

FeatureMergeNarrowZeroSt should be the right name.

lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
40–41

NumNarrowLoadsPromoted should be removed

542–544

isPromotableZeroStoreOpcode(MachineInstr &MI) is used only in here.
By using isPromotableZeroStoreOpcode(MI.getOpcode()), we can remove :

static bool isPromotableZeroStoreOpcode(MachineInstr &MI) {

return isPromotableZeroStoreOpcode(MI.getOpcode());

}

1491

EnableNarrowStOpt -> EnableNarrowZeroStOpt could be better.

1705–1706

enableNarrowStOpt -> EnableNarrowZeroStOpt

lib/Target/AArch64/AArch64Subtarget.h
74

MergeNarrowStores -> MergeNarrowZeroStores

182

mergeNarrowStores -> mergeNarrowZeroStores

mcrosier updated this revision to Diff 77032.Nov 7 2016, 6:59 AM
mcrosier edited edge metadata.

Address Jun's comments.

mcrosier marked 7 inline comments as done.Nov 7 2016, 7:00 AM
junbuml accepted this revision.Nov 7 2016, 7:24 AM
junbuml edited edge metadata.

LGTM. Thanks Chad!

lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
1450

Now, mergeNarrowInsns () is used only for narrow zero store merge. So, "mergeNarrowZeroStore" seems to be the right name.

This revision is now accepted and ready to land.Nov 7 2016, 7:24 AM
This revision was automatically updated to reflect the committed changes.