FLANG
SetRuntimeCallAttributes.cpp File Reference
#include "flang/Common/static-multimap-view.h"
#include "flang/Optimizer/Builder/Runtime/RTBuilder.h"
#include "flang/Optimizer/Dialect/FIRDialect.h"
#include "flang/Optimizer/Dialect/FIROpsSupport.h"
#include "flang/Optimizer/Support/InternalNames.h"
#include "flang/Optimizer/Transforms/Passes.h"
#include "flang/Runtime/io-api.h"
#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"
#include "flang/Optimizer/Transforms/Passes.h.inc"
#include "flang/Optimizer/Transforms/RuntimeFunctions.inc"

Namespaces

namespace  fir

Macros

#define GEN_PASS_DEF_SETRUNTIMECALLATTRIBUTES
#define DEBUG_TYPE   "set-runtime-call-attrs"
#define mkIOKey(X)
#define mkRTKey(X)
#define KNOWN_IO_FUNC(X)
#define KNOWN_RUNTIME_FUNC(X)

Detailed Description

SetRuntimeCallAttributesPass looks for fir.call operations that are calling into Fortran runtime, and tries to set different attributes on them to enable more optimizations in LLVM backend (granted that they are preserved all the way to LLVM IR). This pass is currently only attaching fir.call wide atttributes, such as ones corresponding to llvm.memory, nosync, nocallbac, etc. It is not designed to attach attributes to the arguments and the results of a call.

Macro Definition Documentation

◆ KNOWN_IO_FUNC

#define KNOWN_IO_FUNC ( X)
Value:
RuntimeFactory<mkIOKey(X)>::create(mkIOKey(X)::name)

◆ KNOWN_RUNTIME_FUNC

#define KNOWN_RUNTIME_FUNC ( X)
Value:
RuntimeFactory<mkRTKey(X)>::create(mkRTKey(X)::name)

◆ mkIOKey

#define mkIOKey ( X)
Value:
FirmkKey(IONAME(X))

◆ mkRTKey

#define mkRTKey ( X)
Value:
FirmkKey(RTNAME(X))