From c9208b7d35b023aa2b29fff3474e58e64485e5f3 Mon Sep 17 00:00:00 2001 From: TB Schardl Date: Mon, 26 Aug 2024 09:27:42 -0400 Subject: [PATCH] [Frontend] Add Tapir codegen options to fix flang build. --- flang/include/flang/Frontend/CodeGenOptions.def | 3 +++ flang/include/flang/Frontend/CodeGenOptions.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/flang/include/flang/Frontend/CodeGenOptions.def b/flang/include/flang/Frontend/CodeGenOptions.def index 9d03ec88a56b..388332436516 100644 --- a/flang/include/flang/Frontend/CodeGenOptions.def +++ b/flang/include/flang/Frontend/CodeGenOptions.def @@ -40,5 +40,8 @@ ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codeg ENUM_CODEGENOPT(VecLib, llvm::driver::VectorLibrary, 3, llvm::driver::VectorLibrary::NoLibrary) ///< Vector functions library to use ENUM_CODEGENOPT(FramePointer, llvm::FramePointerKind, 2, llvm::FramePointerKind::None) ///< Enable the usage of frame pointers +/// Tapir target runtime library to use. +ENUM_CODEGENOPT(TapirTarget, TapirTargetID, 8, TapirTargetID::Last_TapirTargetID) + #undef CODEGENOPT #undef ENUM_CODEGENOPT diff --git a/flang/include/flang/Frontend/CodeGenOptions.h b/flang/include/flang/Frontend/CodeGenOptions.h index 0c318e4023af..8d76550f0c22 100644 --- a/flang/include/flang/Frontend/CodeGenOptions.h +++ b/flang/include/flang/Frontend/CodeGenOptions.h @@ -29,6 +29,8 @@ namespace Fortran::frontend { +using TapirTargetID = llvm::TapirTargetID; + /// Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure /// that this large collection of bitfields is a trivial class type. class CodeGenOptionsBase { @@ -129,6 +131,9 @@ class CodeGenOptions : public CodeGenOptionsBase { /// transformation. OptRemark OptimizationRemarkAnalysis; + /// Path to OpenCilk runtime bitcode file. + std::string OpenCilkABIBitcodeFile; + // Define accessors/mutators for code generation options of enumeration type. #define CODEGENOPT(Name, Bits, Default) #define ENUM_CODEGENOPT(Name, Type, Bits, Default) \