14#ifndef LLVM_TRANSFORMS_UTILS_CODEEXTRACTOR_H
15#define LLVM_TRANSFORMS_UTILS_CODEEXTRACTOR_H
61 void findSideEffectInfoForBlock(
BasicBlock &BB);
95 const bool AggregateArgs;
144 bool ArgsInZeroAddressSpace;
148 bool VoidReturnWithSingleOutput;
151 Value *FuncRetVal =
nullptr;
177 bool AllowAlloca =
false,
BasicBlock *AllocationBlock =
nullptr,
179 std::string Suffix =
"",
bool ArgsInZeroAddressSpace =
false,
180 bool VoidReturnWithSingleOutput =
true);
202 ValueSet &Inputs, ValueSet &Outputs);
229 const ValueSet &Allocas,
230 bool CollectGlobalInputs =
false);
248 ValueSet &HoistCands,
BasicBlock *&ExitBlock)
const;
276 struct LifetimeMarkerInfo {
277 bool SinkLifeStart =
false;
278 bool HoistLifeEnd =
false;
283 ValueSet ExcludeArgsFromAggregate;
291 void computeExtractedFuncRetVals();
295 Type *getSwitchType();
297 void severSplitPHINodesOfEntry(
BasicBlock *&Header);
298 void severSplitPHINodesOfExits();
299 void splitReturnBlocks();
301 void moveCodeToFunction(
Function *newFunction);
303 void calculateNewCallTerminatorWeights(
310 void normalizeCFGForExtraction(
BasicBlock *&header);
315 constructFunctionDeclaration(
const ValueSet &inputs,
const ValueSet &outputs,
317 ValueSet &StructValues,
StructType *&StructTy);
322 void emitFunctionBody(
const ValueSet &inputs,
const ValueSet &outputs,
323 const ValueSet &StructValues,
Function *newFunction,
325 const ValueSet &SinkingCands,
329 CallInst *emitReplacerCall(
const ValueSet &inputs,
const ValueSet &outputs,
330 const ValueSet &StructValues,
335 std::vector<Value *> &Reloads);
341 CallInst *ReplacerCall,
const ValueSet &outputs,
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file defines the DenseMap class.
This file implements a set that has insertion order iteration characteristics.
This class represents a conversion between pointers from one address space to another.
an instruction to allocate memory on the stack
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.
InsertPoint - A saved insertion point.
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.