[LLVMbugs] [Bug 11203] New: determine unwished/optional side effects

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 21 09:56:20 PDT 2011


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

           Summary: determine unwished/optional side effects
           Product: new-bugs
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: s3734770 at mail.zih.tu-dresden.de
                CC: llvmbugs at cs.uiuc.edu


I have a language that has a garbage collector. Garbage collected items are
inserted into a linked list which confuses the optimizer.
What I want is to make this list insertion optional so that the alloc+insert is
only performed when the resulting value is used.

The idea is to introduce a function modifier that indicates that the function
is unnecessary when it's result value is not used and so all the side effects
of calling this function can be ignored.
This allows me lots of very aggressive optimizations because i can tell the
compiler which side effects are unwanted.
The function should of course not be inlined until the compiler knows that the
result is really never used (worst case: never).

Other use cases are:
 - Allocating garbage collected ram
 - Counters that should react to optimizations (count how often the mem is
readed)
 - in-llvm based branch prediction profiling

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