When there are constants that have the same structural location, but not the same value, between different regions, we cannot simply outline the region. Instead, we find the constants that are not the same in each location, and promote them to arguments to be passed into the respective functions. At each call site, we pass the constant in as an argument regardless of type.
Added/Edited Tests:
- llvm/test/Transforms/IROutliner/outlining-constants-vs-registers.ll
- llvm/test/Transforms/IROutliner/outlining-different-constants.ll
- llvm/test/Transforms/IROutliner/outlining-different-globals.ll
s/Seen/InInput/
might be a better name?