summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorJinsong Ji <jji@us.ibm.com>2019-11-04 16:27:23 +0000
committerJinsong Ji <jji@us.ibm.com>2019-11-04 17:17:24 +0000
commit40d0d4e2335d14a3a70a565304fd7e92c25f178b (patch)
treeff18d11a4841aab0317303a09a4711df7244aa78 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parentab76cfdd200d35177df2042a1c0c7e86868d01bc (diff)
downloadbcm5719-llvm-40d0d4e2335d14a3a70a565304fd7e92c25f178b.tar.gz
bcm5719-llvm-40d0d4e2335d14a3a70a565304fd7e92c25f178b.zip
Lower generic MASSV entries to PowerPC subtarget-specific entries
This patch (second of two patches) lowers the generic PowerPC vector entries to PowerPC subtarget-specific entries. For instance, the PowerPC generic entry 'cbrtd2_massv' is lowered to 'cbrtd2_P9' or Power9 subtarget. The first patch enables the vectorizer to recognize the IBM MASS vector library routines. This patch specifically adds support for recognizing the '-vector-library=MASSV' option, and defines mappings from IEEE standard scalar math functions to generic PowerPC MASS vector counterparts. For instance, the generic PowerPC MASS vector entry for double-precision 'cbrt' function is '__cbrtd2_massv' The overall support for MASS vector library is presented as such in two patches for ease of review. Patch by pjeeva01 (Jeeva P.) Differential Revision: https://reviews.llvm.org/D59883
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index abefee8b339..40b790f27a1 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -119,6 +119,7 @@ extern "C" void LLVMInitializePowerPCTarget() {
initializePPCPreEmitPeepholePass(PR);
initializePPCTLSDynamicCallPass(PR);
initializePPCMIPeepholePass(PR);
+ initializePPCLowerMASSVEntriesPass(PR);
}
/// Return the datalayout string of a subtarget.
@@ -401,6 +402,9 @@ void PPCPassConfig::addIRPasses() {
addPass(createPPCBoolRetToIntPass());
addPass(createAtomicExpandPass());
+ // Lower generic MASSV routines to PowerPC subtarget-specific entries.
+ addPass(createPPCLowerMASSVEntriesPass());
+
// For the BG/Q (or if explicitly requested), add explicit data prefetch
// intrinsics.
bool UsePrefetching = TM->getTargetTriple().getVendor() == Triple::BGQ &&
OpenPOWER on IntegriCloud