diff options
| author | Orlando Cazalet-Hyams <orlando.hyams@sony.com> | 2025-05-27 13:39:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-27 13:39:52 +0100 |
| commit | 29db3058a8e50775cd236ef4462ae04fdc4ba90c (patch) | |
| tree | 994b73a17a112380f406110cae6cadb16e6804c2 /clang/lib/CodeGen/CGExpr.cpp | |
| parent | 8b9448edc6f39ba9d5eaac3d1e9275ffecc65798 (diff) | |
[KeyInstr][Clang] Assign matrix element atom (#134650)
This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.
RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668
The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index ea23455bb9a5..bae28b45afaa 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2531,8 +2531,9 @@ void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst, llvm::Instruction *Load = Builder.CreateLoad(Dst.getMatrixAddress()); llvm::Value *Vec = Builder.CreateInsertElement(Load, Src.getScalarVal(), Idx, "matins"); - Builder.CreateStore(Vec, Dst.getMatrixAddress(), - Dst.isVolatileQualified()); + auto *I = Builder.CreateStore(Vec, Dst.getMatrixAddress(), + Dst.isVolatileQualified()); + addInstToCurrentSourceAtom(I, Vec); return; } |
