include(CMakeParseArguments)

# springbok_bytecode_module()
#
# A wrapper for the iree_bytecode_module to apply common iree-compile flags
# Parameters:
# NAME: Name of target.
# SRC: Source file to compile into a bytecode module. Support relative path.
# FLAGS: Flags to pass to the translation tool (list of strings).
# C_IDENTIFIER: Identifier to use for generate c embed code.
#     If omitted then no C embed code will be generated.
# RVV_OFF: Indicate RVV is OFF (default: ON)
#
# Examples:
# springbok_bytecode_module(
#   NAME
#     daredevel_bytecode_module_static
#   SRC
#     "daredevil_quant.tflite"
#   C_IDENTIFIER
#     "daredevil_bytecode_module_static"
#   FLAGS
#     "-iree-input-type=tosa"
# )
#
# springbok_bytecode_module(
#   NAME
#     simple_float_mul_bytecode_module_static
#   SRC
#     "simple_float_mul.mlir"
#   C_IDENTIFIER
#     "simple_float_mul_bytecode_module_static"
#   FLAGS
#     "-iree-input-type=mhlo"
#   RVV_OFF
#   PUBLIC
# )
#
function(springbok_bytecode_module)
  cmake_parse_arguments(
    _RULE
    "PUBLIC;RVV_OFF"
    "NAME;SRC;C_IDENTIFIER"
    "FLAGS"
    ${ARGN}
  )

  set(_MLIR_SRC "${_RULE_SRC}")
  string(FIND "${_RULE_SRC}" ".tflite" _IS_TFLITE REVERSE)
  if(${_IS_TFLITE} GREATER 0)
    iree_get_executable_path(IREE_IMPORT_TFLITE_TOOL "iree-import-tflite")
    set(_MLIR_SRC "${CMAKE_CURRENT_BINARY_DIR}/${_RULE_NAME}.mlir")
    get_filename_component(_SRC_PATH "${_RULE_SRC}" REALPATH)
    set(_ARGS "${_SRC_PATH}")
    list(APPEND _ARGS "-o")
    list(APPEND _ARGS "${_RULE_NAME}.mlir")
    # Only add the custom_command here. The output is passed to
    # iree_bytecode_module as the source.
    add_custom_command(
      OUTPUT
        "${_RULE_NAME}.mlir"
      COMMAND
        ${IREE_IMPORT_TFLITE_TOOL}
        ${_ARGS}
      DEPENDS
        ${IREE_IMPORT_TFLITE_TOOL}
    )
  endif()

  get_filename_component(_MLIR_SRC "${_MLIR_SRC}" REALPATH)
  iree_get_executable_path(_TRANSLATE_TOOL_EXECUTABLE "iree-compile")
  iree_get_executable_path(_LINKER_TOOL_EXECUTABLE "lld")

  # Replace dependencies passed by ::name with iree::package::name
  iree_package_ns(_PACKAGE_NS)
  list(TRANSFORM _RULE_DEPS REPLACE "^::" "${_PACKAGE_NS}::")

  # Prefix the library with the package name, so we get: iree_package_name.
  iree_package_name(_PACKAGE_NAME)

  set(_LIB_NAME "${_PACKAGE_NAME}_${_RULE_NAME}")
  set(_O_FILE_NAME ${_RULE_NAME}.o)
  set(_H_FILE_NAME ${_RULE_NAME}.h)
  set(_VMFB_FILE_NAME ${_RULE_NAME}.vmfb)

  set(_CPU_FEATURES "+m,+f,+zvl512b,+zve32x")
  if (${_RULE_RVV_OFF})
    set(_CPU_FEATURES "+m,+f")
  endif()

  ## Example with VM C module.
  # Setup args for iree-compile.
  set(_TRANSLATE_ARGS ${_RULE_FLAGS})
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-debug-symbols=false")
  list(APPEND _TRANSLATE_ARGS "-iree-vm-bytecode-module-strip-source-map=true")
  list(APPEND _TRANSLATE_ARGS "-iree-vm-emit-polyglot-zip=false")
  list(APPEND _TRANSLATE_ARGS "-iree-hal-target-backends=llvm-cpu")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-target-triple=riscv32-pc-linux-elf")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-target-cpu=generic-rv32")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-target-cpu-features=${_CPU_FEATURES}")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-target-abi=ilp32")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-link-embedded=false")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-link-static")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-system-linker-path=\"${_LINKER_TOOL_EXECUTABLE}\"")
  list(APPEND _TRANSLATE_ARGS "-iree-llvm-static-library-output-path=${_O_FILE_NAME}")
  list(APPEND _TRANSLATE_ARGS "${_MLIR_SRC}")
  list(APPEND _TRANSLATE_ARGS "-o")
  list(APPEND _TRANSLATE_ARGS "${_VMFB_FILE_NAME}")

  # Custom command for iree-compile to generate static library and C module.
  add_custom_command(
    OUTPUT
      ${_H_FILE_NAME}
      ${_O_FILE_NAME}
      ${_VMFB_FILE_NAME}
    COMMAND ${_TRANSLATE_TOOL_EXECUTABLE} ${_TRANSLATE_ARGS}
    DEPENDS ${_TRANSLATE_TOOL_EXECUTABLE} ${_MLIR_SRC} ${_LINKER_TOOL_EXECUTABLE}
  )

  add_library(${_LIB_NAME}
    STATIC
    ${_O_FILE_NAME}
  )

  SET_TARGET_PROPERTIES(
    ${_LIB_NAME}
    PROPERTIES
    LINKER_LANGUAGE C
  )

  # Alias the iree_package_name library to iree::package::name.
  # This lets us more clearly map to Bazel and makes it possible to
  # disambiguate the underscores in paths vs. the separators.
  add_library(${_PACKAGE_NS}::${_RULE_NAME} ALIAS ${_LIB_NAME})
  iree_package_dir(_PACKAGE_DIR)
  if(${_RULE_NAME} STREQUAL ${_PACKAGE_DIR})
    add_library(${_PACKAGE_NS} ALIAS ${_LIB_NAME})
  endif()

  set(_RULE_C_NAME "${_RULE_NAME}_c")
  set(_H_FILE_NAME ${_RULE_C_NAME}.h)
  set(_C_FILE_NAME ${_RULE_C_NAME}.c)

  # Generate the embed data with the bytecode module
  iree_c_embed_data(
    NAME
      "${_RULE_C_NAME}"
    IDENTIFIER
      "${_RULE_C_IDENTIFIER}"
    GENERATED_SRCS
      "${_VMFB_FILE_NAME}"
    C_FILE_OUTPUT
      "${_C_FILE_NAME}"
    H_FILE_OUTPUT
      "${_H_FILE_NAME}"
    FLATTEN
    PUBLIC
  )
endfunction()
