[llvm] Reapply "[coro][CoroSplit] Use `llvm.lifetime.end` to compute putting objects on the frame vs the stack (#90265) (PR #91372)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 22:57:20 PDT 2024
================
@@ -204,6 +221,43 @@ bool llvm::isPotentiallyReachableFromMany(
return false;
}
+template <class T> class SingleEntrySet {
+public:
+ using iterator = T *;
+ using const_iterator = const T *;
+
+ SingleEntrySet(T Elem) : Elem(Elem) {}
+
+ bool contains(T Other) const { return Elem == Other; }
+
+ iterator begin() { return &Elem; }
+ iterator end() { return &Elem + 1; }
----------------
nikic wrote:
I don't think the non-const methods are necessary.
https://github.com/llvm/llvm-project/pull/91372
More information about the llvm-commits
mailing list