Mercurial > hg > graal-compiler
diff src/share/vm/opto/compile.cpp @ 1609:4311f23817fd
6959430: Make sure raw loads have control edge
Summary: check that raw loads have control edge
Reviewed-by: never, twisti
author | kvn |
---|---|
date | Tue, 15 Jun 2010 18:07:27 -0700 |
parents | e9ff18c4ace7 |
children | 60a14ad85270 |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp Tue Jun 15 15:57:36 2010 -0700 +++ b/src/share/vm/opto/compile.cpp Tue Jun 15 18:07:27 2010 -0700 @@ -2000,6 +2000,17 @@ } } +#ifdef ASSERT + if( n->is_Mem() ) { + Compile* C = Compile::current(); + int alias_idx = C->get_alias_index(n->as_Mem()->adr_type()); + assert( n->in(0) != NULL || alias_idx != Compile::AliasIdxRaw || + // oop will be recorded in oop map if load crosses safepoint + n->is_Load() && (n->as_Load()->bottom_type()->isa_oopptr() || + LoadNode::is_immutable_value(n->in(MemNode::Address))), + "raw memory operations should have control edge"); + } +#endif // Count FPU ops and common calls, implements item (3) switch( nop ) { // Count all float operations that may use FPU