[llvm] 891b2be - Revert "[NFC][StackSafety] Move out sort from the loop"

Matt Morehouse via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 08:18:43 PDT 2020


Author: Matt Morehouse
Date: 2020-08-14T08:17:35-07:00
New Revision: 891b2be85d5f8b271c7440b51f7d463fb3e75007

URL: https://github.com/llvm/llvm-project/commit/891b2be85d5f8b271c7440b51f7d463fb3e75007
DIFF: https://github.com/llvm/llvm-project/commit/891b2be85d5f8b271c7440b51f7d463fb3e75007.diff

LOG: Revert "[NFC][StackSafety] Move out sort from the loop"

This reverts commit 0426e28419799c35cf52fe3d773c5bab9928c699 due to ASan
buildbot failure.

Added: 
    

Modified: 
    llvm/lib/Analysis/StackSafetyAnalysis.cpp
    llvm/test/Bitcode/thinlto-function-summary-paramaccess.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index 86c6bb538655..cd74a0250457 100644
--- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -812,11 +812,11 @@ StackSafetyInfo::getParamAccesses() const {
       }
       Param.Calls.emplace_back(C.first.ParamNo, C.first.Callee->getGUID(),
                                C.second);
+      llvm::sort(Param.Calls, [](const FunctionSummary::ParamAccess::Call &L,
+                                 const FunctionSummary::ParamAccess::Call &R) {
+        return std::tie(L.ParamNo, L.Callee) < std::tie(R.ParamNo, R.Callee);
+      });
     }
-    sort(Param.Calls, [](const FunctionSummary::ParamAccess::Call &L,
-                         const FunctionSummary::ParamAccess::Call &R) {
-      return std::tie(L.ParamNo, L.Callee) < std::tie(R.ParamNo, R.Callee);
-    });
   }
   return ParamAccesses;
 }

diff  --git a/llvm/test/Bitcode/thinlto-function-summary-paramaccess.ll b/llvm/test/Bitcode/thinlto-function-summary-paramaccess.ll
index 6351133ce3d0..1757173ec52b 100644
--- a/llvm/test/Bitcode/thinlto-function-summary-paramaccess.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary-paramaccess.ll
@@ -230,7 +230,7 @@ entry:
 }
 
 ; SSI-LABEL: for function 'CallMany2'
-; SSI: p[]: empty-set, @Callee(arg0, [-715,125)), @Callee2(arg1, [-33,-32))
+; SSI: p[]: empty-set, @Callee(arg0, [-715,125))
 ; BC-NEXT: <PARAM_ACCESS op0=0 op1=0 op2=0 op3=2 op4=0 op5=[[CALLEE]] op6=1431 op7=250 op8=1 op9=[[CALLEE2:-?[0-9]+]] op10=67 op11=65/>
 ; BC-NEXT: <PERMODULE
 ; DIS-DAG: = gv: (name: "CallMany2", summaries: {{.*}} calls: ((callee: ^{{.*}}), (callee: ^{{.*}})), params: ((param: 0, offset: [0, -1], calls: ((callee: ^{{.*}}, param: 0, offset: [-715, 124]), (callee: ^{{.*}}, param: 1, offset: [-33, -33]))))))) ; guid = 16654048340802466690


        


More information about the llvm-commits mailing list