Skip to content

Commit 8135b7c

Browse files
[LV] Emit all remarks for unvectorizable instructions (#153833)
If ExtraAnalysis is requested, emit all remarks caused by unvectorizable instructions - instead of only the first. This is in line with how other places handle DoExtraAnalysis and it can be quite helpful to get info about all instructions in a loop that prevent vectorization.
1 parent 97f5542 commit 8135b7c

File tree

3 files changed

+299
-244
lines changed

3 files changed

+299
-244
lines changed

llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ class LoopVectorizationLegality {
493493
/// and we only need to check individual instructions.
494494
bool canVectorizeInstrs();
495495

496+
/// Check if an individual instruction is vectorizable.
497+
bool canVectorizeInstr(Instruction &I);
498+
496499
/// When we vectorize loops we may change the order in which
497500
/// we read and write from memory. This method checks if it is
498501
/// legal to vectorize the code, considering only memory constrains.

0 commit comments

Comments
 (0)