[PATCH] D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal.
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 16:50:13 PST 2019
mtrofin added a comment.
In D71733#1792219 <https://reviews.llvm.org/D71733#1792219>, @davidxl wrote:
> The SROA handling code should also be abstracted away and let the derived class handling cost accumulation. In particular, the common code pattern like:
>
> if (lookupSROAArgAndCost(I.getPointerOperand(), SROAArg, CostIt)) {
>
> if (I.isSimple()) {
> accumulateSROACost(CostIt, InlineConstants::InstrCost);
> return true;
> }
>
> disableSROA(CostIt);
> }
>
>
> Can be abtracted with interface CallAnalyzer::handleSROA(..), and the derived class implements this pattern.
Done - that also pulls out the sroa-related costing stuff out, which I've missed originally.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71733/new/
https://reviews.llvm.org/D71733
More information about the llvm-commits
mailing list