|
|
|||
File indexing completed on 2026-05-10 08:43:38
0001 //===-- UnreachableBlockElim.h - Remove unreachable blocks for codegen --===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // This pass is an extremely simple version of the SimplifyCFG pass. Its sole 0010 // job is to delete LLVM basic blocks that are not reachable from the entry 0011 // node. To do this, it performs a simple depth first traversal of the CFG, 0012 // then deletes any unvisited nodes. 0013 // 0014 // Note that this pass is really a hack. In particular, the instruction 0015 // selectors for various targets should just not generate code for unreachable 0016 // blocks. Until LLVM has a more systematic way of defining instruction 0017 // selectors, however, we cannot really expect them to handle additional 0018 // complexity. 0019 // 0020 //===----------------------------------------------------------------------===// 0021 0022 #ifndef LLVM_CODEGEN_UNREACHABLEBLOCKELIM_H 0023 #define LLVM_CODEGEN_UNREACHABLEBLOCKELIM_H 0024 0025 #include "llvm/IR/PassManager.h" 0026 0027 namespace llvm { 0028 0029 class UnreachableBlockElimPass 0030 : public PassInfoMixin<UnreachableBlockElimPass> { 0031 public: 0032 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); 0033 }; 0034 } // end namespace llvm 0035 0036 #endif // LLVM_CODEGEN_UNREACHABLEBLOCKELIM_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|