If we see all functions that can be called, thus in a "closed module",
we can perform better reasoning in the presence of unknown callees of
indirect calls. We now collect all indirectly callable functions, and
match them against an indirect call site with an unknown callee. Every
function that is a candidate is potentially called.
The AMDGPU backend is the only user for now. We should enable this for
AMDGPU (and NVIDIA GPUs in certain cases) also when we run the
Attributor (or OpenMP-opt) earlier in the pipeline.
TODOs
- We should improve the "is candidate" logic.
Should this return ArrayRef?