When tail duplication estimates a size of tail it uses instruction
count. Account for a number of instrictions in a bundle too.
Details
- Reviewers
foad arsenm - Commits
- rG8b417dd3d6c6: Process BUNDLE in tail duplication
Diff Detail
Event Timeline
llvm/lib/CodeGen/TailDuplicator.cpp | ||
---|---|---|
628–629 | This depends on the target interpretation of a bundle. A VLIW target may want to treat a bundle as 1 instruction |
llvm/lib/CodeGen/TailDuplicator.cpp | ||
---|---|---|
628–629 | VLIW packetizer works much later than this, in addPreEmitPass(). |
llvm/lib/CodeGen/TailDuplicator.cpp | ||
---|---|---|
628–629 | Also note that will increase a cost of a bundle, effectively preventing its tail duplication where it would be duplicated earlier. I.e. it will prevent an optimization, so even if there is a target which wants to consider bundle a single instruction it will do no harm, just will not change a source program. I.e. that is a change into a safe direction. |
llvm/lib/CodeGen/TailDuplicator.cpp | ||
---|---|---|
628–629 | In addition the reason to limit tail duplication is code size anyway, and speed is not measured in a number of instructions. |
This depends on the target interpretation of a bundle. A VLIW target may want to treat a bundle as 1 instruction