[PATCH] D39976: [AArch64] Consider the cost model when folding loads and stores
Chad Rosier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 13:45:35 PST 2017
mcrosier added a comment.
In https://reviews.llvm.org/D39976#925078, @evandro wrote:
> Please, let me know if I addressed your concerns before I split the code refactoring in another patch.
One minor comment, but feel free to go ahead and split the patch.
================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:655
+ // It is profitable in the absence of a cost model.
+ if (!TSM.hasInstrSchedModel())
+ return true;
----------------
Rather than repeatedly call hasInstrSchedModel(), why not just store the result in a bool much like you did with OptForSize..
Repository:
rL LLVM
https://reviews.llvm.org/D39976
More information about the llvm-commits
mailing list