clang 19.0.0git
Functions
Flang.cpp File Reference
#include "Flang.h"
#include "Arch/RISCV.h"
#include "CommonArgs.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Driver/Options.h"
#include "llvm/Frontend/Debug/Options.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/TargetParser/RISCVISAInfo.h"
#include "llvm/TargetParser/RISCVTargetParser.h"
#include <cassert>

Go to the source code of this file.

Functions

static void addDashXForInput (const ArgList &Args, const InputInfo &Input, ArgStringList &CmdArgs)
 Add -x lang to CmdArgs for Input.
 
static bool shouldLoopVersion (const ArgList &Args)
 @C shouldLoopVersion
 
static void addVSDefines (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
 
static void processVSRuntimeLibrary (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
 
static void addFloatingPointOptions (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
 
static void renderRemarksOptions (const ArgList &Args, ArgStringList &CmdArgs, const InputInfo &Input)
 

Function Documentation

◆ addDashXForInput()

static void addDashXForInput ( const ArgList &  Args,
const InputInfo Input,
ArgStringList &  CmdArgs 
)
static

Add -x lang to CmdArgs for Input.

Definition at line 29 of file Flang.cpp.

References clang::driver::InputInfo::getType(), and clang::driver::types::getTypeName().

◆ addFloatingPointOptions()

static void addFloatingPointOptions ( const Driver D,
const ArgList &  Args,
ArgStringList &  CmdArgs 
)
static

Definition at line 481 of file Flang.cpp.

References clang::driver::Driver::Diag().

Referenced by clang::driver::tools::Flang::ConstructJob().

◆ addVSDefines()

static void addVSDefines ( const ToolChain TC,
const ArgList &  Args,
ArgStringList &  CmdArgs 
)
static

◆ processVSRuntimeLibrary()

static void processVSRuntimeLibrary ( const ToolChain TC,
const ArgList &  Args,
ArgStringList &  CmdArgs 
)
static

◆ renderRemarksOptions()

static void renderRemarksOptions ( const ArgList &  Args,
ArgStringList &  CmdArgs,
const InputInfo Input 
)
static

Definition at line 610 of file Flang.cpp.

References clang::driver::InputInfo::getBaseInput().

◆ shouldLoopVersion()

static bool shouldLoopVersion ( const ArgList &  Args)
static

@C shouldLoopVersion

Check if Loop Versioning should be enabled. We look for the last of one of the following: -Ofast, -O4, -O<number> and -f[no-]version-loops-for-stride. Loop versioning is disabled if the last option is -fno-version-loops-for-stride. Loop versioning is enabled if the last option is one of: -floop-versioning -Ofast -O4 -O3 For all other cases, loop versioning is is disabled.

The gfortran compiler automatically enables the option for -O3 or -Ofast.

Returns
true if loop-versioning should be enabled, otherwise false.

Definition at line 76 of file Flang.cpp.