2

I'm doing analysis on the LLVM machinecode CFG (CFG with Back-Edges removed), for each Instruction at the CFG I have attached at value (lets call it Cost), I would like to calculate the running average of the CFG paths Total Cost with averaging window of W instructions in case that the running average pass some threshold (CostThreshould) then I would like to print the BasicBlock where this happened , for example calculate for every path on the CFG what is the running average cost over 1000 instructions, if the average grater than 7 at some path then print the last basic block of the path. at this analysis I'm removing all the backedges of the graph so the CFG should be DAG is there an efficient way to calculate this?

0 Answers0