regalloc.hpp revision 2772
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_OPTO_REGALLOC_HPP
#define SHARE_VM_OPTO_REGALLOC_HPP
#include "opto/matcher.hpp"
class Node;
class Matcher;
class PhaseCFG;
#define MAX_REG_ALLOCATORS 10
//------------------------------PhaseRegAlloc------------------------------------
// Abstract register allocator
class PhaseRegAlloc : public Phase {
friend class VMStructs;
static void (*_alloc_statistics[MAX_REG_ALLOCATORS])();
static int _num_allocators;
protected:
void (*pr_stats)());
public:
// Get the register associated with the Node
}
}
// Do all the real work of allocate
virtual void Register_Allocate() = 0;
// notify the register allocator that "node" is a new reference
// to the value produced by "old_node"
// Set the register associated with a new Node
}
}
}
}
}
// Set and query if a node produces an oop
// Convert a register number to a stack offset
// Convert a stack offset to a register number
// Get the register encoding associated with the Node
int get_encode( const Node *n ) const {
}
// Platform dependent hook for actions prior to allocation
void pd_preallocate_hook();
#ifdef ASSERT
// Platform dependent hook for verification after allocation. Will
// only get called when compiling with asserts.
void pd_postallocate_verify_hook();
#endif
#ifndef PRODUCT
static int _total_framesize;
static int _max_framesize;
virtual void dump_frame() const = 0;
static void print_statistics();
#endif
};
#endif // SHARE_VM_OPTO_REGALLOC_HPP