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

Unified Diff: src/IceCfg.cpp

Issue 1465213002: Subzero. ARM32. Combine allocas. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 5 years, 1 month 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 | « no previous file | src/IceTargetLowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 3fe37f3c87eba936ee72bbf83c23955ec137db9f..f8d40a5bf25cff1013f48050b0d30392ec0480df 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -484,8 +484,14 @@ void Cfg::sortAndCombineAllocas(CfgVector<Inst *> &Allocas,
} else {
// Addressing is relative to the stack pointer or to a user pointer. Add
// the offset before adding the size of the object, because it grows
- // upwards from the stack pointer.
- Offsets.push_back(CurrentOffset);
+ // upwards from the stack pointer. In addition, if the addressing is
+ // relative to the stack pointer, we need to add the pre-computed max out
+ // args size bytes.
+ const uint32_t OutArgsOffsetOrZero =
+ (BaseVariableType == BVT_StackPointer)
+ ? getTarget()->maxOutArgsSizeBytes()
+ : 0;
+ Offsets.push_back(CurrentOffset + OutArgsOffsetOrZero);
}
// Update the running offset of the fused alloca region.
CurrentOffset += Size;
« no previous file with comments | « no previous file | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698