We can either check the opcode or number of operands or use
ISD::isVPOpcode inside the methods.
In some places I've used number of operands figuring that it is
cheaper than isVPOpcode. I've included isVPOpcode in an assert to
verify.
Paths
| Differential D116578
[LegalizeTypes] Remove IsVP argument from type legalization methods. NFC ClosedPublic Authored by craig.topper on Jan 3 2022, 11:54 PM.
Details Summary We can either check the opcode or number of operands or use In some places I've used number of operands figuring that it is
Diff Detail
Unit TestsFailed
Event TimelineComment Actions LGTM. I originally went for IsVP as it's arguably clearer to the reader, but I suppose it is better to avoid relying on extra params when the info is already known via other means. The isVPOpcode assertions help make sense of it. This revision is now accepted and ready to land.Jan 4 2022, 4:37 AM Comment Actions Add SDNode::isVPOpcode. Group VP opcodes with their not VP opcodes in some of the switches. Comment Actions Still looks good to me. I am in two minds about the switch formatting; on one hand it's not clang-tidied, but on the other (two) hand(s)m the equality is clearer, and the formatting's already unconventional in these files. So I think I lean towards it being fine as you've got it. Cheers. This revision is now accepted and ready to land.Jan 5 2022, 2:52 AM This revision was landed with ongoing or failed builds.Jan 5 2022, 9:01 AM Closed by commit rG88ecdd30f607: [LegalizeTypes] Remove IsVP argument from type legalization methods. NFC (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 397208 llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
|
clang-format: please reformat the code