Details
- Reviewers
rampitec arsenm - Commits
- rG56a5d78893e6: [AMDGPU] Disable optimizeEndCf at -O0
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | ||
---|---|---|
814 | skipFunction wouldn't be appropriate because this is still a lowering pass we must run |
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | ||
---|---|---|
814 | It still can be checked to skip optimization part of it only. Isn't it? |
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | ||
---|---|---|
814 | You can also just directly check optnone |
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | ||
---|---|---|
813 | There are two reasons why I did that:
| |
814 | Will do. |
I think this is an extreme interpretation of optnone. This is a minor optimization which happens as part of lowering. The fact we do this as a separate step is just an artifact of how we happen to lower control flow. It's not strictly true that no optimizations occur at -O0, especially if they are cheap and provide benefit
I agree with Stas. This optimization should be skipped for -O0. We can avoid the optnone check if it doesn't fit this context. The existing optLevel check in the patch would do then.
You can just check it where optimizeEndCf is called below.