[PATCH] D31186: Changing TargetTransformInfo::getGEPCost to take GetElementPtrInst as parameter

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 23:39:55 PDT 2017


jonpa added a comment.

> In some contexts, we might want to compute the cost of a GEP which doesn't actually exist in IR at the moment. I guess there aren't any callers in the tree like that at the moment, but we use this sort of capability in other contexts, so we want to structure the code to allow it.

I have also been working on improving cost functions by passing the actual instruction pointer when available. With the same argument - that there might not actually be an instruction to pass in a speculative context - I did not replace the existing version, but merely adding the instruction as an optional argument. I am hoping this is the right thing to do. See https://reviews.llvm.org/D29631


https://reviews.llvm.org/D31186





More information about the llvm-commits mailing list