This is an archive of the discontinued LLVM Phabricator instance.

[InstructionSimplify] Limit threadCmpOverPHI recursion depth to 1
AbandonedPublic

Authored by 0xdc03 on Jun 29 2023, 4:36 AM.

Details

Reviewers
nikic
Summary

Other places in the compiler (such as ValueTracking) only allow
recursing one level into phi nodes, however in InstructionSimplify the
limit is 3.

By reducing it to 1, there is a slight reduction in compile times (0.1%):
https://llvm-compile-time-tracker.com/compare.php?from=47a4331cd79ff63b13e369e28ccca268773cf9f2&to=20d987ab937caf22929f0c5790f0a8197b53b447&stat=instructions:u

Depends on D155718.

Diff Detail

Event Timeline

0xdc03 created this revision.Jun 29 2023, 4:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 4:36 AM
0xdc03 requested review of this revision.Jun 29 2023, 4:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 4:36 AM
0xdc03 updated this revision to Diff 542363.Jul 20 2023, 1:23 AM
  • Invert the patch stack
0xdc03 edited the summary of this revision. (Show Details)Jul 20 2023, 1:31 AM
0xdc03 updated this revision to Diff 542376.Jul 20 2023, 1:50 AM
  • Change the patch order
0xdc03 updated this revision to Diff 542387.Jul 20 2023, 2:19 AM
  • Fix some broken logic
0xdc03 abandoned this revision.Aug 16 2023, 5:52 AM

This patch is causing a regression that is proving too hard to track down, and for a 0.1% improvement its not really worth it.