[PATCH] D106995: [IROutliner] Allowing PHINodes in Exit Blocks
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 16:03:01 PST 2022
paquette added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:1146
Group.ArgumentTypes.push_back(PointerType::getUnqual(Output->getType()));
- AggArgsUsed.insert(Group.ArgumentTypes.size() - 1);
+ unsigned ArgTypeIdx = Group.ArgumentTypes.size() - 1;
+ AggArgsUsed.insert(ArgTypeIdx);
----------------
probably want a comment here explaining what's going on?
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:1173
+ } else {
+ GVN = C.getGVN(Output);
+ GVN = C.getCanonicalNum(*GVN);
----------------
comment for this part?
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:1394
+ // we can just get the specified argument.
+ return CI->getArgOperand(ArgNum);
+}
----------------
This can probably be a one-liner?
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:1418
+ ArgNum = Region.AggArgToExtracted.find(ArgNum)->second;
+ return CI->getArgOperand(ArgNum);
+}
----------------
Can probably eliminate the variable.
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:1524
+ Value *Val = Group.OutlinedFunction->getArg(ArgNum);
+ NewPN->setIncomingValue(Idx, Val);
+ continue;
----------------
Can probably just do this as a one-liner?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106995/new/
https://reviews.llvm.org/D106995
More information about the llvm-commits
mailing list