<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
> <a href="http://llvm.org/viewvc/llvm-project?rev=141177&view=rev">http://llvm.org/viewvc/llvm-project?rev=141177&view=rev</a><br>Interesting. Might this help the proposed workaround/fix for<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=3100" target="_blank">http://llvm.org/bugs/show_bug.<u></u>cgi?id=3100</a> work?<br>
</blockquote>
<br></div>
Probably.  Because the testcase is incomplete I was unable to check<br>
for real.<br></blockquote><div><br>I finally got around to investigating this sufficiently.<br><br>It's really close, but not quite. Given the attached llvm assembly, the function call is correctly devirtualized (but the branch is left in). But if you comment out the first ret void (in the <a href="http://vtable.ne">vtable.ne</a> block) & comment in the unreachable instruction then the branch is removed by the simplifycfg pass & no interesting information about the condition is preserved for use by the GVN pass so the call is still indirect/virtual.<br>
<br>I'm not sufficiently familiar with the passes, their roles, temporal relations, etc to know exactly where the fix ought to be in this case:<br>Is the simplifycfg pass throwing away valuable information too early & should be less aggressive?<br>
Or perhaps the simplifycfg pass should be storing away some details for later use by the GVN pass?<br>Other options?<br><br>Thanks,<br>- David<br></div></div>