summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_sinking.cc
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-09-08 16:16:46 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-09-08 16:16:46 +0000
commit86ce50481f91e3be2e5f2686e18e11babde721ae (patch)
tree3179155108b883d8c0c4bb3dbac0b70db0d7f698 /compiler/optimizing/code_sinking.cc
parent88f929ce72a5eabdb1ae1b32e5ec157d0e9f1ef8 (diff)
parentdd018df8a00e841fe38fabe38520b7d297a885c1 (diff)
Merge "optimizing: add block-scoped constructor fence merging pass"
Diffstat (limited to 'compiler/optimizing/code_sinking.cc')
-rw-r--r--compiler/optimizing/code_sinking.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/code_sinking.cc b/compiler/optimizing/code_sinking.cc
index 6c3a9fd6b5..b558eb17a7 100644
--- a/compiler/optimizing/code_sinking.cc
+++ b/compiler/optimizing/code_sinking.cc
@@ -64,6 +64,11 @@ static bool IsInterestingInstruction(HInstruction* instruction) {
// A fence with "0" inputs is dead and should've been removed in a prior pass.
DCHECK_NE(0u, ctor_fence->InputCount());
+ // TODO: this should be simplified to 'return true' since it's
+ // potentially pessimizing any code sinking for inlined constructors with final fields.
+ // TODO: double check that if the final field assignments are not moved,
+ // then the fence is not moved either.
+
return ctor_fence->GetAssociatedAllocation() != nullptr;
}