[all-commits] [llvm/llvm-project] 6462fa: [DebugInfo] getMergedLocation: match scopes based ...
Vladislav Dzhidzhoev via All-commits
all-commits at lists.llvm.org
Fri Apr 18 04:57:49 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6462fad3d04d1cc6ceda303a6525742c8b911e79
https://github.com/llvm/llvm-project/commit/6462fad3d04d1cc6ceda303a6525742c8b911e79
Author: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
Date: 2025-04-18 (Fri, 18 Apr 2025)
Changed paths:
M llvm/lib/IR/DebugInfoMetadata.cpp
A llvm/test/DebugInfo/AArch64/merge-nested-block-loc.ll
A llvm/test/DebugInfo/AArch64/merge-nested-block-loc2.ll
M llvm/unittests/IR/MetadataTest.cpp
Log Message:
-----------
[DebugInfo] getMergedLocation: match scopes based on their location (#132286)
getMergedLocation uses a common parent scope of the two input locations
for an output location.
It doesn't consider the case when the common parent scope is from a file
other than L1's and L2's files. In that case, it produces a merged location
with an erroneous scope (https://github.com/llvm/llvm-project/issues/122846).
In some cases, such as https://github.com/llvm/llvm-project/pull/125780#issuecomment-2651657856,
L1, L2 having a common parent scope from another file indicate that
the code at L1 and L2 is included from the same source location.
With this commit, getMergedLocation detects that L1, L2, or their common parent
scope files are different. If so, it assumes that L1 and L2 were included
from some source location, and tries to attach the output location to a scope
with the nearest common source location with regard to L1 and L2.
If the nearest common location is also from another file, getMergedLocation returns it
as a merged location, assuming that L1 and L2 belong to files that were both included
in the nearest common location.
Fixes https://github.com/llvm/llvm-project/issues/122846.
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