Skip to content

Commit 320c18a

Browse files
authored
[SystemZ] TableGen-erate node descriptions (#168113)
This allows SDNodes to be validated against their expected type profiles and reduces the number of changes required to add a new node. There is only one node that is missing a description -- `GET_CCMASK`, others were successfully imported. Part of #119709. Pull Request: #168113
1 parent 21e0b56 commit 320c18a

File tree

6 files changed

+295
-567
lines changed

6 files changed

+295
-567
lines changed

llvm/lib/Target/SystemZ/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tablegen(LLVM SystemZGenDisassemblerTables.inc -gen-disassembler)
1111
tablegen(LLVM SystemZGenInstrInfo.inc -gen-instr-info)
1212
tablegen(LLVM SystemZGenMCCodeEmitter.inc -gen-emitter)
1313
tablegen(LLVM SystemZGenRegisterInfo.inc -gen-register-info)
14+
tablegen(LLVM SystemZGenSDNodeInfo.inc -gen-sd-node-info)
1415
tablegen(LLVM SystemZGenSubtargetInfo.inc -gen-subtarget)
1516

1617
add_public_tablegen_target(SystemZCommonTableGen)

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 0 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -7423,153 +7423,6 @@ SystemZTargetLowering::ReplaceNodeResults(SDNode *N,
74237423
return LowerOperationWrapper(N, Results, DAG);
74247424
}
74257425

7426-
const char *SystemZTargetLowering::getTargetNodeName(unsigned Opcode) const {
7427-
#define OPCODE(NAME) case SystemZISD::NAME: return "SystemZISD::" #NAME
7428-
switch ((SystemZISD::NodeType)Opcode) {
7429-
case SystemZISD::FIRST_NUMBER: break;
7430-
OPCODE(RET_GLUE);
7431-
OPCODE(CALL);
7432-
OPCODE(SIBCALL);
7433-
OPCODE(TLS_GDCALL);
7434-
OPCODE(TLS_LDCALL);
7435-
OPCODE(PCREL_WRAPPER);
7436-
OPCODE(PCREL_OFFSET);
7437-
OPCODE(ICMP);
7438-
OPCODE(FCMP);
7439-
OPCODE(STRICT_FCMP);
7440-
OPCODE(STRICT_FCMPS);
7441-
OPCODE(TM);
7442-
OPCODE(BR_CCMASK);
7443-
OPCODE(SELECT_CCMASK);
7444-
OPCODE(ADJDYNALLOC);
7445-
OPCODE(PROBED_ALLOCA);
7446-
OPCODE(POPCNT);
7447-
OPCODE(SMUL_LOHI);
7448-
OPCODE(UMUL_LOHI);
7449-
OPCODE(SDIVREM);
7450-
OPCODE(UDIVREM);
7451-
OPCODE(SADDO);
7452-
OPCODE(SSUBO);
7453-
OPCODE(UADDO);
7454-
OPCODE(USUBO);
7455-
OPCODE(ADDCARRY);
7456-
OPCODE(SUBCARRY);
7457-
OPCODE(GET_CCMASK);
7458-
OPCODE(MVC);
7459-
OPCODE(NC);
7460-
OPCODE(OC);
7461-
OPCODE(XC);
7462-
OPCODE(CLC);
7463-
OPCODE(MEMSET_MVC);
7464-
OPCODE(STPCPY);
7465-
OPCODE(STRCMP);
7466-
OPCODE(SEARCH_STRING);
7467-
OPCODE(IPM);
7468-
OPCODE(TBEGIN);
7469-
OPCODE(TBEGIN_NOFLOAT);
7470-
OPCODE(TEND);
7471-
OPCODE(BYTE_MASK);
7472-
OPCODE(ROTATE_MASK);
7473-
OPCODE(REPLICATE);
7474-
OPCODE(JOIN_DWORDS);
7475-
OPCODE(SPLAT);
7476-
OPCODE(MERGE_HIGH);
7477-
OPCODE(MERGE_LOW);
7478-
OPCODE(SHL_DOUBLE);
7479-
OPCODE(PERMUTE_DWORDS);
7480-
OPCODE(PERMUTE);
7481-
OPCODE(PACK);
7482-
OPCODE(PACKS_CC);
7483-
OPCODE(PACKLS_CC);
7484-
OPCODE(UNPACK_HIGH);
7485-
OPCODE(UNPACKL_HIGH);
7486-
OPCODE(UNPACK_LOW);
7487-
OPCODE(UNPACKL_LOW);
7488-
OPCODE(VSHL_BY_SCALAR);
7489-
OPCODE(VSRL_BY_SCALAR);
7490-
OPCODE(VSRA_BY_SCALAR);
7491-
OPCODE(VROTL_BY_SCALAR);
7492-
OPCODE(SHL_DOUBLE_BIT);
7493-
OPCODE(SHR_DOUBLE_BIT);
7494-
OPCODE(VSUM);
7495-
OPCODE(VACC);
7496-
OPCODE(VSCBI);
7497-
OPCODE(VAC);
7498-
OPCODE(VSBI);
7499-
OPCODE(VACCC);
7500-
OPCODE(VSBCBI);
7501-
OPCODE(VMAH);
7502-
OPCODE(VMALH);
7503-
OPCODE(VME);
7504-
OPCODE(VMLE);
7505-
OPCODE(VMO);
7506-
OPCODE(VMLO);
7507-
OPCODE(VICMPE);
7508-
OPCODE(VICMPH);
7509-
OPCODE(VICMPHL);
7510-
OPCODE(VICMPES);
7511-
OPCODE(VICMPHS);
7512-
OPCODE(VICMPHLS);
7513-
OPCODE(VFCMPE);
7514-
OPCODE(STRICT_VFCMPE);
7515-
OPCODE(STRICT_VFCMPES);
7516-
OPCODE(VFCMPH);
7517-
OPCODE(STRICT_VFCMPH);
7518-
OPCODE(STRICT_VFCMPHS);
7519-
OPCODE(VFCMPHE);
7520-
OPCODE(STRICT_VFCMPHE);
7521-
OPCODE(STRICT_VFCMPHES);
7522-
OPCODE(VFCMPES);
7523-
OPCODE(VFCMPHS);
7524-
OPCODE(VFCMPHES);
7525-
OPCODE(VFTCI);
7526-
OPCODE(VEXTEND);
7527-
OPCODE(STRICT_VEXTEND);
7528-
OPCODE(VROUND);
7529-
OPCODE(STRICT_VROUND);
7530-
OPCODE(VTM);
7531-
OPCODE(SCMP128HI);
7532-
OPCODE(UCMP128HI);
7533-
OPCODE(VFAE_CC);
7534-
OPCODE(VFAEZ_CC);
7535-
OPCODE(VFEE_CC);
7536-
OPCODE(VFEEZ_CC);
7537-
OPCODE(VFENE_CC);
7538-
OPCODE(VFENEZ_CC);
7539-
OPCODE(VISTR_CC);
7540-
OPCODE(VSTRC_CC);
7541-
OPCODE(VSTRCZ_CC);
7542-
OPCODE(VSTRS_CC);
7543-
OPCODE(VSTRSZ_CC);
7544-
OPCODE(TDC);
7545-
OPCODE(ATOMIC_SWAPW);
7546-
OPCODE(ATOMIC_LOADW_ADD);
7547-
OPCODE(ATOMIC_LOADW_SUB);
7548-
OPCODE(ATOMIC_LOADW_AND);
7549-
OPCODE(ATOMIC_LOADW_OR);
7550-
OPCODE(ATOMIC_LOADW_XOR);
7551-
OPCODE(ATOMIC_LOADW_NAND);
7552-
OPCODE(ATOMIC_LOADW_MIN);
7553-
OPCODE(ATOMIC_LOADW_MAX);
7554-
OPCODE(ATOMIC_LOADW_UMIN);
7555-
OPCODE(ATOMIC_LOADW_UMAX);
7556-
OPCODE(ATOMIC_CMP_SWAPW);
7557-
OPCODE(ATOMIC_CMP_SWAP);
7558-
OPCODE(ATOMIC_LOAD_128);
7559-
OPCODE(ATOMIC_STORE_128);
7560-
OPCODE(ATOMIC_CMP_SWAP_128);
7561-
OPCODE(LRV);
7562-
OPCODE(STRV);
7563-
OPCODE(VLER);
7564-
OPCODE(VSTER);
7565-
OPCODE(STCKF);
7566-
OPCODE(PREFETCH);
7567-
OPCODE(ADA_ENTRY);
7568-
}
7569-
return nullptr;
7570-
#undef OPCODE
7571-
}
7572-
75737426
// Return true if VT is a vector whose elements are a whole number of bytes
75747427
// in width. Also check for presence of vector support.
75757428
bool SystemZTargetLowering::canTreatAsByteVector(EVT VT) const {

0 commit comments

Comments
 (0)