[llvm-commits] [llvm] r165893 - in /llvm/trunk: include/llvm/Attributes.h lib/CodeGen/Analysis.cpp lib/Transforms/Scalar/CodeGenPrepare.cpp lib/VMCore/Attributes.cpp

Bill Wendling isanbard at gmail.com
Sat Oct 13 23:56:13 PDT 2012


Author: void
Date: Sun Oct 14 01:56:13 2012
New Revision: 165893

URL: http://llvm.org/viewvc/llvm-project?rev=165893&view=rev
Log:
Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.

Modified:
    llvm/trunk/include/llvm/Attributes.h
    llvm/trunk/lib/CodeGen/Analysis.cpp
    llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
    llvm/trunk/lib/VMCore/Attributes.cpp

Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=165893&r1=165892&r2=165893&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Sun Oct 14 01:56:13 2012
@@ -236,7 +236,6 @@
 
   Attributes operator | (const Attributes &A) const;
   Attributes operator & (const Attributes &A) const;
-  Attributes operator ^ (const Attributes &A) const;
   Attributes &operator |= (const Attributes &A);
   Attributes &operator &= (const Attributes &A);
 

Modified: llvm/trunk/lib/CodeGen/Analysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Analysis.cpp?rev=165893&r1=165892&r2=165893&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Analysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/Analysis.cpp Sun Oct 14 01:56:13 2012
@@ -314,8 +314,8 @@
   // the return. Ignore noalias because it doesn't affect the call sequence.
   const Function *F = ExitBB->getParent();
   Attributes CallerRetAttr = F->getAttributes().getRetAttributes();
-  if (Attributes::Builder(CalleeRetAttr ^ CallerRetAttr)
-      .removeAttribute(Attributes::NoAlias).hasAttributes())
+  if (Attributes::Builder(CalleeRetAttr).removeAttribute(Attributes::NoAlias) !=
+      Attributes::Builder(CallerRetAttr).removeAttribute(Attributes::NoAlias))
     return false;
 
   // It's not safe to eliminate the sign / zero extension of the return value.

Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=165893&r1=165892&r2=165893&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Sun Oct 14 01:56:13 2012
@@ -774,8 +774,10 @@
     // Conservatively require the attributes of the call to match those of the
     // return. Ignore noalias because it doesn't affect the call sequence.
     Attributes CalleeRetAttr = CS.getAttributes().getRetAttributes();
-    if (Attributes::Builder(CalleeRetAttr ^ CallerRetAttr)
-        .removeAttribute(Attributes::NoAlias).hasAttributes())
+    if (Attributes::Builder(CalleeRetAttr).
+          removeAttribute(Attributes::NoAlias) !=
+        Attributes::Builder(CallerRetAttr).
+          removeAttribute(Attributes::NoAlias))
       continue;
 
     // Make sure the call instruction is followed by an unconditional branch to

Modified: llvm/trunk/lib/VMCore/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=165893&r1=165892&r2=165893&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Attributes.cpp (original)
+++ llvm/trunk/lib/VMCore/Attributes.cpp Sun Oct 14 01:56:13 2012
@@ -99,9 +99,6 @@
 Attributes Attributes::operator & (const Attributes &A) const {
   return Attributes(Raw() & A.Raw());
 }
-Attributes Attributes::operator ^ (const Attributes &A) const {
-  return Attributes(Raw() ^ A.Raw());
-}
 Attributes &Attributes::operator |= (const Attributes &A) {
   Attrs.Bits |= A.Raw();
   return *this;





More information about the llvm-commits mailing list