[CaptureTracking] Handle capturing of launder.invariant.group
authorPiotr Padlewski <piotr.padlewski@gmail.com>
Sat, 5 May 2018 10:23:27 +0000 (10:23 +0000)
committerPiotr Padlewski <piotr.padlewski@gmail.com>
Sat, 5 May 2018 10:23:27 +0000 (10:23 +0000)
commite9832dfdf366ddffba68164adb6855d17c9f87c1
treef4c3f721b3903da7bb0ada7e34e27bd992edbd65
parentc2ad0968450085bb39b1750d3c43960610e15816
[CaptureTracking] Handle capturing of launder.invariant.group

Summary:
launder.invariant.group has the same rules of capturing as
bitcast, gep, etc - the original value is not captured
if the returned pointer is not captured.

With this patch, we mark 40% more functions as noalias when compiling with -fstrict-vtable-pointers;
1078 vs 1778  (39.37%)

Reviewers: sanjoy, davide, nlewycky, majnemer, mehdi_amini

Subscribers: JDevlieghere, llvm-commits

Differential Revision: https://reviews.llvm.org/D32673

llvm-svn: 331587
llvm/lib/Analysis/CaptureTracking.cpp
llvm/test/Transforms/FunctionAttrs/nocapture.ll