[PATCH] D106993: [IROutliner] Outline across branches with multiple exits
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 2 14:26:46 PDT 2021
paquette added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:153
+ DenseMap<Value *, BasicBlock *> &Map) {
+ for (std::pair<Value *, BasicBlock *> &VtoBB : Map)
+ SortedKeys.push_back(VtoBB.first);
----------------
might as well auto here...
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:156
+
+ if (SortedKeys.size() > 1)
+ stable_sort(SortedKeys, [](const Value *LHS, const Value *RHS) {
----------------
I don't think this check is necessary?
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:457
+ if ((RetTy->isVoidTy() && !ExtractedFuncType->isVoidTy()) ||
+ (RetTy->isIntegerTy(1) && ExtractedFuncType->isIntegerTy(16)))
+ RetTy = ExtractedFuncType;
----------------
why 16?
================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:1129
+ continue;
+ ReturnInst *RI = cast<ReturnInst>(Term);
+ Value *RetVal = RI->getReturnValue();
----------------
can you just use `dyn_cast` versus `isa` + `cast`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106993/new/
https://reviews.llvm.org/D106993
More information about the llvm-commits
mailing list