[llvm-dev] Get basic-block cycle cost from LLVM

陳韋任 via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 10 06:22:28 PST 2017


I believe so, though I am not expert in this field. :)

2017-11-09 20:41 GMT+08:00 Rick Veens via llvm-dev <llvm-dev at lists.llvm.org>
:

> Hi all,
>
> I'm interested in obtaining the cycles spend by the CPU from LLVM and i
> was wondering if this was possible to obtain this with the scheduling
> information from LLVM. (For the cortex-m0 in particular).
>
> I found the following function : getInstrLatency() in the TargetInstrInfo
> class.
>
> If i sum the latencies of the instructions in a basic block i suppose i
> will get the total cycle cost for  the cortex-m0.
>
> From what i understand is that there are multiple ways of doing scheduling
> in LLVM.
> I have read about one way which is using Itenaries and another which is
> using SchedMachineModel.
>
> Will the above function always give me the latencies, independent on the
> scheduling method used ?
>
> Sorry if this is a stupid question, i'm a beginner to LLVM.
>
> Best regards,
>
> Rick Veens
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>


-- 
Wei-Ren Chen (陳韋任)
Homepage: https://people.cs.nctu.edu.tw/~chenwj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171110/1a67bb29/attachment.html>


More information about the llvm-dev mailing list