const RuntimeCheckingPtrGroup *>
RuntimePointerCheck;
+template <typename T> class ArrayRef;
+
/// This class emits a version of the loop where run-time checks ensure
/// that may-alias pointers can't overlap.
///
Loop *getNonVersionedLoop() { return NonVersionedLoop; }
/// Sets the runtime alias checks for versioning the loop.
- void setAliasChecks(SmallVector<RuntimePointerCheck, 4> Checks);
+ void setAliasChecks(ArrayRef<RuntimePointerCheck> Checks);
/// Sets the runtime SCEV checks for versioning the loop.
void setSCEVChecks(SCEVUnionPredicate Check);
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/LoopVersioning.h"
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/Analysis/LoopAccessAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolutionExpander.h"
}
}
-void LoopVersioning::setAliasChecks(
- SmallVector<RuntimePointerCheck, 4> Checks) {
- AliasChecks = std::move(Checks);
+void LoopVersioning::setAliasChecks(ArrayRef<RuntimePointerCheck> Checks) {
+ AliasChecks = {Checks.begin(), Checks.end()};
}
void LoopVersioning::setSCEVChecks(SCEVUnionPredicate Check) {