[all-commits] [llvm/llvm-project] c24230: [MLIR][LLVM] DI Recursive Type fix for recursion v...
Billy Zhu via All-commits
all-commits at lists.llvm.org
Tue Mar 19 22:50:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c2423024923bae9176eda6cd958217c83955150d
https://github.com/llvm/llvm-project/commit/c2423024923bae9176eda6cd958217c83955150d
Author: Billy Zhu <billyzhu at modular.com>
Date: 2024-03-19 (Tue, 19 Mar 2024)
Changed paths:
M mlir/lib/Target/LLVMIR/DebugTranslation.cpp
M mlir/lib/Target/LLVMIR/DebugTranslation.h
M mlir/test/Target/LLVMIR/llvmir-debug.mlir
Log Message:
-----------
[MLIR][LLVM] DI Recursive Type fix for recursion via scope of composites (#85850)
Fixes this bug for the previous recursive DI type PR:
https://github.com/llvm/llvm-project/pull/80251#issuecomment-2007254788.
Drawing inspiration from how clang uses DIBuilder to build forward
decls, this PR changes how placeholders are created & updated. Instead
of requiring each recursive DIType to do in-place mutation, we simply
ask for a temporary node as the placeholder, and run RAUW at the end
when the concrete node is translated.
This has the side effect of simplifying what's needed to add recursion
support for a type. Now only one additional method needs to be created
for exporting. Concretely, for this PR, `translateImpl` for
DICompositeType is back to the state it was before the previous PR, and
the only net addition for DICompositeType is `translateTemporaryImpl`.
---------
Co-authored-by: Tobias Gysi <tobias.gysi at nextsilicon.com>
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