[CHR] Skip region containing llvm.coro.id
authorWei Wang <apollo.mobility@gmail.com>
Mon, 25 Apr 2022 21:00:41 +0000 (14:00 -0700)
committerWei Wang <apollo.mobility@gmail.com>
Wed, 27 Apr 2022 17:27:25 +0000 (10:27 -0700)
commit26a0d53b15447e011dc1a8de1f035e4aecd1083c
treeed3183aeb2b771aebdfe0c7e292ca371db61c3b9
parentccd047cba4f15cd95e8e3895f823757c5988b192
[CHR] Skip region containing llvm.coro.id

When a block containing llvm.coro.id is cloned during CHR, it inserts an invalid
PHI node with token type to the beginning of the block containing llvm.coro.begin.
To avoid such case, we exclude regions with llvm.coro.id.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D124418
llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
llvm/test/Transforms/PGOProfile/chr_coro.ll [new file with mode: 0644]