summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
authorMingyao Yang <mingyao@google.com>2015-04-26 18:23:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-26 18:23:02 +0000
commitf382eff130a5d90c34b3f09c4c61cb50cacd4c54 (patch)
tree07dd1b8e0cdf5c078776d6b64aa3813a80182bb6 /compiler/optimizing/nodes.h
parentadf15974e0a0a2b0e6dc311ff5701b87ca15964a (diff)
parent206d6fd6cae5ba8c4d5f0e230111fe77b9d5c0a5 (diff)
downloadandroid_art-f382eff130a5d90c34b3f09c4c61cb50cacd4c54.tar.gz
android_art-f382eff130a5d90c34b3f09c4c61cb50cacd4c54.tar.bz2
android_art-f382eff130a5d90c34b3f09c4c61cb50cacd4c54.zip
Merge "Deoptimization-based BCE for unknown loop bounds."
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 938d6fcd64..d970e383ed 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -1007,6 +1007,10 @@ class HEnvironment : public ArenaObject<kArenaAllocMisc> {
}
void CopyFrom(HEnvironment* env);
+ // Copy from `env`. If it's a loop phi for `loop_header`, copy the first
+ // input to the loop phi instead. This is for inserting instructions that
+ // require an environment (like HDeoptimization) in the loop pre-header.
+ void CopyFromWithLoopPhiAdjustment(HEnvironment* env, HBasicBlock* loop_header);
void SetRawEnvAt(size_t index, HInstruction* instruction) {
vregs_.Put(index, HUserRecord<HEnvironment*>(instruction));
@@ -1242,6 +1246,13 @@ class HInstruction : public ArenaObject<kArenaAllocMisc> {
environment_->CopyFrom(environment);
}
+ void CopyEnvironmentFromWithLoopPhiAdjustment(HEnvironment* environment,
+ HBasicBlock* block) {
+ ArenaAllocator* allocator = GetBlock()->GetGraph()->GetArena();
+ environment_ = new (allocator) HEnvironment(allocator, environment->Size());
+ environment_->CopyFromWithLoopPhiAdjustment(environment, block);
+ }
+
// Returns the number of entries in the environment. Typically, that is the
// number of dex registers in a method. It could be more in case of inlining.
size_t EnvironmentSize() const;