[PATCH] D18990: [InstCombine] Remove trivially empty va_start/va_end and va_copy/va_end ranges.

Arnaud A. de Grandmaison via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 12:58:37 PDT 2016


aadg created this revision.
aadg added a reviewer: majnemer.
aadg added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

When a va_start or va_copy is immediately followed by a va_end (ignoring
debug information or other start/end in between), then it is safe to
remove the pair. As this code shares some commonalities with the lifetime
markers, this has been factored to helper functions. In the va_copy
case a specific handling in needed because it does not have the same
prototype as the va_end.

This InstCombine pattern kicks-in 3 times when running the LLVM test
suite.

http://reviews.llvm.org/D18990

Files:
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineInternal.h
  test/Transforms/InstCombine/vararg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18990.53310.patch
Type: text/x-patch
Size: 5804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160411/65b51f2e/attachment.bin>


More information about the llvm-commits mailing list