[llvm-branch-commits] [llvm] CodeGen: Remove UsesMSVCFloatingPoint from MachineModuleInfo (PR #100368)

Reid Kleckner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jul 24 09:38:15 PDT 2024


https://github.com/rnk approved this pull request.

I think @jyknight touched this last, and I may have advised him to simply use MMI to store this, since historically it has been used as a side channel for passing information along the code generation pipeline. It's good to avoid that, but it was what we were doing at the time. :)

I think the reason the existing scan was done as part of SDISel is that it is a scan over the IR, and ISel is the point at which we walk the IR to build the mostly-standalone MIR representation. Moving this scan to AsmPrinting is a bit distasteful, but it works and is less code. You could also make a cache-locality argument that walking the IR again during AsmPrinting is slow, but that's pretty weak.

Scanning the IR for FP types is obviously a gross approximation of `_fltused`. If we want to try to implement this properly, maybe we could scan all MachineInstrs during AsmPrinting for usage of vector or x87 FP operands. We can leave that out of scope, though.

In conclusion, we should land this as is, but I wanted to share some context.

https://github.com/llvm/llvm-project/pull/100368


More information about the llvm-branch-commits mailing list