mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement LLVM IR Witness Method Elimination for Swift witness tables. (#39287)
- Witness method calls are done via @llvm.type.checked.load instrinsic call with a type identifier - Type id of a witness method is the requirement's mangled name - Witness tables get !type markers that list offsets and type ids of all methods in the wtable - Added -enable-llvm-wme to enable Witness Method Elimination - Added IR test and execution test
This commit is contained in:
committed by
GitHub
parent
29bc118f5b
commit
46eb8d5db5
@@ -1908,6 +1908,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
Opts.VirtualFunctionElimination = true;
|
||||
}
|
||||
|
||||
if (Args.hasArg(OPT_enable_llvm_wme)) {
|
||||
Opts.WitnessMethodElimination = true;
|
||||
}
|
||||
|
||||
// Default to disabling swift async extended frame info on anything but
|
||||
// darwin. Other platforms are unlikely to have support for extended frame
|
||||
// pointer information.
|
||||
|
||||
Reference in New Issue
Block a user