[PATCH] Be more conservative in canonicalizing loads that only store

Daniel Stewart stewartd at codeaurora.org
Fri May 1 11:03:25 PDT 2015


Hi chandlerc, pete,

Only canonicalize loads that only store if the store's pointer operand is not reloaded elsewhere. It is common that the demotion of phis to loads/stores will create a number of loads that only store. However, the same location is loaded from in multiple locations. In this case, canonicalizing the loads to integers may not be the best thing to do, as eventually the loaded value will be used as it's original type, forcing bitcasts to be spread throughout the code.

http://reviews.llvm.org/D9439

Files:
  lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  test/Transforms/InstCombine/load.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9439.24820.patch
Type: text/x-patch
Size: 3298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150501/2ecc64b0/attachment.bin>


More information about the llvm-commits mailing list