From 4ef3e45d7c6ec3c482a1a48f4df470811aa3cf0a Mon Sep 17 00:00:00 2001 From: buzbee Date: Fri, 14 Dec 2012 13:35:28 -0800 Subject: Compiler constant handling rework In preparation for de-optimization, reworked the constant handling mechanism. Also took advantage of knowledge of constant operands (particularly for long operations). Significant performance improvements for Mandelbrot (~60 seconds to ~34 seconds). Minor improvements in other benchmarks. The new constant handling breaks two of the existing optimization passes: "Skip Large Method" and "Load/Store Elimization." I don't intend to update the large method optimization because it will be superceeded by the upcoming interpreter/ fingerprinting mechanism. Leaving the code in place for now in order to compare compile-time improvements with fingerprinting/interpret. All related code will be deleted when that is complete. The load/store elimination pass needs some rework to handle uses of multiple-register loads and stores. It will be updated & restored in a future CL. Change-Id: Ia979abaf51b8ae81bbb0428031cbcea854625fac --- src/compiler/codegen/codegen_util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compiler/codegen/codegen_util.h') diff --git a/src/compiler/codegen/codegen_util.h b/src/compiler/codegen/codegen_util.h index 4f146560b2..9b9bece585 100644 --- a/src/compiler/codegen/codegen_util.h +++ b/src/compiler/codegen/codegen_util.h @@ -20,6 +20,7 @@ #include #include "compiler/compiler_enums.h" +#include "compiler/compiler_ir.h" namespace art { @@ -59,6 +60,8 @@ void DumpPackedSwitchTable(const uint16_t* table); LIR* MarkBoundary(CompilationUnit* cu, int offset, const char* inst_str); void NopLIR(LIR* lir); bool EvaluateBranch(Instruction::Code opcode, int src1, int src2); +bool IsInexpensiveConstant(CompilationUnit* cu, RegLocation rl_src); +ConditionCode FlipComparisonOrder(ConditionCode before); } // namespace art -- cgit v1.2.3-59-g8ed1b