diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-03 19:12:57 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-03 19:12:57 +0100 |
commit | 575a975afda81ccc78fd1a043ef1f1746c179724 (patch) | |
tree | b7435a2f7b5d2b3b9feb800409a2f1fa3a6d3708 /llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | |
parent | 23e3c3df260ac9d2872d684699141c131db95688 (diff) | |
download | llvm-575a975afda81ccc78fd1a043ef1f1746c179724.zip llvm-575a975afda81ccc78fd1a043ef1f1746c179724.tar.gz llvm-575a975afda81ccc78fd1a043ef1f1746c179724.tar.bz2 |
[SimplifyLibCalls] Remove unused IRBuilder argument; NFC
isLocallyOpenedFile() does not use IRBuilder.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp index c88e118..d47e969 100644 --- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp @@ -138,7 +138,7 @@ static Value *convertStrToNumber(CallInst *CI, StringRef &Str, int64_t Base) { return ConstantInt::get(CI->getType(), Result); } -static bool isLocallyOpenedFile(Value *File, CallInst *CI, IRBuilder<> &B, +static bool isLocallyOpenedFile(Value *File, CallInst *CI, const TargetLibraryInfo *TLI) { CallInst *FOpen = dyn_cast<CallInst>(File); if (!FOpen) @@ -2750,7 +2750,7 @@ Value *LibCallSimplifier::optimizeFWrite(CallInst *CI, IRBuilder<> &B) { } } - if (isLocallyOpenedFile(CI->getArgOperand(3), CI, B, TLI)) + if (isLocallyOpenedFile(CI->getArgOperand(3), CI, TLI)) return emitFWriteUnlocked(CI->getArgOperand(0), CI->getArgOperand(1), CI->getArgOperand(2), CI->getArgOperand(3), B, DL, TLI); @@ -2771,7 +2771,7 @@ Value *LibCallSimplifier::optimizeFPuts(CallInst *CI, IRBuilder<> &B) { // Check if has any use if (!CI->use_empty()) { - if (isLocallyOpenedFile(CI->getArgOperand(1), CI, B, TLI)) + if (isLocallyOpenedFile(CI->getArgOperand(1), CI, TLI)) return emitFPutSUnlocked(CI->getArgOperand(0), CI->getArgOperand(1), B, TLI); else @@ -2794,7 +2794,7 @@ Value *LibCallSimplifier::optimizeFPuts(CallInst *CI, IRBuilder<> &B) { Value *LibCallSimplifier::optimizeFPutc(CallInst *CI, IRBuilder<> &B) { optimizeErrorReporting(CI, B, 1); - if (isLocallyOpenedFile(CI->getArgOperand(1), CI, B, TLI)) + if (isLocallyOpenedFile(CI->getArgOperand(1), CI, TLI)) return emitFPutCUnlocked(CI->getArgOperand(0), CI->getArgOperand(1), B, TLI); @@ -2802,14 +2802,14 @@ Value *LibCallSimplifier::optimizeFPutc(CallInst *CI, IRBuilder<> &B) { } Value *LibCallSimplifier::optimizeFGetc(CallInst *CI, IRBuilder<> &B) { - if (isLocallyOpenedFile(CI->getArgOperand(0), CI, B, TLI)) + if (isLocallyOpenedFile(CI->getArgOperand(0), CI, TLI)) return emitFGetCUnlocked(CI->getArgOperand(0), B, TLI); return nullptr; } Value *LibCallSimplifier::optimizeFGets(CallInst *CI, IRBuilder<> &B) { - if (isLocallyOpenedFile(CI->getArgOperand(2), CI, B, TLI)) + if (isLocallyOpenedFile(CI->getArgOperand(2), CI, TLI)) return emitFGetSUnlocked(CI->getArgOperand(0), CI->getArgOperand(1), CI->getArgOperand(2), B, TLI); @@ -2817,7 +2817,7 @@ Value *LibCallSimplifier::optimizeFGets(CallInst *CI, IRBuilder<> &B) { } Value *LibCallSimplifier::optimizeFRead(CallInst *CI, IRBuilder<> &B) { - if (isLocallyOpenedFile(CI->getArgOperand(3), CI, B, TLI)) + if (isLocallyOpenedFile(CI->getArgOperand(3), CI, TLI)) return emitFReadUnlocked(CI->getArgOperand(0), CI->getArgOperand(1), CI->getArgOperand(2), CI->getArgOperand(3), B, DL, TLI); |