15#ifndef LLVM_TRANSFORMS_SCALAR_SROA_H
16#define LLVM_TRANSFORMS_SCALAR_SROA_H
51 unsigned char Storage = 0;
57 bool isSpeculatable(
bool isTrueVal)
const;
58 bool areAllSpeculatable()
const;
59 bool areAnySpeculatable()
const;
60 bool areNoneSpeculatable()
const;
62 explicit operator intptr_t()
const {
return static_cast<intptr_t
>(Storage); }
65static_assert(
sizeof(SelectHandSpeculativity) ==
sizeof(
unsigned char));
71 std::variant<PossiblySpeculatableLoad, UnspeculatableStore>;
100 const bool PreserveCFG;
127 std::vector<AllocaInst *> PromotableAllocas;
156 static std::optional<sroa::RewriteableMemOps>
184 std::pair<
bool ,
bool > runOnAlloca(
AllocaInst &AI);
185 void clobberUse(
Use &U);
#define LLVM_LIBRARY_VISIBILITY
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.
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 templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
A SetVector that performs no allocations if smaller than a certain size.
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.
SelectHandSpeculativity()=default
SelectHandSpeculativity(intptr_t Storage_)
NodeAddr< UseNode * > Use
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.