LLVM 20.0.0git
|
Checking whether two cases of SI are equal depends on the contents of the BasicBlock and the incoming values of their successor PHINodes. More...
Public Attributes | |
BasicBlock * | Dest |
DenseMap< PHINode *, SmallDenseMap< BasicBlock *, Value *, 8 > > * | PhiPredIVs |
Checking whether two cases of SI are equal depends on the contents of the BasicBlock and the incoming values of their successor PHINodes.
PHINode::getIncomingValueForBlock is O(|Preds|), so we'd like to avoid calling this function on each BasicBlock every time isEqual is called, especially since the same BasicBlock may be passed as an argument multiple times. To do this, we can precompute a map of PHINode -> Pred BasicBlock -> IncomingValue and add it in the Wrapper so isEqual can do O(1) checking of the incoming values.
Definition at line 7490 of file SimplifyCFG.cpp.
BasicBlock* SwitchSuccWrapper::Dest |
Definition at line 7491 of file SimplifyCFG.cpp.
Referenced by llvm::DenseMapInfo< const SwitchSuccWrapper * >::getHashValue().
DenseMap<PHINode *, SmallDenseMap<BasicBlock *, Value *, 8> >* SwitchSuccWrapper::PhiPredIVs |
Definition at line 7492 of file SimplifyCFG.cpp.
Referenced by llvm::DenseMapInfo< const SwitchSuccWrapper * >::getHashValue().