[PATCH] D109476: [APInt.h] Reduce the APInt header file interface a bit. NFC

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 13:30:56 PDT 2021


lattner added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:5135
+namespace {
+/// Magic data for optimising signed division by a constant.
+struct ms {
----------------
dsanders wrote:
> lattner wrote:
> > craig.topper wrote:
> > > Will this end up being needed by GlobalISel? Is there a better place we could share?
> > Good question.  If so, it should go in `lib/CodeGen` somewhere.  I haven't been following GlobalISel, so I'm not sure where they are putting shared utilities between the two frameworks.
> I don't think GlobalISel is using it at the moment but we were using it downstream in our targets GlobalISel legalizer. DAGISel and GlobalISel don't really share much so I'm not currently aware of a suitable home for it. Would it make sense in MathExtras.h?
Yeah, that could make sense, or it could even be moved up to lib/Codegen.  It is a *really* specific algorithm for APInt.h. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109476



More information about the llvm-commits mailing list