[PATCH] D86859: [Coroutine] Make dealing with alloca spills more robust
Xun Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 4 21:12:54 PDT 2020
lxfind added inline comments.
================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:679
// alloca and therefore we need to copy.
- void visitStoreInst(StoreInst &SI) { PI.setAborted(&SI); }
+ void visitStoreInst(StoreInst &SI) { PI.setEscaped(&SI); }
----------------
hoy wrote:
> hoy wrote:
> > hoy wrote:
> > > lxfind wrote:
> > > > hoy wrote:
> > > > > If the use is the pointer, should the store be rewritten if it is dominated by coro.begin?
> > > > We only visit instructions before coro.begin, so it won't be dominated by coro.begin.
> > > Should we check if the use is the left-hand side or right-hand side?
> > Ignore my last comment please. I'm wondering why it's changed from escaped to aborted.
> So why do we change from `setAborted` to `setEscaped`?
setAborted will cause the visiting process to terminate right after this instruction, which was fine in the previous implementation because all it needed was to find out whether it escapes or gets modified. But now I also need to track all aliases, which mean I have to visit every instruction and cannot abort in the middle.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86859/new/
https://reviews.llvm.org/D86859
More information about the llvm-commits
mailing list