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

Unified Diff: src/compiler/osr.cc

Issue 1366753003: [turbofan] Make Node::set_op safer via wrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 3 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/node-properties.cc ('k') | src/compiler/select-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/osr.cc
diff --git a/src/compiler/osr.cc b/src/compiler/osr.cc
index 43e139d25033bdeeff2ac511257f1c7044e39b12..77eea3ce2ce6538dca48336ed2a8d643d5d522f3 100644
--- a/src/compiler/osr.cc
+++ b/src/compiler/osr.cc
@@ -237,7 +237,7 @@ static void PeelOuterLoopsForOsr(Graph* graph, CommonOperatorBuilder* common,
NodeId const id = end->InputAt(i)->id();
for (NodeVector* const copy : copies) {
end->AppendInput(graph->zone(), copy->at(id));
- end->set_op(common->End(end->InputCount()));
+ NodeProperties::ChangeOp(end, common->End(end->InputCount()));
}
}
@@ -301,12 +301,14 @@ void OsrHelper::Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
CHECK_NE(0, live_input_count);
for (Node* const use : osr_loop->uses()) {
if (NodeProperties::IsPhi(use)) {
- use->set_op(common->ResizeMergeOrPhi(use->op(), live_input_count));
use->RemoveInput(0);
+ NodeProperties::ChangeOp(
+ use, common->ResizeMergeOrPhi(use->op(), live_input_count));
}
}
- osr_loop->set_op(common->ResizeMergeOrPhi(osr_loop->op(), live_input_count));
osr_loop->RemoveInput(0);
+ NodeProperties::ChangeOp(
+ osr_loop, common->ResizeMergeOrPhi(osr_loop->op(), live_input_count));
// Run control reduction and graph trimming.
// TODO(bmeurer): The OSR deconstruction could be a regular reducer and play
« no previous file with comments | « src/compiler/node-properties.cc ('k') | src/compiler/select-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698