Add PointerType analysis for DirectX backend

As implemented this patch assumes that Typed pointer support remains in
the llvm::PointerType class, however this could be modified to use a
different subclass of llvm::Type that could be disallowed from use in
other contexts.

This does not rely on inserting typed pointers into the Module, it just
uses the llvm::PointerType class to track and unique types.

Fixes #54918

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D122268
This commit is contained in:
Chris Bieneman
2022-04-14 13:40:26 -05:00
parent 987cd7c3ed
commit e6f44a3cd2
15 changed files with 512 additions and 7 deletions

View File

@@ -1018,6 +1018,8 @@ void ModuleBitcodeWriter::writeTypeTable() {
TypeVals.push_back(true);
break;
}
case Type::DXILPointerTyID:
llvm_unreachable("DXIL pointers cannot be added to IR modules");
}
// Emit the finished record.