[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
Wed Dec 6 09:40:41 PST 2017
junbuml added a comment.
For me, the heuristic seems pretty reasonable, but I'm not fully sure if this can make a right decision target-independently. Someone else who have better idea in hardware level may need to review this.
================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:691
+ long UopN = SCN->NumMicroOps,
+ UopA = TSM.getNumMicroOps(&MIA, SCA),
+ UopB = TSM.getNumMicroOps(&MIB, SCB);
----------------
Isn't it possible to do just TSM.getNumMicroOps(&MIA) and remove above *SCA = TSM.resolveSchedClass(&MIA) in line 678.
================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:707
+ else if (UopA <= 1 && UopB <= 1) {
+ if (LatDif < -UopDif) {
+ DEBUG(dbgs() << "Evaluating instructions: replacement is faster "
----------------
I'm not sure if it's okay to compare values from computeInstrLatency() and getNumMicroOps() ?
Repository:
rL LLVM
https://reviews.llvm.org/D39976
More information about the llvm-commits
mailing list