comparison src/share/vm/c1/c1_Canonicalizer.hpp @ 1783:d5d065957597

6953144: Tiered compilation Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation. Reviewed-by: kvn, never, phh, twisti
author iveresov
date Fri, 03 Sep 2010 17:51:07 -0700
parents c18cbe5936b8
children f95d63e2154a
comparison
equal deleted inserted replaced
1782:f353275af40e 1783:d5d065957597
1 /* 1 /*
2 * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
22 * 22 *
23 */ 23 */
24 24
25 class Canonicalizer: InstructionVisitor { 25 class Canonicalizer: InstructionVisitor {
26 private: 26 private:
27 Compilation *_compilation;
27 Instruction* _canonical; 28 Instruction* _canonical;
28 int _bci; 29 int _bci;
29 30
31 Compilation *compilation() { return _compilation; }
30 void set_canonical(Value x); 32 void set_canonical(Value x);
31 void set_bci(int bci) { _bci = bci; } 33 void set_bci(int bci) { _bci = bci; }
32 void set_constant(jint x) { set_canonical(new Constant(new IntConstant(x))); } 34 void set_constant(jint x) { set_canonical(new Constant(new IntConstant(x))); }
33 void set_constant(jlong x) { set_canonical(new Constant(new LongConstant(x))); } 35 void set_constant(jlong x) { set_canonical(new Constant(new LongConstant(x))); }
34 void set_constant(jfloat x) { set_canonical(new Constant(new FloatConstant(x))); } 36 void set_constant(jfloat x) { set_canonical(new Constant(new FloatConstant(x))); }
41 Instruction** base, 43 Instruction** base,
42 Instruction** index, 44 Instruction** index,
43 int* scale); 45 int* scale);
44 46
45 public: 47 public:
46 Canonicalizer(Value x, int bci) { _canonical = x; _bci = bci; if (CanonicalizeNodes) x->visit(this); } 48 Canonicalizer(Compilation* c, Value x, int bci) : _compilation(c), _canonical(x), _bci(bci) {
49 if (CanonicalizeNodes) x->visit(this);
50 }
47 Value canonical() const { return _canonical; } 51 Value canonical() const { return _canonical; }
48 int bci() const { return _bci; } 52 int bci() const { return _bci; }
49 53
50 virtual void do_Phi (Phi* x); 54 virtual void do_Phi (Phi* x);
51 virtual void do_Constant (Constant* x); 55 virtual void do_Constant (Constant* x);
90 virtual void do_UnsafeGetObject(UnsafeGetObject* x); 94 virtual void do_UnsafeGetObject(UnsafeGetObject* x);
91 virtual void do_UnsafePutObject(UnsafePutObject* x); 95 virtual void do_UnsafePutObject(UnsafePutObject* x);
92 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x); 96 virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x);
93 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x); 97 virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
94 virtual void do_ProfileCall (ProfileCall* x); 98 virtual void do_ProfileCall (ProfileCall* x);
95 virtual void do_ProfileCounter (ProfileCounter* x); 99 virtual void do_ProfileInvoke (ProfileInvoke* x);
96 }; 100 };