[PATCH] D62229: [TargetTransformInfo] early return on nullptr

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 04:40:51 PDT 2019


RKSimon added a comment.

In D62229#1511765 <https://reviews.llvm.org/D62229#1511765>, @fhahn wrote:

> I am pretty sure from the uses of getGEPCost that Ptr should never be null. It is also used without check later on. I think it would be better to drop the `if (Ptr != nullptr)` check.


If we're going to do that we need to add an assertion instead


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62229/new/

https://reviews.llvm.org/D62229





More information about the llvm-commits mailing list