1 /* |
1 /* |
2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 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. |
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
|
25 #include "precompiled.hpp" |
|
26 #include "libadt/vectset.hpp" |
|
27 #include "memory/allocation.inline.hpp" |
|
28 #include "opto/block.hpp" |
|
29 #include "opto/c2compiler.hpp" |
|
30 #include "opto/callnode.hpp" |
|
31 #include "opto/cfgnode.hpp" |
|
32 #include "opto/machnode.hpp" |
|
33 #include "opto/opcodes.hpp" |
|
34 #include "opto/phaseX.hpp" |
|
35 #include "opto/rootnode.hpp" |
|
36 #include "opto/runtime.hpp" |
|
37 #include "runtime/deoptimization.hpp" |
|
38 #ifdef TARGET_ARCH_MODEL_x86_32 |
|
39 # include "adfiles/ad_x86_32.hpp" |
|
40 #endif |
|
41 #ifdef TARGET_ARCH_MODEL_x86_64 |
|
42 # include "adfiles/ad_x86_64.hpp" |
|
43 #endif |
|
44 #ifdef TARGET_ARCH_MODEL_sparc |
|
45 # include "adfiles/ad_sparc.hpp" |
|
46 #endif |
|
47 #ifdef TARGET_ARCH_MODEL_zero |
|
48 # include "adfiles/ad_zero.hpp" |
|
49 #endif |
|
50 |
25 // Portions of code courtesy of Clifford Click |
51 // Portions of code courtesy of Clifford Click |
26 |
52 |
27 // Optimization - Graph Style |
53 // Optimization - Graph Style |
28 |
|
29 #include "incls/_precompiled.incl" |
|
30 #include "incls/_gcm.cpp.incl" |
|
31 |
54 |
32 // To avoid float value underflow |
55 // To avoid float value underflow |
33 #define MIN_BLOCK_FREQUENCY 1.e-35f |
56 #define MIN_BLOCK_FREQUENCY 1.e-35f |
34 |
57 |
35 //----------------------------schedule_node_into_block------------------------- |
58 //----------------------------schedule_node_into_block------------------------- |