1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[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:
Florian Hahn 2021-03-01 16:04:37 +00:00
parent d9c224e71b
commit e4aed742a6

View File

@ -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;