Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: runtime/vm/intermediate_language.h

Issue 470413002: Switch to a fix-point based range analysis to improve its precision. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 21d24ebaed760df8839bdae08a8aee5ec08f6b10..c42de97809ee12d989cea78a74b557227c36bbcd 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -1950,9 +1950,10 @@ class Definition : public Instruction {
// - unknown sentinel
Object& constant_value() const { return constant_value_; }
- virtual void InferRange();
+ virtual void InferRange(Range* range);
Range* range() const { return range_; }
+ void set_range(const Range&);
// Definitions can be canonicalized only into definitions to ensure
// this check statically we override base Canonicalize with a Canonicalize
@@ -2103,7 +2104,7 @@ class PhiInstr : public Definition {
virtual void PrintTo(BufferFormatter* f) const;
- virtual void InferRange();
+ virtual void InferRange(Range* range);
BitVector* reaching_defs() const {
return reaching_defs_;
@@ -2600,7 +2601,7 @@ class ConstraintInstr : public TemplateDefinition<2> {
Value* value() const { return inputs_[0]; }
Range* constraint() const { return constraint_; }
- virtual void InferRange();
+ virtual void InferRange(Range* range);
void AddDependency(Definition* defn) {
Value* val = new Value(defn);
@@ -2645,7 +2646,7 @@ class ConstantInstr : public TemplateDefinition<0> {
virtual bool CanDeoptimize() const { return false; }
- virtual void InferRange();
+ virtual void InferRange(Range* range);
virtual bool AllowsCSE() const { return true; }
virtual EffectSet Effects() const { return EffectSet::None(); }
@@ -3282,7 +3283,7 @@ class IfThenElseInstr : public Definition {
virtual CompileType ComputeType() const;
- virtual void InferRange();
+ virtual void InferRange(Range* range);
ComparisonInstr* comparison() const { return comparison_; }
intptr_t if_true() const { return if_true_; }
@@ -3916,7 +3917,7 @@ class LoadIndexedInstr : public TemplateDefinition<2> {
}
virtual Representation representation() const;
- virtual void InferRange();
+ virtual void InferRange(Range* range);
virtual bool AllowsCSE() const { return false; }
virtual EffectSet Effects() const { return EffectSet::None(); }
@@ -4485,7 +4486,7 @@ class LoadFieldInstr : public TemplateDefinition<1> {
virtual bool CanDeoptimize() const { return false; }
- virtual void InferRange();
+ virtual void InferRange(Range* range);
bool IsImmutableLengthLoad() const;
@@ -4884,7 +4885,7 @@ class BoxIntegerInstr : public TemplateDefinition<1> {
virtual CompileType ComputeType() const;
virtual bool RecomputeType();
- virtual void InferRange();
+ virtual void InferRange(Range* range);
virtual bool AllowsCSE() const { return true; }
virtual EffectSet Effects() const { return EffectSet::None(); }
@@ -5057,7 +5058,7 @@ class UnboxIntegerInstr : public TemplateDefinition<1> {
intptr_t deopt_id() const { return deopt_id_; }
- virtual void InferRange();
+ virtual void InferRange(Range* range);
DECLARE_INSTRUCTION(UnboxInteger)
virtual CompileType ComputeType() const;
@@ -6903,7 +6904,7 @@ class BinaryMintOpInstr : public TemplateDefinition<2> {
return deopt_id_;
}
- virtual void InferRange();
+ virtual void InferRange(Range* range);
virtual Definition* Canonicalize(FlowGraph* flow_graph);
@@ -6977,7 +6978,7 @@ class ShiftMintOpInstr : public TemplateDefinition<2> {
return deopt_id_;
}
- virtual void InferRange();
+ virtual void InferRange(Range* range);
DECLARE_INSTRUCTION(ShiftMintOp)
@@ -7094,7 +7095,7 @@ class BinarySmiOpInstr : public TemplateDefinition<2> {
void PrintTo(BufferFormatter* f) const;
- virtual void InferRange();
+ virtual void InferRange(Range* range);
virtual Definition* Canonicalize(FlowGraph* flow_graph);
« runtime/vm/flow_graph_range_analysis_test.cc ('K') | « runtime/vm/flow_graph_range_analysis_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698