[llvm] [CodeGen][X86] Fix lowering of tailcalls when `-ms-hotpatch` is used (PR #77245)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 05:09:19 PST 2024


aganea wrote:

> @sylvain-audi For 1, I think we can avoid introducing the wrapper `PATCHABLE_OP` and instead add `MIFlag` (/llvm/include/llvm/CodeGen/MachineInstr.h) for your purpose.

One interesting approach that goes along your lines would be to do like x64 MSVC does: always generate a 2-byte instruction at the start of the function, with no consideration to `PATCHABLE_OP` or any other flag. We could do that for MSVC triples. But that seems more involved and I wanted a quick fix ready for 18.0 brachout. + at rnk in case you have an opinion.

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


More information about the llvm-commits mailing list