Remove the bitwise XOR operator from the Attributes class. Replace it with the equiva...
authorBill Wendling <isanbard@gmail.com>
Sun, 14 Oct 2012 06:56:13 +0000 (06:56 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 14 Oct 2012 06:56:13 +0000 (06:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165893 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 5b614e91072e69d38bacb491c330cb72a49b1156..c8f723a7dcffe43c3129bb1ea3df12d351a5920f 100644 (file)
@@ -236,7 +236,6 @@ public:
 
   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);
 
index 09e30eba57954a4c7080d5a2b3d56fc4d0416470..110a294020a651b9ad6c7c2aa45f5f8969224214 100644 (file)
@@ -314,8 +314,8 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, Attributes CalleeRetAttr,
   // 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.
index 4d31444b7641aef197a259f9552918a741dd405e..665d5b01716b08552e47720fee33775aaa3012f0 100644 (file)
@@ -774,8 +774,10 @@ bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) {
     // 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
index 326afc7ba93ad8f3e4883d3abc3e62b71a1fac87..e70efc54fa70f30397a4f40578c4e3810c629e77 100644 (file)
@@ -99,9 +99,6 @@ Attributes Attributes::operator | (const Attributes &A) const {
 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;