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

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

Issue 221693002: PNaCl: Add support for GCC/LLVM vector extensions (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Address dschuff's comments. Created 6 years, 8 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
Index: lib/Transforms/NaCl/PNaClABISimplify.cpp
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp
index 06342d98be352c413e6e423853dba1f5040d151e..1fc1afb938c2dcf8ccd8c5c4e0bd562c0cc5750e 100644
--- a/lib/Transforms/NaCl/PNaClABISimplify.cpp
+++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp
@@ -92,6 +92,16 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManagerBase &PM) {
PM.add(createPromoteI1OpsPass());
+ // Vector simplifications.
+ // TODO(jfb) Remove duplicate constant vector values using
+ // ConstantMerge after the GlobalizeConstantVectors pass?
+ PM.add(createGlobalizeConstantVectorsPass());
+ // The following pass inserts GEPs, it must precede
+ // ExpandGetElementPtr. It also creates vector loads and stores, the
+ // subsequent pass cleans them up to fix their alignment.
+ PM.add(createConstantInsertExtractElementIndexPass());
+ PM.add(createFixVectorLoadStoreAlignmentPass());
+
// Optimization passes and ExpandByVal introduce
// memset/memcpy/memmove intrinsics with a 64-bit size argument.
// This pass converts those arguments to 32-bit.

Powered by Google App Engine
This is Rietveld 408576698