[all-commits] [llvm/llvm-project] 3bb92b: [SandboxVec] Tag insts in a Region with metadata. ...
Jorge Gorbe Moya via All-commits
all-commits at lists.llvm.org
Mon Sep 23 16:59:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3bb92b530f27166b9037b63568534d248ff80150
https://github.com/llvm/llvm-project/commit/3bb92b530f27166b9037b63568534d248ff80150
Author: Jorge Gorbe Moya <jgorbe at google.com>
Date: 2024-09-23 (Mon, 23 Sep 2024)
Changed paths:
M llvm/include/llvm/SandboxIR/SandboxIR.h
M llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Region.h
M llvm/lib/Transforms/Vectorize/SandboxVectorizer/Region.cpp
M llvm/unittests/Transforms/Vectorize/SandboxVectorizer/RegionTest.cpp
Log Message:
-----------
[SandboxVec] Tag insts in a Region with metadata. (#109353)
For each region, we create a metadata node. Then when an instruction is
added to the Region, it gets tagged with the metadata node for that
region. In the following example, we have a Region that contains only
the `%t0` instruction.
```
define i8 @foo(i8 %v0, i8 %v1) {
%t0 = add i8 %v0, 1, !sbvec !0
%t1 = add i8 %t0, %v1
ret i8 %t1
}
!0 = distinct !{!"region"}
```
This commit also adds a function to create regions from metadata already
present in a Function.
This metadata can be used for debugging: if we dump IR before a Region
pass, the IR will contain enough info to re-create the Region and run
the pass by itself in a later invocation.
---------
Co-authored-by: Alina Sbirlea <alina.g.simion at gmail.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