inference: reinfer and track missing code for inlining (#59413)
When code is potentially needed for inlining, but missing for any
reason, be sure to regenerate it during inference with the correct
`ci_meets_requirement` flags (SOURCE_MODE_GET_SOURCE instead of
NOT_REQUIRED) so it is prepared for the optimizer if needed.
This was supposed to be the correct fix for someone else's bug with
missing inlining when expected, but I don't remember what bug it was
anymore. It should however improve handling and tracking of code (and
worlds of code) during inference, which should help for building upon
this base.
```
julia> @atomic Base.method_instance(promote, (Float64,Int)).cache.inferred = 0x22 # mark with inlining cost, deleting code
julia> @code_typed 1.0+1 # this should regenerate the code, but on master instead results in:
CodeInfo(
@ promotion.jl:433 within `+`
1 ─ %1 = invoke Base.promote(x::Float64, y::Int64)::Tuple{Float64, Float64}
│ %2 = builtin Core.getfield(%1, 1)::Float64
│ %3 = builtin Core.getfield(%1, 2)::Float64
│ @ promotion.jl:433 within `+` @ float.jl:492
│ %4 = intrinsic Base.add_float(%2, %3)::Float64
└── return %4
) => Float64
```