1 | //===- Utils.h - llvm-reduce utility functions ------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // This file contains some utility functions supporting llvm-reduce. |
10 | // |
11 | //===----------------------------------------------------------------------===// |
12 | |
13 | #ifndef LLVM_TOOLS_LLVM_REDUCE_DELTAS_UTILS_H |
14 | #define LLVM_TOOLS_LLVM_REDUCE_DELTAS_UTILS_H |
15 | |
16 | #include "llvm/Support/CommandLine.h" |
17 | |
18 | namespace llvm { |
19 | class BasicBlock; |
20 | class Function; |
21 | class Type; |
22 | class Value; |
23 | |
24 | extern cl::opt<bool> Verbose; |
25 | |
26 | Value *getDefaultValue(Type *T); |
27 | bool hasAliasUse(Function &F); |
28 | |
29 | // Constant fold terminators in \p and minimally prune unreachable code from the |
30 | // function. |
31 | void simpleSimplifyCFG(Function &F, ArrayRef<BasicBlock *> BBs, |
32 | bool FoldBlockIntoPredecessor = true); |
33 | |
34 | } // namespace llvm |
35 | |
36 | #endif |
37 | |