From a1daa7d079aa86589ac7e73e818d4ab95969275f Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 31 Jan 2020 16:55:35 -0800 Subject: [PATCH] Avoid std::tie in TypeSize.h std::tie isn't saving much here, just use == && ==. No numbers to support this, but std::tie is one of the most expensive instantiations. --- llvm/include/llvm/Support/TypeSize.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/include/llvm/Support/TypeSize.h b/llvm/include/llvm/Support/TypeSize.h index 459ffb742d5..7f05ed359ca 100644 --- a/llvm/include/llvm/Support/TypeSize.h +++ b/llvm/include/llvm/Support/TypeSize.h @@ -16,7 +16,6 @@ #define LLVM_SUPPORT_TYPESIZE_H #include -#include namespace llvm { @@ -70,8 +69,7 @@ public: // not guaranteed to be the same size at runtime, so they are never // considered to be equal. friend bool operator==(const TypeSize &LHS, const TypeSize &RHS) { - return std::tie(LHS.MinSize, LHS.IsScalable) == - std::tie(RHS.MinSize, RHS.IsScalable); + return LHS.MinSize == RHS.MinSize && LHS.IsScalable == RHS.IsScalable; } friend bool operator!=(const TypeSize &LHS, const TypeSize &RHS) { -- 2.11.0