diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-02-14 00:33:36 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-02-14 00:33:36 +0000 |
commit | d96089b2487448af11ecdaba8371f08d9b2381a2 (patch) | |
tree | f5cd5c76dc0d6cf713605a5baaec1d0cd2edd96b /llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | |
parent | c45f7f3eb424a64a1eb42c867d0837adb218f57b (diff) | |
download | bcm5719-llvm-d96089b2487448af11ecdaba8371f08d9b2381a2.tar.gz bcm5719-llvm-d96089b2487448af11ecdaba8371f08d9b2381a2.zip |
[MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
Same changes in files affected by reduced MC headers dependencies.
llvm-svn: 295009
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp index ec13245c0eb..02e47afeb91 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -1,4 +1,4 @@ -//===-- AMDGPUBaseInfo.cpp - AMDGPU Base encoding information--------------===// +//===- AMDGPUBaseInfo.cpp - AMDGPU Base encoding information --------------===// // // The LLVM Compiler Infrastructure // @@ -6,20 +6,34 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#include "AMDGPUBaseInfo.h" + #include "AMDGPU.h" +#include "AMDGPUBaseInfo.h" #include "SIDefines.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/Triple.h" #include "llvm/CodeGen/MachineMemOperand.h" +#include "llvm/IR/Attributes.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/GlobalValue.h" +#include "llvm/IR/Instruction.h" #include "llvm/IR/LLVMContext.h" #include "llvm/MC/MCContext.h" -#include "llvm/MC/MCInstrInfo.h" +#include "llvm/MC/MCInstrDesc.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSectionELF.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/SubtargetFeature.h" +#include "llvm/Support/Casting.h" +#include "llvm/Support/ELF.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/MathExtras.h" +#include <algorithm> +#include <cassert> +#include <cstdint> +#include <cstring> +#include <utility> #define GET_SUBTARGETINFO_ENUM #include "AMDGPUGenSubtargetInfo.inc" @@ -76,7 +90,7 @@ unsigned getLgkmcntBitShift() { return 8; } /// \returns Lgkmcnt bit width. unsigned getLgkmcntBitWidth() { return 4; } -} // namespace anonymous +} // end namespace anonymous namespace llvm { namespace AMDGPU { @@ -268,7 +282,7 @@ unsigned getMaxNumVGPRs(const FeatureBitset &Features, unsigned WavesPerEU) { return std::min(MaxNumVGPRs, AddressableNumVGPRs); } -} // namespace IsaInfo +} // end namespace IsaInfo void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header, const FeatureBitset &Features) { @@ -371,7 +385,7 @@ std::pair<int, int> getIntegerPairAttribute(const Function &F, return Default; } if (Strs.second.trim().getAsInteger(0, Ints.second)) { - if (!OnlyFirstRequired || Strs.second.trim().size()) { + if (!OnlyFirstRequired || !Strs.second.trim().empty()) { Ctx.emitError("can't parse second integer attribute " + Name); return Default; } @@ -655,5 +669,5 @@ bool isLegalSMRDImmOffset(const MCSubtargetInfo &ST, int64_t ByteOffset) { isUInt<20>(EncodedOffset); } -} // End namespace AMDGPU -} // End namespace llvm +} // end namespace AMDGPU +} // end namespace llvm |