[PATCH] D35522: Move Runtime libcall definitions to a .def file

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 17:01:45 PDT 2017


dschuff added inline comments.


================
Comment at: lib/CodeGen/TargetLoweringBase.cpp:100-110
   if (TT.isGNUEnvironment()) {
     Names[RTLIB::SINCOS_F32] = "sincosf";
     Names[RTLIB::SINCOS_F64] = "sincos";
     Names[RTLIB::SINCOS_F80] = "sincosl";
     Names[RTLIB::SINCOS_F128] = "sincosl";
     Names[RTLIB::SINCOS_PPCF128] = "sincosl";
   }
----------------
dschuff wrote:
> dblaikie wrote:
> > Any reason these two are implemented differently (one has null in the table and initializer the values conditionally - the other has a value in the table and conditionally nulls it out here)?
> The idea was sort of that the default value in the table is the "normal" or most common value, and the exceptional cases are handled here.
Another somewhat-related note, there ended up being a slight bit of ugliness (see line 883 of D35592) related to using nullptr here instead of e.g. an empty string. But that maybe is still better than using empty string instead of nullptr here?


https://reviews.llvm.org/D35522





More information about the llvm-commits mailing list