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

Unified Diff: src/compiler/instruction-selector.cc

Issue 2897203002: [Turbofan] Remove UnallocatedOperand::set_virtual_register. (Closed)
Patch Set: Make ctor conform to Chromium style. Created 3 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/instruction.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index bafa2c51cd5ae94c74535703ab7e2c13dbbd26d1..7f9da4aefcd8788751ed6c1aa54345bc287bbf97 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -302,10 +302,11 @@ int InstructionSelector::GetRename(int virtual_register) {
void InstructionSelector::TryRename(InstructionOperand* op) {
if (!op->IsUnallocated()) return;
- int vreg = UnallocatedOperand::cast(op)->virtual_register();
+ UnallocatedOperand* unalloc = UnallocatedOperand::cast(op);
+ int vreg = unalloc->virtual_register();
int rename = GetRename(vreg);
if (rename != vreg) {
- UnallocatedOperand::cast(op)->set_virtual_register(rename);
+ *unalloc = UnallocatedOperand(*unalloc, rename);
}
}
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698