[llvm-bugs] [Bug 36325] New: We should add hidden visibility to linkonce_odr + unnamed_addr

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 9 11:36:21 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36325

            Bug ID: 36325
           Summary: We should add hidden visibility to linkonce_odr +
                    unnamed_addr
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvm-bugs at lists.llvm.org, peter at pcc.me.uk,
                    stevenwu at apple.com, tejohnson at google.com

This optimization is normally done during linking (always on MachO, if using
LTO in other formats).

If the GV has the *global* unnamed_addr, we could give it hidden visibility
earlier on. For example,

class foo {
  virtual void bar() {}
  virtual void zed();
};
void foo::zed() {}

Produces

define linkonce_odr void @_ZN3foo3barEv(%class.foo*) unnamed_addr

We could add hidden to it in GlobalOpt.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180209/f2d48511/attachment-0001.html>


More information about the llvm-bugs mailing list