Skip to content

Commit c6a624d

Browse files
author
GYT
committed
fix
1 parent bc68571 commit c6a624d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,10 @@ class LoopVectorizeHints {
201201
/// \p DebugMsg for debugging purposes along with the corresponding
202202
/// optimization remark \p RemarkName , with \p RemarkMsg as the user-facing
203203
/// message. The loop \p L is used for the location of the remark.
204-
void LoopVectorizeHints::reportDisallowedVectorization(
205-
const StringRef DebugMsg, const StringRef RemarkName,
206-
const StringRef RemarkMsg, const Loop *L) const;
204+
void reportDisallowedVectorization(const StringRef DebugMsg,
205+
const StringRef RemarkName,
206+
const StringRef RemarkMsg,
207+
const Loop *L) const;
207208
};
208209

209210
/// This holds vectorization requirements that must be verified late in

llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,17 @@ bool LoopVectorizeHints::allowVectorization(
194194
if (Force.Value == LoopVectorizeHints::FK_Disabled) {
195195
reportDisallowedVectorization("#pragma vectorize disable",
196196
"MissedExplicitlyDisabled",
197-
"vectorization is explicitly disabled");
197+
"vectorization is explicitly disabled", L);
198198
} else if (hasDisableAllTransformsHint(L)) {
199199
reportDisallowedVectorization("loop hasDisableAllTransformsHint",
200200
"MissedTransformsDisabled",
201-
"loop transformations are disabled");
201+
"loop transformations are disabled", L);
202202
} else {
203203
// This should be unreachable unless there is a bug.
204204
reportDisallowedVectorization(
205205
"disabled for an unknown reason", "MissedUnknown",
206-
"unknown reason, please file a bug report on the LLVM issue tracker");
206+
"unknown reason, please file a bug report on the LLVM issue tracker",
207+
L);
207208
llvm_unreachable("loop vect disabled for an unknown reason");
208209
}
209210
return false;
@@ -212,7 +213,8 @@ bool LoopVectorizeHints::allowVectorization(
212213
if (VectorizeOnlyWhenForced && getForce() != LoopVectorizeHints::FK_Enabled) {
213214
reportDisallowedVectorization(
214215
"VectorizeOnlyWhenForced is set, and no #pragma vectorize enable",
215-
"MissedForceOnly", "only vectorizing loops that explicitly request it");
216+
"MissedForceOnly", "only vectorizing loops that explicitly request it",
217+
L);
216218
return false;
217219
}
218220

0 commit comments

Comments
 (0)