Skip to content

Commit

Permalink
[Attributor][NFC] Improve the debug output & add a TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoerfert committed Feb 20, 2020
1 parent 3c4da4d commit 8e76fec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/lib/Transforms/IPO/Attributor.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 8e76fec

Please sign in to comment.