mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a Flag to Force Type Layouts for Structs
Added ForceStructTypeLayouts. When enabled, IRGen will lower structs using the aligned group of TypeLayout rather than using TypeInfos. This potentially leads to a size increase as TypeInfos currently produce better code than the TypeLayout route.
This commit is contained in:
committed by
Gwen Mittertreiner
parent
942b0e8a63
commit
b6cff0b844
@@ -1724,6 +1724,9 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
Opts.UseTypeLayoutValueHandling = false;
|
||||
}
|
||||
|
||||
Opts.ForceStructTypeLayouts = Args.hasArg(OPT_force_struct_type_layouts) &&
|
||||
Opts.UseTypeLayoutValueHandling;
|
||||
|
||||
// This is set to true by default.
|
||||
Opts.UseIncrementalLLVMCodeGen &=
|
||||
!Args.hasArg(OPT_disable_incremental_llvm_codegeneration);
|
||||
|
||||
Reference in New Issue
Block a user