[PATCH] D120753: [FuncSpec][NFC] Refactor internal structures.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 05:43:20 PST 2022
labrinea added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Utils/SCCPSolver.h:149
/// the lattice state of their corresponding values in the original function.
- void markArgInFuncSpecialization(Function *F, Argument *A, Constant *C);
+ void markArgInFuncSpecialization(Function *F, ArgInfo &Arg);
----------------
fhahn wrote:
> Does the function modify `Arg`? If not, please either pass by value or as const reference.
Will do, thanks.
================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:465
}
- return Worklist;
+ return WorkList;
}
----------------
SjoerdMeijer wrote:
> Was wondering if we could change `SpecializationList` to:
>
> SmallVector<std::unique_ptr<SpecializationInfo>>;
>
> so that we move and transfer ownership instead of copying things here.
Good remark, but will there really be a copy? I thought that the Return Value Optimization (copy elision) prevents that. Alternatively I could make the function void and pass the SpecializationList by reference on the argument list.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120753/new/
https://reviews.llvm.org/D120753
More information about the llvm-commits
mailing list