summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 5fca4fab22..6020196493 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -343,6 +343,18 @@ HConstant* HGraph::GetConstant(Primitive::Type type, int64_t value) {
}
}
+HFloatConstant* HGraph::GetFloatConstant(float value) {
+ HFloatConstant *constant = new (arena_) HFloatConstant(value);
+ InsertConstant(constant);
+ return constant;
+}
+
+HDoubleConstant* HGraph::GetDoubleConstant(double value) {
+ HDoubleConstant *constant = new (arena_) HDoubleConstant(value);
+ InsertConstant(constant);
+ return constant;
+}
+
void HLoopInformation::Add(HBasicBlock* block) {
blocks_.SetBit(block->GetBlockId());
}