Home | History | Annotate | Download | only in Scalar

Lines Matching refs:SROA

16 // This combines a simple SRoA algorithm with the Mem2Reg algorithm because they
18 // SRoA, then Mem2Reg until we run out of things to promote works well.
61 struct SROA : public FunctionPass {
62 SROA(int T, bool hasDT, char &ID, int ST, int AT, int SLT)
107 /// isUnsafe - This is set to true if the alloca cannot be SROA'd.
131 /// SRThreshold - The maximum alloca size to considered for SROA.
135 /// contain to be considered for SROA.
139 /// have to be considered for SROA.
187 // SROA_DT - SROA that uses DominatorTree.
188 struct SROA_DT : public SROA {
192 SROA(T, true, ID, ST, AT, SLT) {
204 // SROA_SSAUp - SROA that uses SSAUpdater.
205 struct SROA_SSAUp : public SROA {
209 SROA(T, false, ID, ST, AT, SLT) {
1018 // SRoA Driver
1022 bool SROA::runOnFunction(Function &F) {
1406 bool SROA::performPromotion(Function &F) {
1452 /// SROA. It must be a struct or array type with a small number of elements.
1453 bool SROA::ShouldAttemptScalarRepl(AllocaInst *AI) {
1468 bool SROA::performScalarRepl(Function &F) {
1483 // Handle dead allocas trivially. These can be formed by SROA'ing arrays
1495 // Check to see if we can perform the core SROA transformation. We cannot
1538 /// predicate, do SROA now.
1539 void SROA::DoScalarReplacement(AllocaInst *AI,
1541 DEBUG(dbgs() << "Found inst to SROA: " << *AI << '\n');
1577 void SROA::DeleteDeadInstructions() {
1599 void SROA::isSafeForScalarRepl(Instruction *I, uint64_t Offset,
1655 /// together somewhere: we can SRoA and promote all the other elements even if
1661 void SROA::isSafePHISelectUseForScalarRepl(Instruction *I, uint64_t Offset,
1711 void SROA::isSafeGEP(GetElementPtrInst *GEPI,
1792 void SROA::isSafeMemAccess(uint64_t Offset, uint64_t MemSize,
1831 bool SROA::TypeHasComponent(Type *T, uint64_t Offset, uint64_t Size) {
1867 void SROA::RewriteForScalarRepl(Instruction *I, AllocaInst *AI, uint64_t Offset,
1981 void SROA::RewriteBitCast(BitCastInst *BC, AllocaInst *AI, uint64_t Offset,
2009 uint64_t SROA::FindElementAndOffset(Type *&T, uint64_t &Offset,
2039 void SROA::RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
2100 void SROA::RewriteLifetimeIntrinsic(IntrinsicInst *II, AllocaInst *AI,
2115 // Splice the first element and index 'NewOffset' bytes in. SROA will
2157 SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
2331 SROA::RewriteStoreUserOfWholeAlloca(StoreInst *SI, AllocaInst *AI,
2365 EltVal = Builder.CreateLShr(EltVal, ShiftVal, "sroa.store.elt");
2411 EltVal = Builder.CreateLShr(EltVal, ShiftVal, "sroa.store.elt");
2446 SROA::RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI,
2488 SrcField = new LoadInst(SrcField, "sroa.load.elt", LI);
2533 /// by SROA; return false otherwise.
2540 // SROA currently handles only Arrays and Structs.
2570 bool SROA::isSafeAllocaToScalarRepl(AllocaInst *AI) {
2595 // If the struct/array just has one element, use basic SRoA.