diff options
Diffstat (limited to 'compiler/optimizing/sharpening.h')
-rw-r--r-- | compiler/optimizing/sharpening.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/compiler/optimizing/sharpening.h b/compiler/optimizing/sharpening.h index dc55eea683..b81867201f 100644 --- a/compiler/optimizing/sharpening.h +++ b/compiler/optimizing/sharpening.h @@ -25,24 +25,13 @@ namespace art { class CodeGenerator; class DexCompilationUnit; -// Optimization that tries to improve the way we dispatch methods and access types, -// fields, etc. Besides actual method sharpening based on receiver type (for example -// virtual->direct), this includes selecting the best available dispatch for -// invoke-static/-direct based on code generator support. -class HSharpening : public HOptimization { +// Utility methods that try to improve the way we dispatch methods, and access +// types and strings. +class HSharpening { public: - HSharpening(HGraph* graph, - CodeGenerator* codegen, - const char* name = kSharpeningPassName) - : HOptimization(graph, name), - codegen_(codegen) { } - - bool Run() override; - - static constexpr const char* kSharpeningPassName = "sharpening"; - - // Used by Sharpening and InstructionSimplifier. - static void SharpenInvokeStaticOrDirect(HInvokeStaticOrDirect* invoke, CodeGenerator* codegen); + // Used by the builder and InstructionSimplifier. + static HInvokeStaticOrDirect::DispatchInfo SharpenInvokeStaticOrDirect( + ArtMethod* callee, CodeGenerator* codegen); // Used by the builder and the inliner. static HLoadClass::LoadKind ComputeLoadClassKind(HLoadClass* load_class, @@ -61,9 +50,6 @@ class HSharpening : public HOptimization { CodeGenerator* codegen, const DexCompilationUnit& dex_compilation_unit, VariableSizedHandleScope* handles); - - private: - CodeGenerator* codegen_; }; } // namespace art |