[llvm-commits] [llvm] r62428 - /llvm/trunk/include/llvm/Support/CallSite.h

Gabor Greif ggreif at gmail.com
Sat Jan 17 11:03:45 PST 2009


Author: ggreif
Date: Sat Jan 17 13:03:45 2009
New Revision: 62428

URL: http://llvm.org/viewvc/llvm-project?rev=62428&view=rev
Log:
make comparisons a bist faster

Modified:
    llvm/trunk/include/llvm/Support/CallSite.h

Modified: llvm/trunk/include/llvm/Support/CallSite.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CallSite.h?rev=62428&r1=62427&r2=62428&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/CallSite.h (original)
+++ llvm/trunk/include/llvm/Support/CallSite.h Sat Jan 17 13:03:45 2009
@@ -43,11 +43,9 @@
   CallSite(const CallSite &CS) : I(CS.I) {}
   CallSite &operator=(const CallSite &CS) { I = CS.I; return *this; }
 
-  bool operator==(const CallSite &CS) const { return getInstruction()
-                                                == CS.getInstruction(); }
-  bool operator!=(const CallSite &CS) const { return getInstruction()
-                                                != CS.getInstruction(); }
-  
+  bool operator==(const CallSite &CS) const { return I == CS.I; }
+  bool operator!=(const CallSite &CS) const { return I != CS.I; }
+
   /// CallSite::get - This static method is sort of like a constructor.  It will
   /// create an appropriate call site for a Call or Invoke instruction, but it
   /// can also create a null initialized CallSite object for something which is





More information about the llvm-commits mailing list