[LLVMbugs] [Bug 10373] New: Inlining non-virtual thunks causes code bloat

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 15 12:16:24 PDT 2011


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

           Summary: Inlining non-virtual thunks causes code bloat
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jmuizelaar at mozilla.com
                CC: llvmbugs at cs.uiuc.edu


The following example compiles to two separate functions:

class nsSVGElement
{
  virtual void PrependLocalTransformTo() const;
};

class nsIDOMSVGAnimatedPathData  {
  virtual unsigned int GetPathSegList(void **aPathSegList) = 0;
};

class nsSVGPathElement : public nsSVGElement,
                         public nsIDOMSVGAnimatedPathData
{
public:
  unsigned int virtual GetPathSegList(void **aPathSegList); 
};

void *GetDOMWrapper(void *aList,void *aElement, bool aIsAnimValList);
void *GetBaseValKey();

unsigned int nsSVGPathElement::GetPathSegList(void * *aPathSegList)
{
  void *key = GetBaseValKey();
  *aPathSegList = GetDOMWrapper(key, this, false);
  return *aPathSegList ? 0 : 0x8007000e;
}


GCC compiles the thunk an 'add' and 'jmp'.

-- 
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