Index: llvm/lib/Transforms/Scalar/SROA.cpp =================================================================== --- llvm/lib/Transforms/Scalar/SROA.cpp +++ llvm/lib/Transforms/Scalar/SROA.cpp @@ -3208,10 +3208,14 @@ /// split operations. Value *Ptr; + /// TBAA information to attach to the new op. + AAMDNodes AATags; + /// Initialize the splitter with an insertion point, Ptr and start with a /// single zero GEP index. - OpSplitter(Instruction *InsertionPoint, Value *Ptr) - : IRB(InsertionPoint), GEPIndices(1, IRB.getInt32(0)), Ptr(Ptr) {} + OpSplitter(Instruction *InsertionPoint, Value *Ptr, AAMDNodes AATags) + : IRB(InsertionPoint), GEPIndices(1, IRB.getInt32(0)), Ptr(Ptr), + AATags(AATags) {} public: /// Generic recursive split emission routine. @@ -3266,10 +3270,8 @@ }; struct LoadOpSplitter : public OpSplitter { - AAMDNodes AATags; - LoadOpSplitter(Instruction *InsertionPoint, Value *Ptr, AAMDNodes AATags) - : OpSplitter(InsertionPoint, Ptr), AATags(AATags) {} + : OpSplitter(InsertionPoint, Ptr, AATags) {} /// Emit a leaf load of a single value. This is called at the leaves of the /// recursive emission to actually load values. @@ -3305,8 +3307,7 @@ struct StoreOpSplitter : public OpSplitter { StoreOpSplitter(Instruction *InsertionPoint, Value *Ptr, AAMDNodes AATags) - : OpSplitter(InsertionPoint, Ptr), AATags(AATags) {} - AAMDNodes AATags; + : OpSplitter(InsertionPoint, Ptr, AATags) {} /// Emit a leaf store of a single value. This is called at the leaves of the /// recursive emission to actually produce stores.