[PATCH] [SimplifyLibCalls] Teach the Fortified libcall simplifier to look through objectsize.
Ahmed Bougacha
ahmed.bougacha at gmail.com
Fri Oct 24 14:52:32 PDT 2014
Hi hfinkel,
It used to only try to fold fortified (_chk) libcalls with a constant objectsize.
However, in most cases, the @llvm.objectsize intrinsic is used. Teach the
LibCallSimplifier to ask for the objectsize to handle the latter case.
Three-ish (one, really) new optimizations opportunities were created in the tests.
http://reviews.llvm.org/D5984
Files:
include/llvm/Transforms/Utils/SimplifyLibCalls.h
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/CodeGen/X86/2011-02-21-VirtRegRewriter-KillSubReg.ll
test/Transforms/InstCombine/stpcpy_chk-1.ll
test/Transforms/InstCombine/strcpy_chk-1.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5984.15439.patch
Type: text/x-patch
Size: 5364 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141024/b31df940/attachment.bin>
More information about the llvm-commits
mailing list