This is an archive of the discontinued LLVM Phabricator instance.

[NVPTXAsmPrinter] clean up dead code. NFC
ClosedPublic

Authored by nickdesaulniers on Apr 15 2019, 10:39 AM.

Details

Summary

The printOperand function takes a default parameter, for which there are
zero call sites that explicitly pass such a parameter. As such, there
is no case to support. This means that the method
printVecModifiedImmediate is purly dead code, and can be removed.

The eventual goal for some of these AsmPrinter refactoring is to have
printOperand be a virtual method; making it easier to print operands
from the base class for more generic Asm printing. It will help if all
printOperand methods have the same function signature (ie. no Modifier
argument when not needed).

Event Timeline

Nick: Can you do some archaeology on the original patch and find out if there was supposed to be something supported here?

Art: Any thoughts?

Thanks!

tra added a comment.Apr 15 2019, 11:59 AM

Nick: Can you do some archaeology on the original patch and find out if there was supposed to be something supported here?

Art: Any thoughts?

The "vec" modifiers are probably leftovers used by now-deleted Target/NVPTX/NVPTXVector.td
https://reviews.llvm.org/rL314720

echristo accepted this revision.Apr 15 2019, 1:05 PM

LGTM then.

This revision is now accepted and ready to land.Apr 15 2019, 1:05 PM

@tra thanks for the additional context.

This revision was automatically updated to reflect the committed changes.