[llvm] 0007d8e - [VP][NFC] Rename to HANDLE_VP_TO_OPC
Simon Moll via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 01:24:30 PST 2020
Author: Simon Moll
Date: 2020-11-16T10:24:18+01:00
New Revision: 0007d8ed2c0b4a1416642c111d49bbc5eb960730
URL: https://github.com/llvm/llvm-project/commit/0007d8ed2c0b4a1416642c111d49bbc5eb960730
DIFF: https://github.com/llvm/llvm-project/commit/0007d8ed2c0b4a1416642c111d49bbc5eb960730.diff
LOG: [VP][NFC] Rename to HANDLE_VP_TO_OPC
Use the less surprising shorthand OPC instead of OC.
Added:
Modified:
llvm/include/llvm/IR/VPIntrinsics.def
llvm/lib/IR/IntrinsicInst.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/VPIntrinsics.def b/llvm/include/llvm/IR/VPIntrinsics.def
index d3e1fc854373..68e7ea0c8069 100644
--- a/llvm/include/llvm/IR/VPIntrinsics.def
+++ b/llvm/include/llvm/IR/VPIntrinsics.def
@@ -22,63 +22,63 @@
#endif
// Map this VP intrinsic to its functional Opcode
-#ifndef HANDLE_VP_TO_OC
-#define HANDLE_VP_TO_OC(VPID, OC)
+#ifndef HANDLE_VP_TO_OPC
+#define HANDLE_VP_TO_OPC(VPID, OC)
#endif
///// Integer Arithmetic /////
// llvm.vp.add(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_add, 2, 3)
-HANDLE_VP_TO_OC(vp_add, Add)
+HANDLE_VP_TO_OPC(vp_add, Add)
// llvm.vp.and(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_and, 2, 3)
-HANDLE_VP_TO_OC(vp_and, And)
+HANDLE_VP_TO_OPC(vp_and, And)
// llvm.vp.ashr(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_ashr, 2, 3)
-HANDLE_VP_TO_OC(vp_ashr, AShr)
+HANDLE_VP_TO_OPC(vp_ashr, AShr)
// llvm.vp.lshr(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_lshr, 2, 3)
-HANDLE_VP_TO_OC(vp_lshr, LShr)
+HANDLE_VP_TO_OPC(vp_lshr, LShr)
// llvm.vp.mul(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_mul, 2, 3)
-HANDLE_VP_TO_OC(vp_mul, Mul)
+HANDLE_VP_TO_OPC(vp_mul, Mul)
// llvm.vp.or(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_or, 2, 3)
-HANDLE_VP_TO_OC(vp_or, Or)
+HANDLE_VP_TO_OPC(vp_or, Or)
// llvm.vp.sdiv(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_sdiv, 2, 3)
-HANDLE_VP_TO_OC(vp_sdiv, SDiv)
+HANDLE_VP_TO_OPC(vp_sdiv, SDiv)
// llvm.vp.shl(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_shl, 2, 3)
-HANDLE_VP_TO_OC(vp_shl, Shl)
+HANDLE_VP_TO_OPC(vp_shl, Shl)
// llvm.vp.srem(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_srem, 2, 3)
-HANDLE_VP_TO_OC(vp_srem, SRem)
+HANDLE_VP_TO_OPC(vp_srem, SRem)
// llvm.vp.sub(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_sub, 2, 3)
-HANDLE_VP_TO_OC(vp_sub, Sub)
+HANDLE_VP_TO_OPC(vp_sub, Sub)
// llvm.vp.udiv(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_udiv, 2, 3)
-HANDLE_VP_TO_OC(vp_udiv, UDiv)
+HANDLE_VP_TO_OPC(vp_udiv, UDiv)
// llvm.vp.urem(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_urem, 2, 3)
-HANDLE_VP_TO_OC(vp_urem, URem)
+HANDLE_VP_TO_OPC(vp_urem, URem)
// llvm.vp.xor(x,y,mask,vlen)
REGISTER_VP_INTRINSIC(vp_xor, 2, 3)
-HANDLE_VP_TO_OC(vp_xor, Xor)
+HANDLE_VP_TO_OPC(vp_xor, Xor)
#undef REGISTER_VP_INTRINSIC
-#undef HANDLE_VP_TO_OC
+#undef HANDLE_VP_TO_OPC
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp
index b6b036d0bbca..9f3cc688e7ff 100644
--- a/llvm/lib/IR/IntrinsicInst.cpp
+++ b/llvm/lib/IR/IntrinsicInst.cpp
@@ -246,20 +246,20 @@ unsigned VPIntrinsic::GetFunctionalOpcodeForVP(Intrinsic::ID ID) {
default:
return Instruction::Call;
-#define HANDLE_VP_TO_OC(VPID, OC) \
+#define HANDLE_VP_TO_OPC(VPID, OPC) \
case Intrinsic::VPID: \
- return Instruction::OC;
+ return Instruction::OPC;
#include "llvm/IR/VPIntrinsics.def"
}
}
-Intrinsic::ID VPIntrinsic::GetForOpcode(unsigned OC) {
- switch (OC) {
+Intrinsic::ID VPIntrinsic::GetForOpcode(unsigned IROPC) {
+ switch (IROPC) {
default:
return Intrinsic::not_intrinsic;
-#define HANDLE_VP_TO_OC(VPID, OC) \
- case Instruction::OC: \
+#define HANDLE_VP_TO_OPC(VPID, OPC) \
+ case Instruction::OPC: \
return Intrinsic::VPID;
#include "llvm/IR/VPIntrinsics.def"
}
More information about the llvm-commits
mailing list