19418, "bradcray", "Reduce size of chpl__header.h for C back-end?", "2022-03-11T01:43:04Z"
While looking at C compilation times this week, we've noticed how
much slower --incremental
can be, where we expect that a big
source of overhead is re-parsing chpl__header.h
for each .c
file that's generated. This issue postulates that with some minor
efforts, we could probably improve this situation significantly.
Specifically, chpl__header.h
was used as a kitchen sink header
for expediency early in the project's history, and seems likely
that it could be improved, particularly as we deal with more large,
multi-module codes.
As some examples:
-
chpl__header.h
predated any notion ofprivate
, so currently
all private symbols are put into it even though they are not
available outside of their own modules. - It seems as though
chpl__header.h
could be split into a.h
file per module without too much difficulty, where modules
would only#include
the headers for any modules whose
contents they need to refer to.
What else might we find if we look through its contents for
simple programs?