[llvm-commits] [llvm] r126838 - in /llvm/trunk/lib/Target/PTX: PTXAsmPrinter.cpp PTXTargetMachine.cpp PTXTargetMachine.h
Che-Liang Chiou
clchiou at gmail.com
Tue Mar 1 23:58:46 PST 2011
Author: clchiou
Date: Wed Mar 2 01:58:46 2011
New Revision: 126838
URL: http://llvm.org/viewvc/llvm-project?rev=126838&view=rev
Log:
ptx: fix lint and compiler warnings
Modified:
llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp
llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
llvm/trunk/lib/Target/PTX/PTXTargetMachine.h
Modified: llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp?rev=126838&r1=126837&r2=126838&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp Wed Mar 2 01:58:46 2011
@@ -361,7 +361,8 @@
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 @@
}
} 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)
Modified: llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp?rev=126838&r1=126837&r2=126838&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp Wed Mar 2 01:58:46 2011
@@ -36,23 +36,25 @@
}
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,
Modified: llvm/trunk/lib/Target/PTX/PTXTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXTargetMachine.h?rev=126838&r1=126837&r2=126838&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXTargetMachine.h (original)
+++ llvm/trunk/lib/Target/PTX/PTXTargetMachine.h Wed Mar 2 01:58:46 2011
@@ -26,10 +26,10 @@
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,
More information about the llvm-commits
mailing list