Hello,
I search information in order to access address (i.e. value) of label directly in llvm assembler file.
This can be useful to realize jump table from address, etc.
I generate the file branch.ll from a C file.
In this file, we saw that branches are realized by affecting virtually an id to each label and use a switch in order to find the right target.
I want to know if there is another way to do this, for instance, by accessing the address of label and to branch directly to it?
In order to optimize the program (to decrease the cost of branch dispatch), I use the following command line:
llvmc –O5 –o branch_opt branch.bc
llc –march=arm –mcpu=arm1136j-s –mattr=+v6 –f –o branch_opt.s branch_opt.bc
In the optimized program (branch_opt.arm), I saw that all branches are not suppressed.
I want to know, if it is possible to suppress the remaining useless branches? if yes, how ?
Thanks in advance.
Mikaël.
branch.ll (2.67 KB)
branch_opt.arm (809 Bytes)