equal
deleted
inserted
replaced
900 return stride()->bottom_type()->is_int()->get_con(); |
900 return stride()->bottom_type()->is_int()->get_con(); |
901 } |
901 } |
902 |
902 |
903 //============================================================================= |
903 //============================================================================= |
904 //------------------------------Value----------------------------------------- |
904 //------------------------------Value----------------------------------------- |
905 const Type *LoopLimitNode::Value( PhaseTransform *phase ) const { |
905 const Type* LoopLimitNode::Value(PhaseGVN* phase) const { |
906 const Type* init_t = phase->type(in(Init)); |
906 const Type* init_t = phase->type(in(Init)); |
907 const Type* limit_t = phase->type(in(Limit)); |
907 const Type* limit_t = phase->type(in(Limit)); |
908 const Type* stride_t = phase->type(in(Stride)); |
908 const Type* stride_t = phase->type(in(Stride)); |
909 // Either input is TOP ==> the result is TOP |
909 // Either input is TOP ==> the result is TOP |
910 if (init_t == Type::TOP) return Type::TOP; |
910 if (init_t == Type::TOP) return Type::TOP; |
1014 return NULL; // No progress |
1014 return NULL; // No progress |
1015 } |
1015 } |
1016 |
1016 |
1017 //------------------------------Identity--------------------------------------- |
1017 //------------------------------Identity--------------------------------------- |
1018 // If stride == 1 return limit node. |
1018 // If stride == 1 return limit node. |
1019 Node *LoopLimitNode::Identity( PhaseTransform *phase ) { |
1019 Node* LoopLimitNode::Identity(PhaseGVN* phase) { |
1020 int stride_con = phase->type(in(Stride))->is_int()->get_con(); |
1020 int stride_con = phase->type(in(Stride))->is_int()->get_con(); |
1021 if (stride_con == 1 || stride_con == -1) |
1021 if (stride_con == 1 || stride_con == -1) |
1022 return in(Limit); |
1022 return in(Limit); |
1023 return this; |
1023 return this; |
1024 } |
1024 } |