/*========================== begin_copyright_notice ============================

Copyright (C) 2021-2022 Intel Corporation

SPDX-License-Identifier: MIT

============================= end_copyright_notice ===========================*/

syntax = "proto3";

import "Metrics/proto_schema/variable_info.proto";
import "Metrics/proto_schema/kernel_arguments.proto";
import "Metrics/proto_schema/parallelization_enum.proto";
import "Metrics/proto_schema/function_calls.proto";
import "Metrics/proto_schema/instruction_stats.proto";
import "Metrics/proto_schema/emulated_calls.proto";
import "Metrics/proto_schema/mem_alloc_stats.proto";
import "Metrics/proto_schema/code_reference.proto";
import "Metrics/proto_schema/local_reg_stats.proto";
import "Metrics/proto_schema/cfg_stats.proto";
import "Metrics/proto_schema/cost_model_stats.proto";
import "Metrics/proto_schema/spillFill_stats.proto";

package IGC_METRICS;

  enum FunctionType {
    KERNEL = 0;
    FUNCTION = 1;
  }

message Function
{
  string name = 1;

  CodeRef funcLoc = 2;

  FunctionType type = 3;

  repeated VarInfo variables = 4;
// Only for Kernels
  repeated KernelArg arguments = 5;

// Only for DPC++ and OpenMP
  optional ParallelizationType parallelization = 6;

  repeated FuncCalls functionCalls = 7;
  repeated FuncEmuCalls emuFunctionCalls = 8;

  InstrStats instruction_stats = 9;

  MemAllocStats memory_stats = 10;

  LocalRegStats local_reg_stats = 11;

  CFGStats cfg_stats = 12;

  CostModelStats costModel_stats = 13;

  SpillFillStats spillFill_stats = 14;
}