diff options
| author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2019-08-12 23:32:35 +0000 |
|---|---|---|
| committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2019-08-12 23:32:35 +0000 |
| commit | 5b32752d107aec1dbe8676a080c4ae9866a2607c (patch) | |
| tree | 38f4889a062ae3a347178bc0d80ba8122e7590b5 | |
| parent | a0a47d8ac113b1e959288698deef847f562921d3 (diff) | |
| download | bcm5719-llvm-5b32752d107aec1dbe8676a080c4ae9866a2607c.tar.gz bcm5719-llvm-5b32752d107aec1dbe8676a080c4ae9866a2607c.zip | |
[AMDGPU] removed unused functions from printf lowering
Differential Revision: https://reviews.llvm.org/D66117
llvm-svn: 368633
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp index 4de6923d601..85cf902a4ed 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp @@ -65,8 +65,6 @@ private: 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 @@ AMDGPUPrintfRuntimeBinding::AMDGPUPrintfRuntimeBinding() 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 @@ bool AMDGPUPrintfRuntimeBinding::shouldPrintAsStr(char Specifier, 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); |

