================
@@ -192,6 +192,14 @@ class LLVM_ABI EarliestEscapeAnalysis final : public
CaptureAnalysis {
/// This is used for cache invalidation purposes.
DenseMap<Instruction *, TinyPtrVector<const Value *>> Inst2Obj;
+ /// Whether the function contains a call to a function that may return
+ /// twice (e.g. setjmp). Lazily computed and cached, since a `longjmp` may
+ /// re-enter the function at any such call, which this analysis needs to
+ /// account for conservatively.
+ std::optional<bool> ContainsReturnsTwiceCall;
+
+ bool containsReturnsTwiceCall();
----------------
antoniofrighetto wrote:
```suggestion
/// Cached result of Function::callsFunctionThatReturnsTwice(), used to
/// account for longjmp re-entry paths not visibile to the forward CFG.
std::optional<bool> CallsReturnsTwiceFn;
/// Whether the function contains a call that may return twice (e.g., setjmp).
bool callsReturnsTwiceFn();
```
https://github.com/llvm/llvm-project/pull/212297
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits