Category : compiler-construction

In C/C++, it is common for functions to have pass-by-reference or pass-by-pointer parameters. (For convenience, I will only talk about pointers in the following discussions. But the problem exists for both.) The problem is, will the function store the pointers in some places with longer extent than the function call and use the pointers after ..

Read more

It is ok to use this command: opt -enable-new-pm=0 -instcount -stats source_IR.ll I will get the result like: ===————————————————————————-=== … Statistics Collected … ===————————————————————————-=== 3 instcount – Number of Add insts 2 instcount – Number of And insts 10 instcount – Number of Br insts 1 instcount – Number of Call insts 10 instcount – ..

Read more

I mean the command like opt -enable-new-pm=0 -branch-prob -analyze source_if.ll then the output might be: Printing analysis ‘Lazy Branch Probability Analysis’ for function ‘main’: —- Branch Probabilities —- edge entry -> for.cond probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge] edge for.cond -> for.body probability is 0x7c000000 / 0x80000000 = 96.88% [HOT edge] edge ..

Read more