CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
83 lines
3.7 KiB
C++
83 lines
3.7 KiB
C++
//===-- CommandLineOpts.cpp -- shared command line options ------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// This file defines some shared command-line options that can be used when
|
|
/// debugging the test tools.
|
|
|
|
#include "flang/Optimizer/Passes/CommandLineOpts.h"
|
|
|
|
using namespace llvm;
|
|
|
|
#define DisableOption(DOName, DOOption, DODescription) \
|
|
cl::opt<bool> disable##DOName("disable-" DOOption, \
|
|
cl::desc("disable " DODescription " pass"), \
|
|
cl::init(false), cl::Hidden)
|
|
#define EnableOption(EOName, EOOption, EODescription) \
|
|
cl::opt<bool> enable##EOName("enable-" EOOption, \
|
|
cl::desc("enable " EODescription " pass"), \
|
|
cl::init(false), cl::Hidden)
|
|
|
|
cl::opt<bool> dynamicArrayStackToHeapAllocation(
|
|
"fdynamic-heap-array",
|
|
cl::desc("place all array allocations of dynamic size on the heap"),
|
|
cl::init(false), cl::Hidden);
|
|
|
|
cl::opt<std::size_t> arrayStackAllocationThreshold(
|
|
"fstack-array-size",
|
|
cl::desc(
|
|
"place all array allocations more than <size> elements on the heap"),
|
|
cl::init(~static_cast<std::size_t>(0)), cl::Hidden);
|
|
|
|
cl::opt<bool> ignoreMissingTypeDescriptors(
|
|
"ignore-missing-type-desc",
|
|
cl::desc("ignore failures to find derived type descriptors when "
|
|
"translating FIR to LLVM"),
|
|
cl::init(false), cl::Hidden);
|
|
|
|
cl::opt<bool> skipExternalRttiDefinition(
|
|
"skip-external-rtti-definition", llvm::cl::init(false),
|
|
llvm::cl::desc("do not define rtti static objects for types belonging to "
|
|
"other compilation units"),
|
|
cl::Hidden);
|
|
|
|
OptimizationLevel defaultOptLevel{OptimizationLevel::O0};
|
|
|
|
codegenoptions::DebugInfoKind noDebugInfo{codegenoptions::NoDebugInfo};
|
|
|
|
/// Optimizer Passes
|
|
DisableOption(CfgConversion, "cfg-conversion", "disable FIR to CFG pass");
|
|
DisableOption(FirAvc, "avc", "array value copy analysis and transformation");
|
|
DisableOption(FirMao, "memory-allocation-opt",
|
|
"memory allocation optimization");
|
|
|
|
DisableOption(FirAliasTags, "fir-alias-tags", "fir alias analysis");
|
|
cl::opt<bool> useOldAliasTags(
|
|
"use-old-alias-tags",
|
|
cl::desc("Use a single TBAA tree for all functions and do not use "
|
|
"the FIR alias tags pass"),
|
|
cl::init(false), cl::Hidden);
|
|
EnableOption(FirLICM, "fir-licm", "FIR loop invariant code motion");
|
|
|
|
/// CodeGen Passes
|
|
DisableOption(CodeGenRewrite, "codegen-rewrite", "rewrite FIR for codegen");
|
|
DisableOption(TargetRewrite, "target-rewrite", "rewrite FIR for target");
|
|
DisableOption(DebugInfo, "debug-info", "Add debug info");
|
|
DisableOption(FirToLlvmIr, "fir-to-llvmir", "FIR to LLVM-IR dialect");
|
|
DisableOption(LlvmIrToLlvm, "llvm", "conversion to LLVM");
|
|
DisableOption(BoxedProcedureRewrite, "boxed-procedure-rewrite",
|
|
"rewrite boxed procedures");
|
|
EnableOption(SafeTrampoline, "safe-trampoline",
|
|
"W^X compliant runtime trampoline pool");
|
|
|
|
DisableOption(ExternalNameConversion, "external-name-interop",
|
|
"convert names with external convention");
|
|
EnableOption(ConstantArgumentGlobalisation, "constant-argument-globalisation",
|
|
"the local constant argument to global constant conversion");
|
|
DisableOption(CompilerGeneratedNamesConversion, "compiler-generated-names",
|
|
"replace special symbols in compiler generated names");
|