[llvm] r303706 - [SCCP] Use the `hasAddressTaken()` version defined in `Function`.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 16:59:23 PDT 2017


Author: davide
Date: Tue May 23 18:59:23 2017
New Revision: 303706

URL: http://llvm.org/viewvc/llvm-project?rev=303706&view=rev
Log:
[SCCP] Use the `hasAddressTaken()` version defined in `Function`.

Instead of using the SCCP homegrown one. We should eventually
make the private SCCP version disappear, but that wont' be today.
PR33143 tracks this issue.

Add braces for consistency while here. No functional change intended.

Modified:
    llvm/trunk/lib/Transforms/Scalar/SCCP.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=303706&r1=303705&r2=303706&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Tue May 23 18:59:23 2017
@@ -1779,8 +1779,9 @@ static bool runIPSCCP(Module &M, const D
     // arguments and return value aggressively, and can assume it is not called
     // unless we see evidence to the contrary.
     if (F.hasLocalLinkage()) {
-      if (AddressIsTaken(&F))
+      if (F.hasAddressTaken()) {
         AddressTakenFunctions.insert(&F);
+      }
       else {
         Solver.AddArgumentTrackedFunction(&F);
         continue;




More information about the llvm-commits mailing list