//===-- Analyses.def - Metadata about Static Analyses -----------*- 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 the set of static analyses used by AnalysisConsumer.
//
//===----------------------------------------------------------------------===//

#ifndef ANALYSIS_STORE
#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN)
#endif

ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store",
               CreateRegionStoreManager)

#ifndef ANALYSIS_CONSTRAINTS
#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN)
#endif

ANALYSIS_CONSTRAINTS(RangeConstraints, "range",
                     "Use constraint tracking of concrete value ranges",
                     CreateRangeConstraintManager)

ANALYSIS_CONSTRAINTS(Z3Constraints, "z3", "Use Z3 contraint solver",
                     CreateZ3ConstraintManager)

#ifndef ANALYSIS_PURGE
#define ANALYSIS_PURGE(NAME, CMDFLAG, DESC)
#endif

ANALYSIS_PURGE(
    PurgeStmt, "statement",
    "Purge symbols, bindings, and constraints before every statement")

ANALYSIS_PURGE(
    PurgeBlock, "block",
    "Purge symbols, bindings, and constraints before every basic block")

ANALYSIS_PURGE(PurgeNone, "none",
               "Do not purge symbols, bindings, or constraints")

#ifndef ANALYSIS_INLINING_MODE
#define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC)
#endif

ANALYSIS_INLINING_MODE(All, "all", "Analyze all functions as top level")

ANALYSIS_INLINING_MODE(
    NoRedundancy, "noredundancy",
    "Do not analyze a function which has been previously inlined")

#undef ANALYSIS_STORE
#undef ANALYSIS_CONSTRAINTS
#undef ANALYSIS_PURGE
#undef ANALYSIS_INLINING_MODE
#undef ANALYSIS_IPA
