[PATCH] D86053: [APInt] Allow self-assignment with libstdc++
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 04:25:45 PDT 2020
RKSimon added a comment.
In D86053#2225049 <https://reviews.llvm.org/D86053#2225049>, @vitalybuka wrote:
> I would prefer to remove if def completly and always compile with if (this == &that)
> Original patch justified removing of (this == &that) to save 4k. I don't think it's worth it.
> However if want to remove this from release maybe we should do the following, as EXPENSIVE_CHECKS is the one who triggers std::shuffle in llvm::sort?
>
> #ifdef EXPENSIVE_CHECKS
> if (this == &that)
> return *this;
> #endif
This makes sense to me - we keep the codesize savings on main builds and we have a better chance of seeing self-moves on windows bots.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86053/new/
https://reviews.llvm.org/D86053
More information about the llvm-commits
mailing list