Reapplies 142c28ffa1323e9a8d53200a22c80d5d778e0d0f as part of D140242 which got reverted due to amdgpu openmp test failures.
This diff fixes said failures by eliding most of adjustInliningThresholdUsingCallee for indirect calls as the callee function is unavailable for indirect calls.
This also will fail for constexpr casts and aliases. You don’t need to give up on these cases. You should be going off the callee type you can get from the CallBase