Lines Matching defs:Block

34 class Block;
44 // Abstractly provides an infinite array of Block*'s, initialized to NULL.
52 Block **_blocks;
60 _blocks = NEW_ARENA_ARRAY( a, Block *, OptoBlockListSize );
65 Block *lookup( uint i ) const // Lookup, or NULL for not mapped
66 { return (i<Max()) ? _blocks[i] : (Block*)NULL; }
67 Block *operator[] ( uint i ) const // Lookup, or assert for not mapped
69 // Extend the mapping: index i maps to Block *n.
70 void map( uint i, Block *n ) { if( i>=Max() ) grow(i); _blocks[i] = n; }
80 void push( Block *b ) { map(_cnt++,b); }
81 Block *pop() { return _blocks[--_cnt]; }
82 Block *rpop() { Block *b = _blocks[0]; _blocks[0]=_blocks[--_cnt]; return b;}
84 void insert( uint i, Block *n );
99 Block* as_Block() { assert(is_block(), "must be block"); return (Block*)this; }
103 //------------------------------Block------------------------------------------
104 // This class defines a Basic Block.
107 class Block : public CFGElement {
129 // the Projection and the block-ending Node determine which Block follows.
138 Block* _idom; // Immediate dominator block
146 void update_uncommon_branch(Block* un); // Lower branch prob to uncommon code
148 Block* lone_fall_through(); // Return lone fall-through Block or null
150 Block* dom_lca(Block* that); // Compute LCA in dominator tree.
152 bool dominates(Block* that) {
229 void set_loop_alignment(Block *loop_top) {
238 // Create a new Block with given head Node.
240 Block( Arena *a, Node *headnode )
306 Block* non_connector() {
307 Block* s = this;
315 bool has_successor(Block* b) const {
325 Block* non_connector_successor(int i) const {
338 void dump_bidx(const Block* orig, outputStream* st = tty) const;
339 void dump_pred(const Block_Array *bbs, Block* orig, outputStream* st = tty) const;
348 // Build an array of Basic Block pointers, one per Node.
362 void schedule_node_into_block( Node *n, Block *b );
372 Block* insert_anti_dependences(Block* LCA, Node* load, bool verify = false);
373 void verify_anti_dependences(Block* LCA, Node* load) {
384 Block_Array _bbs; // Map Nodes to owning Basic Block
385 Block *_broot; // Basic block of root
408 // basic blocks; i.e. _bbs now maps _idx for all Nodes to some Block.
430 Block* hoist_to_cheaper_block(Block* LCA, Block* early, Node* self);
441 bool move_to_next(Block* bx, uint b_index);
442 void move_to_end(Block* bx, uint b_index);
450 void convert_NeverBranch_to_Goto(Block *b);
455 void insert( Block *b, uint idx, Node *n ) {
475 // Map Block indices to a block-index for a cfg-cover.
513 Block* _target; // block target
517 BlockProbPair(Block* b, float p) : _target(b), _prob(p) {}
519 Block* get_target() const { return _target; }
534 void update_succ_freq(Block* b, float freq);
546 void push_pred(Block* blk, int i, Block_List& worklist, Block_Array& node_to_blk);
549 Block* head() {
551 Block* hd = _members.at(0)->as_Block();
556 Block* backedge_block(); // Return the block on the backedge of the loop (else NULL)
561 bool in_loop_nest(Block* b);
579 Block * _from; // Source basic block
580 Block * _to; // Destination basic block
600 CFGEdge(Block *from, Block *to, float freq, int from_pct, int to_pct) :
607 Block* from() const { return _from; }
608 Block* to () const { return _to; }
625 Block ** _next_list; // Array mapping index to next block
626 Block ** _prev_list; // Array mapping index to previous block
627 Block * _first; // First block in the trace
628 Block * _last; // Last block in the trace
631 Block * next(Block *b) const { return _next_list[b->_pre_order]; }
632 void set_next(Block *b, Block *n) const { _next_list[b->_pre_order] = n; }
635 Block * prev(Block *b) const { return _prev_list[b->_pre_order]; }
636 void set_prev(Block *b, Block *p) const { _prev_list[b->_pre_order] = p; }
640 void break_loop_after(Block *b) {
649 Trace(Block *b, Block **next_list, Block **prev_list) :
664 Block * first_block() const { return _first; }
667 Block * last_block() const { return _last; }
670 void insert_after(Block *b, Trace *tr) {
684 void insert_before(Block *b, Trace *tr) {
685 Block *p = prev(b);
696 void append(Block *b) {
719 Block **next;
720 Block **prev;
724 Trace * trace(Block *b) {