[PATCH] D22998: [coroutines] Part 4a: Coroutine Devirtualization: Lower coro.resume and coro.destroy.

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 20:39:35 PDT 2016


mehdi_amini added inline comments.

================
Comment at: lib/Transforms/Coroutines/CoroInstr.h:33
@@ +32,3 @@
+#define CORO_RESUME_STR "llvm.coro.resume"
+
+/// This class represents the llvm.coro.subfn.addr instruction.
----------------
GorNishanov wrote:
> It is internal header used by Coroutine library. These constants are used (or will be used) by several coroutine passes in this directory.
> 
> When we drop MSVC 2013, these #define could be replaced with constexpr StringRef or something like that.
Sorry I looked at the path and for some reason thought it was a public one...

Nevertheless, I wonder if other passes are even trying to "hide" the intrinsic names or just using it plain everywhere, I might more readable to read `M.getNamedValue("llvm.coro.destroy")` instead of `M.getNamedValue(CORO_DESTROY_STR)`


https://reviews.llvm.org/D22998





More information about the llvm-commits mailing list