Mercurial > hg > graal-compiler
changeset 7600:c095a7f289aa
8005818: Shark: fix OSR for non-empty incoming stack
Reviewed-by: twisti
Contributed-by: Roman Kennke <rkennke@redhat.com>
author | twisti |
---|---|
date | Fri, 11 Jan 2013 16:47:23 -0800 |
parents | c566b81b3323 |
children | 606eada1bf86 |
files | src/share/vm/shark/sharkCompiler.cpp src/share/vm/shark/sharkFunction.cpp src/share/vm/shark/sharkInvariants.hpp |
diffstat | 3 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/shark/sharkCompiler.cpp Fri Jan 11 16:47:23 2013 -0800 +++ b/src/share/vm/shark/sharkCompiler.cpp Fri Jan 11 16:47:23 2013 -0800 @@ -185,6 +185,9 @@ // Build the LLVM IR for the method Function *function = SharkFunction::build(env, &builder, flow, name); + if (env->failing()) { + return; + } // Generate native code. It's unpleasant that we have to drop into // the VM to do this -- it blocks safepoints -- but I can't see any
--- a/src/share/vm/shark/sharkFunction.cpp Fri Jan 11 16:47:23 2013 -0800 +++ b/src/share/vm/shark/sharkFunction.cpp Fri Jan 11 16:47:23 2013 -0800 @@ -77,6 +77,10 @@ // Walk the tree from the start block to determine which // blocks are entered and which blocks require phis SharkTopLevelBlock *start_block = block(flow()->start_block_num()); + if (is_osr() && start_block->stack_depth_at_entry() != 0) { + env()->record_method_not_compilable("can't compile OSR block with incoming stack-depth > 0"); + return; + } assert(start_block->start() == flow()->start_bci(), "blocks out of order"); start_block->enter();
--- a/src/share/vm/shark/sharkInvariants.hpp Fri Jan 11 16:47:23 2013 -0800 +++ b/src/share/vm/shark/sharkInvariants.hpp Fri Jan 11 16:47:23 2013 -0800 @@ -68,7 +68,7 @@ // // Accessing this directly is kind of ugly, so it's private. Add // new accessors below if you need something from it. - private: + protected: ciEnv* env() const { assert(_env != NULL, "env not available"); return _env;