[PATCH] D77188: Fix lifetime call in landingpad blocking Simplifycfg pass

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 11:11:07 PDT 2020


efriedma added a comment.

Lifetime intrinsics specifically pose their own problem, I think; you can't really just individually drop one.  Although, the semantics are sort of fuzzy.

Maybe it would be worth amending LangRef to explicitly allow dropping lifetime.end in general.  Not sure what that text would look like.  (You wouldn't want to, usually, since it would likely block coloring, but here the payoff might be big enough.)

I have a rough idea for a proposal bouncing around in my head to try to replace lifetime intrinsics with something more powerful/well-defined for local variables, but probably I don't have time to actually implement it anytime soon.  Basically, instead of the current lifetime.start/end, we would have intrinsics that look basically like malloc/free, except that the memory allocation is backed by an alloca.  In that world, it would be a lot easier to determine what transforms are actually legal/reasonable.  If anyone is interested, I could try to write something up more formally.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77188/new/

https://reviews.llvm.org/D77188





More information about the llvm-commits mailing list