Changeset View
Changeset View
Standalone View
Standalone View
include/clang/Basic/LangOptions.def
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | |||||
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment") | LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment") | ||||
LANGOPT(HexagonQdsp6Compat , 1, 0, "hexagon-qdsp6 backward compatibility") | LANGOPT(HexagonQdsp6Compat , 1, 0, "hexagon-qdsp6 backward compatibility") | ||||
LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting") | LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting") | ||||
LANGOPT(ObjCWeakRuntime , 1, 0, "__weak support in the ARC runtime") | LANGOPT(ObjCWeakRuntime , 1, 0, "__weak support in the ARC runtime") | ||||
LANGOPT(ObjCWeak , 1, 0, "Objective-C __weak in ARC and MRC files") | LANGOPT(ObjCWeak , 1, 0, "Objective-C __weak in ARC and MRC files") | ||||
LANGOPT(ObjCSubscriptingLegacyRuntime , 1, 0, "Subscripting support in legacy ObjectiveC runtime") | LANGOPT(ObjCSubscriptingLegacyRuntime , 1, 0, "Subscripting support in legacy ObjectiveC runtime") | ||||
LANGOPT(FakeAddressSpaceMap , 1, 0, "OpenCL fake address space map") | LANGOPT(FakeAddressSpaceMap , 1, 0, "OpenCL fake address space map") | ||||
ENUM_LANGOPT(AddressSpaceMapMangling , AddrSpaceMapMangling, 2, ASMM_Target, "OpenCL address space map mangling mode") | ENUM_LANGOPT(AddressSpaceMapMangling , AddrSpaceMapMangling, 2, ASMM_Target, "OpenCL address space map mangling mode") | ||||
LANGOPT(NoDefaultHeader, 1, 0, "Do not include default header file for OpenCL") | |||||
Anastasia: I was just thinking whether it would make sense to do the opposite i.e. to have a flag that… | |||||
I agree and has made the change. The module caches AST of the header file, which is essentially the same thing as PCH. I checked a typical OpenCL progam. Without including header, ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 0.0160 (100.0%) 0.0080 (100.0%) 0.0240 (100.0%) 0.0211 (100.0%) Clang front-end timer 0.0160 (100.0%) 0.0080 (100.0%) 0.0240 (100.0%) 0.0211 (100.0%) Total With header but without module caching, ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 0.2160 (100.0%) 0.0120 (100.0%) 0.2280 (100.0%) 0.2271 (100.0%) Clang front-end timer 0.2160 (100.0%) 0.0120 (100.0%) 0.2280 (100.0%) 0.2271 (100.0%) Total With header and module caching, ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 0.0160 (100.0%) 0.0080 (100.0%) 0.0240 (100.0%) 0.0222 ( 93.6%) Clang front-end timer 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0008 ( 3.5%) Reading modules 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0007 ( 2.9%) Loading /home/yaxunl/llvm-tot/llvm/tools/clang/test/CodeGenOpenCL/./JJHF9CF78G8Z/opencl_c-3RXFI66A6CUM7.pcm 0.0160 (100.0%) 0.0080 (100.0%) 0.0240 (100.0%) 0.0237 (100.0%) Total So the caching is very effective and essentially makes the header loading time to be ignored. yaxunl: I agree and has made the change.
The module caches AST of the header file, which is… | |||||
BENIGN_LANGOPT(DelayedTemplateParsing , 1, 0, "delayed template parsing") | BENIGN_LANGOPT(DelayedTemplateParsing , 1, 0, "delayed template parsing") | ||||
LANGOPT(BlocksRuntimeOptional , 1, 0, "optional blocks runtime") | LANGOPT(BlocksRuntimeOptional , 1, 0, "optional blocks runtime") | ||||
ENUM_LANGOPT(GC, GCMode, 2, NonGC, "Objective-C Garbage Collection mode") | ENUM_LANGOPT(GC, GCMode, 2, NonGC, "Objective-C Garbage Collection mode") | ||||
ENUM_LANGOPT(ValueVisibilityMode, Visibility, 3, DefaultVisibility, | ENUM_LANGOPT(ValueVisibilityMode, Visibility, 3, DefaultVisibility, | ||||
"value symbol visibility") | "value symbol visibility") | ||||
ENUM_LANGOPT(TypeVisibilityMode, Visibility, 3, DefaultVisibility, | ENUM_LANGOPT(TypeVisibilityMode, Visibility, 3, DefaultVisibility, | ||||
"type symbol visibility") | "type symbol visibility") | ||||
Show All 38 Lines |
I was just thinking whether it would make sense to do the opposite i.e. to have a flag that would enable loading of the header (which won't be loaded by default). This might be better for compatibility.
The issues might arise because the users already have their own BIF declaration mechanisms in place in Clang or because of the parsing speed increase. The latter can affect testing significantly. Does the module mechanism use PCH?
Have you compared the speed with and without including the OpenCL header? Is there any difference?