[llvm-dev] basic block labels in assembly (.s file)

Vedant Kumar via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 30 16:41:57 PST 2015


Hi,

Does this need to be done in AsmPrinter?

Maybe it's possible to script this. In python, it could be:

with open(Path, 'rb') as F:
    re.subn(r'\.LBB_(\d+)', lambda M: '.MyLabel_' + M.group(1), F.read())

vedant

> On Nov 28, 2015, at 6:48 PM, Xiangyang Guo via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi, All,
> 
> If I use 'llc' to generate .s file, I notice usually the basic block labels are like ".LBB_number:". Is there a way that I can change the labels to other names, for example,  to ".MyLabel_number:" ? I think this should be related to AsmPrinter, but I cannot narrow down to certain specific source code.
> 
> Any help and suggestion is appreciated.
> 
> Regards,
> 
> Xiangyang
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list