[llvm-commits] [PATCH] get all MallocInst transforms/analysis to operate on malloc calls instead (patch #1)
Dan Gohman
gohman at apple.com
Thu Sep 17 13:36:53 PDT 2009
Hi Victor,
This patch looks good, with one general area of comments:
Instruction.cpp and Verifier.cpp now have their own copy of isMalloc.
I guess this is to avoid a library dependence, but it's unfortunate.
The Verifier may move out of VMCore some day, but Instructions.cpp is
more problematic. It seems that CreateMalloc no longer belongs in
VMCore; could it be moved? That would avoid at least one of the
isMalloc copies.
BTW, lib/Analysis currently has an overload of isMalloc which takes
a non-const Value*. This isn't needed; the const-qualified one will
always work here.
Dan
On Sep 15, 2009, at 1:38 PM, Victor Hernandez wrote:
> This is the first of 4 patches that will result in malloc calls
> having the same transforms/analysis applied to them as are currently
> done to MallocInst.
> This first patch includes changes to the malloc call creation code
> (AllocTy is now the element type of the malloc, not the resulting
> pointer type) and a bug fix to getMallocArraySize (the case where
> the array size is a product of 2 constants was broken).
> Also included are changes isSafeToSpeculativelyExecute() and
> Verifier to treat malloc calls the same as MallocInst.
>
> <MallocCalls.diff>
>
> Victor
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list