This is a simple model for checking when Spill2Reg is profitable in x86.
It walks through instructions in the proximity of the spill or reload and
counts the number of memory and vector instructions. If the count of
memory instructions is greater than a threshold and the count of vector
instructions less than a threshold, then we consider it to be profitable.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/include/llvm/CodeGen/TargetInstrInfo.h | ||
---|---|---|
2041 | Use the same format as the messages in other callback functions. | |
2050 | same | |
2059 | same | |
llvm/lib/Target/X86/X86InstrInfo.cpp | ||
82 | 'the' | |
87 | Be consistent with other description. | |
9736 | Instead of checking register size, can you check if MO.getReg() belongs to any vector register class explicitly? | |
9790 | I don't understand this statement. Kill flag means the last use of a register, but DstReg will be used to move the value back to integer register. |
The profitability function now checks a radius around the instruction and the mem threshold is now a percentage.
Use the same format as the messages in other callback functions.