aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp14
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);