[llvm-dev] XMMs unused

Matthias Braun via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 30 10:17:11 PDT 2018


At a first glance I see nothing obviously wrong with the assembly, but it is a big file. So if you have a specific part in mind, please copy into the E-Mail discussion.

I assume you are compiling for a mac or linux system? In that case none of the xmm registers are callee saved (as you already explained) so the register allocator has to spill them if they are alive across a call. So I don't see proof yet that using xmm10-xmm15 would have helped in this function...

- Matthias

> On Oct 30, 2018, at 12:24 AM, Dangeti Tharun kumar via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi Craig,
> 
> The test case is from spec-17.
> 
> The attached is the assembly file for the function MeanShiftImage from spec17/538.imagick_r/src/magick/feature.c.
> As I was saying, registers XMM10-15 are not used.
> 
> 
> On Thu, Oct 25, 2018 at 2:16 PM Dangeti Tharun kumar <cs15mtech11002 at iith.ac.in <mailto:cs15mtech11002 at iith.ac.in>> wrote:
> Hi,
> 
> It can be reproduced with the following command:
> clang -S -I spec17/benchspec/CPU/538.imagick_r/src/ -O3 -mavx spec17/benchspec/CPU/538.imagick_r/src/magick/feature.c -DMAGICKCORE_HDRI_ENABLE
> I don't see any register above xmm9 been used in any function.
> 
> On Thu, Oct 25, 2018 at 10:44 AM Craig Topper <craig.topper at gmail.com <mailto:craig.topper at gmail.com>> wrote:
> Can you provide an example?
> 
> ~Craig
> 
> 
> On Wed, Oct 24, 2018 at 9:52 PM Dangeti Tharun kumar via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> Hi,
> 
> I see that, in Greedy register allocation not all the XMM registers are used(even there is a need) if there is a function call crossing the live range.
> There are spills which can be avoided just by using them.
> 
> The reason I see is the CCC declares XMMs are not callee saved. This means they are caller saved, correct me if I am wrong.
> Is the greedy RA intentionally not using XMMs in order to avoid saving and restoring regs at call site?
> 
> 
> -- 
> Regards,
> DTharun
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
> 
> 
> -- 
> Regards,
> DTharun
> 
> 
> -- 
> Regards,
> DTharun
> <meanshift.s>_______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181030/32e381ac/attachment-0001.html>


More information about the llvm-dev mailing list