[LLVMbugs] [Bug 11633] New: Binary identical template instantiations are not merged

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 21 00:35:38 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11633

             Bug #: 11633
           Summary: Binary identical template instantiations are not
                    merged
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dsaritz at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7782
  --> http://llvm.org/bugs/attachment.cgi?id=7782
testcase

Function templates instantiated for different integral types that produce
identical code are not merged into a single function.
In the attached example this is demonstrated for int and an enum type.
Codegen produced with clang -Os -std=gnu++0x -flto -m32 -lstdc++ -ffast-math.

Sometimes clang even produces very slightly different code for example for
unsigned int and enum instantiations of certain functions for which MSVC
generates identical code and merges the functions.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list