[all-commits] [llvm/llvm-project] f18429: [DebugInfo][InstrRef][NFC] Add a missing assignmen...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Mon Jan 31 08:09:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f18429372f12b571aef539855c4dbef23a96f494
      https://github.com/llvm/llvm-project/commit/f18429372f12b571aef539855c4dbef23a96f494
  Author: Jeremy Morse <jmorse+git at studentrobotics.org>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h

  Log Message:
  -----------
  [DebugInfo][InstrRef][NFC] Add a missing assignment operator

ValueIDNum is supposed to be a value type that boils down to a uint64_t,
that has some bitfields for convenience. If we use the default operator=,
we end up with each bit field being individually assigned, which is
un-necessarily slow.

Implement the assignment operator by just copying the uint64_t value of
the object. This is quicker, and matches how the comparison operators
work already. Doing so is 0.1% faster on the compile-time-tracker.




More information about the All-commits mailing list