[llvm] 8e76fec - [Attributor][NFC] Improve the debug output & add a TODO

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 19 21:47:20 PST 2020


Author: Johannes Doerfert
Date: 2020-02-19T23:46:08-06:00
New Revision: 8e76fec0ae89d724a8d20d48f34c6c596404b916

URL: https://github.com/llvm/llvm-project/commit/8e76fec0ae89d724a8d20d48f34c6c596404b916
DIFF: https://github.com/llvm/llvm-project/commit/8e76fec0ae89d724a8d20d48f34c6c596404b916.diff

LOG: [Attributor][NFC] Improve the debug output & add a TODO

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/Attributor.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 98a0a59234e3..2d82ba35b147 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -4618,6 +4618,8 @@ struct AAValueSimplifyArgument final : AAValueSimplifyImpl {
     // the replaced value and not the copy that byval creates implicitly.
     Argument *Arg = getAssociatedArgument();
     if (Arg->hasByValAttr()) {
+      // TODO: We probably need to verify synchronization is not an issue, e.g.,
+      //       there is no race by not copying a constant byval.
       const auto &MemAA = A.getAAFor<AAMemoryBehavior>(*this, getIRPosition());
       if (!MemAA.isAssumedReadOnly())
         return indicatePessimisticFixpoint();
@@ -7680,6 +7682,8 @@ ChangeStatus Attributor::run() {
     ChangeStatus LocalChange = AA->manifest(*this);
     if (LocalChange == ChangeStatus::CHANGED && AreStatisticsEnabled())
       AA->trackStatistics();
+    LLVM_DEBUG(dbgs() << "[Attributor] Manifest " << LocalChange << " : " << *AA
+                      << "\n");
 
     ManifestChange = ManifestChange | LocalChange;
 


        


More information about the llvm-commits mailing list