<div dir="ltr">+chandlerc</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 15, 2015 at 3:45 PM, Jingyue Wu <span dir="ltr"><<a href="mailto:jingyue@google.com" target="_blank">jingyue@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch is not in SROA yet. Do you mind I check it in?<br>
<br>
I was bitten by the same issue in the NVPTX backend. Code patterns such as<br>
<br>
%0 = alloca i32<br>
%1 = addrspacecast i32* %0 to addrspace(4) i32* ; cast from generic to local so that later accesses can be much faster<br>
... use %1 ...<br>
<br>
will appear quite often after NVPTXFavorNonGenericAddrSpaces (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_doxygen_html_NVPTXTargetMachine-5F8cpp-5Fsource.html-23l00169&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=PEN2HaAp9kcuFrufPkXh2UorVgA-SF5SadWX_45sJQk&s=ptur8q2M9-gy2_C0PwnQfw3LI-2_-3pC-2qHWgYF9LM&e=" rel="noreferrer" target="_blank">http://llvm.org/docs/doxygen/html/NVPTXTargetMachine_8cpp_source.html#l00169</a>) with some WIP checked in. It would be great if SROA can nuke these allocas across addrspacecasts.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D4501&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=PEN2HaAp9kcuFrufPkXh2UorVgA-SF5SadWX_45sJQk&s=8nJXQ8ttiFSpx6So7HPyWVW2WfchJTVgUiJ8mGVu7dY&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D4501</a><br>
<br>
EMAIL PREFERENCES<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=PEN2HaAp9kcuFrufPkXh2UorVgA-SF5SadWX_45sJQk&s=dcUp0DvbWh9kouAwerg8QcodHT18waL8N48FwVCWR_Y&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>