Skip to content

Commit

Permalink
[Frontend] Add Tapir codegen options to fix flang build.
Browse files Browse the repository at this point in the history
  • Loading branch information
neboat committed Sep 1, 2024
1 parent e6afb67 commit c9208b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flang/include/flang/Frontend/CodeGenOptions.def
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions flang/include/flang/Frontend/CodeGenOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) \
Expand Down

0 comments on commit c9208b7

Please sign in to comment.