forked from OSchip/llvm-project
[AMDGPU] Remove replaceWithNative (NFC)
The function was introduced without any use on Aug 11, 2017 in commit
7f37794ebd
.
This commit is contained in:
parent
bfc8f76e60
commit
5c4b9ea4a7
|
@ -58,9 +58,6 @@ private:
|
|||
// "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) {
|
||||
|
|
Loading…
Reference in New Issue