summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-04-26 15:05:28 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-04-26 15:05:29 +0000
commit5ff903a589af282f516bbcf6844ff2656ce76b02 (patch)
tree853e7f348c7299f32021a7f0f60ca95ef4f04b24 /compiler/optimizing/nodes.h
parent2c31b5ac1d45f2f96932c8ff0d299abb2dbde862 (diff)
parentb0bd8915cb257cdaf46ba663c450a6543bca75af (diff)
Merge "[optimizing] Replace FP divide by power of 2"
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 938d6fcd64..5ce0b8efdd 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -242,7 +242,7 @@ class HGraph : public ArenaObject<kArenaAllocMisc> {
// Returns a constant of the given type and value. If it does not exist
// already, it is created and inserted into the graph. Only integral types
- // are currently supported.
+ // are currently cached.
HConstant* GetConstant(Primitive::Type type, int64_t value);
HNullConstant* GetNullConstant();
HIntConstant* GetIntConstant(int32_t value) {
@@ -251,6 +251,8 @@ class HGraph : public ArenaObject<kArenaAllocMisc> {
HLongConstant* GetLongConstant(int64_t value) {
return CreateConstant(value, &cached_long_constants_);
}
+ HFloatConstant* GetFloatConstant(float value);
+ HDoubleConstant* GetDoubleConstant(double value);
HBasicBlock* FindCommonDominator(HBasicBlock* first, HBasicBlock* second) const;
@@ -2037,10 +2039,9 @@ class HFloatConstant : public HConstant {
const float value_;
- // Only the SsaBuilder can currently create floating-point constants. If we
- // ever need to create them later in the pipeline, we will have to handle them
- // the same way as integral constants.
+ // Only the SsaBuilder and HGraph can create floating-point constants.
friend class SsaBuilder;
+ friend class HGraph;
DISALLOW_COPY_AND_ASSIGN(HFloatConstant);
};
@@ -2074,10 +2075,9 @@ class HDoubleConstant : public HConstant {
const double value_;
- // Only the SsaBuilder can currently create floating-point constants. If we
- // ever need to create them later in the pipeline, we will have to handle them
- // the same way as integral constants.
+ // Only the SsaBuilder and HGraph can create floating-point constants.
friend class SsaBuilder;
+ friend class HGraph;
DISALLOW_COPY_AND_ASSIGN(HDoubleConstant);
};