summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Gupta Kumar, Sanjiv <sanjiv.kumar.gupta@intel.com> 2018-02-05 13:35:03 +0530
committer Gupta Kumar, Sanjiv <sanjiv.kumar.gupta@intel.com> 2018-02-21 14:56:13 +0530
commitd9e4d73b20d68aa387f5837e1535b6fc26b2859a (patch)
treeb55a96e66f2db1482571788b33c6d3055cb47396 /compiler/optimizing/nodes.cc
parent8dbb4ba7ffdf42cf08c55b117370efc0ec5357e8 (diff)
Fix iCache misses for GetKind on x86,x86_64
GetKind() takes about 2.6% of total compilation time on x86_64. The primary reason is that the target call GetKindInternal() is often beyond the page boundary causing frequent i-cache misses. This patch removes the virtual call to GetKindInternal () and instead keeps the InstructionKind into each constructed instruction. Since we have about 121 instructions in total as of now, it takes about 7 extra bits in each instruction. dex2oat runs about 12% faster with --compiler-filter=everything on an APK of 25MB. Test: Tested the patch by running host art tests. Rebased. Change-Id: Ia7bbcd67180151e4565507164a718acbb6284885 Signed-off-by: Gupta Kumar, Sanjiv <sanjiv.kumar.gupta@intel.com>
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 91e475d737..f6ba19f22a 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -1121,10 +1121,6 @@ void HEnvironment::RemoveAsUserOfInput(size_t index) const {
user->FixUpUserRecordsAfterEnvUseRemoval(before_env_use_node);
}
-HInstruction::InstructionKind HInstruction::GetKind() const {
- return GetKindInternal();
-}
-
HInstruction* HInstruction::GetNextDisregardingMoves() const {
HInstruction* next = GetNext();
while (next != nullptr && next->IsParallelMove()) {