aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/graphKit.cpp
diff options
context:
space:
mode:
authorkvn <none@none>2010-06-15 18:07:27 -0700
committerkvn <none@none>2010-06-15 18:07:27 -0700
commit7a944531b69a589a0c969b1868ab4e65e4019dda (patch)
tree2c90c080987ca0283e55eea1aaf10320fea33f33 /src/share/vm/opto/graphKit.cpp
parentd7334d39be71c0d8b64195f734c3f53a78bb974b (diff)
6959430: Make sure raw loads have control edge
Summary: check that raw loads have control edge Reviewed-by: never, twisti
Diffstat (limited to 'src/share/vm/opto/graphKit.cpp')
-rw-r--r--src/share/vm/opto/graphKit.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp
index ce2fb4bb7..42a974b9b 100644
--- a/src/share/vm/opto/graphKit.cpp
+++ b/src/share/vm/opto/graphKit.cpp
@@ -1789,9 +1789,10 @@ void GraphKit::increment_counter(address counter_addr) {
void GraphKit::increment_counter(Node* counter_addr) {
int adr_type = Compile::AliasIdxRaw;
- Node* cnt = make_load(NULL, counter_addr, TypeInt::INT, T_INT, adr_type);
+ Node* ctrl = control();
+ Node* cnt = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type);
Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1)));
- store_to_memory( NULL, counter_addr, incr, T_INT, adr_type );
+ store_to_memory( ctrl, counter_addr, incr, T_INT, adr_type );
}
@@ -2771,11 +2772,7 @@ FastLockNode* GraphKit::shared_lock(Node* obj) {
// Update the counter for this lock. Don't bother using an atomic
// operation since we don't require absolute accuracy.
lock->create_lock_counter(map()->jvms());
- int adr_type = Compile::AliasIdxRaw;
- Node* counter_addr = makecon(TypeRawPtr::make(lock->counter()->addr()));
- Node* cnt = make_load(NULL, counter_addr, TypeInt::INT, T_INT, adr_type);
- Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1)));
- store_to_memory(control(), counter_addr, incr, T_INT, adr_type);
+ increment_counter(lock->counter()->addr());
}
#endif