Skip to content

Unnecessary VREG spills spoil performance #18

@efocht

Description

@efocht

In the attached function I get VREG spills which totally destroy performance. The number of VREGs should actually be sufficient, it is unclear why the compiler generates spills.

Check:

/opt/nec/nosupport/llvm-ve-1.15.0/bin/clang++ -fPIC -I. --target=ve-linux -std=c++11 -Rpass="(inline|unroll|loop.*)" -O3 -mllvm --regalloc=greedy -S -o test1_intr.s -c test1_intr.cpp

egrep "(vld |vst )" test1_intr.s | wc -l

All vld and vst in the function have additional attributes, therefore the ones without attributes come from spill/restore.

The number of registers should easily allow for UNR=21, instead even UNR=2 generates spills. We have 64 VREGs to distribute, what is so broken with the register allocators? (Tried -mllvm -regalloc=basic/fast/greedy).

test1_intr.zip

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions