From 942a3785dca38feaae9d01b35d6bfb09c39315eb Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 17 Dec 2014 17:10:47 +0000 Subject: Now that GraphChecker has a state, don't re-use it. Otherwise, we'll see the same ids twice. Change-Id: Ic9bb801629ff90cc788248528d5260aaaff73675 --- compiler/optimizing/constant_folding_test.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/constant_folding_test.cc') diff --git a/compiler/optimizing/constant_folding_test.cc b/compiler/optimizing/constant_folding_test.cc index cad6683577..ed7e57be7c 100644 --- a/compiler/optimizing/constant_folding_test.cc +++ b/compiler/optimizing/constant_folding_test.cc @@ -47,9 +47,9 @@ static void TestCode(const uint16_t* data, x86::CodeGeneratorX86 codegen(graph); HConstantFolding(graph).Run(); - SSAChecker ssa_checker(&allocator, graph); - ssa_checker.Run(); - ASSERT_TRUE(ssa_checker.IsValid()); + SSAChecker ssa_checker_cf(&allocator, graph); + ssa_checker_cf.Run(); + ASSERT_TRUE(ssa_checker_cf.IsValid()); StringPrettyPrinter printer_after_cf(graph); printer_after_cf.VisitInsertionOrder(); @@ -59,8 +59,9 @@ static void TestCode(const uint16_t* data, check_after_cf(graph); HDeadCodeElimination(graph).Run(); - ssa_checker.Run(); - ASSERT_TRUE(ssa_checker.IsValid()); + SSAChecker ssa_checker_dce(&allocator, graph); + ssa_checker_dce.Run(); + ASSERT_TRUE(ssa_checker_dce.IsValid()); StringPrettyPrinter printer_after_dce(graph); printer_after_dce.VisitInsertionOrder(); -- cgit v1.2.3-59-g8ed1b