FLANG
Protected Member Functions | List of all members
Fortran::frontend::CodeGenAction Class Reference

#include <flang/Frontend/FrontendActions.h>

Inheritance diagram for Fortran::frontend::CodeGenAction:
Fortran::frontend::FrontendAction Fortran::frontend::EmitAssemblyAction Fortran::frontend::EmitFIRAction Fortran::frontend::EmitHLFIRAction Fortran::frontend::EmitLLVMAction Fortran::frontend::EmitLLVMBitcodeAction Fortran::frontend::EmitObjAction

Protected Member Functions

 CodeGenAction (BackendActionTy act)
 
- Protected Member Functions inherited from Fortran::frontend::FrontendAction
bool runPrescan ()
 
bool runParse (bool emitMessages)
 
bool runSemanticChecks ()
 
bool generateRtTypeTables ()
 
bool reportFatalSemanticErrors ()
 
bool reportFatalScanningErrors ()
 
bool reportFatalParsingErrors ()
 
virtual bool shouldEraseOutputFiles ()
 

Protected Attributes

MLIR

{

std::unique_ptr< mlir::MLIRContext > mlirCtx
 
mlir::OwningOpRef< mlir::ModuleOp > mlirModule
 

LLVM IR

}

std::unique_ptr< llvm::LLVMContext > llvmCtx
 
std::unique_ptr< llvm::Module > llvmModule
 
BackendActionTy action
 
void embedOffloadObjects ()
 Embeds offload objects specified with -fembed-offload-object.
 
void linkBuiltinBCLibs ()
 Links in BC libraries spefified with -mlink-builtin-bitcode.
 
void lowerHLFIRToFIR ()
 Runs pass pipeline to lower HLFIR into FIR.
 
void generateLLVMIR ()
 
 ~CodeGenAction () override
 }
 

Additional Inherited Members

- Public Member Functions inherited from Fortran::frontend::FrontendAction
CompilerInstancegetInstance () const
 
void setInstance (CompilerInstance *value)
 
const FrontendInputFilegetCurrentInput () const
 
llvm::StringRef getCurrentFile () const
 
llvm::StringRef getCurrentFileOrBufferName () const
 
void setCurrentInput (const FrontendInputFile &currentIntput)
 
bool beginSourceFile (CompilerInstance &ci, const FrontendInputFile &input)
 
llvm::Error execute ()
 Run the action.
 
void endSourceFile ()
 

Detailed Description

Abstract base class for actions that generate code (MLIR, LLVM IR, assembly and machine code). Every action that inherits from this class will at least run the prescanning, parsing, semantic checks and lower the parse tree to an MLIR module.

Member Function Documentation

◆ generateLLVMIR()

void CodeGenAction::generateLLVMIR ( )
protected

Generates an LLVM IR module from CodeGenAction::mlirModule and saves it in CodeGenAction::llvmModule.


The documentation for this class was generated from the following files: