[Attributor][NFC] Do not create temporary maps during lookup
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 15 Apr 2020 07:14:56 +0000 (02:14 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 16 Apr 2020 07:32:31 +0000 (02:32 -0500)
commitd18bb247492face84966f6c1c32e479e5e026f1d
tree312a5f01ed14539ac0d74fc427bf93e13e526502
parente5d666d76837f7b808452b24dce646bf18ee6e40
[Attributor][NFC] Do not create temporary maps during lookup

The AAMap.lookup() call created a temporary value if the key was not
present. Since the value was another map it was not free to create it.
Instead of a lookup we now use find and compare the result against the
end iterator explicitly. The result is the same but we never need to
create a temporary map.
llvm/include/llvm/Transforms/IPO/Attributor.h