erichkeane wrote: > > TBH, it seems odd that we have a lifetime operation markers, rather than an > > actual scope. > > I believe that our lifetime management should be matching to the 'scopes' > > that they are in, and better reflect the C/C++ scoping rules? > > SO I guess I would envision more of a `lifetime-scope` thing, that marks > > the list of allocas on `entry`. > > But these markers seem too low level entirely. > > But you eventually need them when you lower to `ucf` no?
I'm unfamiliar with `ucf`? Is that a dialect that google doesn't know about? If so, why doesn't said dialect have the lifetime markers rather than CIR? > This could be considered jointly with #175037 . > > BTW I don't think it's a good idea to emit these markers directly from > CIRGen. In CIR we already have scoped allocas, which serves well for lifetime > information before CFG flattening. Yes, this is exactly my thoughts (2nd half). Note that PR was abandoned, because I don't think I have enough of a hold on it. One thing to note: We DID find a few places where we do have to do some hoisting (see some patches by @andykaylor lately), to make sure lifetimes are managed correctly, since cleanups scopes had some troubles. So I don't think we can use our existing 'scopes' perfectly for these purposes. https://github.com/llvm/llvm-project/pull/199599 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
