mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Round 2 of dead private variable removal.
LLVM is now -Wunused-private-field clean except for - lib/MC/MCDisassembler/Disassembler.h. Not sure why it keeps all those unaccessible fields. - gtest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158096 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,7 +28,6 @@ class BasicBlock;
|
|||||||
|
|
||||||
class ProfileInfoLoader {
|
class ProfileInfoLoader {
|
||||||
const std::string &Filename;
|
const std::string &Filename;
|
||||||
Module &M;
|
|
||||||
std::vector<std::string> CommandLines;
|
std::vector<std::string> CommandLines;
|
||||||
std::vector<unsigned> FunctionCounts;
|
std::vector<unsigned> FunctionCounts;
|
||||||
std::vector<unsigned> BlockCounts;
|
std::vector<unsigned> BlockCounts;
|
||||||
@@ -39,8 +38,7 @@ class ProfileInfoLoader {
|
|||||||
public:
|
public:
|
||||||
// ProfileInfoLoader ctor - Read the specified profiling data file, exiting
|
// ProfileInfoLoader ctor - Read the specified profiling data file, exiting
|
||||||
// the program if the file is invalid or broken.
|
// the program if the file is invalid or broken.
|
||||||
ProfileInfoLoader(const char *ToolName, const std::string &Filename,
|
ProfileInfoLoader(const char *ToolName, const std::string &Filename);
|
||||||
Module &M);
|
|
||||||
|
|
||||||
static const unsigned Uncounted;
|
static const unsigned Uncounted;
|
||||||
|
|
||||||
|
|||||||
@@ -83,10 +83,8 @@ const unsigned ProfileInfoLoader::Uncounted = ~0U;
|
|||||||
// program if the file is invalid or broken.
|
// program if the file is invalid or broken.
|
||||||
//
|
//
|
||||||
ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
|
ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
|
||||||
const std::string &Filename,
|
const std::string &Filename)
|
||||||
Module &TheModule) :
|
: Filename(Filename), Warned(false) {
|
||||||
Filename(Filename),
|
|
||||||
M(TheModule), Warned(false) {
|
|
||||||
FILE *F = fopen(Filename.c_str(), "rb");
|
FILE *F = fopen(Filename.c_str(), "rb");
|
||||||
if (F == 0) {
|
if (F == 0) {
|
||||||
errs() << ToolName << ": Error opening '" << Filename << "': ";
|
errs() << ToolName << ": Error opening '" << Filename << "': ";
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ void LoaderPass::readEdge(ProfileInfo::Edge e,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool LoaderPass::runOnModule(Module &M) {
|
bool LoaderPass::runOnModule(Module &M) {
|
||||||
ProfileInfoLoader PIL("profile-loader", Filename, M);
|
ProfileInfoLoader PIL("profile-loader", Filename);
|
||||||
|
|
||||||
EdgeInformation.clear();
|
EdgeInformation.clear();
|
||||||
std::vector<unsigned> Counters = PIL.getRawEdgeCounts();
|
std::vector<unsigned> Counters = PIL.getRawEdgeCounts();
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ static cl::opt<bool> DisableHoisting("disable-spill-hoist", cl::Hidden,
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
class InlineSpiller : public Spiller {
|
class InlineSpiller : public Spiller {
|
||||||
MachineFunctionPass &Pass;
|
|
||||||
MachineFunction &MF;
|
MachineFunction &MF;
|
||||||
LiveIntervals &LIS;
|
LiveIntervals &LIS;
|
||||||
LiveStacks &LSS;
|
LiveStacks &LSS;
|
||||||
@@ -137,8 +136,7 @@ public:
|
|||||||
InlineSpiller(MachineFunctionPass &pass,
|
InlineSpiller(MachineFunctionPass &pass,
|
||||||
MachineFunction &mf,
|
MachineFunction &mf,
|
||||||
VirtRegMap &vrm)
|
VirtRegMap &vrm)
|
||||||
: Pass(pass),
|
: MF(mf),
|
||||||
MF(mf),
|
|
||||||
LIS(pass.getAnalysis<LiveIntervals>()),
|
LIS(pass.getAnalysis<LiveIntervals>()),
|
||||||
LSS(pass.getAnalysis<LiveStacks>()),
|
LSS(pass.getAnalysis<LiveStacks>()),
|
||||||
AA(&pass.getAnalysis<AliasAnalysis>()),
|
AA(&pass.getAnalysis<AliasAnalysis>()),
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ class RAGreedy : public MachineFunctionPass,
|
|||||||
|
|
||||||
// analyses
|
// analyses
|
||||||
SlotIndexes *Indexes;
|
SlotIndexes *Indexes;
|
||||||
LiveStacks *LS;
|
|
||||||
MachineDominatorTree *DomTree;
|
MachineDominatorTree *DomTree;
|
||||||
MachineLoopInfo *Loops;
|
MachineLoopInfo *Loops;
|
||||||
EdgeBundles *Bundles;
|
EdgeBundles *Bundles;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ ExecutionEngine *MCJIT::createJIT(Module *M,
|
|||||||
|
|
||||||
// If the target supports JIT code generation, create the JIT.
|
// If the target supports JIT code generation, create the JIT.
|
||||||
if (TargetJITInfo *TJ = TM->getJITInfo())
|
if (TargetJITInfo *TJ = TM->getJITInfo())
|
||||||
return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM, M), GVsWithCode);
|
return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM), GVsWithCode);
|
||||||
|
|
||||||
if (ErrorStr)
|
if (ErrorStr)
|
||||||
*ErrorStr = "target does not support JIT code generation";
|
*ErrorStr = "target does not support JIT code generation";
|
||||||
|
|||||||
@@ -22,15 +22,11 @@ namespace llvm {
|
|||||||
// matching LLVM IR counterparts in the module(s) being compiled.
|
// matching LLVM IR counterparts in the module(s) being compiled.
|
||||||
class MCJITMemoryManager : public RTDyldMemoryManager {
|
class MCJITMemoryManager : public RTDyldMemoryManager {
|
||||||
virtual void anchor();
|
virtual void anchor();
|
||||||
JITMemoryManager *JMM;
|
OwningPtr<JITMemoryManager> JMM;
|
||||||
|
|
||||||
// FIXME: Multiple modules.
|
|
||||||
Module *M;
|
|
||||||
public:
|
public:
|
||||||
MCJITMemoryManager(JITMemoryManager *jmm, Module *m) :
|
MCJITMemoryManager(JITMemoryManager *jmm) :
|
||||||
JMM(jmm?jmm:JITMemoryManager::CreateDefaultMemManager()), M(m) {}
|
JMM(jmm?jmm:JITMemoryManager::CreateDefaultMemManager()) {}
|
||||||
// We own the JMM, so make sure to delete it.
|
|
||||||
~MCJITMemoryManager() { delete JMM; }
|
|
||||||
|
|
||||||
uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
|
uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
|
||||||
unsigned SectionID) {
|
unsigned SectionID) {
|
||||||
|
|||||||
@@ -30,12 +30,6 @@ using namespace llvm;
|
|||||||
// very little right now.
|
// very little right now.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
SPUHazardRecognizer::SPUHazardRecognizer(const TargetInstrInfo &tii) :
|
|
||||||
TII(tii),
|
|
||||||
EvenOdd(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Return the pipeline hazard type encountered or generated by this
|
/// Return the pipeline hazard type encountered or generated by this
|
||||||
/// instruction. Currently returns NoHazard.
|
/// instruction. Currently returns NoHazard.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -24,12 +24,8 @@ class TargetInstrInfo;
|
|||||||
/// SPUHazardRecognizer
|
/// SPUHazardRecognizer
|
||||||
class SPUHazardRecognizer : public ScheduleHazardRecognizer
|
class SPUHazardRecognizer : public ScheduleHazardRecognizer
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
const TargetInstrInfo &TII;
|
|
||||||
int EvenOdd;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SPUHazardRecognizer(const TargetInstrInfo &TII);
|
SPUHazardRecognizer(const TargetInstrInfo &/*TII*/) {}
|
||||||
virtual HazardType getHazardType(SUnit *SU, int Stalls);
|
virtual HazardType getHazardType(SUnit *SU, int Stalls);
|
||||||
virtual void EmitInstruction(SUnit *SU);
|
virtual void EmitInstruction(SUnit *SU);
|
||||||
virtual void AdvanceCycle();
|
virtual void AdvanceCycle();
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ namespace llvm {
|
|||||||
class SPUTargetLowering :
|
class SPUTargetLowering :
|
||||||
public TargetLowering
|
public TargetLowering
|
||||||
{
|
{
|
||||||
int VarArgsFrameIndex; // FrameIndex for start of varargs area.
|
|
||||||
SPUTargetMachine &SPUTM;
|
SPUTargetMachine &SPUTM;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -250,12 +250,8 @@ int getNVPTXVectorSize(TargetRegisterClass const *RC) {
|
|||||||
|
|
||||||
NVPTXRegisterInfo::NVPTXRegisterInfo(const TargetInstrInfo &tii,
|
NVPTXRegisterInfo::NVPTXRegisterInfo(const TargetInstrInfo &tii,
|
||||||
const NVPTXSubtarget &st)
|
const NVPTXSubtarget &st)
|
||||||
: NVPTXGenRegisterInfo(0),
|
: NVPTXGenRegisterInfo(0),
|
||||||
TII(tii),
|
Is64Bit(st.is64Bit()) {}
|
||||||
ST(st) {
|
|
||||||
Is64Bit = st.is64Bit();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define GET_REGINFO_TARGET_DESC
|
#define GET_REGINFO_TARGET_DESC
|
||||||
#include "NVPTXGenRegisterInfo.inc"
|
#include "NVPTXGenRegisterInfo.inc"
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ class NVPTXSubtarget;
|
|||||||
|
|
||||||
class NVPTXRegisterInfo : public NVPTXGenRegisterInfo {
|
class NVPTXRegisterInfo : public NVPTXGenRegisterInfo {
|
||||||
private:
|
private:
|
||||||
const TargetInstrInfo &TII;
|
|
||||||
const NVPTXSubtarget &ST;
|
|
||||||
bool Is64Bit;
|
bool Is64Bit;
|
||||||
// Hold Strings that can be free'd all together with NVPTXRegisterInfo
|
// Hold Strings that can be free'd all together with NVPTXRegisterInfo
|
||||||
ManagedStringPool ManagedStrPool;
|
ManagedStringPool ManagedStrPool;
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ namespace llvm {
|
|||||||
class SparcSubtarget;
|
class SparcSubtarget;
|
||||||
|
|
||||||
class SparcFrameLowering : public TargetFrameLowering {
|
class SparcFrameLowering : public TargetFrameLowering {
|
||||||
const SparcSubtarget &STI;
|
|
||||||
public:
|
public:
|
||||||
explicit SparcFrameLowering(const SparcSubtarget &sti)
|
explicit SparcFrameLowering(const SparcSubtarget &/*sti*/)
|
||||||
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, 0), STI(sti) {
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
||||||
|
|||||||
@@ -78,8 +78,7 @@ static void storeToStack(MachineBasicBlock &MBB,
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
XCoreFrameLowering::XCoreFrameLowering(const XCoreSubtarget &sti)
|
XCoreFrameLowering::XCoreFrameLowering(const XCoreSubtarget &sti)
|
||||||
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0),
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0) {
|
||||||
STI(sti) {
|
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ namespace llvm {
|
|||||||
class XCoreSubtarget;
|
class XCoreSubtarget;
|
||||||
|
|
||||||
class XCoreFrameLowering: public TargetFrameLowering {
|
class XCoreFrameLowering: public TargetFrameLowering {
|
||||||
const XCoreSubtarget &STI;
|
|
||||||
public:
|
public:
|
||||||
XCoreFrameLowering(const XCoreSubtarget &STI);
|
XCoreFrameLowering(const XCoreSubtarget &STI);
|
||||||
|
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ int main(int argc, char **argv) {
|
|||||||
// using the standard profile info provider pass, but for now this gives us
|
// using the standard profile info provider pass, but for now this gives us
|
||||||
// access to additional information not exposed via the ProfileInfo
|
// access to additional information not exposed via the ProfileInfo
|
||||||
// interface.
|
// interface.
|
||||||
ProfileInfoLoader PIL(argv[0], ProfileDataFile, *M);
|
ProfileInfoLoader PIL(argv[0], ProfileDataFile);
|
||||||
|
|
||||||
// Run the printer pass.
|
// Run the printer pass.
|
||||||
PassManager PassMgr;
|
PassManager PassMgr;
|
||||||
|
|||||||
@@ -167,13 +167,13 @@ TEST(TypeBuilderTest, Context) {
|
|||||||
&(TypeBuilder<types::i<1>, true>::get(context2))->getContext());
|
&(TypeBuilder<types::i<1>, true>::get(context2))->getContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyType {
|
struct MyType {
|
||||||
int a;
|
int a;
|
||||||
int *b;
|
int *b;
|
||||||
void *array[1];
|
void *array[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyPortableType {
|
struct MyPortableType {
|
||||||
int32_t a;
|
int32_t a;
|
||||||
int32_t *b;
|
int32_t *b;
|
||||||
void *array[1];
|
void *array[1];
|
||||||
|
|||||||
@@ -23,10 +23,9 @@ namespace llvm {
|
|||||||
/// and emission of the instruction selector.
|
/// and emission of the instruction selector.
|
||||||
///
|
///
|
||||||
class DAGISelEmitter : public TableGenBackend {
|
class DAGISelEmitter : public TableGenBackend {
|
||||||
RecordKeeper &Records;
|
|
||||||
CodeGenDAGPatterns CGP;
|
CodeGenDAGPatterns CGP;
|
||||||
public:
|
public:
|
||||||
explicit DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
|
explicit DAGISelEmitter(RecordKeeper &R) : CGP(R) {}
|
||||||
|
|
||||||
// run - Output the isel, returning true on failure.
|
// run - Output the isel, returning true on failure.
|
||||||
void run(raw_ostream &OS);
|
void run(raw_ostream &OS);
|
||||||
|
|||||||
Reference in New Issue
Block a user