[llvm] 5c4b9ea - [AMDGPU] Remove replaceWithNative (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 31 16:43:16 PST 2021
Author: Kazu Hirata
Date: 2021-12-31T16:43:06-08:00
New Revision: 5c4b9ea4a7b36c625555262a07f744c0fc694461
URL: https://github.com/llvm/llvm-project/commit/5c4b9ea4a7b36c625555262a07f744c0fc694461
DIFF: https://github.com/llvm/llvm-project/commit/5c4b9ea4a7b36c625555262a07f744c0fc694461.diff
LOG: [AMDGPU] Remove replaceWithNative (NFC)
The function was introduced without any use on Aug 11, 2017 in commit
7f37794ebd2c6c36224597800e4d1e5a99ad80e9.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
index c221b55d9c70e..0e1bb3305b2d6 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
@@ -58,9 +58,6 @@ class AMDGPULibCalls {
// "FuncName" exists. It may create a new function prototype in pre-link mode.
FunctionCallee getFunction(Module *M, const FuncInfo &fInfo);
- // Replace a normal function with its native version.
- bool replaceWithNative(CallInst *CI, const FuncInfo &FInfo);
-
bool parseFunctionName(const StringRef &FMangledName, FuncInfo &FInfo);
bool TDOFold(CallInst *CI, const FuncInfo &FInfo);
@@ -779,27 +776,6 @@ bool AMDGPULibCalls::TDOFold(CallInst *CI, const FuncInfo &FInfo) {
return false;
}
-bool AMDGPULibCalls::replaceWithNative(CallInst *CI, const FuncInfo &FInfo) {
- Module *M = CI->getModule();
- if (getArgType(FInfo) != AMDGPULibFunc::F32 ||
- FInfo.getPrefix() != AMDGPULibFunc::NOPFX ||
- !HasNative(FInfo.getId()))
- return false;
-
- AMDGPULibFunc nf = FInfo;
- nf.setPrefix(AMDGPULibFunc::NATIVE);
- if (FunctionCallee FPExpr = getFunction(M, nf)) {
- LLVM_DEBUG(dbgs() << "AMDIC: " << *CI << " ---> ");
-
- CI->setCalledFunction(FPExpr);
-
- LLVM_DEBUG(dbgs() << *CI << '\n');
-
- return true;
- }
- return false;
-}
-
// [native_]half_recip(c) ==> 1.0/c
bool AMDGPULibCalls::fold_recip(CallInst *CI, IRBuilder<> &B,
const FuncInfo &FInfo) {
More information about the llvm-commits
mailing list