[PATCH] D158861: [llvm] Move CallInst::CreateMalloc to IRBuilderBase::CreateMalloc

Konrad Wilhelm Kleine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 03:04:10 PDT 2023


kwk updated this revision to Diff 554954.
kwk added a comment.

Do not change somewhat broken naming behavior.

Before, when `CreateMalloc` was still part of `CallInst` a malloc call
was always named "malloccall" unless a bitcast was needed which is
when the `Name` argument was being used. but only then.
To me this looked like an inconsistency. As a matter of fact, the bitcast
operation is no longer needed, hence I was advised to remove it. Doing so
results in a pretty big change with respect to the tests which all have used
`%malloccall´ in their `CHECK` lines. To keep up the confidence in my
patch and to keep it simple, I decided to go back to the behavior of
`CallInst::CreateMalloc`. In a future commit we should drop the bitcast
operation and change the return type of `IRBuilderBase::CreateMalloc`
from `Instruction*` to `CallInst*`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158861/new/

https://reviews.llvm.org/D158861

Files:
  llvm/bindings/ocaml/llvm/llvm.mli
  llvm/examples/BrainF/BrainF.cpp
  llvm/include/llvm/IR/IRBuilder.h
  llvm/include/llvm/IR/Instructions.h
  llvm/lib/IR/Core.cpp
  llvm/lib/IR/IRBuilder.cpp
  llvm/lib/IR/Instructions.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  polly/lib/CodeGen/IslNodeBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158861.554954.patch
Type: text/x-patch
Size: 18703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230831/ffb25178/attachment.bin>


More information about the llvm-commits mailing list