1//===- SandboxIRValues.def --------------------------------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9// ClassID, Class 10#ifndef DEF_VALUE 11#define DEF_VALUE(ID, CLASS) 12#endif 13DEF_VALUE(Function, Function) 14DEF_VALUE(Argument, Argument) 15 16#ifndef DEF_USER 17#define DEF_USER(ID, CLASS) 18#endif 19DEF_USER(User, User) 20DEF_VALUE(Block, BasicBlock) 21DEF_USER(Constant, Constant) 22DEF_USER(ConstantInt, ConstantInt) 23 24#ifndef DEF_INSTR 25#define DEF_INSTR(ID, OPCODE, CLASS) 26#endif 27 28#ifndef OP 29#define OP(OPCODE) 30#endif 31 32#ifndef OPCODES 33#define OPCODES(...) 34#endif 35// clang-format off 36// ClassID, Opcode(s), Class 37DEF_INSTR(Opaque, OP(Opaque), OpaqueInst) 38DEF_INSTR(ExtractElement, OP(ExtractElement), ExtractElementInst) 39DEF_INSTR(InsertElement, OP(InsertElement), InsertElementInst) 40DEF_INSTR(ShuffleVector, OP(ShuffleVector), ShuffleVectorInst) 41DEF_INSTR(Select, OP(Select), SelectInst) 42DEF_INSTR(Br, OP(Br), BranchInst) 43DEF_INSTR(Load, OP(Load), LoadInst) 44DEF_INSTR(Store, OP(Store), StoreInst) 45DEF_INSTR(Ret, OP(Ret), ReturnInst) 46DEF_INSTR(Call, OP(Call), CallInst) 47DEF_INSTR(Invoke, OP(Invoke), InvokeInst) 48DEF_INSTR(CallBr, OP(CallBr), CallBrInst) 49DEF_INSTR(CatchPad, OP(CatchPad), CatchPadInst) 50DEF_INSTR(CleanupPad, OP(CleanupPad), CleanupPadInst) 51DEF_INSTR(CatchRet, OP(CatchRet), CatchReturnInst) 52DEF_INSTR(GetElementPtr, OP(GetElementPtr), GetElementPtrInst) 53DEF_INSTR(CatchSwitch, OP(CatchSwitch), CatchSwitchInst) 54DEF_INSTR(Switch, OP(Switch), SwitchInst) 55DEF_INSTR(UnOp, OPCODES( \ 56 OP(FNeg) \ 57 ), UnaryOperator) 58DEF_INSTR(BinaryOperator, OPCODES(\ 59 OP(Add) \ 60 OP(FAdd) \ 61 OP(Sub) \ 62 OP(FSub) \ 63 OP(Mul) \ 64 OP(FMul) \ 65 OP(UDiv) \ 66 OP(SDiv) \ 67 OP(FDiv) \ 68 OP(URem) \ 69 OP(SRem) \ 70 OP(FRem) \ 71 OP(Shl) \ 72 OP(LShr) \ 73 OP(AShr) \ 74 OP(And) \ 75 OP(Or) \ 76 OP(Xor) \ 77 ), BinaryOperator) 78DEF_INSTR(AtomicRMW, OP(AtomicRMW), AtomicRMWInst) 79DEF_INSTR(AtomicCmpXchg, OP(AtomicCmpXchg), AtomicCmpXchgInst) 80DEF_INSTR(Alloca, OP(Alloca), AllocaInst) 81DEF_INSTR(Cast, OPCODES(\ 82 OP(ZExt) \ 83 OP(SExt) \ 84 OP(FPToUI) \ 85 OP(FPToSI) \ 86 OP(FPExt) \ 87 OP(PtrToInt) \ 88 OP(IntToPtr) \ 89 OP(SIToFP) \ 90 OP(UIToFP) \ 91 OP(Trunc) \ 92 OP(FPTrunc) \ 93 OP(BitCast) \ 94 OP(AddrSpaceCast) \ 95 ), CastInst) 96DEF_INSTR(PHI, OP(PHI), PHINode) 97DEF_INSTR(Unreachable, OP(Unreachable), UnreachableInst) 98 99// clang-format on 100#ifdef DEF_VALUE 101#undef DEF_VALUE 102#endif 103#ifdef DEF_USER 104#undef DEF_USER 105#endif 106#ifdef DEF_INSTR 107#undef DEF_INSTR 108#endif 109#ifdef OP 110#undef OP 111#endif 112#ifdef OPCODES 113#undef OPCODES 114#endif 115