15#ifndef LLVM_TRANSFORMS_SCALAR_SROA_H
16#define LLVM_TRANSFORMS_SCALAR_SROA_H
44class AllocaSliceRewriter;
50 unsigned char Storage = 0;
61 explicit operator intptr_t()
const {
return static_cast<intptr_t
>(Storage); }
64static_assert(
sizeof(SelectHandSpeculativity) ==
sizeof(
unsigned char));
70 std::variant<PossiblySpeculatableLoad, UnspeculatableStore>;
99 const bool PreserveCFG;
126 std::vector<AllocaInst *> PromotableAllocas;
155 static std::optional<sroa::RewriteableMemOps>
183 std::pair<
bool ,
bool > runOnAlloca(
AllocaInst &AI);
184 void clobberUse(
Use &U);
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library,...
static bool runImpl(Function &F, const TargetLowering &TLI)
This file implements a map that provides insertion order iteration.
This header defines various interfaces for pass management in LLVM.
This file defines the PointerIntPair class.
This file implements a set that has insertion order iteration characteristics.
This file defines the SmallVector class.
an instruction to allocate memory on the stack
A container for analyses that lazily runs them and caches their results.
A cache of @llvm.assume calls within a function.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
This is an important class for using LLVM in a threaded context.
bool areAnySpeculatable() const
SelectHandSpeculativity & setAsSpeculatable(bool isTrueVal)
bool areNoneSpeculatable() const
SelectHandSpeculativity(intptr_t Storage_)
bool isSpeculatable(bool isTrueVal) const
SelectHandSpeculativity()=default
bool areAllSpeculatable() const
PointerIntPair - This class implements a pair of a pointer and small integer.
A set of analyses that are preserved following a run of a transformation pass.
An optimization pass providing Scalar Replacement of Aggregates.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Run the pass over the function.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
This class represents the LLVM 'select' instruction.
A vector that has set insertion semantics.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
An instruction for storing to memory.
StringRef - Represent a constant reference to a string, i.e.
A Use represents the edge between a Value definition and its users.
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
Visitor to rewrite instructions using p particular slice of an alloca to use a new alloca.
Representation of the alloca slices.
A partition of the slices.
A legacy pass for the legacy pass manager that wraps the SROA pass.
std::variant< PossiblySpeculatableLoad, UnspeculatableStore > RewriteableMemOp
This is an optimization pass for GlobalISel generic memory operations.
Describes an element of a Bitfield.
A CRTP mix-in to automatically provide informational APIs needed for passes.
A MapVector that performs no allocations if smaller than a certain size.