Eli Bendersky
2012-Dec-18 21:01 UTC
[LLVMdev] Getting rid of tabs in LLVM's assembly output?
On Tue, Dec 18, 2012 at 11:36 AM, Caldarale, Charles R <Chuck.Caldarale at unisys.com> wrote:>> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] >> On Behalf Of Eli Bendersky >> Subject: [LLVMdev] Getting rid of tabs in LLVM's assembly output? > >> Problem: I then get tabs in my tests, which are discouraged by LLVM's >> own code standards, because assembly output uses tabs extensively. > >> Proposal: get rid of tabs by just replacing them with two spaces everywhere. > > That will cause some really ugly output; can a somewhat more intelligent formatter be used to keep columns aligned? >Here's how some random output currently looks in a 2-space-per-tab editor: cmpl $0, -28(%rbp) je .LBB2_9 movsbl -81(%rbp), %eax movq -16(%rbp), %rcx movb 56(%rcx), %dl andb $1, %dl movzbl %dl, %esi So if you're worried about ugliness, it's already there :-) Eli
Craig Topper
2012-Dec-18 21:09 UTC
[LLVMdev] Getting rid of tabs in LLVM's assembly output?
But its pretty easy to change the tabstop within the editor to make it readable. On Tue, Dec 18, 2012 at 1:01 PM, Eli Bendersky <eliben at google.com> wrote:> On Tue, Dec 18, 2012 at 11:36 AM, Caldarale, Charles R > <Chuck.Caldarale at unisys.com> wrote: > >> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > >> On Behalf Of Eli Bendersky > >> Subject: [LLVMdev] Getting rid of tabs in LLVM's assembly output? > > > >> Problem: I then get tabs in my tests, which are discouraged by LLVM's > >> own code standards, because assembly output uses tabs extensively. > > > >> Proposal: get rid of tabs by just replacing them with two spaces > everywhere. > > > > That will cause some really ugly output; can a somewhat more intelligent > formatter be used to keep columns aligned? > > > > Here's how some random output currently looks in a 2-space-per-tab editor: > > cmpl $0, -28(%rbp) > je .LBB2_9 > movsbl -81(%rbp), %eax > movq -16(%rbp), %rcx > movb 56(%rcx), %dl > andb $1, %dl > movzbl %dl, %esi > > So if you're worried about ugliness, it's already there :-) > > Eli > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- ~Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121218/6cb3e3f9/attachment.html>
Eli Bendersky
2012-Dec-18 21:13 UTC
[LLVMdev] Getting rid of tabs in LLVM's assembly output?
On Tue, Dec 18, 2012 at 1:09 PM, Craig Topper <craig.topper at gmail.com> wrote:> But its pretty easy to change the tabstop within the editor to make it > readable. >True, in this case... The output is not trying to be intelligent in the general case, just spitting out tabs. I agree that to replace this, however, it would be best to look at some smart column-padded formatting than use a constant tab -> N spaces replacement. I'll see if this is something I can get to. Eli
Possibly Parallel Threads
- [LLVMdev] Getting rid of tabs in LLVM's assembly output?
- [LLVMdev] Getting rid of tabs in LLVM's assembly output?
- [LLVMdev] Getting rid of tabs in LLVM's assembly output?
- [LLVMdev] Getting rid of tabs in LLVM's assembly output?
- [LLVMdev] Getting rid of tabs in LLVM's assembly output?