[llvm-commits] [PATCH] auto-upgrade malloc instructions to malloc calls

Devang Patel devang.patel at gmail.com
Thu Sep 24 09:50:41 PDT 2009


Victor,

On Wed, Sep 23, 2009 at 5:03 PM, Victor Hernandez <vhernandez at apple.com> wrote:
> This patch:
> 1. Gets malloc instructions to be auto-upgraded to malloc calls in LLParser
> and BitcodeReader.
> 2. Updates Core and BrainF to no longer create malloc instructions.
> 3. Updates testcases that made assumptions that were no longer true without
> malloc instructions.
>
>
>
>
> After this patch, there are no MallocInsts created by LLVM, and MallocInst
> can be torn out.
>

+  /// setCalledFunction - Set the function called
+  void setCalledFunction(Value* func) {

how about "Func" or "Fn" instead of "func" ?

+target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
+target triple = "i686-apple-darwin8"

No need to add target info in test cases.

-
Devang



More information about the llvm-commits mailing list