Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[Support] Assert that DomTree nodes share parent" #102780

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions llvm/include/llvm/Support/GenericDomTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,6 @@ class DominatorTreeBase {
/// may (but is not required to) be null for a forward (backwards)
/// statically unreachable block.
DomTreeNodeBase<NodeT> *getNode(const NodeT *BB) const {
assert((!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) &&
"cannot get DomTreeNode of block with different parent");
if (auto Idx = getNodeIndex(BB); Idx && *Idx < DomTreeNodes.size())
return DomTreeNodes[*Idx].get();
return nullptr;
Expand Down
2 changes: 0 additions & 2 deletions llvm/lib/Analysis/TypeMetadataUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ findCallsAtConstantOffset(SmallVectorImpl<DevirtCallSite> &DevirtCalls,
// after indirect call promotion and inlining, where we may have uses
// of the vtable pointer guarded by a function pointer check, and a fallback
// indirect call.
if (CI->getFunction() != User->getFunction())
continue;
if (!DT.dominates(CI, User))
continue;
if (isa<BitCastInst>(User)) {
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ bool AlignmentFromAssumptionsPass::processAssumption(CallInst *ACall,
continue;

if (Instruction *K = dyn_cast<Instruction>(J))
if (K->getFunction() == ACall->getFunction())
WorkList.push_back(K);
}

Expand Down
8 changes: 2 additions & 6 deletions llvm/lib/Transforms/Scalar/LoopFuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,9 +1729,7 @@ struct LoopFuser {
// mergeLatch may remove the only block in FC1.
SE.forgetLoop(FC1.L);
SE.forgetLoop(FC0.L);
// Forget block dispositions as well, so that there are no dangling
// pointers to erased/free'ed blocks.
SE.forgetBlockAndLoopDispositions();
SE.forgetLoopDispositions();

// Move instructions from FC0.Latch to FC1.Latch.
// Note: mergeLatch requires an updated DT.
Expand Down Expand Up @@ -2025,9 +2023,7 @@ struct LoopFuser {
// mergeLatch may remove the only block in FC1.
SE.forgetLoop(FC1.L);
SE.forgetLoop(FC0.L);
// Forget block dispositions as well, so that there are no dangling
// pointers to erased/free'ed blocks.
SE.forgetBlockAndLoopDispositions();
SE.forgetLoopDispositions();

// Move instructions from FC0.Latch to FC1.Latch.
// Note: mergeLatch requires an updated DT.
Expand Down
33 changes: 0 additions & 33 deletions llvm/test/Transforms/AlignmentFromAssumptions/domtree-crash.ll

This file was deleted.

Loading