James Y Knight via llvm-dev
2019-Feb-22 15:33 UTC
[llvm-dev] Improving textual IR format for nameless blocks
After watching a few different people get confused about nameless blocks in llvm IR, and recalling my own confusion a few years ago, I'd like to change the syntax slightly to make it a bit clearer. This is similar to the change made for instruction names in https://llvm.org/PR2480 a decade ago. Two changes: 1. Change the parsing of a numeric block label to parse as a value number rather than a string. 2. When printing blocks, always print the value number as a proper label, except for the initial block. See proposed change in https://reviews.llvm.org/D58548 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190222/bff2ca8c/attachment.html>
Duncan Exon Smith via llvm-dev
2019-Feb-22 21:21 UTC
[llvm-dev] Improving textual IR format for nameless blocks
> On 2019 Feb 22, at 07:33, James Y Knight via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > After watching a few different people get confused about nameless blocks in llvm IR, and recalling my own confusion a few years ago, I'd like to change the syntax slightly to make it a bit clearer. > > This is similar to the change made for instruction names in https://llvm.org/ <https://llvm.org/>PR2480 a decade ago. > > Two changes: > 1. Change the parsing of a numeric block label to parse as a value number rather than a string. > 2. When printing blocks, always print the value number as a proper label, except for the initial block. > > See proposed change in https://reviews.llvm.org/D58548 <https://reviews.llvm.org/D58548>I'm in favour of this. I think it improves readability at low cost. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190222/93363226/attachment.html>
Reid Kleckner via llvm-dev
2019-Feb-22 21:57 UTC
[llvm-dev] Improving textual IR format for nameless blocks
Thanks so much for making this happen. I have written many, many clang test cases with convoluted FileCheck regexes that match "label:" and "; :<numbered label>" so they pass with and without NDEBUG. On Fri, Feb 22, 2019 at 7:34 AM James Y Knight via llvm-dev < llvm-dev at lists.llvm.org> wrote:> After watching a few different people get confused about nameless blocks > in llvm IR, and recalling my own confusion a few years ago, I'd like to > change the syntax slightly to make it a bit clearer. > > This is similar to the change made for instruction names in > https://llvm.org/PR2480 a decade ago. > > Two changes: > 1. Change the parsing of a numeric block label to parse as a value number > rather than a string. > 2. When printing blocks, always print the value number as a proper label, > except for the initial block. > > See proposed change in https://reviews.llvm.org/D58548 > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190222/a7b3f025/attachment.html>
Chris Lattner via llvm-dev
2019-Feb-24 02:34 UTC
[llvm-dev] Improving textual IR format for nameless blocks
> On Feb 22, 2019, at 7:33 AM, James Y Knight via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > After watching a few different people get confused about nameless blocks in llvm IR, and recalling my own confusion a few years ago, I'd like to change the syntax slightly to make it a bit clearer. > > This is similar to the change made for instruction names in https://llvm.org/ <https://llvm.org/>PR2480 a decade ago. > > Two changes: > 1. Change the parsing of a numeric block label to parse as a value number rather than a string. > 2. When printing blocks, always print the value number as a proper label, except for the initial block. > > See proposed change in https://reviews.llvm.org/D58548 <https://reviews.llvm.org/D58548>Great idea! -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190223/847c672e/attachment.html>