[LLVMdev] libc malloc vs. llvm::MallocInst
sabre at nondot.org
Fri Jun 20 09:31:02 PDT 2008
On Fri, 20 Jun 2008, TU Dresden wrote:
> There is also a pass, called RaiseAllocation (well ... at least i think so)
> and i remember in previous versions (2.2)
> of llvm i read a commentary inside the sourcecode that the pass should be
> used with care because
> llvm::MallocInst is not platform-independent. This commentary is removed in
> the current version. - Why?
This is just an internal implementation detail. the LLVM malloc
instruction still calls libc malloc. Using an instruction like this gives
us slightly more type information, that's all.
More information about the llvm-dev