Add FunctionFamily and LLVMDbgOp enums to DXIL::Function

Saves having to do repeated string comparisons for function calls to identify if the instruction is a DXOp call or an LLVM Dbg call.
The LLVM Dbg calls are unique and the specific llvm dbg operation is stored in the DXIL::Function
The DXOp calls are not unique and the zero'th argument of the CALL Instruction is used to determine the DXOp opcode.
This commit is contained in:
Jake Turner
2024-08-19 16:25:38 +01:00
parent c64866ba08
commit 0e2decbae5
2 changed files with 788 additions and 741 deletions
@@ -52,6 +52,20 @@ namespace DXIL
static const rdcstr DXIL_FAKE_OUTPUT_STRUCT_NAME("_OUT");
static const rdcstr DXIL_FAKE_INPUT_STRUCT_NAME("_IN");
enum class FunctionFamily : uint8_t
{
LLVM,
DXOp,
LLVMDbg,
};
enum class LLVMDbgOp : uint8_t
{
Unknown = 0,
Declare,
Value,
};
struct BumpAllocator
{
BumpAllocator(size_t totalSize);
@@ -1365,6 +1379,9 @@ struct Function : public Value
rdcarray<UselistEntry> uselist;
AttachedMetadata attachedMeta;
FunctionFamily family = FunctionFamily::LLVM;
LLVMDbgOp llvmDbgOp = LLVMDbgOp::Unknown;
};
class LLVMOrderAccumulator
File diff suppressed because it is too large Load Diff