LLVM 24.0.0git
CommandFlags.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Target/TargetOptions.h"
#include <optional>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::cl
 This namespace contains all of the command line option processing machinery.
namespace  llvm::codegen

Enumerations

enum  llvm::codegen::SaveStatsMode { llvm::codegen::None , llvm::codegen::Cwd , llvm::codegen::Obj }

Functions

LLVM_ABI std::string llvm::codegen::getMArch (const cl::LibraryOptionsContext &C)
LLVM_ABI std::string llvm::codegen::getMCPU (const cl::LibraryOptionsContext &C)
LLVM_ABI std::string llvm::codegen::getMTune (const cl::LibraryOptionsContext &C)
LLVM_ABI std::vector< std::string > llvm::codegen::getMAttrs (const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< Reloc::Model > llvm::codegen::getExplicitRelocModel (const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< CodeModel::Model > llvm::codegen::getExplicitCodeModel (const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< uint64_t > llvm::codegen::getExplicitLargeDataThreshold (const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< CodeGenFileType > llvm::codegen::getExplicitFileType (const cl::LibraryOptionsContext &C)
LLVM_ABI CodeGenFileType llvm::codegen::getFileType (const cl::LibraryOptionsContext &C)
LLVM_ABI llvm::FloatABI::ABIType llvm::codegen::getFloatABIForCalls (const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< bool > llvm::codegen::getExplicitDataSections (const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< bool > llvm::codegen::getExplicitFunctionSections (const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< bool > llvm::codegen::getExplicitEmulatedTLS (const cl::LibraryOptionsContext &C)
LLVM_ABI SaveStatsMode llvm::codegen::getSaveStats (const cl::LibraryOptionsContext &C)
LLVM_ABI ArrayRef< const cl::LibraryOptions * > llvm::codegen::getToolOptions ()
 The options that a tool reading getTargetOptions passes to cl::parseCommandLineOptions.
LLVM_ABI TargetOptions llvm::codegen::getTargetOptions (const cl::LibraryOptionsContext &LibraryOptions, const llvm::Triple &TheTriple)
 Common utility function tightly tied to the options listed here.
LLVM_ABI std::string llvm::codegen::getCPUStr (const cl::LibraryOptionsContext &C)
LLVM_ABI std::string llvm::codegen::getTuneCPUStr (const cl::LibraryOptionsContext &C)
LLVM_ABI std::string llvm::codegen::getFeaturesStr (const cl::LibraryOptionsContext &C)
LLVM_ABI std::vector< std::string > llvm::codegen::getFeatureList (const cl::LibraryOptionsContext &C)
LLVM_ABI void llvm::codegen::renderBoolStringAttr (AttrBuilder &B, StringRef Name, bool Val)
LLVM_ABI void llvm::codegen::setFunctionAttributes (Function &F, StringRef CPU, StringRef Features, StringRef TuneCPU="")
 Set function attributes of function F based on CPU, TuneCPU, Features, and command line flags.
LLVM_ABI void llvm::codegen::setFunctionAttributes (Module &M, StringRef CPU, StringRef Features, StringRef TuneCPU="")
 Set function attributes of functions in Module M based on CPU, TuneCPU, Features, and command line flags.
LLVM_ABI Expected< std::unique_ptr< TargetMachine > > llvm::codegen::createTargetMachineForTriple (const cl::LibraryOptionsContext &LibraryOptions, const Triple &TargetTriple, CodeGenOptLevel OptLevel=CodeGenOptLevel::Default)
 Creates a TargetMachine instance with the options defined on the command line.
LLVM_ABI void llvm::codegen::maybeEnableStatistics (const cl::LibraryOptionsContext &C)
 Conditionally enables the collection of LLVM statistics during the tool run, based on the value of the flag.
LLVM_ABI int llvm::codegen::maybeSaveStatistics (const cl::LibraryOptionsContext &C, StringRef OutputFilename, StringRef ToolName)
 Conditionally saves the collected LLVM statistics to the received output file, based on the value of the flag.