<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Hi </span><br><div class="gmail_quote"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><div>
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></span></div>I'm working on a project which needs loop-attached metadata similar to</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">the parallel metadata discussed in here. Currently I'm trying to make</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">the metadata get through the optimisation passes unscathed. For loop</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">passes, I've solved that by modifying the LPPassManager to check for</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">metadata presence before and after runOnLoop, and restoring it if</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">necessary (assuming the loop didn't get removed and the metadata</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">didn't get moved).</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">However, the CFG simplifier pass also can optimize the loop latch and</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">attached metadata away. As this is a function pass, I don't have</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">access to the loop-specific functionality such as getLoopLatch to</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">check for metadata.</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Any suggestions how to fix this? How would the parallel loop metadata</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">discussed in here survive these CFG simplifications?</span><span class="HOEnZb"><font color="#888888"><div><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br>
</span></div><div><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Michael</span></div>
</font></span></div><br>