diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp index 43bfd0f13f875a..9d3c9e1e2ef9f3 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp @@ -24,7 +24,7 @@ namespace llvm { void initializeCycleInfoWrapperPassPass(PassRegistry &); -} +} // namespace llvm using namespace llvm; diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp index b113904ce242f9..3e1d1283dd485e 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp @@ -260,7 +260,7 @@ struct AMDGPUOutgoingArgHandler : public AMDGPUOutgoingValueHandler { assignValueToAddress(ValVReg, Addr, MemTy, MPO, VA); } }; -} +} // anonymous namespace AMDGPUCallLowering::AMDGPUCallLowering(const AMDGPUTargetLowering &TLI) : CallLowering(&TLI) { diff --git a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp index fd3186332c6296..30c5e5eebfcdc8 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp @@ -147,7 +147,7 @@ class AMDGPULibCalls { bool useNative(CallInst *CI); }; -} // end llvm namespace +} // end namespace llvm template static CallInst *CreateCallEx(IRB &B, FunctionCallee Callee, Value *Arg, @@ -899,7 +899,7 @@ static double log2(double V) { return log(V) / numbers::ln2; #endif } -} +} // namespace llvm bool AMDGPULibCalls::fold_pow(FPMathOperator *FPOp, IRBuilder<> &B, const FuncInfo &FInfo) { diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp index 936d3f98377ac9..17413ab55536da 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp @@ -199,7 +199,7 @@ class ApplyRegBankMapping final : public GISelChangeObserver { } }; -} +} // anonymous namespace AMDGPURegisterBankInfo::AMDGPURegisterBankInfo(const GCNSubtarget &ST) : Subtarget(ST), TRI(Subtarget.getRegisterInfo()), diff --git a/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp b/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp index 9d44b65d1698ca..e72cfcb5bb038f 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPURemoveIncompatibleFunctions.cpp @@ -28,7 +28,7 @@ using namespace llvm; namespace llvm { extern const SubtargetFeatureKV AMDGPUFeatureKV[AMDGPU::NumSubtargetFeatures - 1]; -} +} // namespace llvm namespace { diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp index 9ddf0a310ed061..192996f84c5f37 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -177,7 +177,7 @@ static VGPRRegisterRegAlloc greedyRegAllocVGPR( static VGPRRegisterRegAlloc fastRegAllocVGPR( "fast", "fast register allocator", createFastVGPRRegisterAllocator); -} +} // anonymous namespace static cl::opt EnableEarlyIfConversion("amdgpu-early-ifcvt", cl::Hidden, diff --git a/llvm/lib/Target/AMDGPU/GCNILPSched.cpp b/llvm/lib/Target/AMDGPU/GCNILPSched.cpp index b1d51092ab9b7a..5926abca12449b 100644 --- a/llvm/lib/Target/AMDGPU/GCNILPSched.cpp +++ b/llvm/lib/Target/AMDGPU/GCNILPSched.cpp @@ -359,4 +359,4 @@ std::vector makeGCNILPScheduler(ArrayRef BotRoots, GCNILPScheduler S; return S.schedule(BotRoots, DAG); } -} +} // namespace llvm diff --git a/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp b/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp index 6dfd8c2ff77169..061b0515031b1b 100644 --- a/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp +++ b/llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp @@ -24,9 +24,9 @@ namespace llvm { std::vector makeMinRegSchedule(ArrayRef TopRoots, const ScheduleDAG &DAG); - std::vector makeGCNILPScheduler(ArrayRef BotRoots, - const ScheduleDAG &DAG); -} +std::vector makeGCNILPScheduler(ArrayRef BotRoots, + const ScheduleDAG &DAG); +} // namespace llvm // shim accessors for different order containers static inline MachineInstr *getMachineInstr(MachineInstr *MI) { diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.cpp index 4e9a33227a5dcb..709cd15d9b9e4a 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.cpp @@ -26,7 +26,7 @@ class AMDGPUELFStreamer : public MCELFStreamer { std::move(Emitter)) {} }; -} +} // anonymous namespace MCELFStreamer * llvm::createAMDGPUELFStreamer(const Triple &T, MCContext &Context, diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp index bb45b2079da7eb..ba72152f5668e2 100644 --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -45,8 +45,7 @@ namespace llvm::AMDGPU { #define GET_ImageDimIntrinsicTable_IMPL #define GET_RsrcIntrinsics_IMPL #include "AMDGPUGenSearchableTables.inc" -} - +} // namespace llvm::AMDGPU // Must be at least 4 to be able to branch over minimum unconditional branch // code. This is only for making it possible to write reasonably small tests for diff --git a/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp b/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp index 21ea17e8a6b07e..452dac4b009932 100644 --- a/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp +++ b/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp @@ -748,7 +748,7 @@ static SIAtomicAddrSpace getFenceAddrSpaceMMRA(const MachineInstr &MI, return (Result != SIAtomicAddrSpace::NONE) ? Result : Default; } -} // end namespace anonymous +} // end anonymous namespace void SIMemOpAccess::reportUnsupported(const MachineBasicBlock::iterator &MI, const char *Msg) const { diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp index 1b3cc4a83bea3b..bb5f2328129f91 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -153,7 +153,7 @@ inline unsigned getSaSdstBitWidth() { return 1; } /// \returns SaSdst bit shift inline unsigned getSaSdstBitShift() { return 0; } -} // end namespace anonymous +} // end anonymous namespace namespace llvm {