Xiangyang Guo via llvm-dev
2015-Nov-29 02:48 UTC
[llvm-dev] basic block labels in assembly (.s file)
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151128/1191b129/attachment.html>
Vedant Kumar via llvm-dev
2015-Dec-01 00:41 UTC
[llvm-dev] basic block labels in assembly (.s file)
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
Tom Stellard via llvm-dev
2015-Dec-01 15:31 UTC
[llvm-dev] basic block labels in assembly (.s file)
On Sat, Nov 28, 2015 at 09:48:53PM -0500, Xiangyang Guo via llvm-dev 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. >The '.L' prefix comes from the value of your target's MCAsmInfo::PrivateLabelPrefix. This is configurable. -Tom> 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