In some situations, the compiler may insert an accumulator prime instruction and an accumulator unprime instruction with no use of that accumulator between the two.
That's for example the case when we store an accumulator after assembling it or restoring it. This patch adds a peephole to remove these prime and unprime instructions.
Details
Details
- Reviewers
nemanjai saghir NeHuang - Group Reviewers
Restricted Project - Commits
- rG18db29ea6fb6: [PowerPC] Add peephole to remove redundant accumulator prime/unprime…
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
400 ms | linux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp |
Event Timeline
llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp | ||
---|---|---|
373 | Question: Besides adding the operand register to the candidate, are we also recording the machine instruction used the register candidate? If I understand it properly, can we also add it in the comment? This would help understand your comment below we mark the two instructions for removal. - line 380 | |
376 | nit: do you think we need to add instruction OPC information in the message to differentiate them? | |
379 | nit: operand -> operand register |
Question: Besides adding the operand register to the candidate, are we also recording the machine instruction used the register candidate? If I understand it properly, can we also add it in the comment? This would help understand your comment below we mark the two instructions for removal. - line 380