Currently, in the IROutliner, we rebuild the CodeExtractorCache for every function when it needs to be analyzed for cost, or when it is outlined. For large pieces of code, this takes a long time.
We can instead build the caches at the beginning of the run and then adapt the cache as necessary. This required making the ache accessible from the CodeExtractor, and then adapting the IROutliner to build everything at once, and then reference it when necessary, removing instructions that were no longer in the original functions once they are outlined.
This reduces compile time significantly.
comment?