summaryrefslogtreecommitdiff
path: root/compiler/optimizing/sharpening.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-03-06 14:38:52 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2017-03-07 14:32:54 +0000
commitc4aa82c5b0aa921c51eaf6f6bbaff36501ea2cee (patch)
tree0da77f4e4a0fca7577f4c4c709353465d46c8581 /compiler/optimizing/sharpening.h
parent3a791cee90451dc32d46f1b0a85fecc6f22f62bf (diff)
Invoke typed arraycopy for primitive arrays.
Apps will always call the Object version of arraycopy. When we can infer the types of the passed arrays, replace the method being called to be the typed System.arraycopy one. 10% improvement on ExoPlayerBench. Test: 641-checker-arraycopy bug: 7103825 Change-Id: I872d7a6e163a4614510ef04ae582eb90ec48b5fa
Diffstat (limited to 'compiler/optimizing/sharpening.h')
-rw-r--r--compiler/optimizing/sharpening.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/optimizing/sharpening.h b/compiler/optimizing/sharpening.h
index 4240b2f339..10707c796f 100644
--- a/compiler/optimizing/sharpening.h
+++ b/compiler/optimizing/sharpening.h
@@ -48,14 +48,16 @@ class HSharpening : public HOptimization {
static constexpr const char* kSharpeningPassName = "sharpening";
// Used by the builder and the inliner.
- static HLoadClass::LoadKind SharpenClass(HLoadClass* load_class,
- CodeGenerator* codegen,
- CompilerDriver* compiler_driver,
- const DexCompilationUnit& dex_compilation_unit)
+ static HLoadClass::LoadKind ComputeLoadClassKind(HLoadClass* load_class,
+ CodeGenerator* codegen,
+ CompilerDriver* compiler_driver,
+ const DexCompilationUnit& dex_compilation_unit)
REQUIRES_SHARED(Locks::mutator_lock_);
+ // Used by Sharpening and InstructionSimplifier.
+ static void SharpenInvokeStaticOrDirect(HInvokeStaticOrDirect* invoke, CodeGenerator* codegen);
+
private:
- void ProcessInvokeStaticOrDirect(HInvokeStaticOrDirect* invoke);
void ProcessLoadString(HLoadString* load_string);
CodeGenerator* codegen_;