[PATCH] D72309: Rework be15dfa88fb1 such that it works with GlobalISel which doesn't use EVT

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 10:14:58 PST 2020


dsanders added a comment.

In D72309#1807593 <https://reviews.llvm.org/D72309#1807593>, @arichardson wrote:

> Could we invert the boolean flag to be isFloat? I fear that calling it isInteger, will lead the the same problems that I tried to fix in that commit (calling .isInteger() returns false for pointers).


GlobalISel's LLT type doesn't have an isInteger() and distinguishes scalars from pointers so I think that's less of a risk for GlobalISel. For SelectionDAG, my guard against misuse is moving it to the GlobalISel namespace so that SelectionDAG code can't call it by accident.

That said, I don't mind inverting it in principle but one risk I see with that is that clangs fixits will direct downstream people to add the namespace but won't point out that the bool is inverted. We could name it isIntegral, isIntegerLike, isIntegerComparison, etc. if that helps.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72309/new/

https://reviews.llvm.org/D72309





More information about the llvm-commits mailing list