Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1709)

Unified Diff: src/compiler/simplified-lowering.cc

Issue 1124813005: WIP Atomics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AtomicsLoad type in typer.cc Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/simplified-lowering.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 050d6ce0873211d55f179b50b1f4c1e88ef39b67..b70e128fcef4616581b198e044d2a3b9ea77ba04 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -855,6 +855,15 @@ class RepresentationSelector {
if (lower()) lowering->DoLoadElement(node);
break;
}
+ case IrOpcode::kLoadElementAtomic: {
+ ElementAccess access = ElementAccessOf(node->op());
+ ProcessInput(node, 0, changer_->TypeForBasePointer(access)); // base
+ ProcessInput(node, 1, kMachInt32); // index
+ ProcessRemainingInputs(node, 2);
+ SetOutput(node, access.machine_type);
+ if (lower()) lowering->DoLoadElementAtomic(node);
+ break;
+ }
case IrOpcode::kStoreElement: {
ElementAccess access = ElementAccessOf(node->op());
ProcessInput(node, 0, changer_->TypeForBasePointer(access)); // base
@@ -1300,6 +1309,13 @@ void SimplifiedLowering::DoLoadElement(Node* node) {
}
+void SimplifiedLowering::DoLoadElementAtomic(Node* node) {
+ const ElementAccess& access = ElementAccessOf(node->op());
+ node->set_op(machine()->LoadAtomic(access.machine_type));
+ node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1)));
+}
+
+
void SimplifiedLowering::DoStoreElement(Node* node) {
const ElementAccess& access = ElementAccessOf(node->op());
Type* type = NodeProperties::GetBounds(node->InputAt(2)).upper;
« no previous file with comments | « src/compiler/simplified-lowering.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698