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
Chandler Carruth
2012-Dec-18 22:07 UTC
[LLVMdev] Getting rid of tabs in LLVM's assembly output?
On Tue, Dec 18, 2012 at 1:13 PM, Eli Bendersky <eliben at google.com> wrote:> 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.Maybe it's naive, but I would expect it to be easy for each backend to expose a constant N which is the length of the longest mnemonic, and then for the printer to pad to N+1 or N+2.... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121218/7d0b3545/attachment.html>
Owen Anderson
2012-Dec-18 23:21 UTC
[LLVMdev] Getting rid of tabs in LLVM's assembly output?
On Dec 18, 2012, at 2:07 PM, Chandler Carruth <chandlerc at google.com> wrote:> On Tue, Dec 18, 2012 at 1:13 PM, Eli Bendersky <eliben at google.com> wrote: > 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. > > Maybe it's naive, but I would expect it to be easy for each backend to expose a constant N which is the length of the longest mnemonic, and then for the printer to pad to N+1 or N+2….That would probably work for X86, but other targets (ARM in particular) often have operands which are printed/parsed as suffices on the mnemonic itself. Because of these, the backend does not statically know the longest potential string-of-stuff-before-the-tab. --Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121218/d20179a0/attachment.html>
Reasonably Related 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?