diff options
author | 2023-04-18 15:16:06 +0100 | |
---|---|---|
committer | 2023-04-19 15:31:53 +0000 | |
commit | 5eb1fd0dae3832ceee2102613bb08c291daca6f3 (patch) | |
tree | da074eb8ea773b594a455fa9cd7ddde21d8f885b /compiler/optimizing/constant_folding_test.cc | |
parent | 2ff7fcccdeb2100cb5a3cc5314411fd23dd5f7c9 (diff) |
Restrict the use of ConstantFolding's VisitIf
It was taking a lot of time for the improvement it got. We can get
99.99% of the improvement, with only one VisitIf call. This is
roughly 20% of the compile time it used to take.
Bug: 278626992
Fixes: 278626992
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: Icc00c9ad6a9eb4f4fd18677bcb65655cbbe9d027
Diffstat (limited to 'compiler/optimizing/constant_folding_test.cc')
-rw-r--r-- | compiler/optimizing/constant_folding_test.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/constant_folding_test.cc b/compiler/optimizing/constant_folding_test.cc index 9acfa35326..741fd3f822 100644 --- a/compiler/optimizing/constant_folding_test.cc +++ b/compiler/optimizing/constant_folding_test.cc @@ -60,7 +60,9 @@ class ConstantFoldingTest : public CommonCompilerTest, public OptimizingUnitTest std::string actual_before = printer_before.str(); EXPECT_EQ(expected_before, actual_before); - HConstantFolding(graph_, /* stats= */ nullptr, "constant_folding").Run(); + HConstantFolding constant_folding( + graph_, /* stats= */ nullptr, "constant_folding", /* use_all_optimizations= */ true); + constant_folding.Run(); GraphChecker graph_checker_cf(graph_); graph_checker_cf.Run(); ASSERT_TRUE(graph_checker_cf.IsValid()); |