changeset 1295:a139f3afcef3

2008-12-24 Andrew Haley <aph@redhat.com> * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Work around bug in ciTypeFlow::Block::pre_order_at(). * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Allow "*" as a wildcard. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (llvm::IRBuilder): type2aelembytes now a mamber function. * ports/hotspot/src/share/vm/shark/sharkBlock.hpp (class SharkBlock): is_private_copy renamed is_backedge_copy. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse): force_bci if there's a trap. * ports/hotspot/src/cpu/zero/vm/disassembler_zero.cpp: Delete everything.
author Andrew Haley <aph@redhat.com>
date Wed, 24 Dec 2008 13:33:17 +0000
parents cf5fe433e739
children 136f40a0dae4
files ports/hotspot/src/cpu/zero/vm/disassembler_zero.cpp ports/hotspot/src/share/vm/shark/sharkBlock.cpp ports/hotspot/src/share/vm/shark/sharkBlock.hpp ports/hotspot/src/share/vm/shark/sharkBuilder.hpp ports/hotspot/src/share/vm/shark/sharkCompiler.cpp ports/hotspot/src/share/vm/shark/sharkFunction.cpp
diffstat 6 files changed, 14 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/ports/hotspot/src/cpu/zero/vm/disassembler_zero.cpp	Wed Dec 24 08:25:40 2008 -0500
+++ b/ports/hotspot/src/cpu/zero/vm/disassembler_zero.cpp	Wed Dec 24 13:33:17 2008 +0000
@@ -26,25 +26,3 @@
 #include "incls/_precompiled.incl"
 #include "incls/_disassembler_zero.cpp.incl"
 
-#ifndef PRODUCT
-void Disassembler::decode(CodeBlob *cb, outputStream *st)
-{
-  Unimplemented();
-}
-
-void Disassembler::decode(nmethod *nm, outputStream *st)
-{
-#ifdef SHARK
-  assert(st == NULL, "it's all going to stderr anyway");
-  ((SharkEntry *) nm->instructions_begin())->llvm_function()->dump();
-#else
-  Unimplemented();
-#endif // SHARK
-}
-
-void Disassembler::decode(u_char *begin, u_char *end, outputStream *st)
-{
-  Unimplemented();
-}
-#endif // PRODUCT
-
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp	Wed Dec 24 08:25:40 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp	Wed Dec 24 13:33:17 2008 +0000
@@ -105,6 +105,8 @@
   builder()->SetInsertPoint(entry_block());
 
   if (has_trap()) {
+    iter()->force_bci(start());
+
     current_state()->decache_for_trap();
     builder()->CreateCall2(
       SharkRuntime::uncommon_trap(),
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp	Wed Dec 24 08:25:40 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp	Wed Dec 24 13:33:17 2008 +0000
@@ -78,7 +78,7 @@
   }
   bool is_private_copy() const
   {
-    return ciblock()->is_private_copy();
+    return ciblock()->is_backedge_copy();
   }
   int max_locals() const
   {
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp	Wed Dec 24 08:25:40 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp	Wed Dec 24 13:33:17 2008 +0000
@@ -104,7 +104,7 @@
     return CreateArrayAddress(
       arrayoop,
       SharkType::to_arrayType(basic_type),
-      type2aelembytes[basic_type],
+      type2aelembytes(basic_type),
       base_offset, index, name);
   }
 
--- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Wed Dec 24 08:25:40 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Wed Dec 24 13:33:17 2008 +0000
@@ -76,7 +76,8 @@
   if (env->failing())
     return;
   if (SharkPrintTypeflowOf != NULL) {
-    if (!strcmp(SharkPrintTypeflowOf, name))
+    if (!strcmp(SharkPrintTypeflowOf, name) ||
+	!strcmp(SharkPrintTypeflowOf, "*"))
       flow->print_on(tty);
   }
 
--- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp	Wed Dec 24 08:25:40 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp	Wed Dec 24 13:33:17 2008 +0000
@@ -42,8 +42,14 @@
   set_block_insertion_point(NULL);
   _blocks = NEW_RESOURCE_ARRAY(SharkBlock*, flow()->block_count());
   for (int i = 0; i < block_count(); i++)
-    _blocks[i] = new SharkBlock(this, flow()->pre_order_at(i));
-
+    {
+      ciTypeFlow::Block *b = flow()->pre_order_at(i);
+      // Work around a bug in pre_order_at() that does not return the
+      // correct pre-ordering.  If pre_order_at() were correct this
+      // line could simply be:
+      // _blocks[i] = new SharkBlock(this, b);
+      _blocks[b->pre_order()] = new SharkBlock(this, b);
+    }
   // Walk the tree from the start block to determine which
   // blocks are entered and which blocks require phis
   SharkBlock *start_block = block(0);