[llvm] r296990 - [APInt] Remove the And/Or/Xor/Not functions from the APIntOps namespace.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 5 08:41:11 PST 2017


Author: ctopper
Date: Sun Mar  5 10:41:11 2017
New Revision: 296990

URL: http://llvm.org/viewvc/llvm-project?rev=296990&view=rev
Log:
[APInt] Remove the And/Or/Xor/Not functions from the APIntOps namespace.

Summary:
They aren't used anywhere in tree and its preferable to use the &, |, ^, or ~ operators.

With my patch to add rvalue reference support to &, |, ^ operators it also becomes less performant to use these functions.

Reviewers: RKSimon, davide, hans

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D30613

Modified:
    llvm/trunk/include/llvm/ADT/APInt.h

Modified: llvm/trunk/include/llvm/ADT/APInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=296990&r1=296989&r2=296990&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APInt.h (original)
+++ llvm/trunk/include/llvm/ADT/APInt.h Sun Mar  5 10:41:11 2017
@@ -1992,27 +1992,6 @@ inline APInt add(const APInt &LHS, const
 /// Performs subtraction on APInt values.
 inline APInt sub(const APInt &LHS, const APInt &RHS) { return LHS - RHS; }
 
-/// \brief Bitwise AND function for APInt.
-///
-/// Performs bitwise AND operation on APInt LHS and
-/// APInt RHS.
-inline APInt And(const APInt &LHS, const APInt &RHS) { return LHS & RHS; }
-
-/// \brief Bitwise OR function for APInt.
-///
-/// Performs bitwise OR operation on APInt LHS and APInt RHS.
-inline APInt Or(const APInt &LHS, const APInt &RHS) { return LHS | RHS; }
-
-/// \brief Bitwise XOR function for APInt.
-///
-/// Performs bitwise XOR operation on APInt.
-inline APInt Xor(const APInt &LHS, const APInt &RHS) { return LHS ^ RHS; }
-
-/// \brief Bitwise complement function.
-///
-/// Performs a bitwise complement operation on APInt.
-inline APInt Not(const APInt &APIVal) { return ~APIVal; }
-
 } // End of APIntOps namespace
 
 // See friend declaration above. This additional declaration is required in




More information about the llvm-commits mailing list