src/share/vm/opto/block.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7088955 Cdiff src/share/vm/opto/block.hpp

src/share/vm/opto/block.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2010, 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) 1997, 2011, 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.
*** 43,52 **** --- 43,53 ---- // Map dense integer indices to Blocks. Uses classic doubling-array trick. // Abstractly provides an infinite array of Block*'s, initialized to NULL. // Note that the constructor just zeros things, and since I use Arena // allocation I do not need a destructor to reclaim storage. class Block_Array : public ResourceObj { + friend class VMStructs; uint _size; // allocated size, as opposed to formal limit debug_only(uint _limit;) // limit to formal domain protected: Block **_blocks; void grow( uint i ); // Grow array node to fit
*** 70,79 **** --- 71,81 ---- uint Max() const { debug_only(return _limit); return _size; } }; class Block_List : public Block_Array { + friend class VMStructs; public: uint _cnt; Block_List() : Block_Array(Thread::current()->resource_area()), _cnt(0) {} void push( Block *b ) { map(_cnt++,b); } Block *pop() { return _blocks[--_cnt]; }
*** 85,94 **** --- 87,97 ---- void print(); }; class CFGElement : public ResourceObj { + friend class VMStructs; public: float _freq; // Execution frequency (estimate) CFGElement() : _freq(0.0f) {} virtual bool is_block() { return false; }
*** 100,109 **** --- 103,113 ---- //------------------------------Block------------------------------------------ // This class defines a Basic Block. // Basic blocks are used during the output routines, and are not used during // any optimization pass. They are created late in the game. class Block : public CFGElement { + friend class VMStructs; public: // Nodes in this block, in order Node_List _nodes; // Basic blocks have a Node which defines Control for all Nodes pinned in
*** 339,348 **** --- 343,353 ---- //------------------------------PhaseCFG--------------------------------------- // Build an array of Basic Block pointers, one per Node. class PhaseCFG : public Phase { + friend class VMStructs; private: // Build a proper looking cfg. Return count of basic blocks uint build_cfg(); // Perform DFS search.
*** 513,522 **** --- 518,528 ---- float get_prob() const { return _prob; } }; //------------------------------CFGLoop------------------------------------------- class CFGLoop : public CFGElement { + friend class VMStructs; int _id; int _depth; CFGLoop *_parent; // root of loop tree is the method level "pseudo" loop, it's parent is null CFGLoop *_sibling; // null terminated list CFGLoop *_child; // first child, use child's sibling to visit all immediately nested loops
*** 564,573 **** --- 570,580 ---- //----------------------------------CFGEdge------------------------------------ // A edge between two basic blocks that will be embodied by a branch or a // fall-through. class CFGEdge : public ResourceObj { + friend class VMStructs; private: Block * _from; // Source basic block Block * _to; // Destination basic block float _freq; // Execution frequency (estimate) int _state;
*** 700,709 **** --- 707,717 ---- }; //------------------------------PhaseBlockLayout------------------------------- // Rearrange blocks into some canonical order, based on edges and their frequencies class PhaseBlockLayout : public Phase { + friend class VMStructs; PhaseCFG &_cfg; // Control flow graph GrowableArray<CFGEdge *> *edges; Trace **traces; Block **next;
src/share/vm/opto/block.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File