rustc_codegen_llvm: Tidying of update_target_reliable_float_cfg
#146747
+9
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR simplifies floating type handling through
update_target_reliable_float_cfg
based on several facts:Due to the first fact, we can normally ignore minor and patch releases of LLVM and we can remove obscure variables like
lt_xx_x_x
.The second fact is missed when the minimum LLVM version is raised to LLVM 20 (cf. #145071) and one "fixed in LLVM 20" case can be safely removed (another cannot be removed since it's fixed on LLVM 20.1.1).
It also reorders certain
match
clauses by the architecture when there's no problems reordering it.Note that, an LLVM issue on MIPS is fixed on LLVM 20.1.0 and another on AArch64 is fixed on LLVM 20.1.1.
Originally, they are both considered fixed on LLVM 20.1.1 but the author separated them into two cases (so that the MIPS bug checking can be removed).
Related: #146615 (uses similar method to extract LLVM version)
Related: #145071 (follow-up of the minimum LLVM version upgrade to LLVM 20)
r? @workingjubilee