By adding the prefixed instructions the branch distances are no longer computed correctly. Since prefixed instructions cannot cross a 64 byte boundary we have to assume that a prefixed instruction may have a nop prepended to it. This patch tries to take that nop into consideration when computing the size of basic blocks.
Details
Details
- Reviewers
power-llvm-team nemanjai hfinkel - Group Reviewers
Restricted Project - Commits
- rG9de1241bb2dd: [PowerPC][Future] Branch Distance Estimation For Prefixed Instructions
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Aside from a couple of minor nits, LGTM.
llvm/lib/Target/PowerPC/PPCBranchSelector.cpp | ||
---|---|---|
161 | s/You cannot have/It is not possible for | |
llvm/test/CodeGen/PowerPC/alignlongjumptest.mir | ||
2 | Minor nit: since you are splitting the run directives across multiple lines, might as well keep them to 80 columns. It appears that this is a bit wider. |
llvm/lib/Target/PowerPC/PPCBranchSelector.cpp | ||
---|---|---|
151 | s/iteself/itself |
s/iteself/itself