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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 16:57:43 PDT 2020


efriedma added a comment.

TargetTransformInfo exists because some IR transforms really don't work without the extra information.  For example, vectorization doesn't make sense without some target-specific parameters. But the further we go down the path of target-specific tweaks, the harder it becomes to make any changes at all: you end up with bugs that can only be reproduced on on specific targets, and the impacts on compile time and code quality become harder to predict.  This is why, for example, it's really hard to make changes to DAGCombine.

I think changing computeKnownBits to allow arbitrary target-controlled computation is going too far on the side of unpredictability; it's used by a bunch of passes in contexts you wouldn't really expect to behave in target-specific ways.


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