[llvm-commits] [llvm] r141182 - /llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp
Duncan Sands
baldrick at free.fr
Wed Oct 5 08:11:20 PDT 2011
Author: baldrick
Date: Wed Oct 5 10:11:08 2011
New Revision: 141182
URL: http://llvm.org/viewvc/llvm-project?rev=141182&view=rev
Log:
Remove a bunch of unused variables in the PTX backend (warned about by gcc-4.6).
Modified:
llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp
Modified: llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp?rev=141182&r1=141181&r2=141182&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXISelLowering.cpp Wed Oct 5 10:11:08 2011
@@ -237,36 +237,22 @@
for (unsigned i = 0, e = Ins.size(); i != e; ++i) {
EVT RegVT = Ins[i].VT;
TargetRegisterClass* TRC = 0;
- int OpCode;
// Determine which register class we need
- if (RegVT == MVT::i1) {
+ if (RegVT == MVT::i1)
TRC = PTX::RegPredRegisterClass;
- OpCode = PTX::READPARAMPRED;
- }
- else if (RegVT == MVT::i16) {
+ else if (RegVT == MVT::i16)
TRC = PTX::RegI16RegisterClass;
- OpCode = PTX::READPARAMI16;
- }
- else if (RegVT == MVT::i32) {
+ else if (RegVT == MVT::i32)
TRC = PTX::RegI32RegisterClass;
- OpCode = PTX::READPARAMI32;
- }
- else if (RegVT == MVT::i64) {
+ else if (RegVT == MVT::i64)
TRC = PTX::RegI64RegisterClass;
- OpCode = PTX::READPARAMI64;
- }
- else if (RegVT == MVT::f32) {
+ else if (RegVT == MVT::f32)
TRC = PTX::RegF32RegisterClass;
- OpCode = PTX::READPARAMF32;
- }
- else if (RegVT == MVT::f64) {
+ else if (RegVT == MVT::f64)
TRC = PTX::RegF64RegisterClass;
- OpCode = PTX::READPARAMF64;
- }
- else {
+ else
llvm_unreachable("Unknown parameter type");
- }
// Use a unique index in the instruction to prevent instruction folding.
// Yes, this is a hack.
@@ -275,10 +261,6 @@
SDValue ArgValue = DAG.getNode(PTXISD::READ_PARAM, dl, RegVT, Chain,
Index);
- SDValue Flag = ArgValue.getValue(1);
-
- SDValue Copy = DAG.getCopyFromReg(Chain, dl, Reg, RegVT);
- SDValue RegValue = DAG.getRegister(Reg, RegVT);
InVals.push_back(ArgValue);
MFI->addArgReg(Reg);
More information about the llvm-commits
mailing list