[PATCH] D17353: Set minimum cost of speculating an instruction.

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 22:25:55 PST 2016


davidxl added a comment.

I think the correct heuristic change is : GEP cost can be considered 0 only when its result has a single use which is also the address of a memory operation.  A more elaborate heuristic is that if GEP has a single use which is another GEP it can be merged with (and folded), its cost can be considered zero.   See related bug when GEP merging does not do what it does when there are multiple uses (and folding does not happen with merging): https://llvm.org/bugs/show_bug.cgi?id=23163


http://reviews.llvm.org/D17353





More information about the llvm-commits mailing list