[Attributor][FIX] checkForAllInstructions, correctly handle declarations
authorKuter Dinel <kuterdinel@gmail.com>
Thu, 22 Jul 2021 03:19:07 +0000 (06:19 +0300)
committerKuter Dinel <kuterdinel@gmail.com>
Fri, 23 Jul 2021 23:21:29 +0000 (02:21 +0300)
commit0cd964ff254888d563659f4f8f39c934732aa487
tree15dfdb7508fcd0ad90e73e9fbfb35d3daf9a0195
parent328bb2caae810d484422a13c279939c03ac8c6b3
[Attributor][FIX] checkForAllInstructions, correctly handle declarations

checkForAllInstructions was not handling declarations correctly.
It should have been returning false when it gets called on a declaration

The patch also fixes a test case for AAFunctionReachability for it to be able
to pass after the changes to the checkForAllinstructions.

Differential Revision: https://reviews.llvm.org/D106625
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/unittests/Transforms/IPO/AttributorTest.cpp