From ca22d427b94de946d4ef32b8acbdfb7e62e7cfa4 Mon Sep 17 00:00:00 2001 From: David Bolvansky Date: Wed, 16 May 2018 11:39:52 +0000 Subject: [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, lebedev.ri, rja Reviewed By: rja Subscribers: rja, srhines, efriedma, lebedev.ri, llvm-commits Differential Revision: https://reviews.llvm.org/D45736 llvm-svn: 332452 --- llvm/test/Transforms/InferFunctionAttrs/annotate.ll | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/test/Transforms/InferFunctionAttrs/annotate.ll') diff --git a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll index 80ac8f99edc..371f1ad065b 100644 --- a/llvm/test/Transforms/InferFunctionAttrs/annotate.ll +++ b/llvm/test/Transforms/InferFunctionAttrs/annotate.ll @@ -514,6 +514,9 @@ declare i32 @getc_unlocked(%opaque*) ; CHECK: declare i32 @getchar() declare i32 @getchar() +; CHECK: declare i32 @getchar_unlocked() +declare i32 @getchar_unlocked() + ; CHECK: declare i8* @getenv(i8* nocapture) [[G1]] declare i8* @getenv(i8*) @@ -700,6 +703,9 @@ declare i32 @putc(i32, %opaque*) ; CHECK: declare i32 @putchar(i32) declare i32 @putchar(i32) +; CHECK: declare i32 @putchar_unlocked(i32) +declare i32 @putchar_unlocked(i32) + ; CHECK: declare i32 @puts(i8* nocapture readonly) [[G0]] declare i32 @puts(i8*) -- cgit v1.2.3