We can treat conditional tail call both as call and false branch without CFG violations. Initially the BB containing CTC would always end with CTC instruction (as it is treated as tail call at this stage). The fall through FBB would also be added for this BB during CFG construction. The analyzeBranch would stop execution on finding isTailCall and initially would return nullptr for both CondBranch and UncondBranch. After BB reordering unconditional jump to FBB might be added by fixBranches (BB is treated normally as BB with one successor).
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
FYI if you just want to test, I think you can publish this as "draft" using "arc diff --draft"
Comment Actions
@rafaelauler Thanks, I've decided to add proper description since currently I don't really see any examples when removeConditionalTailCalls would be necessary. We can discuss it in discord if it will be comfortable for you or @maksfb .