mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
SLPVectorizer: Rewrite ArrayRef slice compare to be more idiomatic.
NFC intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230965 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e1244e83b9
commit
5916e9cddf
@ -3178,15 +3178,11 @@ private:
|
||||
/// the WeakVH array.
|
||||
/// Vectorization of part of the VL array may cause later values in the VL array
|
||||
/// to become invalid. We track when this has happened in the WeakVH array.
|
||||
static bool hasValueBeenRAUWed(ArrayRef<Value *> &VL,
|
||||
SmallVectorImpl<WeakVH> &VH,
|
||||
unsigned SliceBegin,
|
||||
unsigned SliceSize) {
|
||||
for (unsigned i = SliceBegin; i < SliceBegin + SliceSize; ++i)
|
||||
if (VH[i] != VL[i])
|
||||
return true;
|
||||
|
||||
return false;
|
||||
static bool hasValueBeenRAUWed(ArrayRef<Value *> VL, ArrayRef<WeakVH> VH,
|
||||
unsigned SliceBegin, unsigned SliceSize) {
|
||||
VL = VL.slice(SliceBegin, SliceSize);
|
||||
VH = VH.slice(SliceBegin, SliceSize);
|
||||
return !std::equal(VL.begin(), VL.end(), VH.begin());
|
||||
}
|
||||
|
||||
bool SLPVectorizer::vectorizeStoreChain(ArrayRef<Value *> Chain,
|
||||
|
Loading…
x
Reference in New Issue
Block a user