mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
ptx: fix lint and compiler warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126838 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f48817cbf9
commit
31c488c8bd
@ -361,7 +361,8 @@ void PTXAsmPrinter::EmitFunctionDeclaration() {
|
||||
unsigned cnt = 0;
|
||||
//for (int i = 0, e = MFI->getNumArg(); i != e; ++i) {
|
||||
for(PTXMachineFunctionInfo::reg_reverse_iterator
|
||||
i = MFI->argRegReverseBegin(), e = MFI->argRegReverseEnd(), b = i; i != e; ++i) {
|
||||
i = MFI->argRegReverseBegin(), e = MFI->argRegReverseEnd(), b = i;
|
||||
i != e; ++i) {
|
||||
reg = *i;
|
||||
assert(reg != PTX::NoRegister && "Not a valid register!");
|
||||
if (i != b)
|
||||
@ -374,7 +375,8 @@ void PTXAsmPrinter::EmitFunctionDeclaration() {
|
||||
}
|
||||
} else {
|
||||
for (PTXMachineFunctionInfo::reg_reverse_iterator
|
||||
i = MFI->argRegReverseBegin(), e = MFI->argRegReverseEnd(), b = i; i != e; ++i) {
|
||||
i = MFI->argRegReverseBegin(), e = MFI->argRegReverseEnd(), b = i;
|
||||
i != e; ++i) {
|
||||
reg = *i;
|
||||
assert(reg != PTX::NoRegister && "Not a valid register!");
|
||||
if (i != b)
|
||||
|
@ -36,23 +36,25 @@ extern "C" void LLVMInitializePTXTarget() {
|
||||
}
|
||||
|
||||
namespace {
|
||||
const char* DataLayout32 = "e-p:32:32-i64:32:32-f64:32:32-v128:32:128-v64:32:64-n32:64";
|
||||
const char* DataLayout64 = "e-p:64:64-i64:32:32-f64:32:32-v128:32:128-v64:32:64-n32:64";
|
||||
const char* DataLayout32 =
|
||||
"e-p:32:32-i64:32:32-f64:32:32-v128:32:128-v64:32:64-n32:64";
|
||||
const char* DataLayout64 =
|
||||
"e-p:64:64-i64:32:32-f64:32:32-v128:32:128-v64:32:64-n32:64";
|
||||
}
|
||||
|
||||
// DataLayout and FrameLowering are filled with dummy data
|
||||
PTXTargetMachine::PTXTargetMachine(const Target &T,
|
||||
const std::string &TT,
|
||||
const std::string &FS)
|
||||
: Subtarget(TT, FS),
|
||||
: LLVMTargetMachine(T, TT),
|
||||
// FIXME: This feels like a dirty hack, but Subtarget does not appear to be
|
||||
// initialized at this point, and we need to finish initialization of
|
||||
// DataLayout.
|
||||
DataLayout((FS.find("64bit") != FS.npos) ? DataLayout64 : DataLayout32),
|
||||
LLVMTargetMachine(T, TT),
|
||||
Subtarget(TT, FS),
|
||||
FrameLowering(Subtarget),
|
||||
TLInfo(*this),
|
||||
InstrInfo(*this) {
|
||||
InstrInfo(*this),
|
||||
TLInfo(*this) {
|
||||
}
|
||||
|
||||
bool PTXTargetMachine::addInstSelector(PassManagerBase &PM,
|
||||
|
@ -26,10 +26,10 @@ namespace llvm {
|
||||
class PTXTargetMachine : public LLVMTargetMachine {
|
||||
private:
|
||||
const TargetData DataLayout;
|
||||
PTXSubtarget Subtarget; // has to be initialized before FrameLowering
|
||||
PTXFrameLowering FrameLowering;
|
||||
PTXInstrInfo InstrInfo;
|
||||
PTXTargetLowering TLInfo;
|
||||
PTXSubtarget Subtarget;
|
||||
|
||||
public:
|
||||
PTXTargetMachine(const Target &T, const std::string &TT,
|
||||
|
Loading…
Reference in New Issue
Block a user