On AIX we currently have one TOC entry for each constant in the constant
pool. This can create an issue in cases where there are a lot of
constants and we fill the TOC with constant pool entries.
This patch will try to merge the constant pool enties on the module
level. A struct will be created with all of the constants in that
module and the base address of that struct will be stored as a gobal
variable. All accesses to the constants in the struct will be done via
the base address of the global struct and and offset.
This pass was added after instruction selection. It was not easy to
decide where to place this pass as it doesn't fit well anywhere in the
piplelne. If this were to be done before instruction selection all
constants that may have been materialized or may have been folded away
in some fashion will be included in a merged constant pool. If this was
to be added as a feature in instruction selection it would be a module
level feature incuded in a basic block level pass.
Prefer llvm set types