<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Here's what I understood so far from a general eyeballing of the code:<br>
<br>
1. Legacy DA is a wrapper around GPU DA. I could not find any direct use of GPU DA.<br>
2. It is likely that AMDGPU no longer "requires" Legacy DA. The advantage of the Legacy DA is that it can handle irreducible regions, but we usually convert them into loops for AMDGPU anyway. I don't know if we have reached a point where we don't care about legacy DA in this respect.<br>
3. StructurizeCFG under the new pass manager simply skips DA, and consequently cannot skip uniform regions. This essentially disables an optimization when moving to the new pass manager.<br>
4. Similarly, loop unswitching is an optimization and available in its simple form with the new pass manager. But I don't know for sure if it *must* skip loops with divergent values.<br>
<br>
So we (the AMDGPU folks) need to figure out how much is our dependency on any DA in the new pass manager. Besides the above optimizations, isn't it required for later target optimizations around SGPR usage? Is it possible to unblock the transition to the new pass manager, and then later restore these optimizations? Also, I am wondering if can focus on making only the new GPU DA available subject to #2 above. <br></blockquote><div><br></div><div>To be clear, currently the new PM switch only affects the optimization pipeline, which out of all the uses of Legacy DA only affects LoopUnswitch and StructurizeCFG. The other uses are in the codegen pipeline which isn't affected.</div><div> </div></div></div>