14#ifndef LLVM_TRANSFORMS_UTILS_CODEEXTRACTOR_H
15#define LLVM_TRANSFORMS_UTILS_CODEEXTRACTOR_H
59 void findSideEffectInfoForBlock(
BasicBlock &BB);
93 const bool AggregateArgs;
142 bool ArgsInZeroAddressSpace;
146 bool VoidReturnWithSingleOutput;
149 Value *FuncRetVal =
nullptr;
175 bool AllowAlloca =
false,
BasicBlock *AllocationBlock =
nullptr,
177 std::string Suffix =
"",
bool ArgsInZeroAddressSpace =
false,
178 bool VoidReturnWithSingleOutput =
true);
200 ValueSet &Inputs, ValueSet &Outputs);
228 bool CollectGlobalInputs =
false);
246 ValueSet &HoistCands,
BasicBlock *&ExitBlock)
const;
274 struct LifetimeMarkerInfo {
275 bool SinkLifeStart =
false;
276 bool HoistLifeEnd =
false;
281 ValueSet ExcludeArgsFromAggregate;
289 void computeExtractedFuncRetVals();
293 Type *getSwitchType();
295 void severSplitPHINodesOfEntry(
BasicBlock *&Header);
296 void severSplitPHINodesOfExits();
297 void splitReturnBlocks();
299 void moveCodeToFunction(
Function *newFunction);
301 void calculateNewCallTerminatorWeights(
308 void normalizeCFGForExtraction(
BasicBlock *&header);
313 constructFunctionDeclaration(
const ValueSet &inputs,
const ValueSet &outputs,
315 ValueSet &StructValues,
StructType *&StructTy);
320 void emitFunctionBody(
const ValueSet &inputs,
const ValueSet &outputs,
321 const ValueSet &StructValues,
Function *newFunction,
323 const ValueSet &SinkingCands,
327 CallInst *emitReplacerCall(
const ValueSet &inputs,
const ValueSet &outputs,
328 const ValueSet &StructValues,
333 std::vector<Value *> &Reloads);
339 CallInst *ReplacerCall,
const ValueSet &outputs,
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file defines the DenseMap class.
Hexagon Lower HLX Pair Allocas
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.
BasicBlock::iterator InsertPoint
InsertPoint - A saved insertion point.
A vector that has set insertion semantics.
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.