[llvm-dev] Strange function time

Muhui Jiang via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 17 02:42:34 PDT 2018


Hi

I write a LLVM function pass to try to analysis all the functions inside
one binary.

However, this pass has been run for 80 CPU hours.

You can refer to
https://groups.google.com/forum/#!searchin/llvm-dev/slow$20pass%7Csort:date/llvm-dev/BNbqiSbrh70/mQFZkAj-BgAJ

I look at the functions it analyzed. Then I found some very strange
function name. There are more than one hundred functions whose name is
output_xxx. I randomly select some of them and found that the IR are all
the same like below:

Source Line:115|Column:11|File:insn-output.c|IR:  call void
@llvm.dbg.value(metadata %struct.rtx_def** %operands, metadata !441244,
metadata !DIExpression()), !dbg !441246
Source Line:116|Column:10|File:insn-output.c|IR:  call void
@llvm.dbg.value(metadata %struct.rtx_def* %insn, metadata !441245, metadata
!DIExpression()), !dbg !441247
Source Line:118|Column:9|File:insn-output.c|IR:  %call = tail call fastcc
i8* @output_fp_compare(%struct.rtx_def* %insn, %struct.rtx_def** %operands,
i32 0, i32 0) #5, !dbg !43814
Source Line:118|Column:2|File:insn-output.c|IR:  ret i8* %call, !dbg !43815

I am not sure this is the reason that make my pass running such a long
time. The target bitcode is just less than 50Mb. I don't think it will cost
me so much time. Do anyone has any ideas? I

Regards
Muhui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180717/f620cc06/attachment.html>


More information about the llvm-dev mailing list