This is an archive of the discontinued LLVM Phabricator instance.

Reformat NVPTXInstrInfo.td, and add additional comments.
ClosedPublic

Authored by jlebar on Feb 17 2016, 3:14 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 48249.Feb 17 2016, 3:14 PM
jlebar retitled this revision from to Reformat NVPTXInstrInfo.td, and add additional comments..
jlebar updated this object.
jlebar added a reviewer: jholewinski.
jlebar added subscribers: tra, llvm-commits.
jholewinski edited edge metadata.Feb 17 2016, 4:01 PM

What is the motivation for this? Is it reformatted with a tool?

I'm not fundamentally opposed to such a change; I just want to understand the rationale since it touches a *lot* of code.

What is the motivation for this?

After finding the bug in D17315, I'm trawling through the tablegen files looking for other issues. I was going to have to carefully read the whole thing anyway, and figure I'm going to be more successful finding bugs if the code is consistently-formatted.

Is it reformatted with a tool?

http://www.kinesis-ergo.com/shop/advantage-for-pc-mac/ :-p

I'm not fundamentally opposed to such a change; I just want to understand the rationale since it touches a *lot* of code.

If it helps, here's a diff that ignores all whitespace, including newlines.

$ git diff --word-diff-regex=[^[:space:]] 7126dbe9c^..7126dbe9c | gist
https://gist.github.com/de3b01211b52b6162380

If you run this in your own terminal (fetch this branch: https://github.com/jlebar/llvm/tree/nvvm-reformat) it'll be all nice and color-coded.

It would be helpful to get this in if we agree on it, otherwise I get to live in a rebase hell (admittedly of my own making) trying to land these other patches. Or otherwise I can drop this, and that will halve my rebase hell, but we'd lose I think some nontrivial cosmetic improvements.

I can try to split out most of the whitespace changes from the non-ws changes if that would help. No promises -- I didn't split it up originally because I was afraid that even that would get me into rebase hell -- but I can try.

jholewinski accepted this revision.Mar 1 2016, 4:54 AM
jholewinski edited edge metadata.

Sorry, I know I've been slow to respond recently...

This looks fine. Thanks for taking the time to clean this up!

This revision is now accepted and ready to land.Mar 1 2016, 4:54 AM

Sorry, I know I've been slow to respond recently...

No worries, I know I've sent you a lot of code lately. :)

This revision was automatically updated to reflect the committed changes.