This is an archive of the discontinued LLVM Phabricator instance.

NVPTX: Trivial cleanups of NVPTXInferAddressSpaces
ClosedPublic

Authored by arsenm on Jan 25 2017, 8:32 PM.

Details

Reviewers
jlebar
Summary
  • Move DEBUG_TYPE below includes
  • Change unknown address space constant to be consistent with other passes
    • Grammar fixes in debug output

Diff Detail

Event Timeline

arsenm created this revision.Jan 25 2017, 8:32 PM
jlebar accepted this revision.Jan 26 2017, 5:13 PM
jlebar added inline comments.
lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
472

I don't really care, but I have to admit that I find '\n' in place of "\n" kind of a strange change to make.

This revision is now accepted and ready to land.Jan 26 2017, 5:13 PM
arsenm added inline comments.Jan 26 2017, 5:16 PM
lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
472

I think it looks nicer and allegedly this saves a call by using the more inlinable char version of <<

jlebar added inline comments.Jan 26 2017, 5:18 PM
lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
472

I mean, presumably we are not optimizing for the speed of these dbgs() calls.

If my grep'ing is correct, *nobody* is doing '\n', so maybe we shouldn't make this change.

$ git grep 'dbgs().*"\\n"' | wc -l
1009
$ git grep "dbgs().*'\\n'" | wc -l
0

arsenm added inline comments.Jan 26 2017, 5:22 PM
lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp
472

I've been consistently using single quote chars in AMDGPU so something is probably off

arsenm closed this revision.Jan 30 2017, 3:38 PM

r293567