[PATCH] D12351: Changing @llvm.objectsize(i8*, i1) to @llvm.objectsize(i8*, i8)

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 13:20:30 PDT 2015


george.burgess.iv updated this revision to Diff 33352.
george.burgess.iv marked 2 inline comments as done.
george.burgess.iv added a comment.

Fixed nits + added auto upgrade logic.

In response to comments:

In http://reviews.llvm.org/D12351#233926, @vsk wrote:

> I notice that we're changing objectsize(p, 1) to objectsize(p, 2) in the tests. Are existing users of objectsize(p, typ) affected by this, and if so, can we warn them?


First, thanks for the feedback!

Pre-patch `objectsize(p, 1)` operates differently than post-patch `objectsize(p, 1)`, yes. I'm happy to warn users of the change -- is there an official method for doing so, or will a post to llvm-dev suffice? (FWIW, there's a patch to update Clang to use the new intrinsic @http://reviews.llvm.org/D12352 as well)

In http://reviews.llvm.org/D12351#233940, @majnemer wrote:

> You need auto-upgrade logic to transition old users to the new intrinsic.


That's a thing? That's kind of awesome. Thanks for the heads up! :) Is there a preferred way to test new auto-upgrade code, or does "I ran opt on a pre-patch file and the output LGTM for post-patch code" suffice?


http://reviews.llvm.org/D12351

Files:
  docs/LangRef.rst
  include/llvm/IR/Intrinsics.td
  lib/CodeGen/CodeGenPrepare.cpp
  lib/CodeGen/SelectionDAG/FastISel.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/IR/AutoUpgrade.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp
  test/Assembler/auto_upgrade_intrinsics.ll
  test/CodeGen/AArch64/arm64-2012-07-11-InstrEmitterBug.ll
  test/CodeGen/AArch64/arm64-indexed-vector-ldst-2.ll
  test/CodeGen/AArch64/arm64-memset-to-bzero.ll
  test/CodeGen/ARM/divmod.ll
  test/CodeGen/Generic/crash.ll
  test/CodeGen/Generic/object-size-type.ll
  test/CodeGen/X86/2011-05-26-UnreachableBlockElim.ll
  test/CodeGen/X86/crash.ll
  test/CodeGen/X86/object-size.ll
  test/Transforms/CodeGenPrepare/basic.ll
  test/Transforms/InstCombine/debuginfo.ll
  test/Transforms/InstCombine/invoke.ll
  test/Transforms/InstCombine/malloc-free-delete.ll
  test/Transforms/InstCombine/objsize-64.ll
  test/Transforms/InstCombine/objsize-address-space.ll
  test/Transforms/InstCombine/objsize-noverify.ll
  test/Transforms/InstCombine/objsize.ll
  test/Transforms/InstCombine/stpcpy_chk-1.ll
  test/Transforms/InstCombine/strcpy_chk-1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12351.33352.patch
Type: text/x-patch
Size: 43034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150827/eba2dc7d/attachment-0001.bin>


More information about the llvm-commits mailing list