mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
If all of the write objects are identified then we can vectorize the loop even if the read objects are unidentified.
PR14719. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1704,6 +1704,7 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
|
||||
|
||||
// Check that the read-writes do not conflict with other read-write
|
||||
// pointers.
|
||||
bool AllWritesIdentified = true;
|
||||
for (I = ReadWrites.begin(), IE = ReadWrites.end(); I != IE; ++I) {
|
||||
GetUnderlyingObjects(*I, TempObjects, DL);
|
||||
for (ValueVector::iterator it=TempObjects.begin(), e=TempObjects.end();
|
||||
@ -1711,6 +1712,7 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
|
||||
if (!isIdentifiedObject(*it)) {
|
||||
DEBUG(dbgs() << "LV: Found an unidentified write ptr:"<< **it <<"\n");
|
||||
NeedRTCheck = true;
|
||||
AllWritesIdentified = false;
|
||||
}
|
||||
if (!WriteObjects.insert(*it)) {
|
||||
DEBUG(dbgs() << "LV: Found a possible write-write reorder:"
|
||||
@ -1726,7 +1728,9 @@ bool LoopVectorizationLegality::canVectorizeMemory() {
|
||||
GetUnderlyingObjects(*I, TempObjects, DL);
|
||||
for (ValueVector::iterator it=TempObjects.begin(), e=TempObjects.end();
|
||||
it != e; ++it) {
|
||||
if (!isIdentifiedObject(*it)) {
|
||||
// If all of the writes are identified then we don't care if the read
|
||||
// pointer is identified or not.
|
||||
if (!AllWritesIdentified && !isIdentifiedObject(*it)) {
|
||||
DEBUG(dbgs() << "LV: Found an unidentified read ptr:"<< **it <<"\n");
|
||||
NeedRTCheck = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user