[all-commits] [llvm/llvm-project] 43a9d5: [KeyInstr] Add Atom Group waterline to LLVMContext...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Tue May 6 03:43:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 43a9d5dfd52d3845596d20b62159147cd276d343
      https://github.com/llvm/llvm-project/commit/43a9d5dfd52d3845596d20b62159147cd276d343
  Author: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
  Date:   2025-05-06 (Tue, 06 May 2025)

  Changed paths:
    M llvm/include/llvm/IR/LLVMContext.h
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/IR/LLVMContext.cpp
    M llvm/lib/IR/LLVMContextImpl.h
    M llvm/unittests/IR/MetadataTest.cpp

  Log Message:
  -----------
  [KeyInstr] Add Atom Group waterline to LLVMContext (#133478)

Source location atoms are identified by a function-local number and the
DILocation's InlinedAt field. The front end is responsible for assigning source
atom numbers, but certain optimisations need to assign new atom numbers to some
instructions. Most often code duplication optimisations like loop
unroll. Tracking a global maximum value (waterline) means we can easily
(cheaply) get new numbers that don't clash in any function.

The waterline is managed through DILocation creation,
LLVMContext::incNextAtomGroup, and LLVMContext::updateAtomGroupWaterline.

Add unittest.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list