From 5319d3cca5a9b8e9e3f59421818272b966575172 Mon Sep 17 00:00:00 2001 From: Wojciech Staszkiewicz Date: Mon, 1 Aug 2016 17:48:59 -0700 Subject: Implement running user defined list of passes This change introduces new dex2oat switch --run-passes=. This switch accepts path to a text file with names of passes to run. Compiler will run optimization passes specified in the file rather then the default ones. There is no verification implemented on the compiler side. It is user's responsibility to provide a list of passes that leads to successful generation of correct code. Care should be taken to prepare a list that satisfies all dependencies between optimizations. We only take control of the optional optimizations. Codegen (builder), and all passes required for register allocation will run unaffected by this mechanism. Change-Id: Ic3694e53515fefcc5ce6f28d9371776b5afcbb4f --- compiler/optimizing/optimization.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/optimization.h') diff --git a/compiler/optimizing/optimization.h b/compiler/optimizing/optimization.h index 2f59d4cd5b..0819fb01ac 100644 --- a/compiler/optimizing/optimization.h +++ b/compiler/optimizing/optimization.h @@ -37,7 +37,10 @@ class HOptimization : public ArenaObject { virtual ~HOptimization() {} - // Return the name of the pass. + // Return the name of the pass. Pass names for a single HOptimization should be of form + // or $ for common prefix. + // Example: 'instruction_simplifier', 'instruction_simplifier$after_bce', + // 'instruction_simplifier$before_codegen'. const char* GetPassName() const { return pass_name_; } // Perform the analysis itself. -- cgit v1.2.3-59-g8ed1b