[llvm-branch-commits] [llvm-branch] r109188 - in /llvm/branches/ggreif/waymark-64: include/llvm/Use.h lib/VMCore/Use.cpp
Gabor Greif
ggreif at gmail.com
Thu Jul 22 15:26:34 PDT 2010
Author: ggreif
Date: Thu Jul 22 17:26:34 2010
New Revision: 109188
URL: http://llvm.org/viewvc/llvm-project?rev=109188&view=rev
Log:
parametrize initTags
Modified:
llvm/branches/ggreif/waymark-64/include/llvm/Use.h
llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp
Modified: llvm/branches/ggreif/waymark-64/include/llvm/Use.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/waymark-64/include/llvm/Use.h?rev=109188&r1=109187&r2=109188&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64/include/llvm/Use.h (original)
+++ llvm/branches/ggreif/waymark-64/include/llvm/Use.h Thu Jul 22 17:26:34 2010
@@ -119,6 +119,7 @@
template <unsigned>
static const Use* getImpliedUser(const Use*);
inline const Use* getImpliedUser() const;
+ template <unsigned>
static Use *initTags(Use *Start, Use *Stop, ptrdiff_t Done = 0);
Value *Val;
@@ -149,6 +150,10 @@
inline const Use* Use::getImpliedUser() const {
return getImpliedUser<availableTagBits>(this);
}
+template <>
+Use *Use::initTags<2>(Use *Start, Use *Stop, ptrdiff_t Done);
+template <>
+Use *Use::initTags<3>(Use *Start, Use *Stop, ptrdiff_t Done);
// simplify_type - Allow clients to treat uses just like values when using
// casting operators.
Modified: llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp?rev=109188&r1=109187&r2=109188&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp Thu Jul 22 17:26:34 2010
@@ -86,10 +86,11 @@
}
//===----------------------------------------------------------------------===//
-// Use initTags Implementation
+// Use initTags Implementations
//===----------------------------------------------------------------------===//
-Use *Use::initTags(Use * const Start, Use *Stop, ptrdiff_t Done) {
+template <>
+Use *Use::initTags<Use::availableTagBits>(Use * const Start, Use *Stop, ptrdiff_t Done) {
while (Done < 20) {
if (Start == Stop--)
return Start;
@@ -177,7 +178,7 @@
PointerIntPair<User*, 1, Tag>& ref(static_cast<AugmentedUse&>(End[-1]).ref);
ref.setPointer(const_cast<User*>(this));
ref.setInt(tagOne);
- return Use::initTags(Begin, End);
+ return Use::initTags<Use::availableTagBits>(Begin, End);
}
//===----------------------------------------------------------------------===//
@@ -191,7 +192,7 @@
User *Obj = reinterpret_cast<User*>(End);
Obj->OperandList = Start;
Obj->NumOperands = Us;
- Use::initTags(Start, End);
+ Use::initTags<Use::availableTagBits>(Start, End);
return Obj;
}
@@ -216,7 +217,7 @@
User *Obj = reinterpret_cast<User*>(End);
Obj->OperandList = Start;
Obj->NumOperands = Us;
- Use::initTags(Start, End);
+ Use::initTags<Use::availableTagBits>(Start, End);
return Obj;
}
More information about the llvm-branch-commits
mailing list