< prev index next >

src/hotspot/share/opto/loopnode.hpp

Print this page
rev 48506 : [mq]: JDK-8194992

*** 1,7 **** /* ! * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 213,222 **** --- 213,223 ---- virtual int Opcode() const; virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); Node *init_control() const { return in(EntryControl); } Node *back_control() const { return in(LoopBackControl); } + CountedLoopEndNode *loopexit_or_null() const; CountedLoopEndNode *loopexit() const; Node *init_trip() const; Node *stride() const; int stride_con() const; bool stride_is_con() const;
*** 340,350 **** PhiNode* iv_phi = phi(); if (iv_phi == NULL) { return NULL; } Node *ln = iv_phi->in(0); ! if (ln->is_CountedLoop() && ln->as_CountedLoop()->loopexit() == this) { return (CountedLoopNode*)ln; } return NULL; } --- 341,351 ---- PhiNode* iv_phi = phi(); if (iv_phi == NULL) { return NULL; } Node *ln = iv_phi->in(0); ! if (ln->is_CountedLoop() && ln->as_CountedLoop()->loopexit_or_null() == this) { return (CountedLoopNode*)ln; } return NULL; }
*** 352,376 **** virtual void dump_spec(outputStream *st) const; #endif }; ! inline CountedLoopEndNode *CountedLoopNode::loopexit() const { Node *bc = back_control(); if( bc == NULL ) return NULL; Node *le = bc->in(0); if( le->Opcode() != Op_CountedLoopEnd ) return NULL; return (CountedLoopEndNode*)le; } ! inline Node *CountedLoopNode::init_trip() const { return loopexit() ? loopexit()->init_trip() : NULL; } ! inline Node *CountedLoopNode::stride() const { return loopexit() ? loopexit()->stride() : NULL; } ! inline int CountedLoopNode::stride_con() const { return loopexit() ? loopexit()->stride_con() : 0; } ! inline bool CountedLoopNode::stride_is_con() const { return loopexit() && loopexit()->stride_is_con(); } ! inline Node *CountedLoopNode::limit() const { return loopexit() ? loopexit()->limit() : NULL; } ! inline Node *CountedLoopNode::incr() const { return loopexit() ? loopexit()->incr() : NULL; } ! inline Node *CountedLoopNode::phi() const { return loopexit() ? loopexit()->phi() : NULL; } //------------------------------LoopLimitNode----------------------------- // Counted Loop limit node which represents exact final iterator value: // trip_count = (limit - init_trip + stride - 1)/stride // final_value= trip_count * stride + init_trip. --- 353,382 ---- virtual void dump_spec(outputStream *st) const; #endif }; ! inline CountedLoopEndNode *CountedLoopNode::loopexit_or_null() const { Node *bc = back_control(); if( bc == NULL ) return NULL; Node *le = bc->in(0); if( le->Opcode() != Op_CountedLoopEnd ) return NULL; return (CountedLoopEndNode*)le; } ! inline CountedLoopEndNode *CountedLoopNode::loopexit() const { ! CountedLoopEndNode* cle = loopexit_or_null(); ! assert(cle != NULL, "loopexit is NULL"); ! return cle; ! } ! inline Node *CountedLoopNode::init_trip() const { return loopexit_or_null() ? loopexit()->init_trip() : NULL; } ! inline Node *CountedLoopNode::stride() const { return loopexit_or_null() ? loopexit()->stride() : NULL; } ! inline int CountedLoopNode::stride_con() const { return loopexit_or_null() ? loopexit()->stride_con() : 0; } ! inline bool CountedLoopNode::stride_is_con() const { return loopexit_or_null() && loopexit()->stride_is_con(); } ! inline Node *CountedLoopNode::limit() const { return loopexit_or_null() ? loopexit()->limit() : NULL; } ! inline Node *CountedLoopNode::incr() const { return loopexit_or_null() ? loopexit()->incr() : NULL; } ! inline Node *CountedLoopNode::phi() const { return loopexit_or_null() ? loopexit()->phi() : NULL; } //------------------------------LoopLimitNode----------------------------- // Counted Loop limit node which represents exact final iterator value: // trip_count = (limit - init_trip + stride - 1)/stride // final_value= trip_count * stride + init_trip.
< prev index next >