[InstrProfiling] Emit runtime hook only once
authorGulfem Savrun Yeniceri <gulfem@google.com>
Fri, 16 Sep 2022 18:19:06 +0000 (18:19 +0000)
committerGulfem Savrun Yeniceri <gulfem@google.com>
Tue, 20 Sep 2022 17:00:46 +0000 (17:00 +0000)
commitf039a9fa32483a7d4c2de421595fbe295e9cac6a
tree3cc62cffca27257e2c040c5ba6d2de9aeb776537
parent7c932cdb10fe6223a929661fae7485bb535f94d8
[InstrProfiling] Emit runtime hook only once

This patch fixes the issue about calling emitRuntimeHook() twice
when we need to unconditionally emit runtime hook as discussed in
https://reviews.llvm.org/rGd6aed77f0d19.

Differential Revision: https://reviews.llvm.org/D134254
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp