comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java @ 1434:72cfb36c6bb2

* enabled all jtt tests * added proxy that counts jni calls * honor hotspot stackshadowpages * constant pool caching * monitor enter/exit * arithmetic stubs (frem, drem, ...) * create stack values for debug info * some doc
author Lukas Stadler <lukas.stadler@oracle.com>
date Thu, 30 Sep 2010 17:19:48 -0700
parents efba53f86c4f
children 9e5e83ca2259
comparison
equal deleted inserted replaced
1433:efba53f86c4f 1434:72cfb36c6bb2
65 } 65 }
66 66
67 public static VMEntries getVMEntries() { 67 public static VMEntries getVMEntries() {
68 if (vmEntries == null) { 68 if (vmEntries == null) {
69 try { 69 try {
70 vmEntries = new VMEntriesNative();
71 if (CountingProxy.ENABLED) {
72 vmEntries = CountingProxy.getProxy(VMEntries.class, vmEntries);
73 }
70 if (Logger.ENABLED) { 74 if (Logger.ENABLED) {
71 vmEntries = LoggingProxy.getProxy(VMEntries.class, new VMEntriesNative()); 75 vmEntries = LoggingProxy.getProxy(VMEntries.class, vmEntries);
72 } else {
73 vmEntries = new VMEntriesNative();
74 } 76 }
75 } catch (Throwable t) { 77 } catch (Throwable t) {
76 t.printStackTrace(); 78 t.printStackTrace();
77 } 79 }
78 } 80 }
96 InvocationSocket invocation = new InvocationSocket(output, input); 98 InvocationSocket invocation = new InvocationSocket(output, input);
97 VMExits exits = (VMExits) Proxy.newProxyInstance(VMExits.class.getClassLoader(), new Class<?>[] { VMExits.class}, invocation); 99 VMExits exits = (VMExits) Proxy.newProxyInstance(VMExits.class.getClassLoader(), new Class<?>[] { VMExits.class}, invocation);
98 VMEntries entries = Compiler.initializeClient(exits); 100 VMEntries entries = Compiler.initializeClient(exits);
99 invocation.setDelegate(entries); 101 invocation.setDelegate(entries);
100 } else { 102 } else {
103 vmExits = new VMExitsNative();
104 if (CountingProxy.ENABLED) {
105 vmExits = CountingProxy.getProxy(VMExits.class, vmExits);
106 }
101 if (Logger.ENABLED) { 107 if (Logger.ENABLED) {
102 vmExits = LoggingProxy.getProxy(VMExits.class, new VMExitsNative()); 108 vmExits = LoggingProxy.getProxy(VMExits.class, vmExits);
103 } else {
104 vmExits = new VMExitsNative();
105 } 109 }
106 } 110 }
107 } catch (Throwable t) { 111 } catch (Throwable t) {
108 t.printStackTrace(); 112 t.printStackTrace();
109 } 113 }
134 generator = new HotSpotXirGenerator(config, target, registerConfig); 138 generator = new HotSpotXirGenerator(config, target, registerConfig);
135 } 139 }
136 compiler = new C1XCompiler(runtime, target, generator); 140 compiler = new C1XCompiler(runtime, target, generator);
137 141
138 C1XOptions.setOptimizationLevel(3); 142 C1XOptions.setOptimizationLevel(3);
143 C1XOptions.OptInlineExcept = false;
144 C1XOptions.OptInlineSynchronized = false;
139 C1XOptions.UseDeopt = false; 145 C1XOptions.UseDeopt = false;
140 C1XOptions.IRChecking = Logger.ENABLED; 146 C1XOptions.IRChecking = Logger.ENABLED;
141 C1XOptions.TraceBytecodeParserLevel = 0; 147 C1XOptions.TraceBytecodeParserLevel = 0;
142 // C1XOptions.TraceBytecodeParserLevel = Logger.ENABLED ? 4 : 0; 148 // C1XOptions.TraceBytecodeParserLevel = Logger.ENABLED ? 4 : 0;
143 C1XOptions.PrintCFGToFile = false; 149 C1XOptions.PrintCFGToFile = false;
144 C1XOptions.PrintAssembly = false;// true; 150 C1XOptions.PrintAssembly = false;// true;
145 C1XOptions.PrintCompilation = Logger.ENABLED; 151 C1XOptions.PrintCompilation = Logger.ENABLED;
146 C1XOptions.GenAssertionCode = Logger.ENABLED; 152 C1XOptions.GenAssertionCode = Logger.ENABLED;
147 C1XOptions.DetailedAsserts = Logger.ENABLED; 153 C1XOptions.DetailedAsserts = Logger.ENABLED;
148 154
155 // these options are important - c1x4hotspot will not generate correct code without them
149 C1XOptions.GenSpecialDivChecks = true; 156 C1XOptions.GenSpecialDivChecks = true;
150 C1XOptions.AlignCallsForPatching = true; 157 C1XOptions.AlignCallsForPatching = true;
151 C1XOptions.NullCheckUniquePc = true; 158 C1XOptions.NullCheckUniquePc = true;
152 C1XOptions.invokeinterfaceTemplatePos = true; 159 C1XOptions.invokeinterfaceTemplatePos = true;
160 C1XOptions.StackShadowPages = config.stackShadowPages;
161
153 } 162 }
154 163
155 public CiCompiler getCompiler() { 164 public CiCompiler getCompiler() {
156 return compiler; 165 return compiler;
157 } 166 }