mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
[mlir][nvvm] Fix circular dependency in (#68934)
BasicPtxBuilder includes NVVMDialect and vice versa. Cmake appereantly forgives that, but this causes bazel build fails. This PR aims to fix that
This commit is contained in:
parent
46cb8d9a32
commit
282ea28f18
@ -12,7 +12,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h"
|
||||
#include "mlir/Dialect/LLVMIR/NVVMDialect.h"
|
||||
#include "mlir/Support/LogicalResult.h"
|
||||
|
||||
#define DEBUG_TYPE "ptx-builder"
|
||||
@ -28,6 +27,8 @@
|
||||
using namespace mlir;
|
||||
using namespace NVVM;
|
||||
|
||||
static constexpr int64_t kSharedMemorySpace = 3;
|
||||
|
||||
static char getRegisterType(Type type) {
|
||||
if (type.isInteger(1))
|
||||
return 'b';
|
||||
@ -43,7 +44,7 @@ static char getRegisterType(Type type) {
|
||||
return 'd';
|
||||
if (auto ptr = type.dyn_cast<LLVM::LLVMPointerType>()) {
|
||||
// Shared address spaces is addressed with 32-bit pointers.
|
||||
if (ptr.getAddressSpace() == NVVM::kSharedMemorySpace) {
|
||||
if (ptr.getAddressSpace() == kSharedMemorySpace) {
|
||||
return 'r';
|
||||
}
|
||||
return 'l';
|
||||
|
Loading…
Reference in New Issue
Block a user