forked from OSchip/llvm-project
[VPlan] Remove recipes from back to front.
Update the deletion order when destroying VPBasicBlocks. This ensures recipes that depend on earlier ones in the block are removed first. Otherwise this may cause issues when recipes have remaining users later in the block.
This commit is contained in:
parent
2632ba6a35
commit
a6c81d3366
|
@ -1309,7 +1309,10 @@ public:
|
|||
appendRecipe(Recipe);
|
||||
}
|
||||
|
||||
~VPBasicBlock() override { Recipes.clear(); }
|
||||
~VPBasicBlock() override {
|
||||
while (!Recipes.empty())
|
||||
Recipes.pop_back();
|
||||
}
|
||||
|
||||
/// Instruction iterators...
|
||||
using iterator = RecipeListTy::iterator;
|
||||
|
|
Loading…
Reference in New Issue