[PATCH] D87342: Allow targets to augment computeKnownBits with their analysis using TargetTransformInfo

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 12:31:08 PDT 2020


spatel added a reviewer: efriedma.
spatel added a comment.

In D87342#2312464 <https://reviews.llvm.org/D87342#2312464>, @nikic wrote:

> I do have a concern about the general direction here: When we allowed targets to hook into InstCombine, one of the hard design constraints was that the target is only allowed to affect combines for target intrinsics, and nothing else. This patch seems to go against that restriction by allowing to replace general analysis behavior and affect otherwise target-independent folds. Maybe @spatel and @lebedev.ri have something to say regarding that.

Sorry for the delayed reply. I skimmed the earlier patch and this one now, and I agree, this could open the door to unintended behavior for seemingly target-independent passes. 
It's not clear to me if there's anything other than the GEP example planning to use an override. Can we create a dedicated GEP analysis function that would limit the compile-time impact? Or could we use/create some option that would enable the more expensive analysis selectively?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87342



More information about the llvm-commits mailing list