[LLVMbugs] [Bug 715] NEW: Fix / clean up memory allocation related optimizations

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Mar 7 11:35:21 PST 2006


           Summary: Fix / clean up memory allocation related optimizations
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: evan.cheng at apple.com

JM/ldecod was suffering on Darwin because calloc was inlined to malloc + memset. Turns out Darwin's 
calloc was much smarter.

1. Teach the optimizer that calloc / realloc return new pointers, just like "malloc".
2. Eliminate MallocInst. Just recognize malloc, calloc, calls.
3. Fold malloc / memset to calloc calls when it's profitable (e.g. on Darwin).

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list