summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_simplifier.h
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2015-08-06 15:46:02 +0100
committer Roland Levillain <rpl@google.com> 2016-02-17 18:05:40 +0000
commit1252e976b972231a84b36e4bb73cf513bb7799d1 (patch)
treeec1e75f145fd1ebe50f1c411f9338443e65ea715 /compiler/optimizing/instruction_simplifier.h
parentf0b04803ec4cdd8d76aadb6f02ae2511c46b20b5 (diff)
Implement Optimizing's constant folding as a visitor.
Refactor the logic of art::HConstantFolding::Run into a new visitor, art::HConstantFoldingVisitor. Change-Id: Id8d3c3826f6dff6cc2d18a01f6c48d79bde483b3
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.h')
-rw-r--r--compiler/optimizing/instruction_simplifier.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/optimizing/instruction_simplifier.h b/compiler/optimizing/instruction_simplifier.h
index cc4b6f6adc..7905104ed4 100644
--- a/compiler/optimizing/instruction_simplifier.h
+++ b/compiler/optimizing/instruction_simplifier.h
@@ -25,6 +25,13 @@ namespace art {
/**
* Implements optimizations specific to each instruction.
+ *
+ * Note that graph simplifications producing a constant should be
+ * implemented in art::HConstantFolding, while graph simplifications
+ * not producing constants should be implemented in
+ * art::InstructionSimplifier. (This convention is a choice that was
+ * made during the development of these parts of the compiler and is
+ * not bound by any technical requirement.)
*/
class InstructionSimplifier : public HOptimization {
public: