Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 6b9ff0c5a71b41329422963f2b5e62c8fec3f8bd..4f1648908ae1fcfd34f557e1a9a587ccb87750b7 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -54,6 +54,7 @@ class LChunkBuilder; |
#define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \ |
+ V(ArithmeticBinaryOperation) \ |
V(BinaryOperation) \ |
V(BitwiseBinaryOperation) \ |
V(ControlInstruction) \ |
@@ -797,6 +798,7 @@ class HValue: public ZoneObject { |
kAllowUndefinedAsNaN, |
kIsArguments, |
kTruncatingToInt32, |
+ kAllUsesTruncatingToInt32, |
// Set after an instruction is killed. |
kIsDead, |
// Instructions that are allowed to produce full range unsigned integer |
@@ -996,6 +998,9 @@ class HValue: public ZoneObject { |
// Returns true if the flag specified is set for all uses, false otherwise. |
bool CheckUsesForFlag(Flag f); |
+ // Returns true if the flag specified is set for all uses, and this set |
+ // of uses is non-empty. |
+ bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f); |
Sven Panne
2013/06/11 07:59:30
This helper predicate is totally confusing and har
|
GVNFlagSet gvn_flags() const { return gvn_flags_; } |
void SetGVNFlag(GVNFlag f) { gvn_flags_.Add(f); } |
@@ -3850,7 +3855,7 @@ class HArithmeticBinaryOperation: public HBinaryOperation { |
: representation(); |
} |
- virtual HValue* Canonicalize(); |
+ DECLARE_ABSTRACT_INSTRUCTION(ArithmeticBinaryOperation) |
private: |
virtual bool IsDeletable() const { return true; } |
@@ -4482,9 +4487,8 @@ class HDiv: public HArithmeticBinaryOperation { |
HValue* right); |
bool HasPowerOf2Divisor() { |
- if (right()->IsConstant() && |
- HConstant::cast(right())->HasInteger32Value()) { |
- int32_t value = HConstant::cast(right())->Integer32Value(); |
+ if (right()->IsInteger32Constant()) { |
+ int32_t value = right()->GetInteger32Constant(); |
return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value)); |
} |