[PATCH] D28150: Move the section name from GlobalObject to the LLVMContext

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 28 19:12:43 PST 2016


mehdi_amini added inline comments.


================
Comment at: include/llvm/IR/GlobalObject.h:41
-  std::string Section;     // Section to emit this into, empty means default
   Comdat *ObjComdat;
   enum {
----------------
rnk wrote:
> mehdi_amini wrote:
> > We could do the same for the comdat?
> I'd want to do performance measurements before doing that. For C++ targeting not MachO, basically everything has a comdat, and I don't want to regress that. I'm aware that nothing has a comdat on MachO, but it's something we'd want to measure before changing.
> 
> Also, the wins are much smaller. std::string is usually 3 pointers, vs one for comdat.
Makes sense, my thought was that it is the kind of information that is not "frequently" queried, so it should be fine, but it may not be true, measuring is the right thing to do!


https://reviews.llvm.org/D28150





More information about the llvm-commits mailing list