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

Unified Diff: src/IceOperand.cpp

Issue 2107073002: Subzero: Merge SpillVariable functionality directly into Variable. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review comments. Created 4 years, 6 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/IceOperand.h ('k') | src/IceTargetLoweringX8632Traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceOperand.cpp
diff --git a/src/IceOperand.cpp b/src/IceOperand.cpp
index 50d70b935cd761ff5f0a67a34cb5f912f84aa6cf..e6593c720da6d5e17ce44e21d2f9527c0ae2c088 100644
--- a/src/IceOperand.cpp
+++ b/src/IceOperand.cpp
@@ -198,11 +198,12 @@ const Variable *Variable::asType(const Cfg *Func, Type Ty,
if (!BuildDefs::dump() || getType() == Ty)
return this;
static constexpr SizeT One = 1;
- Variable *V = new (CfgLocalAllocator<Variable>().allocate(One))
+ auto *V = new (CfgLocalAllocator<Variable>().allocate(One))
Variable(Func, kVariable, Ty, Number);
V->Name = Name;
V->RegNum = NewRegNum.hasValue() ? NewRegNum : RegNum;
V->StackOffset = StackOffset;
+ V->LinkedTo = LinkedTo;
return V;
}
@@ -537,8 +538,11 @@ void Variable::dump(const Cfg *Func, Ostream &Str) const {
return;
}
if (Func->isVerbose(IceV_RegOrigins) ||
- (!hasReg() && !Func->getTarget()->hasComputedFrame()))
+ (!hasReg() && !Func->getTarget()->hasComputedFrame())) {
Str << "%" << getName();
+ if (getLinkedTo() != nullptr)
+ Str << ":%" << getLinkedTo()->getName();
+ }
if (hasReg()) {
if (Func->isVerbose(IceV_RegOrigins))
Str << ":";
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLoweringX8632Traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698