diff options
Diffstat (limited to 'include/llvm/Transforms/Scalar/SCCP.h')
-rw-r--r-- | include/llvm/Transforms/Scalar/SCCP.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Scalar/SCCP.h b/include/llvm/Transforms/Scalar/SCCP.h new file mode 100644 index 0000000000000..0dd90ecbedeca --- /dev/null +++ b/include/llvm/Transforms/Scalar/SCCP.h @@ -0,0 +1,36 @@ +//===- SCCP.cpp - Sparse Conditional Constant Propagation -------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// \file +// This file implements sparse conditional constant propagation and merging: +// +// Specifically, this: +// * Assumes values are constant unless proven otherwise +// * Assumes BasicBlocks are dead unless proven otherwise +// * Proves values to be constant, and replaces them with constants +// * Proves conditional branches to be unconditional +// +/// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TRANSFORMS_SCALAR_SCCP_H +#define LLVM_TRANSFORMS_SCALAR_SCCP_H + +#include "llvm/IR/Function.h" +#include "llvm/IR/PassManager.h" + +namespace llvm { + +/// This pass performs function-level constant propagation and merging. +class SCCPPass : public PassInfoMixin<SCCPPass> { +public: + PreservedAnalyses run(Function &F, AnalysisManager<Function> &AM); +}; +} + +#endif // LLVM_TRANSFORMS_SCALAR_SCCP_H |