LLVM  14.0.0git
Namespaces | Functions
ReplaceConstant.cpp File Reference
#include "llvm/IR/ReplaceConstant.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/NoFolder.h"
Include dependency graph for ReplaceConstant.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This file implements support for optimizing divisions by a constant.
 

Functions

Instruction * llvm::createReplacementInstr (ConstantExpr *CE, Instruction *Instr)
 Create a replacement instruction for constant expression CE and insert it before Instr. More...
 
void llvm::convertConstantExprsToInstructions (Instruction *I, ConstantExpr *CE, SmallPtrSetImpl< Instruction * > *Insts=nullptr)
 The given instruction I contains given constant expression CE as one of its operands, possibly nested within constant expression trees. More...
 
void llvm::convertConstantExprsToInstructions (Instruction *I, std::map< Use *, std::vector< std::vector< ConstantExpr * >>> &CEPaths, SmallPtrSetImpl< Instruction * > *Insts=nullptr)
 The given instruction I contains constant expression CE within the constant expression trees of it`s constant expression operands, and CEPaths holds all the reachable paths (to CE) from such constant expression trees of I. More...
 
void llvm::collectConstantExprPaths (Instruction *I, ConstantExpr *CE, std::map< Use *, std::vector< std::vector< ConstantExpr * >>> &CEPaths)
 Given an instruction I which uses given constant expression CE as operand, either directly or nested within other constant expressions, return all reachable paths from the constant expression operands of I to CE, and return collected paths at CEPaths. More...