We align non-fallthrough branches under Cortex-M at O3 to lead to fewer instruction fetches. This improves that for the block after a LE or LETP. These blocks will still have branches on until the LowOverheadLoops pass is run (as they are not handled by analyzeBranch, the branch is not removed until later), so canFallThrough will return false. These extra branches will eventually be removed, leaving a fallthrough, so treat them as such and don't add unnecessary alignments.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp | ||
---|---|---|
362–379 | If my understanding is correct then the fall-through branch at the end of MBB isn't removed until the LowOverheadLoops pass. Do we therefore need to check if LOL are enabled? |
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp | ||
---|---|---|
362–379 | Hmm. I was considering that all non-lob cases would already have been cleared up, handled by analyzeBranch, but perhaps you are right and this should be checking more specifically. |
If my understanding is correct then the fall-through branch at the end of MBB isn't removed until the LowOverheadLoops pass. Do we therefore need to check if LOL are enabled?