[PATCH] D27853: [CodeGenPrep]Restructure promoting Ext to form ExtLoad
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 21 13:39:00 PST 2016
qcolombet added inline comments.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4141
+/// instruction. If it reach to an unpromotable instruction, save the promoted
+/// Ext in \p PromotedExts. When some promotion happened, \p TPT contains the
+/// proper state to revert them.
----------------
[...]save the promoted Ext[...]
You mean save the promoted instructions, right?
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4171
+ if (!TPH) {
+ PromotedExts.push_back(I);
continue;
----------------
"I" is not promoted here, we shouldn't push it.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4177
+ if (!TLI || !TLI->enableExtLdPromotion() || DisableExtLdPromotion)
+ return false;
+
----------------
Shouldn't we keep this check before TypePromotionHelper::getAction?
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4206
TPT.rollback(LastKnownGood);
+ PromotedExts.push_back(I);
continue;
----------------
"I" is not promoted here.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4231
+ TPT.rollback(LastKnownGood);
+ PromotedExts.push_back(I);
+ }
----------------
Ditto.
https://reviews.llvm.org/D27853
More information about the llvm-commits
mailing list