This review is based on review: https://reviews.llvm.org/D62925 . It is part of moving hoistInvariantLoads function and all functions referenced only by hoistInvariantLoads to ScopBuilder.
Moved getNonHoistableCtx and functions listed below to ScopBuilder:
isRequiredInvariantLoad
hasNonHoistableBasePtrInScop
isAccessRangeTooComplex
These functions were referenced only by getNonHoistableCtx.
MaxDimensionsInAccessRange and MaxDisjunctsInDomain constant is marked
as extern and it is added to polly namespace. It is used by Scop and ScopBuilder classes.
MaxDimensionsInAccessRange constant moved to ScopBuilder. It is not used outside ScopBuilder.