[llvm-dev] LLVM and System V ABI Inconsistency Question

Sochat, Vanessa via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 14 08:01:39 PDT 2021


Hi LLVM Community,

I’m hoping for some insight to a question I stumbled on – I’ve been trying various social networks and contacts to no avail! I was recently looking at the System V ABI Document for X86 and comparing to the LLVM source code, and I had a few questions about register allocation. Basically, when we are doing the post merge step in classifying, say, a struct, the first rule says that we check for either lo or hi to be in memory, and then set the whole thing to memory. But in the implementation, it only checks hi (and then changes lo). I thought if it’s not an oversight, it might be the case that lo can never be set to memory, or something like that? I’m hoping that you have some insight because I’m not sure if this is an oversight on my part! I shared some screenshots here:

https://twitter.com/vsoch/status/1435687187979268099

And the link to the code in question is here:

https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/TargetInfo.cpp#L2726
Thank you so much for your help! 😊

Best,

Vanessa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210914/6e1248f2/attachment.html>


More information about the llvm-dev mailing list