[all-commits] [llvm/llvm-project] 384f91: Reapply 34cdc913214fd (#74455), call-site-splittin...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Wed Dec 6 08:53:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 384f916ea899ea6ac9af4a3fb9d0a5b03937acfe
      https://github.com/llvm/llvm-project/commit/384f916ea899ea6ac9af4a3fb9d0a5b03937acfe
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2023-12-06 (Wed, 06 Dec 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp

  Log Message:
  -----------
  Reapply 34cdc913214fd (#74455), call-site-splitting for RemoveDIs

Original commit message below; asan complained about this commit because it
transpires that the final comparison with CurrentI is in fact a comparison
of a pointer that has been freed. This seems to work fine most of the time,
but using the iterator for such an instruction causes the freed instruction
memory to be accessed, causing a use-after-free. The fix is to perform the
comparison as an instruction, not an iterator.

[NFC][DebugInfo][RemoveDIs] Use iterators to insert in callsite-splitting (#74455)

This patch gets call site splitting to use iterators for insertion
rather than instruction pointers. When we switch on non-instr debug-info
this becomes significant, as the iterators are going to signal whether
or not a position is before or after debug-info.

NFC as this isn't going to affect the output of any existing test.




More information about the All-commits mailing list