Skip to content

Commit

Permalink
Revert "[DXIL][Analysis] Implement enough of DXILResourceAnalysis for…
Browse files Browse the repository at this point in the history
… buffers" (llvm#104504)

Reverts llvm#100699

This broke a few bots unfortunately.
  • Loading branch information
joker-eph authored Aug 15, 2024
1 parent 290e485 commit fcc318f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 521 deletions.
13 changes: 5 additions & 8 deletions llvm/include/llvm/Analysis/DXILResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@
namespace llvm {
class CallInst;
class MDTuple;
class TargetExtType;

namespace dxil {

class ResourceInfo {
struct ResourceBinding {
uint32_t RecordID;
uint32_t UniqueID;
uint32_t Space;
uint32_t LowerBound;
uint32_t Size;

bool operator==(const ResourceBinding &RHS) const {
return std::tie(RecordID, Space, LowerBound, Size) ==
std::tie(RHS.RecordID, RHS.Space, RHS.LowerBound, RHS.Size);
return std::tie(UniqueID, Space, LowerBound, Size) ==
std::tie(RHS.UniqueID, RHS.Space, RHS.LowerBound, RHS.Size);
}
bool operator!=(const ResourceBinding &RHS) const {
return !(*this == RHS);
Expand Down Expand Up @@ -129,9 +128,9 @@ class ResourceInfo {
bool isFeedback() const;
bool isMultiSample() const;

void bind(uint32_t RecordID, uint32_t Space, uint32_t LowerBound,
void bind(uint32_t UniqueID, uint32_t Space, uint32_t LowerBound,
uint32_t Size) {
Binding.RecordID = RecordID;
Binding.UniqueID = UniqueID;
Binding.Space = Space;
Binding.LowerBound = LowerBound;
Binding.Size = Size;
Expand Down Expand Up @@ -216,8 +215,6 @@ class ResourceInfo {

ResourceBinding getBinding() const { return Binding; }
std::pair<uint32_t, uint32_t> getAnnotateProps() const;

void print(raw_ostream &OS) const;
};

} // namespace dxil
Expand Down
10 changes: 0 additions & 10 deletions llvm/include/llvm/IR/IntrinsicsDirectX.td
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ def int_dx_flattened_thread_id_in_group : Intrinsic<[llvm_i32_ty], [], [IntrNoMe
def int_dx_create_handle : ClangBuiltin<"__builtin_hlsl_create_handle">,
Intrinsic<[ llvm_ptr_ty ], [llvm_i8_ty], [IntrWillReturn]>;

// Create resource handle given binding information. Returns a `target("dx.")`
// type appropriate for the kind of resource given a register space ID, lower
// bound and range size of the binding, as well as an index and an indicator
// whether that index may be non-uniform.
def int_dx_handle_fromBinding
: DefaultAttrsIntrinsic<
[llvm_any_ty],
[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i1_ty],
[IntrNoMem]>;

def int_dx_all : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_any_ty]>;
def int_dx_any : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_any_ty]>;
def int_dx_clamp : DefaultAttrsIntrinsic<[llvm_any_ty], [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>]>;
Expand Down
Loading

0 comments on commit fcc318f

Please sign in to comment.