[PATCH] D66117: [AMDGPU] removed unused functions from printf lowering

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 16:32:42 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL368633: [AMDGPU] removed unused functions from printf lowering (authored by rampitec, committed by ).
Herald added a project: LLVM.

Changed prior to commit:
  https://reviews.llvm.org/D66117?vs=214730&id=214739#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66117/new/

https://reviews.llvm.org/D66117

Files:
  llvm/trunk/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp


Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -65,8 +65,6 @@
                                StringRef fmt, size_t num_ops) const;
 
   bool shouldPrintAsStr(char Specifier, Type *OpType) const;
-  bool confirmSpirModule(Module &M) const;
-  bool confirmOpenCLVersion200(Module &M) const;
   bool lowerPrintfForGpu(Module &M);
 
   void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -108,20 +106,6 @@
   initializeAMDGPUPrintfRuntimeBindingPass(*PassRegistry::getPassRegistry());
 }
 
-bool AMDGPUPrintfRuntimeBinding::confirmOpenCLVersion200(Module &M) const {
-  NamedMDNode *OCLVersion = M.getNamedMetadata("opencl.ocl.version");
-  if (!OCLVersion || OCLVersion->getNumOperands() != 1)
-    return false;
-  MDNode *Ver = OCLVersion->getOperand(0);
-  if (Ver->getNumOperands() != 2)
-    return false;
-  ConstantInt *Major = mdconst::dyn_extract<ConstantInt>(Ver->getOperand(0));
-  ConstantInt *Minor = mdconst::dyn_extract<ConstantInt>(Ver->getOperand(1));
-  if (!Major || !Minor)
-    return false;
-  return Major->getZExtValue() == 2;
-}
-
 void AMDGPUPrintfRuntimeBinding::getConversionSpecifiers(
     SmallVectorImpl<char> &OpConvSpecifiers, StringRef Fmt,
     size_t NumOps) const {
@@ -168,11 +152,6 @@
   return ElemIType->getBitWidth() == 8;
 }
 
-bool AMDGPUPrintfRuntimeBinding::confirmSpirModule(Module &M) const {
-  NamedMDNode *SPIRVersion = M.getNamedMetadata("opencl.spir.version");
-  return SPIRVersion ? true : false;
-}
-
 bool AMDGPUPrintfRuntimeBinding::lowerPrintfForGpu(Module &M) {
   LLVMContext &Ctx = M.getContext();
   IRBuilder<> Builder(Ctx);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66117.214739.patch
Type: text/x-patch
Size: 1816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190812/9f98b9fa/attachment.bin>


More information about the llvm-commits mailing list