LLVM  7.0.0
SCCP.h
Go to the documentation of this file.
1 //===- SCCP.cpp - Sparse Conditional Constant Propagation -------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // \file
11 // This file implements sparse conditional constant propagation and merging:
12 //
13 // Specifically, this:
14 // * Assumes values are constant unless proven otherwise
15 // * Assumes BasicBlocks are dead unless proven otherwise
16 // * Proves values to be constant, and replaces them with constants
17 // * Proves conditional branches to be unconditional
18 //
19 //===----------------------------------------------------------------------===//
20 
21 #ifndef LLVM_TRANSFORMS_SCALAR_SCCP_H
22 #define LLVM_TRANSFORMS_SCALAR_SCCP_H
23 
25 #include "llvm/IR/DataLayout.h"
26 #include "llvm/IR/Function.h"
27 #include "llvm/IR/Module.h"
28 #include "llvm/IR/PassManager.h"
29 
30 namespace llvm {
31 
32 class Function;
33 
34 /// This pass performs function-level constant propagation and merging.
35 class SCCPPass : public PassInfoMixin<SCCPPass> {
36 public:
38 };
39 
40 bool runIPSCCP(Module &M, const DataLayout &DL, const TargetLibraryInfo *TLI);
41 } // end namespace llvm
42 
43 #endif // LLVM_TRANSFORMS_SCALAR_SCCP_H
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:111
bool runIPSCCP(Module &M, const DataLayout &DL, const TargetLibraryInfo *TLI)
Definition: SCCP.cpp:1801
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:63
F(f)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition: SCCP.cpp:1713
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:365
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:153
Module.h This file contains the declarations for the Module class.
Provides information about what library functions are available for the current target.
A container for analyses that lazily runs them and caches their results.
This pass performs function-level constant propagation and merging.
Definition: SCCP.h:35
This header defines various interfaces for pass management in LLVM.