[PATCH] D94137: [coroutine] update promise object's final layout index
Xun Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 15:53:37 PST 2021
lxfind added inline comments.
================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:2278-2284
// Add PromiseAlloca to Allocas list so that it is processed in insertSpills.
if (Shape.ABI == coro::ABI::Switch && Shape.SwitchLowering.PromiseAlloca)
// We assume that the promise alloca won't be modified before
// CoroBegin and no alias will be create before CoroBegin.
FrameData.Allocas.emplace_back(
Shape.SwitchLowering.PromiseAlloca,
DenseMap<Instruction *, llvm::Optional<APInt>>{}, false);
----------------
ychen wrote:
> lxfind wrote:
> > You can move this code to right after "B.addFieldForAllocas(F, FrameData, Shape);" (comments will need to be updated)
> > Then you won't need to modify "updateLayoutIndex".
> > That way I think it's actually cleaner.
> My first attempt was here. It seems `FrameTypeBuilder` object is not available here to do the update.
Not update here. But move these code to right after "B.addFieldForAllocas(F, FrameData, Shape);"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94137/new/
https://reviews.llvm.org/D94137
More information about the llvm-commits
mailing list