[all-commits] [llvm/llvm-project] 390572: [RISCV] Use std::map::count != 0 instead of std::m...
Craig Topper via All-commits
all-commits at lists.llvm.org
Thu Jan 27 12:17:12 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 39057240f59b348e42c9807ab0d6eb85ccc229ad
https://github.com/llvm/llvm-project/commit/39057240f59b348e42c9807ab0d6eb85ccc229ad
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-01-27 (Thu, 27 Jan 2022)
Changed paths:
M llvm/lib/Support/RISCVISAInfo.cpp
Log Message:
-----------
[RISCV] Use std::map::count != 0 instead of std::map::count == 1. NFC
Maps always return 0 or 1 for count. Comparing to 0 can create
simpler compiled code.
Someday we'll get to use std::map::contains.
More information about the All-commits
mailing list