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

Unified Diff: lib/Transforms/NaCl/PNaClABISimplify.cpp

Issue 1207543003: PNaCl: Add two new passes: `-rewrite-aggregate-arguments && `-rewrite-aggregate-returns`. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix and add a test. Created 5 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 | « lib/Transforms/NaCl/CMakeLists.txt ('k') | lib/Transforms/NaCl/RewriteAggFuns.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Transforms/NaCl/PNaClABISimplify.cpp
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp
index e758244a737d2ead200b9307e1ae38f93219b977..5172c259c1b9ce1806c29e7a89a768bd3a212970 100644
--- a/lib/Transforms/NaCl/PNaClABISimplify.cpp
+++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp
@@ -92,6 +92,11 @@ void llvm::PNaClABISimplifyAddPreOptPasses(Triple *T, PassManagerBase &PM) {
// "va_arg" instructions have been removed.
PM.add(createExpandVarArgsPass());
+ // RewriteAgg(Arg|Ret) replaces aggregate arguments or return type with the
+ // pointer representation of the type. Needs to be before ExpandStructRegs.
+ PM.add(createRewriteAggArgPass());
+ PM.add(createRewriteAggRetPass());
+
// TODO(mtrofin) Remove the following and only run it as a post-opt pass once
// the following bug is fixed.
// https://code.google.com/p/nativeclient/issues/detail?id=3857
« no previous file with comments | « lib/Transforms/NaCl/CMakeLists.txt ('k') | lib/Transforms/NaCl/RewriteAggFuns.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698