[llvm-commits] [PATCH] Refactoring MemoryBuiltin Analysis
Nuno Lopes
nunoplopes at sapo.pt
Mon Jun 18 14:19:41 PDT 2012
Hi,
Right now, there are multiple implementations of analysis of memory
allocation functions across the LLVM codebase, including:
- computing size of pointed objects (dead store elimination,
instcombine, basic alias analysis)
- recognize allocation functions (e.g., to know that the return
value doesn't alias anything else, or to recognize uninitialized
allocated memory for undef purposes).
Therefore I send in attach a patch to refactor the MemoryBuiltin
Analysis to include all the functionality needed by the other passes
just mentioned. It removes a lot of code duplication, and the proposed
implementation is better than all the previous ones combined. The
patch adds support for the noalias function attribute as well.
This patch also adds support for computing the size of pointed objects
at run-time, which is basically a copy from the bounds checking pass.
After this patch goes in, most of the code in the bounds checking pass
can be removed.
Any comments/suggestions/etc..?
Thanks,
Nuno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm_memorybuiltin.diff
Type: text/x-patch
Size: 42708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120618/146218bf/attachment.bin>
More information about the llvm-commits
mailing list