<div dir="ltr">Hi all,<div><br></div><div>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).</div><div><br></div><div>I found the following function : <span style="font-size:12.8px">getInstrLatency() in the </span><span style="font-size:12.8px">TargetInstrInfo class.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">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.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">From what i understand is that there are multiple ways of doing scheduling in LLVM. </span></div><div><span style="font-size:12.8px">I have read about one way which is using Itenaries and another which is using SchedMachineModel.</span></div><div><br></div><div>Will the above function always give me the latencies, independent on the scheduling method used ?</div><div><br></div><div>Sorry if this is a stupid question, i'm a beginner to LLVM.</div><div><br></div><div>Best regards,</div><div><br></div><div>Rick Veens</div></div>