summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_builder.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-03-10 18:07:54 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-03-10 18:07:54 +0000
commit48e702fe11458b334e6abcc8f562729ccb5b27dd (patch)
treeeed2c65d5a0fd7d019a156b54b19e84fb535d993 /compiler/optimizing/ssa_builder.h
parent39d9fe2eb3552a002c53ed41701c6faffe3cd75a (diff)
parente0fe7ae36180863e45cbb9d1e6e9c30b1b1a949c (diff)
Merge "Make the SSA builder honor the debuggable flag."
Diffstat (limited to 'compiler/optimizing/ssa_builder.h')
-rw-r--r--compiler/optimizing/ssa_builder.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/optimizing/ssa_builder.h b/compiler/optimizing/ssa_builder.h
index f50da46040..b414fb2945 100644
--- a/compiler/optimizing/ssa_builder.h
+++ b/compiler/optimizing/ssa_builder.h
@@ -24,6 +24,26 @@ namespace art {
static constexpr int kDefaultNumberOfLoops = 2;
+/**
+ * Transforms a graph into SSA form. The liveness guarantees of
+ * this transformation are listed below. A DEX register
+ * being killed means its value at a given position in the code
+ * will not be available to its environment uses. A merge in the
+ * following text is materialized as a `HPhi`.
+ *
+ * (a) Dex registers that do not require merging (that is, they do not
+ * have different values at a join block) are available to all their
+ * environment uses.
+ *
+ * (b) Dex registers that require merging, and the merging gives
+ * incompatible types, will be killed for environment uses of that merge.
+ *
+ * (c) When the `debuggable` flag is passed to the compiler, Dex registers
+ * that require merging and have a proper type after the merge, are
+ * available to all their environment uses. If the `debuggable` flag
+ * is not set, values of Dex registers only used by environments
+ * are killed.
+ */
class SsaBuilder : public HGraphVisitor {
public:
explicit SsaBuilder(HGraph* graph)