[all-commits] [llvm/llvm-project] 5ef2cb: [FormatVariadic] Reduce allocations

Benjamin Kramer via All-commits all-commits at lists.llvm.org
Sat Apr 11 05:54:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ef2cb3df4ce261ec0ec647f38495d2bf32b996e
      https://github.com/llvm/llvm-project/commit/5ef2cb3df4ce261ec0ec647f38495d2bf32b996e
  Author: Benjamin Kramer <benny.kra at googlemail.com>
  Date:   2020-04-11 (Sat, 11 Apr 2020)

  Changed paths:
    M llvm/include/llvm/Support/FormatVariadic.h
    M llvm/lib/Support/FormatVariadic.cpp

  Log Message:
  -----------
  [FormatVariadic] Reduce allocations

- Move Adapters array to the stack, we know the size precisely
- Parse format string on demand into a SmallVector. In theory this could
  lead to parsing it multiple times, but I couldn't find a single instance
  of that in LLVM.
- Make more of the implementation details private.


  Commit: e590bd6b921a247e0fb98259d57bc4c8e61d1890
      https://github.com/llvm/llvm-project/commit/e590bd6b921a247e0fb98259d57bc4c8e61d1890
  Author: Benjamin Kramer <benny.kra at googlemail.com>
  Date:   2020-04-11 (Sat, 11 Apr 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp

  Log Message:
  -----------
  [argpromote] Use formatv to simplify code. NFCI.


Compare: https://github.com/llvm/llvm-project/compare/512600e3c0db...e590bd6b921a


More information about the All-commits mailing list