Skip to content

Commit a608563

Browse files
committed
fmt
1 parent a5eb7ee commit a608563

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18415,20 +18415,23 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
1841518415
}
1841618416

1841718417
void CodeGenFunction::AddAMDGCNAddressSpaceMMRA(llvm::Instruction *Inst,
18418-
const CallExpr *E, unsigned FirstASNameIdx) {
18418+
const CallExpr *E,
18419+
unsigned FirstASNameIdx) {
1841918420
constexpr const char *Tag = "opencl-fence-mem";
1842018421

1842118422
LLVMContext &Ctx = Inst->getContext();
1842218423
SmallVector<MMRAMetadata::TagT, 3> MMRAs;
18423-
for(unsigned K = FirstASNameIdx; K < E->getNumArgs(); ++K) {
18424+
for (unsigned K = FirstASNameIdx; K < E->getNumArgs(); ++K) {
1842418425
llvm::Value *V = EmitScalarExpr(E->getArg(K));
1842518426
StringRef AS;
18426-
if(llvm::getConstantStringInfo(V, AS) && (AS == "local" || AS == "global" || AS == "image")) {
18427+
if (llvm::getConstantStringInfo(V, AS) &&
18428+
(AS == "local" || AS == "global" || AS == "image")) {
1842718429
MMRAs.push_back({Tag, AS});
1842818430
// TODO: Delete the resulting unused constant?
1842918431
continue;
1843018432
}
18431-
CGM.Error(E->getExprLoc(), "expected one of \"local\", \"global\" or \"image\"");
18433+
CGM.Error(E->getExprLoc(),
18434+
"expected one of \"local\", \"global\" or \"image\"");
1843218435
}
1843318436

1843418437
llvm::unique(MMRAs);
@@ -19107,7 +19110,8 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
1910719110
ProcessOrderScopeAMDGCN(EmitScalarExpr(E->getArg(0)),
1910819111
EmitScalarExpr(E->getArg(1)), AO, SSID);
1910919112
FenceInst *Fence = Builder.CreateFence(AO, SSID);
19110-
if (BuiltinID == AMDGPU::BI__builtin_amdgcn_masked_fence && E->getNumArgs() > 2)
19113+
if (BuiltinID == AMDGPU::BI__builtin_amdgcn_masked_fence &&
19114+
E->getNumArgs() > 2)
1911119115
AddAMDGCNAddressSpaceMMRA(Fence, E, 2);
1911219116
return Fence;
1911319117
}

clang/lib/CodeGen/CodeGenFunction.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4632,7 +4632,8 @@ class CodeGenFunction : public CodeGenTypeCache {
46324632
llvm::Value *EmitRISCVBuiltinExpr(unsigned BuiltinID, const CallExpr *E,
46334633
ReturnValueSlot ReturnValue);
46344634

4635-
void AddAMDGCNAddressSpaceMMRA(llvm::Instruction *Inst, const CallExpr *E, unsigned FirstASNameIdx);
4635+
void AddAMDGCNAddressSpaceMMRA(llvm::Instruction *Inst, const CallExpr *E,
4636+
unsigned FirstASNameIdx);
46364637
void ProcessOrderScopeAMDGCN(llvm::Value *Order, llvm::Value *Scope,
46374638
llvm::AtomicOrdering &AO,
46384639
llvm::SyncScope::ID &SSID);

0 commit comments

Comments
 (0)