1e8d8bef9SDimitry Andric //===- ReplaceConstant.h - Replacing LLVM constant expressions --*- C++ -*-===// 2e8d8bef9SDimitry Andric // 3e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6e8d8bef9SDimitry Andric // 7e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 8e8d8bef9SDimitry Andric // 9e8d8bef9SDimitry Andric // This file declares the utility function for replacing LLVM constant 10e8d8bef9SDimitry Andric // expressions by instructions. 11e8d8bef9SDimitry Andric // 12e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 13e8d8bef9SDimitry Andric 14e8d8bef9SDimitry Andric #ifndef LLVM_IR_REPLACECONSTANT_H 15e8d8bef9SDimitry Andric #define LLVM_IR_REPLACECONSTANT_H 16e8d8bef9SDimitry Andric 17fe6060f1SDimitry Andric #include <map> 18fe6060f1SDimitry Andric #include <vector> 19e8d8bef9SDimitry Andric 20e8d8bef9SDimitry Andric namespace llvm { 21e8d8bef9SDimitry Andric 22*06c3fb27SDimitry Andric template <typename T> class ArrayRef; 23*06c3fb27SDimitry Andric class Constant; 241fd87a68SDimitry Andric 25*06c3fb27SDimitry Andric /// Replace constant expressions users of the given constants with 26*06c3fb27SDimitry Andric /// instructions. Return whether anything was changed. 27*06c3fb27SDimitry Andric bool convertUsersOfConstantsToInstructions(ArrayRef<Constant *> Consts); 28fe6060f1SDimitry Andric 29e8d8bef9SDimitry Andric } // end namespace llvm 30e8d8bef9SDimitry Andric 31e8d8bef9SDimitry Andric #endif // LLVM_IR_REPLACECONSTANT_H 32