aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-03-18 23:52:22 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-30 23:29:28 +0200
commit302d1089d76828fe4de0296bf55afe092825bbbf (patch)
treebaa57a03ca7622f9b2ac388b3f9721de48507b6b /validation/optim
parent6ad43a13c2e2b556bdd697a2c47b449cbaa80262 (diff)
downloadsparse-dev-302d1089d76828fe4de0296bf55afe092825bbbf.tar.gz
kds: fix recursion in kill_dead_stores_bb()
In kill_dead_stores_bb(), after having scanned the current BB, we may recurse into the parent BBs. But we must do this only if we're sure that the store there may not be needed in another BB. In other words, we must do this only if the current BB is the only child of the parent. However, if one of the parent has more than one child, instead of trying the next parent, the function stops there and returns. Furthermore, the check is done with an open loop instead of using the helper bb_list_size(). Fix this by using bb_list_size() to check if the parent has only one child, do the recursion if it is the case and try the next parent if not. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
-rw-r--r--validation/optim/kill-stores2.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/kill-stores2.c b/validation/optim/kill-stores2.c
index 69288848..861b5ece 100644
--- a/validation/optim/kill-stores2.c
+++ b/validation/optim/kill-stores2.c
@@ -11,7 +11,6 @@ static void foo(void)
/*
* check-name: kill-stores2
* check-command: test-linearize $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: store\\.