<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/160387>160387</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[CIR] Upstream TBAA handling
</td>
</tr>
<tr>
<th>Labels</th>
<td>
ClangIR
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
andykaylor
</td>
</tr>
</table>
<pre>
### Overview
Upstream support for generating TBAA attributes and lowering to TBAA metadata in LLVM IR.
We should carefully consider how we can reuse/share the classic codegen implementation for generating TBAA metadata.
### Suggested minimal test case
```
// Compile with -O1
void test_int(int *a) {
a = 1;
}
```
### Existing incubator tests
clang/test/CIR/CodeGen/tbaa-bitinit.c
clang/test/CIR/CodeGen/tbaa-enum.c
clang/test/CIR/CodeGen/tbaa-enum.cpp
clang/test/CIR/CodeGen/tbaa-pointer.cpp
clang/test/CIR/CodeGen/tbaa-scalar.c
clang/test/CIR/CodeGen/tbaa-struct.cpp
clang/test/CIR/CodeGen/tbaa-union.cpp
clang/test/CIR/CodeGen/tbaa-vptr.cpp
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk19vozgUxT-NeblKZEwg5IEH2mxWlbqq1P33uLrYt-BdYyP7kmy-_QiamY5G89BIFsj4nMPvIg6mZHtP1IjyQZTHDGceQmzQm-t_eHUhZl0w10ao4n3By5ni2dJFyPbPKXEkHCHN0xQiw1uI0JOniGx9D388tC0gc7TdzJQAvQEXLhSXQw7v5yMxGmQE6-H5-a_f4Ol1K2QrZPs3QRrC7AxojPQ2O3cFHXyyhiIM4QIXAo0eIs2JhDqlASMBDwTaLWNp0MFQTx7sODkayTOyDf6nmF8xbu_-mPf3ue8pMRkYrbcjOmBKDBoTLbpK3tbiOQl1gscwTtYRXCwPsHnJhWzPwZrV9o_1LFRtPYNQLQp1ALF_ELIFQBDFEXJRLFuxP_4Y_j3TL__btKJbr-cOOcQ1PQnZaoe-F-q07IU6PT69Ltdg6Ffyy-MOcdNZtt7yVn9ST34e7xRP0yflU7CeKd7hSBodxk_zJI6z5jvyZ2-Dv0N_nnjFz0xTmENxwIyafF_WVVlXeZ0Nje7yNy0VGt0ZI6WWOWqq8qpGuasQTWYbJVUpD6pQMq_Kemuoruu93u0LZYpdWYidpBGt2zp3Hrch9plNaaYmr2RR7zOHHbm0NlipxwV54VRLnWOzWDbd3Cexk84mTh8hbNmtxV_mKo_wrc9rIwb0xlnfZ3N0zcA8JVHc_vHe8jB3Wx1GoU5L3O22mWL4l_TyqVbAJNTpxnhu1JcAAAD___VAaMU">