From ff08995589871d57a15207a24aeaa8959933c896 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 2 May 2009 18:29:22 +0000 Subject: Previously, RecursivelyDeleteDeadInstructions provided an option of returning a list of pointers to Values that are deleted. This was unsafe, because the pointers in the list are, by nature of what RecursivelyDeleteDeadInstructions does, always dangling. Replace this with a simple callback mechanism. This may eventually be removed if all clients can reasonably be expected to use CallbackVH. Use this to factor out the dead-phi-cycle-elimination code from LSR utility function, and generalize it to use the RecursivelyDeleteTriviallyDeadInstructions utility function. This makes LSR more aggressive about eliminating dead PHI cycles; adjust tests to either be less trivial or to simply expect fewer instructions. llvm-svn: 70636 --- llvm/test/Transforms/LoopStrengthReduce/pr2570.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/test/Transforms/LoopStrengthReduce') diff --git a/llvm/test/Transforms/LoopStrengthReduce/pr2570.ll b/llvm/test/Transforms/LoopStrengthReduce/pr2570.ll index 23ae7238b0b..ce0c3bf5c98 100644 --- a/llvm/test/Transforms/LoopStrengthReduce/pr2570.ll +++ b/llvm/test/Transforms/LoopStrengthReduce/pr2570.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep {phi\\>} | count 14 +; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep {phi\\>} | count 10 ; PR2570 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" -- cgit v1.2.3