mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:50:30 +00:00
Make some helpers static or move into the llvm namespace.
llvm-svn: 217077
This commit is contained in:
parent
1932ecdd2a
commit
e2bc8704e5
@ -103,7 +103,8 @@ static unsigned countFileIDs(ArrayRef<CounterMappingRegion> Regions,
|
|||||||
/// A counter with kind Counter::Expression and an expression
|
/// A counter with kind Counter::Expression and an expression
|
||||||
/// with kind CounterExpression::Add
|
/// with kind CounterExpression::Add
|
||||||
/// Remaining bits - Counter/Expression ID.
|
/// Remaining bits - Counter/Expression ID.
|
||||||
unsigned encodeCounter(ArrayRef<CounterExpression> Expressions, Counter C) {
|
static unsigned encodeCounter(ArrayRef<CounterExpression> Expressions,
|
||||||
|
Counter C) {
|
||||||
unsigned Tag = unsigned(C.getKind());
|
unsigned Tag = unsigned(C.getKind());
|
||||||
if (C.isExpression())
|
if (C.isExpression())
|
||||||
Tag += Expressions[C.getExpressionID()].Kind;
|
Tag += Expressions[C.getExpressionID()].Kind;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "MipsELFStreamer.h"
|
#include "MipsELFStreamer.h"
|
||||||
#include "llvm/MC/MCInst.h"
|
#include "llvm/MC/MCInst.h"
|
||||||
|
using namespace llvm;
|
||||||
|
|
||||||
void MipsELFStreamer::EmitInstruction(const MCInst &Inst,
|
void MipsELFStreamer::EmitInstruction(const MCInst &Inst,
|
||||||
const MCSubtargetInfo &STI) {
|
const MCSubtargetInfo &STI) {
|
||||||
|
@ -24,12 +24,9 @@
|
|||||||
#include "llvm/MC/MCContext.h"
|
#include "llvm/MC/MCContext.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
|
|
||||||
using namespace llvm;
|
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class MipsELFStreamer;
|
class MipsELFStreamer;
|
||||||
class MCSubtargetInfo;
|
class MCSubtargetInfo;
|
||||||
}
|
|
||||||
|
|
||||||
class MipsOptionRecord {
|
class MipsOptionRecord {
|
||||||
public:
|
public:
|
||||||
@ -58,7 +55,7 @@ public:
|
|||||||
}
|
}
|
||||||
~MipsRegInfoRecord() {}
|
~MipsRegInfoRecord() {}
|
||||||
|
|
||||||
void EmitMipsOptionRecord();
|
void EmitMipsOptionRecord() override;
|
||||||
void SetPhysRegUsed(unsigned Reg, const MCRegisterInfo *MCRegInfo);
|
void SetPhysRegUsed(unsigned Reg, const MCRegisterInfo *MCRegInfo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -77,4 +74,5 @@ private:
|
|||||||
uint32_t ri_cprmask[4];
|
uint32_t ri_cprmask[4];
|
||||||
int64_t ri_gp_value;
|
int64_t ri_gp_value;
|
||||||
};
|
};
|
||||||
|
} // namespace llvm
|
||||||
#endif
|
#endif
|
||||||
|
@ -221,7 +221,7 @@ static unsigned ApproximateLoopSize(const Loop *L, unsigned &NumCalls,
|
|||||||
// Returns the loop hint metadata node with the given name (for example,
|
// Returns the loop hint metadata node with the given name (for example,
|
||||||
// "llvm.loop.unroll.count"). If no such metadata node exists, then nullptr is
|
// "llvm.loop.unroll.count"). If no such metadata node exists, then nullptr is
|
||||||
// returned.
|
// returned.
|
||||||
const MDNode *GetUnrollMetadata(const Loop *L, StringRef Name) {
|
static const MDNode *GetUnrollMetadata(const Loop *L, StringRef Name) {
|
||||||
MDNode *LoopID = L->getLoopID();
|
MDNode *LoopID = L->getLoopID();
|
||||||
if (!LoopID)
|
if (!LoopID)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user