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

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1411583007: Combine allocas (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Finish fast path. 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 | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.cpp
diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
index b8fc90b78b334a2685abddd2ee564bbf724a7434..8e2480831e44929d6fa989a2770563dd26561188 100644
--- a/src/IceTargetLoweringMIPS32.cpp
+++ b/src/IceTargetLoweringMIPS32.cpp
@@ -92,6 +92,11 @@ void TargetMIPS32::translateO2() {
// TODO(stichnot): share passes with X86?
// https://code.google.com/p/nativeclient/issues/detail?id=4094
+ // Merge Alloca instructions, and lay out the stack.
+ static constexpr bool SortAndCombineAllocas = true;
+ Func->processAllocas(SortAndCombineAllocas);
+ Func->dump("After Alloca processing");
+
if (!Ctx->getFlags().getPhiEdgeSplit()) {
// Lower Phi instructions.
Func->placePhiLoads();
@@ -187,6 +192,11 @@ void TargetMIPS32::translateOm1() {
// TODO: share passes with X86?
+ // Do not merge Alloca instructions, and lay out the stack.
+ static constexpr bool SortAndCombineAllocas = false;
+ Func->processAllocas(SortAndCombineAllocas);
+ Func->dump("After Alloca processing");
+
Func->placePhiLoads();
if (Func->hasError())
return;
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698