[llvm-branch-commits] [llvm-branch] r109194 - /llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp
Gabor Greif
ggreif at gmail.com
Thu Jul 22 16:01:32 PDT 2010
Author: ggreif
Date: Thu Jul 22 18:01:32 2010
New Revision: 109194
URL: http://llvm.org/viewvc/llvm-project?rev=109194&view=rev
Log:
add a simplistic getImpliedUser<3>, but no workee yet
Modified:
llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp
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=109194&r1=109193&r2=109194&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64/lib/VMCore/Use.cpp Thu Jul 22 18:01:32 2010
@@ -50,7 +50,33 @@
template <>
const Use *Use::getImpliedUser<3>(const Use *Current) {
- return getImpliedUser<2>(Current);
+ while (true) {
+ unsigned Tag = (Current++)->Prev.getInt();
+ if (Tag < stop64Tag)
+ continue;
+ switch (Tag) {
+ case stop64Tag: {
+ ptrdiff_t Offset = 0;
+ while (true) {
+ unsigned Tag = Current->Prev.getInt();
+ switch (Tag) {
+ case zero64Tag:
+ case one64Tag:
+ case two64Tag:
+ case three64Tag:
+ ++Current;
+ Offset = (Offset << 2) + Tag;
+ continue;
+ default:
+ return Current + Offset;
+ }
+ }
+ }
+
+ case fullStopTag:
+ return Current;
+ }
+ }
}
template <>
More information about the llvm-branch-commits
mailing list