//===- ReplaceConstant.cpp - Replace LLVM constant expression--------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file implements a utility function for replacing LLVM constant // expressions by instructions. // //===----------------------------------------------------------------------===// #include "llvm/IR/ReplaceConstant.h" #include "llvm/ADT/SetVector.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Instructions.h" namespace llvm { static bool isExpandableUser(User *U) { … } static SmallVector<Instruction *, 4> expandUser(BasicBlock::iterator InsertPt, Constant *C) { … } bool convertUsersOfConstantsToInstructions(ArrayRef<Constant *> Consts, Function *RestrictToFunc, bool RemoveDeadConstants, bool IncludeSelf) { … } } // namespace llvm