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

Unified Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 2116213002: Subzero: Allow deeper levels of variable splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 5 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/IceTargetLoweringMIPS32.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index a9dc7a7e75496b3d28fb654c2188c7b6cc2ed0da..daa72147b3a771818db285f131a77699290f6bd6 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -944,17 +944,12 @@ void TargetX86Base<TraitsType>::emitVariable(const Variable *Var) const {
auto BaseRegNum = Var->getBaseRegNum();
if (BaseRegNum.hasNoValue())
BaseRegNum = getFrameOrStackReg();
- // Print in the form "Offset(%reg)", taking care that:
- // - Offset is never printed when it is 0
-
- const bool DecorateAsm = getFlags().getDecorateAsm();
- // Only print Offset when it is nonzero, regardless of DecorateAsm.
- if (Offset) {
- if (DecorateAsm) {
- Str << Var->getSymbolicStackOffset();
- } else {
- Str << Offset;
- }
+
+ // Print in the form "Offset(%reg)", omitting Offset when it is 0.
+ if (getFlags().getDecorateAsm()) {
+ Str << Var->getSymbolicStackOffset();
+ } else if (Offset != 0) {
+ Str << Offset;
}
const Type FrameSPTy = Traits::WordType;
Str << "(%" << getRegName(BaseRegNum, FrameSPTy) << ")";
@@ -1211,9 +1206,9 @@ void TargetX86Base<TraitsType>::addProlog(CfgNode *Node) {
// Assign stack offsets to variables that have been linked to spilled
// variables.
for (Variable *Var : VariablesLinkedToSpillSlots) {
- const Variable *Linked = Var->getLinkedTo();
- assert(Linked != nullptr);
- Var->setStackOffset(Linked->getStackOffset());
+ const Variable *Root = Var->getLinkedToRoot();
+ assert(Root != nullptr);
+ Var->setStackOffset(Root->getStackOffset());
}
this->HasComputedFrame = true;
« no previous file with comments | « src/IceTargetLoweringMIPS32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698