// Copyright 2024 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUDialect.h"

#include "iree/compiler/Codegen/Dialect/Codegen/IR/IREECodegenInterfaces.h"
#include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUAttrs.h"
#include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUDialect.cpp.inc"
#include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUOps.h"
#include "iree/compiler/Codegen/Dialect/PCF/IR/PCFInterfaces.h"

namespace mlir::iree_compiler::IREE::GPU {

void IREEGPUDialect::initialize() {
  registerAttributes();

  addOperations<
#define GET_OP_LIST
#include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUOps.cpp.inc"
      >();

  // Promised interface declarations for interfaces implemented externally.
  declarePromisedInterface<PCF::ScopeAttrInterface, SubgroupScopeAttr>();
  declarePromisedInterface<PCF::ScopeAttrInterface, LaneScopeAttr>();
}

} // namespace mlir::iree_compiler::IREE::GPU
