SuccessChanges

Summary

  1. AMDGPU: Annotate amdgpu.noclobber for global loads only (details)
  2. [SimplifyCFG] simplifyUnreachable(): switch to non-permissive DomTree updates (details)
  3. [NFC][SimplifyCFG] Add a test with same-destination condidional branch (details)
  4. [SimplifyCFG] simplifyUnreachable(): fix handling of degenerate same-destination conditional branch (details)
  5. [SimplifyCFG] FoldValueComparisonIntoPredecessors(): switch to non-permissive DomTree updates (details)
  6. [SimplifyCFG] FoldValueComparisonIntoPredecessors(): deal with each predecessor only once (details)
  7. [NFC][SimplifyCFG] SwitchToLookupTable(): pull out SI->getParent() into a variable (details)
  8. [SimplifyCFG] SwitchToLookupTable(): switch to non-permissive DomTree updates (details)
  9. [NFC][SimplifyCFG] Add a test where SimplifyEqualityComparisonWithOnlyPredecessor() deletes existing edge (details)
  10. [SimplifyCFG] SimplifyEqualityComparisonWithOnlyPredecessor(): really don't delete DomTree edges multiple times (details)
Commit cb5b52a06eeb7cc868944bb08f71fffe13f33412 by changpeng.fang
AMDGPU: Annotate amdgpu.noclobber for global loads only

Summary:
  This is to avoid unnecessary analysis since amdgpu.noclobber is only used for globals.

Reviewers:
  arsenm

Fixes:
   SWDEV-239161

Differential Revision:
  https://reviews.llvm.org/D94107
The file was addedllvm/test/CodeGen/AMDGPU/annotate-noclobber.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-clobbers-load.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
Commit f98535686e3c1fa76986337639df1636282692c9 by lebedev.ri
[SimplifyCFG] simplifyUnreachable(): switch to non-permissive DomTree updates

... which requires not removing a DomTree edge if the switch's default
still points at that destination, because it can't be removed;
... and not processing the same predecessor more than once.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 3460719f583583e6990ec5c1b2a718cc01797bf7 by lebedev.ri
[NFC][SimplifyCFG] Add a test with same-destination condidional branch

Reported by Mikael Holmén as post-commit feedback on
https://reviews.llvm.org/rG2d07414ee5f74a09fb89723b4a9bb0818bdc2e18#968162
The file was addedllvm/test/Transforms/SimplifyCFG/simplifyUnreachable-degenerate-conditional-branch-with-matching-destinations.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 29ca7d5a1ad968c371124b8d82edd8d91eee7b4f by lebedev.ri
[SimplifyCFG] simplifyUnreachable(): fix handling of degenerate same-destination conditional branch

One would hope that it would have been already canonicalized into an
unconditional branch, but that isn't really guaranteed to happen
with SimplifyCFG's visitation order.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/simplifyUnreachable-degenerate-conditional-branch-with-matching-destinations.ll
Commit fc96cb2dad6b8293124f12d00fb55ff75c2ebe71 by lebedev.ri
[SimplifyCFG] FoldValueComparisonIntoPredecessors(): switch to non-permissive DomTree updates

... which requires not adding a DomTree edge that we just added.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit d15d81ce15e086208f30d99ce2257a75401dc12c by lebedev.ri
[SimplifyCFG] FoldValueComparisonIntoPredecessors(): deal with each predecessor only once

If the predecessor is a switch, and BB is not the default destination,
multiple cases could have the same destination. and it doesn't
make sense to re-process the predecessor, because we won't make any changes,
once is enough.

I'm not sure this can be really tested, other than via the assertion
being added here, which fires without the fix.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit fa5447aa3fec313bfd8ec31b7c66d390a5589b94 by lebedev.ri
[NFC][SimplifyCFG] SwitchToLookupTable(): pull out SI->getParent() into a variable
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 2b437fcd479befb96bd61e71c4de8143bd861a48 by lebedev.ri
[SimplifyCFG] SwitchToLookupTable(): switch to non-permissive DomTree updates

... which requires not deleting a DomTree edge that we just deleted.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 0a87e53fc40ffd644139cdd210e7c382dbe329c8 by lebedev.ri
[NFC][SimplifyCFG] Add a test where SimplifyEqualityComparisonWithOnlyPredecessor() deletes existing edge
The file was addedllvm/test/Transforms/SimplifyCFG/SimplifyEqualityComparisonWithOnlyPredecessor-domtree-preservation-edgecase.ll
Commit a14945c1db614261a6f8d5d199e246d78f51e977 by lebedev.ri
[SimplifyCFG] SimplifyEqualityComparisonWithOnlyPredecessor(): really don't delete DomTree edges multiple times
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/SimplifyEqualityComparisonWithOnlyPredecessor-domtree-preservation-edgecase.ll