Some love for prune-as-you-go inlining.

Hey folks,

Could someone help me get this bug-fix into LLVM’s TOT?

CloneAndPruneFunctionInto: Fix pruned inlining when blockaddresses are present.

Details:
The issue is actually very simple: We were attempting to update
references to block address, but only the one's from blocks we had
seen so far. In PruningFunctionCloner::CloneBlock, one block
is processed at a time, in a breadth first manner. This means that
our VMap, the instruction-remapping-mechanism, is also only updated
in an identical breadth first manner. In other words, if Block X
uses the address of Block Y, and Block Y has not yet been cloned,
then your instructions in Block X that reference the address of
Block Y will not be updated (so, they will refer to the old func's
Block Y, not the new func's block Y).

Jon

llvm-fix-blockaddr.diff (5.89 KB)

Please disregard. This is still a work in progress.