<div dir="ltr">Hello everyone,<div><br></div><div>I'm trying to tag certain load instructions with specialized metadata and make use of it in an AA pass. However, it seems that metadata is getting lost when instructions are merged together.</div>
<div><br></div><div>Here's a toy problem with one intentionally duplicated load to illustrate the issue.</div><div><br></div><div> <a href="http://susepaste.org/3af3a676">http://susepaste.org/3af3a676</a></div><div>
<br></div><div>The above paste has two before/after IR pairs (the `before` code gets passed through `opt -O3 test.ll | llvm-dis`). Regular `tbaa` tags are still present when loads are merged, however custom ones seem to perish.</div>
<div><br></div><div>Is this expected? If yes, is there any way I can make them persist from within a custom AA pass at all? I tried overwriting copyValue() in the AA pass but it doesn't seem to get called at all. The main idea is to recognize certain types of loads and have other information in the my.tbaa metadata that regular tbaa doesn't provide. The only other solution I can think of right now is to encode that extra information in tbaa node strings, but that seems rather gross.</div>
<div><br></div><div style>Thanks,</div><div style><br></div><div style><br></div><div style>Dimitri.</div></div>