Skip to content

Commit 6d2a93e

Browse files
Corrected format
1 parent 6e330e6 commit 6d2a93e

File tree

2 files changed

+13
-26
lines changed

2 files changed

+13
-26
lines changed

clang/lib/DPCT/RulesAsm/AsmMigration.cpp

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
#include "AsmMigration.h"
1010
#include "AnalysisInfo.h"
11+
#include "Diagnostics/Diagnostics.h"
12+
#include "ErrorHandle/CrashRecovery.h"
13+
#include "RuleInfra/MapNames.h"
1114
#include "RulesAsm/Parser/AsmNodes.h"
1215
#include "RulesAsm/Parser/AsmParser.h"
1316
#include "RulesAsm/Parser/AsmTokenKinds.h"
14-
#include "ErrorHandle/CrashRecovery.h"
15-
#include "Diagnostics/Diagnostics.h"
16-
#include "RuleInfra/MapNames.h"
1717
#include "TextModification.h"
1818
#include "Utility.h"
1919
#include "clang/AST/Expr.h"
@@ -592,10 +592,9 @@ bool SYCLGenBase::emitVariableDeclaration(const InlineAsmVarDecl *D) {
592592

593593
bool SYCLGenBase::emitAddressExpr(const InlineAsmAddressExpr *Dst) {
594594
// Address expression only support ld/st/red & atom instructions.
595-
if (!CurrInst ||
596-
!CurrInst->is(asmtok::op_st, asmtok::op_ld, asmtok::op_atom,
597-
asmtok::op_prefetch, asmtok::op_red, asmtok::op_cp,
598-
asmtok::op_ldmatrix)) {
595+
if (!CurrInst || !CurrInst->is(asmtok::op_st, asmtok::op_ld, asmtok::op_atom,
596+
asmtok::op_prefetch, asmtok::op_red,
597+
asmtok::op_cp, asmtok::op_ldmatrix)) {
599598
return SYCLGenError();
600599
}
601600
std::string Type;
@@ -1316,7 +1315,7 @@ class SYCLGen : public SYCLGenBase {
13161315
for (unsigned Inst = 0, E = VE->getNumElements(); Inst != E; ++Inst) {
13171316
if (isa<InlineAsmDiscardExpr>(VE->getElement(Inst)))
13181317
continue;
1319-
OS() << "&";
1318+
OS() << "&";
13201319
if (emitStmt(VE->getElement(Inst)))
13211320
return SYCLGenError();
13221321
OS() << ", ";
@@ -2707,15 +2706,6 @@ class SYCLGen : public SYCLGenBase {
27072706
if (Inst->getNumInputOperands() != 1)
27082707
return SYCLGenError();
27092708

2710-
OS() << "Size of input ops: " << Inst->getNumInputOperands() << "\n";
2711-
OS() << "Input op(0/1): " << Inst->getInputOperand(0) << "\n";
2712-
llvm::SaveAndRestore<const InlineAsmInstruction *> Store2(CurrInst);
2713-
CurrInst = Inst;
2714-
const auto *Src2 =
2715-
dyn_cast_or_null<InlineAsmAddressExpr>(Inst->getInputOperand(0));
2716-
OS() << emitStmt(Src2) << "\n";
2717-
OS() << "Output op: " << emitStmt(Inst->getOutputOperand()) << "\n";
2718-
27192709
llvm::SaveAndRestore<const InlineAsmInstruction *> Store(CurrInst);
27202710
CurrInst = Inst;
27212711
const auto *Src =

clang/runtime/dpct-rt/include/dpct/math.hpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef __DPCT_MATH_HPP__
1010
#define __DPCT_MATH_HPP__
1111

12-
#include <limits>
1312
#include <climits>
13+
#include <limits>
1414
#include <sycl/sycl.hpp>
1515
#include <type_traits>
1616

@@ -2049,9 +2049,8 @@ class joint_matrix {
20492049
};
20502050

20512051
template <typename T>
2052-
void ldmatrix(uintptr_t addr, T *m,
2053-
const sycl::nd_item<3> &item_ct1, bool trans = false,
2054-
unsigned mat = 0) {
2052+
void ldmatrix(uintptr_t addr, T *m, const sycl::nd_item<3> &item_ct1,
2053+
bool trans = false, unsigned mat = 0) {
20552054
int lane = item_ct1.get_local_id(2);
20562055

20572056
int group = lane / 8;
@@ -2097,23 +2096,21 @@ void ldmatrix(uintptr_t addr, T *m,
20972096
}
20982097

20992098
template <typename T>
2100-
void ldmatrix(uintptr_t addr, T *m1, T *m2,
2101-
const sycl::nd_item<3> &item_ct1, bool trans = false) {
2099+
void ldmatrix(uintptr_t addr, T *m1, T *m2, const sycl::nd_item<3> &item_ct1,
2100+
bool trans = false) {
21022101
ldmatrix(addr, m1, item_ct1, trans, 0);
21032102
ldmatrix(addr, m2, item_ct1, trans, 1);
21042103
}
21052104

21062105
template <typename T>
2107-
void ldmatrix(uintptr_t addr, T *m1, T *m2,
2108-
T *m3, T *m4,
2106+
void ldmatrix(uintptr_t addr, T *m1, T *m2, T *m3, T *m4,
21092107
const sycl::nd_item<3> &item_ct1, bool trans = false) {
21102108
ldmatrix(addr, m1, item_ct1, trans, 0);
21112109
ldmatrix(addr, m2, item_ct1, trans, 1);
21122110
ldmatrix(addr, m3, item_ct1, trans, 2);
21132111
ldmatrix(addr, m4, item_ct1, trans, 3);
21142112
}
21152113

2116-
21172114
} // namespace matrix
21182115
} // namespace experimental
21192116

0 commit comments

Comments
 (0)