[PATCH] D86673: Conservatively merge &&Variable for catch(Variable)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 21:45:07 PDT 2020


efriedma added reviewers: thanm, dotdash, arielb1, inouehrs, MatzeB, arsenm.
efriedma added a comment.
Herald added a subscriber: wdng.

Special-casing a specific load instruction isn't the right approach; the affected instruction is, at best, unpredictable.

Fundamentally, the issue is that the code can't really figure out what the lifetime of the alloca is supposed to be.  On the non-exception path, there's an llvm.lifetime.end marker, but on the exception path there is no such marker.

I see two possible approaches here:

1. Teach stackcoloring to detect that there's a "missing" llvm.lifetime.end marker for the alloca in question, and handle that somehow.
2. Teach clang to emit an appropriate llvm.lifetime.end marker in the catch block, to precisely express the lifetime to stackcoloring.


Repository:
  rZORG LLVM Github Zorg

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

https://reviews.llvm.org/D86673



More information about the llvm-commits mailing list