LLVM  8.0.1
UnreachableBlockElim.h
Go to the documentation of this file.
1 //===-- UnreachableBlockElim.h - Remove unreachable blocks for codegen --===//
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 // This pass is an extremely simple version of the SimplifyCFG pass. Its sole
11 // job is to delete LLVM basic blocks that are not reachable from the entry
12 // node. To do this, it performs a simple depth first traversal of the CFG,
13 // then deletes any unvisited nodes.
14 //
15 // Note that this pass is really a hack. In particular, the instruction
16 // selectors for various targets should just not generate code for unreachable
17 // blocks. Until LLVM has a more systematic way of defining instruction
18 // selectors, however, we cannot really expect them to handle additional
19 // complexity.
20 //
21 //===----------------------------------------------------------------------===//
22 
23 #ifndef LLVM_LIB_CODEGEN_UNREACHABLEBLOCKELIM_H
24 #define LLVM_LIB_CODEGEN_UNREACHABLEBLOCKELIM_H
25 
26 #include "llvm/IR/PassManager.h"
27 
28 namespace llvm {
29 
31  : public PassInfoMixin<UnreachableBlockElimPass> {
32 public:
34 };
35 } // end namespace llvm
36 
37 #endif // LLVM_LIB_CODEGEN_UNREACHABLEBLOCKELIM_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
F(f)
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:366
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:154
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.