[all-commits] [llvm/llvm-project] 97f7e4: [RISC] Replace dyn_casts that are only checked by ...

Craig Topper via All-commits all-commits at lists.llvm.org
Sat Jan 16 21:33:53 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 97f7e4e8c9309e0806f9b8f8afcf8ce2ef63656c
      https://github.com/llvm/llvm-project/commit/97f7e4e8c9309e0806f9b8f8afcf8ce2ef63656c
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-01-16 (Sat, 16 Jan 2021)

  Changed paths:
    M llvm/utils/TableGen/RISCVCompressInstEmitter.cpp

  Log Message:
  -----------
  [RISC] Replace dyn_casts that are only checked by an assert with a cast. NFC


  Commit: 2b6a92625fdf11928bff1a31cdc06d7dbd193f85
      https://github.com/llvm/llvm-project/commit/2b6a92625fdf11928bff1a31cdc06d7dbd193f85
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-01-16 (Sat, 16 Jan 2021)

  Changed paths:
    M llvm/utils/TableGen/RISCVCompressInstEmitter.cpp

  Log Message:
  -----------
  [RISCV] Simplify mergeCondAndCode in RISCVCompressInstEmitter.cpp. NFC

Instead forming a std::string and returning it to pass into another
raw_ostream, just pass the raw_ostream as a parameter.

Take StringRef as arguments instead raw_string_ostream references
making the caller responsible for converting to strings. Use
StringRef operations instead of std::string::substr.a


  Commit: 1327c730bb9a0bff963af3745869cf244ae37241
      https://github.com/llvm/llvm-project/commit/1327c730bb9a0bff963af3745869cf244ae37241
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-01-16 (Sat, 16 Jan 2021)

  Changed paths:
    M llvm/utils/TableGen/RISCVCompressInstEmitter.cpp

  Log Message:
  -----------
  [RISCV] Few more minor cleanups to RISCVCompressInstEmitter. NFC

-Use StringRef instead of std::string.
-Const correct a parameter.
-Don't call StringRef::data() before printing. Just pass the StringRef.


  Commit: 061f681c0dfa4d279dc656802bf81f3b9bfa3d34
      https://github.com/llvm/llvm-project/commit/061f681c0dfa4d279dc656802bf81f3b9bfa3d34
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-01-16 (Sat, 16 Jan 2021)

  Changed paths:
    M llvm/utils/TableGen/RISCVCompressInstEmitter.cpp

  Log Message:
  -----------
  [RISCV] Remove an extra map lookup from RISCVCompressInstEmitter. NFC

When we looked up the map to see if the entry already existed,
this created the new entry for us. So save a reference to it so
we can use it to update the entry instead of looking it up again.

Also remove unnecessary StringRef constructors around string
literals on calls to this function.


Compare: https://github.com/llvm/llvm-project/compare/633c5afccfbb...061f681c0dfa


More information about the All-commits mailing list