This is similar to previous patch https://reviews.llvm.org/D123925. It could also reduce the time we call declaresCoroCleanupIntrinsics. And it is helpful for further changes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Coroutines/CoroCleanup.cpp | ||
---|---|---|
57 | why are we removing Changed and always invalidating analyses? if we have a module where most functions don't call any of these intrinsics, we're going to unnecessarily invalidate a lot more analyses which will be bad for compile times. |
llvm/lib/Transforms/Coroutines/CoroCleanup.cpp | ||
---|---|---|
57 | My thought is: Here is the case that M owns the declaration of some coroutine intrinsics but not a function uses it actually. But I think it wouldn't happen in real cases. |
llvm/lib/Transforms/Coroutines/CoroCleanup.cpp | ||
---|---|---|
57 | oh sorry, I forgot this was now a module pass |
why are we removing Changed and always invalidating analyses? if we have a module where most functions don't call any of these intrinsics, we're going to unnecessarily invalidate a lot more analyses which will be bad for compile times.