[LLVMbugs] [Bug 23579] New: Investigate re-enabling GlobalMerge at -O<3

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 19 11:51:44 PDT 2015


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

            Bug ID: 23579
           Summary: Investigate re-enabling GlobalMerge at -O<3
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: ahmed.bougacha at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Some time ago, I downgraded GlobalMerge to only run at
-O3/CodeGenOpt::Aggressive, pending improvements.

Let's use this as the umbrella PR for said improvements:

- The first landed in r235249;  it conservatively avoided merging globals that
were never used with other globals (and that are obviously unprofitable to
merge).

- One of the other changes I looked into was to group globals by use in
functions or basic blocks, with a cost model that takes into account usage
count.  Neither was good enough, so this needs more investigation.

- Also, the cost model should take into account optsize/minsize (on ARM more
than on AArch64).

- Recently, as part of the subtarget changes, the maximum offset was changed to
the most conservative value (127 on ARM);  similarly to minsize, this should
also take into account the per-function subtarget.

- On the implementation side, GlobalMerge runs in its initialization, because
of debug info issues.  We should also fix that, to un-block the const global
merging flag.

- Yet another issue is the lack of proper option-passing machinery, especially
for LTO.

-- 
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/20150519/0808fd0b/attachment.html>


More information about the llvm-bugs mailing list