#ifndef LLVM_CODEGEN_COMMANDFLAGS_H
#define LLVM_CODEGEN_COMMANDFLAGS_H
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Target/TargetOptions.h"
#include <optional>
#include <string>
#include <vector>
namespace llvm {
class Module;
class AttrBuilder;
class Function;
class Triple;
class TargetMachine;
namespace codegen {
std::string getMArch();
std::string getMCPU();
std::vector<std::string> getMAttrs();
Reloc::Model getRelocModel();
std::optional<Reloc::Model> getExplicitRelocModel();
ThreadModel::Model getThreadModel();
CodeModel::Model getCodeModel();
std::optional<CodeModel::Model> getExplicitCodeModel();
uint64_t getLargeDataThreshold();
std::optional<uint64_t> getExplicitLargeDataThreshold();
llvm::ExceptionHandling getExceptionModel();
std::optional<CodeGenFileType> getExplicitFileType();
CodeGenFileType getFileType();
FramePointerKind getFramePointerUsage();
bool getEnableUnsafeFPMath();
bool getEnableNoInfsFPMath();
bool getEnableNoNaNsFPMath();
bool getEnableNoSignedZerosFPMath();
bool getEnableApproxFuncFPMath();
bool getEnableNoTrappingFPMath();
DenormalMode::DenormalModeKind getDenormalFPMath();
DenormalMode::DenormalModeKind getDenormalFP32Math();
bool getEnableHonorSignDependentRoundingFPMath();
llvm::FloatABI::ABIType getFloatABIForCalls();
llvm::FPOpFusion::FPOpFusionMode getFuseFPOps();
SwiftAsyncFramePointerMode getSwiftAsyncFramePointer();
bool getDontPlaceZerosInBSS();
bool getEnableGuaranteedTailCallOpt();
bool getEnableAIXExtendedAltivecABI();
bool getDisableTailCalls();
bool getStackSymbolOrdering();
bool getStackRealign();
std::string getTrapFuncName();
bool getUseCtors();
bool getDisableIntegratedAS();
bool getDataSections();
std::optional<bool> getExplicitDataSections();
bool getFunctionSections();
std::optional<bool> getExplicitFunctionSections();
bool getIgnoreXCOFFVisibility();
bool getXCOFFTracebackTable();
std::string getBBSections();
unsigned getTLSSize();
bool getEmulatedTLS();
std::optional<bool> getExplicitEmulatedTLS();
bool getEnableTLSDESC();
std::optional<bool> getExplicitEnableTLSDESC();
bool getUniqueSectionNames();
bool getUniqueBasicBlockSectionNames();
bool getSeparateNamedSections();
llvm::EABI getEABIVersion();
llvm::DebuggerKind getDebuggerTuningOpt();
bool getEnableStackSizeSection();
bool getEnableAddrsig();
bool getEmitCallSiteInfo();
bool getEnableMachineFunctionSplitter();
bool getEnableDebugEntryValues();
bool getValueTrackingVariableLocations();
std::optional<bool> getExplicitValueTrackingVariableLocations();
bool getForceDwarfFrameSection();
bool getXRayFunctionIndex();
bool getDebugStrictDwarf();
unsigned getAlignLoops();
bool getJMCInstrument();
bool getXCOFFReadOnlyPointers();
struct RegisterCodeGenFlags { … };
bool getEnableBBAddrMap();
llvm::BasicBlockSection getBBSectionsMode(llvm::TargetOptions &Options);
TargetOptions InitTargetOptionsFromCodeGenFlags(const llvm::Triple &TheTriple);
std::string getCPUStr();
std::string getFeaturesStr();
std::vector<std::string> getFeatureList();
void renderBoolStringAttr(AttrBuilder &B, StringRef Name, bool Val);
void setFunctionAttributes(StringRef CPU, StringRef Features, Function &F);
void setFunctionAttributes(StringRef CPU, StringRef Features, Module &M);
bool getDefaultValueTrackingVariableLocations(const llvm::Triple &T);
Expected<std::unique_ptr<TargetMachine>> createTargetMachineForTriple(
StringRef TargetTriple,
CodeGenOptLevel OptLevel = CodeGenOptLevel::Default);
}
}
#endif