forked from OSchip/llvm-project
[NFC] Introduce option to switch off compatible invokes merge
Does not affect default behavior (transform is on).
This commit is contained in:
parent
ac5a5a9cfe
commit
bfc1217119
|
@ -167,6 +167,10 @@ static cl::opt<unsigned> BranchFoldToCommonDestVectorMultiplier(
|
|||
"to fold branch to common destination when vector operations are "
|
||||
"present"));
|
||||
|
||||
static cl::opt<bool> EnableMergeCompatibleInvokes(
|
||||
"simplifycfg-merge-compatible-invokes", cl::Hidden, cl::init(true),
|
||||
cl::desc("Allow SimplifyCFG to merge invokes together when appropriate"));
|
||||
|
||||
STATISTIC(NumBitMaps, "Number of switch instructions turned into bitmaps");
|
||||
STATISTIC(NumLinearMaps,
|
||||
"Number of switch instructions turned into linear mapping");
|
||||
|
@ -2528,6 +2532,9 @@ static void MergeCompatibleInvokesImpl(ArrayRef<InvokeInst *> Invokes,
|
|||
/// edges invoke0->cont0 and invoke1->cont1 are "compatible",
|
||||
/// and the invoked functions are "compatible".
|
||||
static bool MergeCompatibleInvokes(BasicBlock *BB, DomTreeUpdater *DTU) {
|
||||
if (!EnableMergeCompatibleInvokes)
|
||||
return false;
|
||||
|
||||
bool Changed = false;
|
||||
|
||||
// FIXME: generalize to all exception handling blocks?
|
||||
|
|
Loading…
Reference in New Issue