For now, CoroElide pass can not handle case like:
coroA (cond){ if (cond) co_await coroB else co_await coroC co_return }
However, CoroElide should worked for this.
In this patch, If dominate relation is not satisfied, we iterate all paths from coro.begin to normal terminators to check whether there is any pathes from coro.begin to Terminators which not pass through any of the coro.destroys. If not, record the coro.begin.
As for the paths reach to normal terminators through suspend point, they have been skipped during DFS.
TestPlan: check-llvm, check-clang, cppcoro
A nit-pick, but: it's spelled "switches" with an "e". So I would rename this CoroSuspendSwitches, or if that's too long of a variable name for you, CoroSwitches. Also, this could be marked const to signal these won't be "lowered" or transformed in any way: SmallPtrSet<const SwitchInst *, 4>.