[PATCH] D142026: Optimize OptTable::findNearest implementation and usage

2023-01-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. > Plausibly caused by this change -- I'm thinking that `MaximumDistance` is > initialized to `UINT_MAX - 1`, but then we cast that to a signed integer and > compare that, so it wraps to a large negative number. @nikic : I thought I fixed that with e8a163dc03

[PATCH] D142026: Optimize OptTable::findNearest implementation and usage

2023-01-20 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. FYI I just noticed some i686 failures that look something like this: /builddir/build/BUILD/llvm-16.0.0.src/redhat-linux-build/unittests/Option/./OptionTests --gtest_filter=OptTableTest/0.FindNearest -- /builddir/build/BUILD/llvm-16.0.0.src/unittests/Option/OptionPa

[PATCH] D142026: Optimize OptTable::findNearest implementation and usage

2023-01-19 Thread serge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6ad1b4095172: Optimize OptTable::findNearest implementation and usage (authored by serge-sans-paille). Changed prior to commit: https://reviews.ll

[PATCH] D142026: Optimize OptTable::findNearest implementation and usage

2023-01-19 Thread Nikita Popov via Phabricator via cfe-commits
nikic accepted this revision. nikic added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142026/new/ https://reviews.llvm.org/D142026 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D142026: Optimize OptTable::findNearest implementation and usage

2023-01-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 490412. serge-sans-paille added a comment. Thanks @nikic for the review. Remarks taken into account. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142026/new/ https://reviews.llvm.org/D142026 Files: clang/lib/Driver/Driver.cpp llvm/in

[PATCH] D142026: Optimize OptTable::findNearest implementation and usage

2023-01-18 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2475 if (getOpts().findNearest(Value, Nearest, IncludedFlagsBitmask, - ExcludedFlagsBitmask) <= 1) { + ExcludedFlagsBitmask, 0, 1) <= 1) { Di

[PATCH] D142026: Optimize OptTable::findNearest implementation and usage

2023-01-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, nikic. Herald added subscribers: StephenFan, hiraditya. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald a