Swap optimizations when inlining
When we optimize a function we run:
1. Constant folding
2. Instruction simplifier
3. Dead code elimination
Make the inliner use the same order of optimizations.
Improvements are small but noticeable. Locally, Pixel 5 speed compile:
* System server: -7.8KB (-0.02%)
* SysUIGoogle: -3.9KB (-0.01%)
* AGSA: -113KB (-0.03%)
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: If2eaf9b35b43f88c29093fcf9a9ba17da22d2535
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 3992ff4..fdc00ba 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -2198,8 +2198,8 @@
InstructionSimplifier simplify(callee_graph, codegen_, inline_stats_);
HOptimization* optimizations[] = {
- &simplify,
&fold,
+ &simplify,
&dce,
};