LLVM 20.0.0git
Public Attributes | List of all members
SwitchSuccWrapper Struct Reference

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

BasicBlockDest
 
DenseMap< PHINode *, SmallDenseMap< BasicBlock *, Value *, 8 > > * PhiPredIVs
 

Detailed Description

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.

Member Data Documentation

◆ Dest

BasicBlock* SwitchSuccWrapper::Dest

◆ PhiPredIVs

DenseMap<PHINode *, SmallDenseMap<BasicBlock *, Value *, 8> >* SwitchSuccWrapper::PhiPredIVs

The documentation for this struct was generated from the following file: