Fix two problems that popped up after my last patch. One is that the
stitching of prologue/epilogue can be wrong when reading a value from a
previous stage. Also changed how we duplicate phi instructions to avoid
generating extra phi that we delete later.
Details
- Reviewers
jmolloy - Commits
- rGe0297a8bee65: [ModuloSchedule] Fix a bug in experimental expander
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/ModuloSchedule.cpp | ||
---|---|---|
1660 | What's the rationale for this change? Is this just to avoid creating a phi that we destroy later? If so, I'd prefer to keep the logic simple over optimal. We can always clean up dead nodes easily. | |
1767 | The nesting is getting too deep here, let's move this into a helper function. |
llvm/lib/CodeGen/ModuloSchedule.cpp | ||
---|---|---|
1660 | Yes the goal is to avoid inserting useless Phi. The problem is that when we have a large number of stages we can run into combinatorial explosion since we move the phi instructions block by block. I moved the logic in a lambda to make it easier to read. |
What's the rationale for this change? Is this just to avoid creating a phi that we destroy later?
If so, I'd prefer to keep the logic simple over optimal. We can always clean up dead nodes easily.