aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PTX
diff options
context:
space:
mode:
authorChe-Liang Chiou <clchiou@gmail.com>2011-03-18 11:23:56 +0000
committerChe-Liang Chiou <clchiou@gmail.com>2011-03-18 11:23:56 +0000
commit8902ecb6826d0677c32f1fb9aac41070fee1ac7d (patch)
treea090b42e2664203411cd7769f02b7639beb93bef /lib/Target/PTX
parent88d3367baa066b4924a9303291aee084c154fff1 (diff)
downloadexternal_llvm-8902ecb6826d0677c32f1fb9aac41070fee1ac7d.zip
external_llvm-8902ecb6826d0677c32f1fb9aac41070fee1ac7d.tar.gz
external_llvm-8902ecb6826d0677c32f1fb9aac41070fee1ac7d.tar.bz2
ptx: fix parameter order that is reversed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PTX')
-rw-r--r--lib/Target/PTX/PTXAsmPrinter.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/PTX/PTXAsmPrinter.cpp b/lib/Target/PTX/PTXAsmPrinter.cpp
index 19a699e..dd3e895 100644
--- a/lib/Target/PTX/PTXAsmPrinter.cpp
+++ b/lib/Target/PTX/PTXAsmPrinter.cpp
@@ -381,9 +381,8 @@ void PTXAsmPrinter::EmitFunctionDeclaration() {
decl += " (";
if (isKernel) {
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;
+ for(PTXMachineFunctionInfo::reg_iterator
+ i = MFI->argRegBegin(), e = MFI->argRegEnd(), b = i;
i != e; ++i) {
reg = *i;
assert(reg != PTX::NoRegister && "Not a valid register!");
@@ -396,8 +395,8 @@ void PTXAsmPrinter::EmitFunctionDeclaration() {
decl += utostr(++cnt);
}
} else {
- for (PTXMachineFunctionInfo::reg_reverse_iterator
- i = MFI->argRegReverseBegin(), e = MFI->argRegReverseEnd(), b = i;
+ for (PTXMachineFunctionInfo::reg_iterator
+ i = MFI->argRegBegin(), e = MFI->argRegEnd(), b = i;
i != e; ++i) {
reg = *i;
assert(reg != PTX::NoRegister && "Not a valid register!");