RequirementMachine: Introduce 'concrete contraction' pre-processing pass before building rewrite system

See the comment at the top of ConcreteContraction.cpp for a detailed explanation.

This can be turned off with the -disable-requirement-machine-concrete-contraction
pass, mostly meant for testing. A few tests now run with this pass both enabled
and disabled, to exercise code paths which are otherwise trivially avoided by
concrete contraction.

Fixes rdar://problem/88135912.
This commit is contained in:
Slava Pestov
2022-02-18 23:52:00 -05:00
parent bbbbfbac89
commit 8e09ba8b45
33 changed files with 687 additions and 38 deletions

View File

@@ -964,6 +964,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
}
}
if (Args.hasArg(OPT_disable_requirement_machine_concrete_contraction))
Opts.EnableRequirementMachineConcreteContraction = false;
Opts.DumpTypeWitnessSystems = Args.hasArg(OPT_dump_type_witness_systems);
return HadError || UnsupportedOS || UnsupportedArch;