1 //===- ReplaceConstant.h - Replacing LLVM constant expressions --*- 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 declares the utility function for replacing LLVM constant
10 // expressions by instructions.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_IR_REPLACECONSTANT_H
15 #define LLVM_IR_REPLACECONSTANT_H
16 
17 #include <map>
18 #include <vector>
19 
20 namespace llvm {
21 
22 template <typename T> class ArrayRef;
23 class Constant;
24 
25 /// Replace constant expressions users of the given constants with
26 /// instructions. Return whether anything was changed.
27 bool convertUsersOfConstantsToInstructions(ArrayRef<Constant *> Consts);
28 
29 } // end namespace llvm
30 
31 #endif // LLVM_IR_REPLACECONSTANT_H
32