PTX: Fix parameter order bug

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Holewinski 2011-09-23 17:59:11 +00:00
parent 2e3441e5e5
commit a5745569b6
2 changed files with 8 additions and 8 deletions

View File

@ -32,7 +32,7 @@ unsigned PTXParamManager::addArgumentParam(unsigned Size) {
unsigned Index = AllParams.size();
AllParams[Index] = Param;
ArgumentParams.insert(Index);
ArgumentParams.push_back(Index);
return Index;
}
@ -49,7 +49,7 @@ unsigned PTXParamManager::addReturnParam(unsigned Size) {
unsigned Index = AllParams.size();
AllParams[Index] = Param;
ReturnParams.insert(Index);
ReturnParams.push_back(Index);
return Index;
}
@ -66,7 +66,7 @@ unsigned PTXParamManager::addLocalParam(unsigned Size) {
unsigned Index = AllParams.size();
AllParams[Index] = Param;
LocalParams.insert(Index);
LocalParams.push_back(Index);
return Index;
}

View File

@ -16,7 +16,7 @@
#define PTX_PARAM_MANAGER_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallVector.h"
namespace llvm {
@ -40,13 +40,13 @@ private:
};
DenseMap<unsigned, PTXParam> AllParams;
DenseSet<unsigned> ArgumentParams;
DenseSet<unsigned> ReturnParams;
DenseSet<unsigned> LocalParams;
SmallVector<unsigned, 4> ArgumentParams;
SmallVector<unsigned, 4> ReturnParams;
SmallVector<unsigned, 4> LocalParams;
public:
typedef DenseSet<unsigned>::const_iterator param_iterator;
typedef SmallVector<unsigned, 4>::const_iterator param_iterator;
PTXParamManager();