class MethodLiveness : public ArenaObj { public: // The BasicBlock class is used to represent a basic block in the // liveness analysis. class BasicBlock : public ArenaObj { private: // This class is only used by the MethodLiveness class. friendclass MethodLiveness;
// The analyzer which created this basic block.
MethodLiveness* _analyzer;
// The range of this basic block is [start_bci,limit_bci) int _start_bci; int _limit_bci;
// The liveness at the start of the block;
ArenaBitMap _entry;
// The summarized liveness effects of our direct successors reached // by normal control flow
ArenaBitMap _normal_exit;
// The summarized liveness effects of our direct successors reached // by exceptional control flow
ArenaBitMap _exception_exit;
// These members hold the results of the last call to // compute_gen_kill_range(). _gen is the set of locals // used before they are defined in the range. _kill is the // set of locals defined before they are used.
ArenaBitMap _gen;
ArenaBitMap _kill; int _last_bci;
// A list of all blocks which could come directly before this one // in normal (non-exceptional) control flow. We propagate liveness // information to these blocks.
GrowableArray<BasicBlock*>* _normal_predecessors;
// A list of all blocks which could come directly before this one // in exceptional control flow.
GrowableArray<BasicBlock*>* _exception_predecessors;
// The following fields are used to manage a work list used in the // dataflow.
BasicBlock *_next; bool _on_work_list;
// Our successors call this method to merge liveness information into // our _normal_exit member. bool merge_normal(const BitMap& other);
// Our successors call this method to merge liveness information into // our _exception_exit member. bool merge_exception(const BitMap& other);
// This helper routine is used to help compute the gen/kill pair for // the block. It is also used to answer queries. void compute_gen_kill_range(ciBytecodeStream *bytes);
// Compute the gen/kill effect of a single instruction. void compute_gen_kill_single(ciBytecodeStream *instruction);
// Add a basic block to our list of normal predecessors. void add_normal_predecessor(BasicBlock *pred) {
_normal_predecessors->append_if_missing(pred);
}
// Add a basic block to our list of exceptional predecessors void add_exception_predecessor(BasicBlock *pred) {
_exception_predecessors->append_if_missing(pred);
}
// Split the basic block at splitBci. This basic block // becomes the second half. The first half is newly created.
BasicBlock *split(int splitBci);
// -- Dataflow.
void compute_gen_kill(ciMethod* method);
// Propagate changes from this basic block void propagate(MethodLiveness *ml);
// -- Query.
MethodLivenessResult get_liveness_at(ciMethod* method, int bci);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.