Skip to content

Commit 5d46492

Browse files
committed
Fix warnings
1 parent 4752b5c commit 5d46492

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

llvm/lib/SYCLLowerIR/LowerInvokeSimd.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,6 @@ Value *stripCasts(Value *V) {
103103
return V;
104104
}
105105

106-
const Value *getSingleUserSkipCasts(const Value *V) {
107-
while (isCast(V)) {
108-
if (V->getNumUses() != 1) {
109-
return nullptr;
110-
}
111-
V = *(V->user_begin());
112-
}
113-
return V;
114-
}
115-
116106
void collectUsesLookThroughCasts(Value *V, SmallPtrSetImpl<const Use *> &Uses) {
117107
for (Use &U : V->uses()) {
118108
Value *VV = U.getUser();
@@ -385,7 +375,6 @@ bool processInvokeSimdCall(CallInst *InvokeSimd,
385375
auto *Helper = cast<Function>(H);
386376
// Mark helper as explicit SIMD function. Some BEs need this info.
387377
{
388-
LLVMContext &C = Helper->getContext();
389378
markFunctionAsESIMD(Helper);
390379
// Fixup helper's linkage, which is linkonce_odr after the FE. It is dropped
391380
// from the ESIMD module after global DCE in post-link if not fixed up.

llvm/tools/sycl-post-link/sycl-post-link.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -696,9 +696,9 @@ processInputModule(std::unique_ptr<Module> M) {
696696
// Violation of this invariant is user error and must've been reported.
697697
// However, if split mode is "auto", then entry point filtering is still
698698
// performed.
699-
assert(!IROutputOnly || (SplitMode == module_split::SPLIT_NONE) ||
700-
(SplitMode == module_split::SPLIT_AUTO) &&
701-
"invalid split mode for IR-only output");
699+
assert((!IROutputOnly || (SplitMode == module_split::SPLIT_NONE) ||
700+
(SplitMode == module_split::SPLIT_AUTO)) &&
701+
"invalid split mode for IR-only output");
702702

703703
// Top-level per-kernel/per-source splitter. SYCL/ESIMD splitting is applied
704704
// to modules resulting from all other kinds of splitting.
@@ -780,8 +780,8 @@ processInputModule(std::unique_ptr<Module> M) {
780780
if (!SplitEsimd && (MMs.size() > 1)) {
781781
// SYCL/ESIMD splitting is not requested, link back into single module.
782782
assert(MMs.size() == 2);
783-
assert(MMs[0].isESIMD() && MMs[1].isSYCL() ||
784-
MMs[1].isESIMD() && MMs[0].isSYCL());
783+
assert((MMs[0].isESIMD() && MMs[1].isSYCL()) ||
784+
(MMs[1].isESIMD() && MMs[0].isSYCL()));
785785
int ESIMDInd = MMs[0].isESIMD() ? 0 : 1;
786786
int SYCLInd = MMs[0].isESIMD() ? 1 : 0;
787787
// ... but before that, make sure no link conflicts will occur.

0 commit comments

Comments
 (0)