[all-commits] [llvm/llvm-project] d18bb2: [Attributor][NFC] Do not create temporary maps dur...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Apr 16 00:34:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d18bb247492face84966f6c1c32e479e5e026f1d
      https://github.com/llvm/llvm-project/commit/d18bb247492face84966f6c1c32e479e5e026f1d
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list