[Openmp-commits] [openmp] 135f6a1 - [libomptarget][plugin-nextgen] fix for [TypePromotion] NewPM support.

Ron Lieberman via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 3 09:04:33 PST 2023


Author: Ron Lieberman
Date: 2023-01-03T11:04:13-06:00
New Revision: 135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4

URL: https://github.com/llvm/llvm-project/commit/135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4
DIFF: https://github.com/llvm/llvm-project/commit/135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4.diff

LOG: [libomptarget][plugin-nextgen] fix for  [TypePromotion] NewPM support.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
    openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
index 92fd7bc87716a..2775d0621b10e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -133,16 +133,7 @@ void AMDGPUPrintfRuntimeBindingImpl::getConversionSpecifiers(
 
 bool AMDGPUPrintfRuntimeBindingImpl::shouldPrintAsStr(char Specifier,
                                                       Type *OpType) const {
-  if (Specifier != 's')
-    return false;
-  const PointerType *PT = dyn_cast<PointerType>(OpType);
-  if (!PT || PT->getAddressSpace() != AMDGPUAS::CONSTANT_ADDRESS)
-    return false;
-  Type *ElemType = PT->getContainedType(0);
-  if (ElemType->getTypeID() != Type::IntegerTyID)
-    return false;
-  IntegerType *ElemIType = cast<IntegerType>(ElemType);
-  return ElemIType->getBitWidth() == 8;
+  return Specifier == 's' && isa<PointerType>(OpType);
 }
 
 bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {

diff  --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
index 7cc1bb88cd004..893f4b17f3921 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
@@ -107,7 +107,7 @@ void init(Triple TT) {
   initializeWasmEHPreparePass(Registry);
   initializeWriteBitcodePassPass(Registry);
   initializeHardwareLoopsPass(Registry);
-  initializeTypePromotionPass(Registry);
+  initializeTypePromotionLegacyPass(Registry);
   initializeReplaceWithVeclibLegacyPass(Registry);
   initializeJMCInstrumenterPass(Registry);
 }


        


More information about the Openmp-commits mailing list