OSDN Git Service

[SimplifyLibcalls] Replace locked IO with unlocked IO
authorDavid Bolvansky <david.bolvansky@gmail.com>
Thu, 26 Apr 2018 22:31:43 +0000 (22:31 +0000)
committerDavid Bolvansky <david.bolvansky@gmail.com>
Thu, 26 Apr 2018 22:31:43 +0000 (22:31 +0000)
commitc64f4dbfe31e509f9c1092b951e524b056245af8
tree2c0469f5c5629d2787ee1090d4d3ecf8b0fe6bca
parent891b01ba295294fa3a4798d68c928e64a9b4a661
[SimplifyLibcalls] Replace locked IO with unlocked IO

Summary: If file stream arg is not captured and source is fopen, we could replace IO calls by unlocked IO ("_unlocked" function variants) to gain better speed,

Reviewers: efriedma, RKSimon, spatel, sanjoy, hfinkel, majnemer

Subscribers: lebedev.ri, llvm-commits

Differential Revision: https://reviews.llvm.org/D45736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331002 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetLibraryInfo.def
include/llvm/Transforms/Utils/BuildLibCalls.h
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Analysis/TargetLibraryInfo.cpp
lib/Transforms/Utils/BuildLibCalls.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/Transforms/InstCombine/unlocked-stdio.ll [new file with mode: 0644]