[LLVMbugs] [Bug 23690] New: PGO for macro expansion code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 28 13:11:26 PDT 2015


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

            Bug ID: 23690
           Summary: PGO for macro expansion code
           Product: new-bugs
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: tabloid.adroit at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#define GET_BIT(lll)    \
    // blah blah

#define G(label1,label2)   \
{                                      \
  // decent amount code  \
  ...
  while (1) {                       \
  GET_BIT(label2);             \
  };                                    \
}

void f() {
   if (..)
     G('c', 'd');

   while ( .. )
       G('a','b');
}

(This simplified case is from SPEC2006 401.bzip2 decompress.c)

After perf sampling, a lot of samples that should have landed in G and
GET_BIT is attributed to the two lines that have G expansion.
Discriminator does not work either for this case. However  the last
field of DW_TAG_lexical_block ("Unique ID to identify blocks from a
template function") is unique for all instances of scopes in G and
GET_BIT. It will be great to have PGO get better profile of hot and
cold paths inside macros with nontrivial scopes.

-- 
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/20150528/89b8b734/attachment.html>


More information about the llvm-bugs mailing list