[Attributor] Add helper to change an instruction to `unreachable` inst
authorHideto Ueno <uenoku.tokotoko@gmail.com>
Thu, 26 Dec 2019 17:39:37 +0000 (02:39 +0900)
committerHideto Ueno <uenoku.tokotoko@gmail.com>
Thu, 26 Dec 2019 17:39:37 +0000 (02:39 +0900)
commitcb5eb13eafdcf2d6ad8dc3a2c7b25eea3948839d
treeb75590fe20a7a1911efe4ff3b159b716e5d4799d
parentffd57408efd4c8d455616a5ff4f623250e8580c9
[Attributor] Add helper to change an instruction to `unreachable` inst

Summary: Calling `changeToUnreachable` in `manifest` from different places might cause really unpredictable problems. As other deleting functions are doing, we need to change these instructions after all `manifest`.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71910
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp