aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2021-04-15 12:24:47 -0700
committerCraig Topper <craig.topper@sifive.com>2021-04-15 12:32:21 -0700
commit07edd789939238d309d2ab747fad79337d705909 (patch)
tree0026438cce0d187dc4b039d153920e6c5205cee5 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent13015ebd6f568f98e9b908564195f03f8f0d02a9 (diff)
downloadllvm-07edd789939238d309d2ab747fad79337d705909.zip
llvm-07edd789939238d309d2ab747fad79337d705909.tar.gz
llvm-07edd789939238d309d2ab747fad79337d705909.tar.bz2
[TableGen] Reduce the number of map lookups in TypeSetByHwMode::getOrCreate. NFCI
hasMode was looking up the map once. Then we'd either call get which would look up again, or we'd insert into the map which requires walking the map to find the insertion point. I believe the hasMode was needed because get has a special case to look for DefaultMode if the mode being asked for doesn't exist. We don't want that here so we were using hasMode to make sure we wouldn't hit that case. Simplify to a regular operator[] access which will default construct a SetType if the lookup fails.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
0 files changed, 0 insertions, 0 deletions