mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Reduce global namespace pollution. NFC.
llvm-svn: 284521
This commit is contained in:
parent
a424fc3b0e
commit
641730af4a
@ -41,7 +41,7 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
using namespace lto;
|
using namespace lto;
|
||||||
|
|
||||||
LLVM_ATTRIBUTE_NORETURN void reportOpenError(StringRef Path, Twine Msg) {
|
LLVM_ATTRIBUTE_NORETURN static void reportOpenError(StringRef Path, Twine Msg) {
|
||||||
errs() << "failed to open " << Path << ": " << Msg << '\n';
|
errs() << "failed to open " << Path << ": " << Msg << '\n';
|
||||||
errs().flush();
|
errs().flush();
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -1194,7 +1194,7 @@ StringRef sys::getHostCPUName() { return "generic"; }
|
|||||||
// On Linux, the number of physical cores can be computed from /proc/cpuinfo,
|
// On Linux, the number of physical cores can be computed from /proc/cpuinfo,
|
||||||
// using the number of unique physical/core id pairs. The following
|
// using the number of unique physical/core id pairs. The following
|
||||||
// implementation reads the /proc/cpuinfo format on an x86_64 system.
|
// implementation reads the /proc/cpuinfo format on an x86_64 system.
|
||||||
int computeHostNumPhysicalCores() {
|
static int computeHostNumPhysicalCores() {
|
||||||
// Read /proc/cpuinfo as a stream (until EOF reached). It cannot be
|
// Read /proc/cpuinfo as a stream (until EOF reached). It cannot be
|
||||||
// mmapped because it appears to have 0 size.
|
// mmapped because it appears to have 0 size.
|
||||||
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Text =
|
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Text =
|
||||||
@ -1236,7 +1236,7 @@ int computeHostNumPhysicalCores() {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// On other systems, return -1 to indicate unknown.
|
// On other systems, return -1 to indicate unknown.
|
||||||
int computeHostNumPhysicalCores() { return -1; }
|
static int computeHostNumPhysicalCores() { return -1; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int sys::getHostNumPhysicalCores() {
|
int sys::getHostNumPhysicalCores() {
|
||||||
|
@ -47,8 +47,9 @@ LanaiDisassembler::LanaiDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
|
|||||||
|
|
||||||
// Forward declare because the autogenerated code will reference this.
|
// Forward declare because the autogenerated code will reference this.
|
||||||
// Definition is further down.
|
// Definition is further down.
|
||||||
DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo,
|
static DecodeStatus DecodeGPRRegisterClass(MCInst &Inst, unsigned RegNo,
|
||||||
uint64_t Address, const void *Decoder);
|
uint64_t Address,
|
||||||
|
const void *Decoder);
|
||||||
|
|
||||||
static DecodeStatus decodeRiMemoryValue(MCInst &Inst, unsigned Insn,
|
static DecodeStatus decodeRiMemoryValue(MCInst &Inst, unsigned Insn,
|
||||||
uint64_t Address, const void *Decoder);
|
uint64_t Address, const void *Decoder);
|
||||||
|
@ -73,11 +73,12 @@ static MCInstPrinter *createLanaiMCInstPrinter(const Triple & /*T*/,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MCRelocationInfo *createLanaiElfRelocation(const Triple &TheTriple,
|
static MCRelocationInfo *createLanaiElfRelocation(const Triple &TheTriple,
|
||||||
MCContext &Ctx) {
|
MCContext &Ctx) {
|
||||||
return createMCRelocationInfo(TheTriple, Ctx);
|
return createMCRelocationInfo(TheTriple, Ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
class LanaiMCInstrAnalysis : public MCInstrAnalysis {
|
class LanaiMCInstrAnalysis : public MCInstrAnalysis {
|
||||||
public:
|
public:
|
||||||
explicit LanaiMCInstrAnalysis(const MCInstrInfo *Info)
|
explicit LanaiMCInstrAnalysis(const MCInstrInfo *Info)
|
||||||
@ -106,6 +107,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} // end anonymous namespace
|
||||||
|
|
||||||
static MCInstrAnalysis *createLanaiInstrAnalysis(const MCInstrInfo *Info) {
|
static MCInstrAnalysis *createLanaiInstrAnalysis(const MCInstrInfo *Info) {
|
||||||
return new LanaiMCInstrAnalysis(Info);
|
return new LanaiMCInstrAnalysis(Info);
|
||||||
|
@ -29151,7 +29151,8 @@ static SDValue combineLogicBlendIntoPBLENDV(SDNode *N, SelectionDAG &DAG,
|
|||||||
// into:
|
// into:
|
||||||
// srl(ctlz x), log2(bitsize(x))
|
// srl(ctlz x), log2(bitsize(x))
|
||||||
// Input pattern is checked by caller.
|
// Input pattern is checked by caller.
|
||||||
SDValue lowerX86CmpEqZeroToCtlzSrl(SDValue Op, EVT ExtTy, SelectionDAG &DAG) {
|
static SDValue lowerX86CmpEqZeroToCtlzSrl(SDValue Op, EVT ExtTy,
|
||||||
|
SelectionDAG &DAG) {
|
||||||
SDValue Cmp = Op.getOperand(1);
|
SDValue Cmp = Op.getOperand(1);
|
||||||
EVT VT = Cmp.getOperand(0).getValueType();
|
EVT VT = Cmp.getOperand(0).getValueType();
|
||||||
unsigned Log2b = Log2_32(VT.getSizeInBits());
|
unsigned Log2b = Log2_32(VT.getSizeInBits());
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include "X86InstrInfo.h"
|
#include "X86InstrInfo.h"
|
||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
#include "llvm/Support/Threading.h"
|
#include "llvm/Support/Threading.h"
|
||||||
|
using namespace llvm;
|
||||||
|
|
||||||
/// This flag is used in the method llvm::call_once() used below to make the
|
/// This flag is used in the method llvm::call_once() used below to make the
|
||||||
/// initialization of the map 'OpcodeToGroup' thread safe.
|
/// initialization of the map 'OpcodeToGroup' thread safe.
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
using namespace llvm;
|
namespace llvm {
|
||||||
|
|
||||||
/// This class is used to group {132, 213, 231} forms of FMA opcodes together.
|
/// This class is used to group {132, 213, 231} forms of FMA opcodes together.
|
||||||
/// Each of the groups has either 3 register opcodes, 3 memory opcodes,
|
/// Each of the groups has either 3 register opcodes, 3 memory opcodes,
|
||||||
/// or 6 register and memory opcodes. Also, each group has an attrubutes field
|
/// or 6 register and memory opcodes. Also, each group has an attrubutes field
|
||||||
@ -311,5 +310,6 @@ public:
|
|||||||
return rm_iterator(getX86InstrFMA3Info()->OpcodeToGroup.end());
|
return rm_iterator(getX86InstrFMA3Info()->OpcodeToGroup.end());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} // namespace llvm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user