[llvm] 575a975 - [SimplifyLibCalls] Remove unused IRBuilder argument; NFC
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 10:13:52 PST 2020
Author: Nikita Popov
Date: 2020-02-03T19:12:57+01:00
New Revision: 575a975afda81ccc78fd1a043ef1f1746c179724
URL: https://github.com/llvm/llvm-project/commit/575a975afda81ccc78fd1a043ef1f1746c179724
DIFF: https://github.com/llvm/llvm-project/commit/575a975afda81ccc78fd1a043ef1f1746c179724.diff
LOG: [SimplifyLibCalls] Remove unused IRBuilder argument; NFC
isLocallyOpenedFile() does not use IRBuilder.
Added:
Modified:
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index c88e1180c08c..d47e9691b37c 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);
More information about the llvm-commits
mailing list