commit | bcf972c0208490b0eb3ce3c170c2db486ba945b3 | [log] [tgz] |
---|---|---|
author | Chris Wailes <[email protected]> | Thu Oct 21 11:03:28 2021 -0700 |
committer | Chris Wailes <[email protected]> | Thu Oct 21 11:09:35 2021 -0700 |
tree | b1c1dbb1b4ab51d68cdf0d952fd8b6df20856cbd | |
parent | 54272acac043c1dedfb7db7420545b31ec1ac51f [diff] [blame] |
Importing rustc-1.56.0 Change-Id: I98941481270706fa55f8fb2cb91686ae3bd30f38
diff --git a/src/llvm-project/llvm/lib/Analysis/InstructionPrecedenceTracking.cpp b/src/llvm-project/llvm/lib/Analysis/InstructionPrecedenceTracking.cpp index c26cdf2..7d1e630 100644 --- a/src/llvm-project/llvm/lib/Analysis/InstructionPrecedenceTracking.cpp +++ b/src/llvm-project/llvm/lib/Analysis/InstructionPrecedenceTracking.cpp
@@ -111,6 +111,13 @@ FirstSpecialInsts.erase(Inst->getParent()); } +void InstructionPrecedenceTracking::removeUsersOf(const Instruction *Inst) { + for (const auto *U : Inst->users()) { + if (const auto *UI = dyn_cast<Instruction>(U)) + removeInstruction(UI); + } +} + void InstructionPrecedenceTracking::clear() { FirstSpecialInsts.clear(); #ifndef NDEBUG