14#ifndef LLVM_TRANSFORMS_UTILS_CODEEXTRACTOR_H
15#define LLVM_TRANSFORMS_UTILS_CODEEXTRACTOR_H
58 void findSideEffectInfoForBlock(
BasicBlock &BB);
92 const bool AggregateArgs;
134 bool ArgsInZeroAddressSpace;
158 bool AllowAlloca =
false,
160 std::string Suffix =
"",
bool ArgsInZeroAddressSpace =
false);
181 ValueSet &Inputs, ValueSet &Outputs);
208 const ValueSet &Allocas,
209 bool CollectGlobalInputs =
false)
const;
228 ValueSet &SinkCands, ValueSet &HoistCands,
247 struct LifetimeMarkerInfo {
248 bool SinkLifeStart =
false;
249 bool HoistLifeEnd =
false;
254 ValueSet ExcludeArgsFromAggregate;
262 void computeExtractedFuncRetVals();
266 Type *getSwitchType();
268 void severSplitPHINodesOfEntry(
BasicBlock *&Header);
269 void severSplitPHINodesOfExits();
270 void splitReturnBlocks();
272 void moveCodeToFunction(
Function *newFunction);
274 void calculateNewCallTerminatorWeights(
281 void normalizeCFGForExtraction(
BasicBlock *&header);
285 Function *constructFunctionDeclaration(
const ValueSet &inputs,
286 const ValueSet &outputs,
289 ValueSet &StructValues,
295 void emitFunctionBody(
const ValueSet &inputs,
const ValueSet &outputs,
296 const ValueSet &StructValues,
Function *newFunction,
298 const ValueSet &SinkingCands,
302 CallInst *emitReplacerCall(
const ValueSet &inputs,
const ValueSet &outputs,
303 const ValueSet &StructValues,
308 std::vector<Value *> &Reloads);
312 void insertReplacerCall(
This file defines the DenseMap class.
This file implements a set that has insertion order iteration characteristics.
an instruction to allocate memory on the stack
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A cache of @llvm.assume calls within a function.
LLVM Basic Block Representation.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
Analysis providing branch probability information.
This class represents a function call, abstracting a target machine's calling convention.
Implements a dense probed hash-table based set.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
A Module instance is used to store all the information related to an LLVM module.
A vector that has set insertion semantics.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Class to represent struct types.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.