[PATCH] D39976: [AArch64] Consider the cost model when folding loads and stores
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 09:32:28 PST 2017
junbuml added a comment.
No objection in high level. IMHO, it will not cause significant compile time regression, but better to make sure. I also agree with splitting this patch: one for the profitability check and one for refactoring.
================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:649
+ // Default as profitable if optimizing for size.
+ if (MF->getFunction()->optForSize())
+ return true;
----------------
No need to repeat this check for every candiate.
================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:667-669
+ if (!NewSD->isValid() || NewSD->isVariant() ||
+ !OldASD->isValid() || OldASD->isVariant() ||
+ !OldBSD->isValid() || OldBSD->isVariant())
----------------
Can we guarantee these pointers are always none null?
Repository:
rL LLVM
https://reviews.llvm.org/D39976
More information about the llvm-commits
mailing list