[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. But it seems everything is autogenerated and nothing is “custom message”. Any custom change is removed by next autogeneration. Possibly @hans could tell us if there is a way CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> C++14 binary literals Thanks, noted. >> Suggest “xor” We could. Aaron what do you think? But I still like “0x” more. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 __

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Could the following text be acceptable? replace expression with '0xA ^ 1' or ‘10 xor 1’ to silence this warning (In C mode without xor macro “replace expression with '0xA ^ 1' to silence this warning”) I am not fan of “the ‘xor’ alternative token” CHANGES SINCE LAST

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Swap trick is cool, we can suggest it always(vs. ‘xor’) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216458. xbolva00 edited the summary of this revision. xbolva00 added a comment. Detect digit separators. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xo

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216478. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as-pow.cpp Index: test/SemaCXX/warn-xor-as-pow.cpp

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Implemented @Quuxplusone's idea to improve silence note. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I think everybody should be fine with this now :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> I think adding parens and casts are fairly well-understood to suppress >> warnings. It should work here as well. #define ALPHA_OFFSET (3). Did anobody from Chromium try it? >> They have varying levels of C++ proficiency I consider things like hex decimals or paren

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> other warning that behaves differently for ordinary and hex literals Such literals should indicate that the user knows what he/she is doing (bit tricks, ..). I agree that there should be a additional docs (as we mentioned it and kindly pinged @hans) and not force

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> What was the motivation for firing on more than bare literals? First patch supported diagnosing macros. There is no exact motivation why, simply “I just did it” to present working prototype. Based on review, things were adjusted. Some reviewers wanted to keep full

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216720. xbolva00 added a comment. Addressed Bruno Ricci's tips. Removed macro support. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr

[PATCH] D66621: [clang] Devirtualization for classes with destructors marked as 'final'

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. https://reviews.llvm.org/rGcb30590da10ba80a133222588efedab7e5fc9bdd does not help here? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66621/new/ https://reviews.llvm.org/D66621 ___ cfe-comm

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Removed macro support (again...). I agree with Nico, this warning is on by default so should be as exact as possible without many false positives. While we all know that the Chromium's false positive case could be rewritten for better code readability, on the other si

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216723. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as-pow.cpp Index: test/SemaCXX/warn-xor-as-pow.cpp

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216724. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as-pow.cpp Index: test/SemaCXX/warn-xor-as-pow.cpp

[PATCH] D66621: [clang] Devirtualization for classes with destructors marked as 'final'

2019-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Aha okay :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66621/new/ https://reviews.llvm.org/D66621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: regehr. xbolva00 added a comment. >> I now agree that it makes sense to warn when the operands are macros or >> variables. I could re-add macro support and then @jfb or @regehr would blame this diagnostic because of macro support =] variables could open a new box of

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I am strongly in favour to just land this as is. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-25 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Another bug found by -Wxor-used-as-pow :) https://github.com/christinaa/PcapPlusPlus/commit/4646a004f5168bcb78fe2dce78afa08d794c1450 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397

[PATCH] D66711: [clang] Warning for non-final classes with final destructors

2019-08-25 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 accepted this revision. xbolva00 added a comment. This revision is now accepted and ready to land. Looks fine Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66711/new/ https://reviews.llvm.org/D66711 ___ cfe-

[PATCH] D66765: [analyzer] (Urgent!) Add 9.0.0. release notes.

2019-08-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/ReleaseNotes.rst:263 + + - ``-analyzer-checker-option-help-alpha``: The list of incomplet and inkorrekt +not yet advised to be specified. Detto Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D66765: [analyzer] (Urgent!) Add 9.0.0. release notes.

2019-08-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/ReleaseNotes.rst:251 + + - ``-analyzer-checker-help-alpha``: The list of incomplet and inkorrekt +checkers not yet advised to be turned on. Please fix this Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D66397#1647455 , @aaron.ballman wrote: > Adding @rsmith to see if we can make forward progress on this patch again. On the other side, I don't want to waste Richard's time since I dont want to extend (variables and macros a

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 218115. xbolva00 added a comment. Fixed review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> tbh, I would appreciate if you would leave the definition of >> diagnoseXorMisusedAsPow() where it is and add a forward declare of the >> function earlier in the file. I uploaded the patch almost 2 weeks ago and nobody complained so I thought it is okay. Uploaded,

[PATCH] D59754: [Sema] Add c++2a designated initializer warnings

2019-08-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: cfe/trunk/lib/Sema/SemaInit.cpp:3112 SmallVector InitExpressions; + bool HasArrayDesignator = false; warning: variable ‘HasArrayDesignator’ set but not used [-Wunused-but-set-variable] bool HasArrayDesignator

[PATCH] D66711: [clang] Warning for non-final classes with final destructors

2019-08-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370594: [clang] Warning for non-final classes with final destructors (authored by xbolva00, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66621: [clang] Devirtualization for classes with destructors marked as 'final'

2019-08-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370597: [clang] Devirtualization for classes with destructors marked as 'final' (authored by xbolva00, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D66621: [clang] Devirtualization for classes with destructors marked as 'final'

2019-08-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> For now, I need help committing this, if anyone would be so kind! rL370597 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66621/new/ https://reviews.llvm.org/D66621 ___

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-09-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 218258. xbolva00 added a comment. Fixed review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-09-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11031-11032 // Do not diagnose macros. - if (Loc.isMacroID()) + if (Loc.isMacroID() || XorLHS.get()->getBeginLoc().isMacroID() || + XorRHS.get()->getBeginLoc().i

[PATCH] D66711: [clang] Warning for non-final classes with final destructors

2019-09-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. rL370737 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66711/new/ https://reviews.llvm.org/D66711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: compiler-rt/test/ubsan/TestCases/Pointer/index-overflow.cpp:15 + // ERR2: runtime error: pointer index expression with base {{.*}} overflowed to + // ERR1: runtime error: subtracting integral value of non-null pointer 0x{{.*}} from

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:59 + ``getelementptr inbounds`` can not change the null status of a pointer, + meaning it can not produce non-null pointer given null base pointer, and + likewise given non-null base pointer it can not prod

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:59 + ``getelementptr inbounds`` can not change the null status of a pointer, + meaning it can not produce non-null pointer given null base pointer, and + likewise given non-null base pointer it can not prod

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:59 + ``getelementptr inbounds`` can not change the null status of a pointer, + meaning it can not produce non-null pointer given null base pointer, and + likewise given non-null base pointer it can not prod

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11067 + + // Do not diagnose 2 ^ 64, but allow special case (2 ^ 64) - 1. + if (SubLHS && SubRHS && (LeftSideValue != 2 || RightSideValue != 64)) aaron.

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11067 + + // Do not diagnose 2 ^ 64, but allow special case (2 ^ 64) - 1. + if (SubLHS && SubRHS && (LeftSideValue != 2 || RightSideValue != 64)) xbolva

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11067 + + // Do not diagnose 2 ^ 64, but allow special case (2 ^ 64) - 1. + if (SubLHS && SubRHS && (LeftSideValue != 2 || RightSideValue != 64)) aaron.

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ok, I will fix it as you suggested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11067 + + // Do not diagnose 2 ^ 64, but allow special case (2 ^ 64) - 1. + if (SubLHS && SubRHS && (LeftSideValue != 2 || RightSideValue != 64)) xbolva

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2019-12-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. if(num != 0) memmove is missed optimization opportunity. Such branch can be removed (if profitable). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63324/new/ https://reviews.llvm.org/D63324 ___ cfe-commits mailing

[PATCH] D71857: Fixes -Wrange-loop-analysis warnings

2019-12-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp:22 #include "lldb/Target/Process.h" #include "lldb/Utility/Log.h" NFC patch? Repository: rG LLVM Github Monorepo

[PATCH] D71037: [Diagnostic] Add ftabstop to -Wmisleading-indentation

2020-01-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 reopened this revision. xbolva00 added a comment. This revision is now accepted and ready to land. Can you add a test case for that crash? Otherwise OK. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71037/new/ https://reviews.llvm.org/D71037 _

[PATCH] D70638: [Diagnostic] add a warning which warns about misleading indentation

2020-01-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. (re-ping; I think this false positive for goto label case is important to be fixed before 10 release) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70638/new/ https://reviews.llvm.org/D70638 ___

[PATCH] D71037: [Diagnostic] Add ftabstop to -Wmisleading-indentation

2020-01-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ah, true. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71037/new/ https://reviews.llvm.org/D71037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:2806 - // constructors. - if (VariableType.isPODType(SemaRef.Context)) return; assert it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:2806 - // constructors. - if (VariableType.isPODType(SemaRef.Context)) return; Mordante wrote: > xbolva00 wrote: > > assert it? > Sorry I don't understand what you mean. What do you wa

[PATCH] D72231: [Sema] Adds the pointer-to-int-cast diagnostic

2020-01-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> The diagnostic is not enabled by default But GCC enables it for C even without "-Wall or -Wextra". Clang should follow it.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72231/new/ https://reviews.llvm.org/D72231 _

[PATCH] D71374: Improve support of GNU mempcpy

2020-01-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 accepted this revision. xbolva00 added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71374/new/ https://reviews.llvm.org/D71374 _

[PATCH] D72467: [WIP] Remove "mask" operand from shufflevector.

2020-01-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4413 unsigned MaxRecurse) { - if (isa(Mask)) + if (all_of(Mask, [](int Elem) { return Elem == -1; })) return UndefValue::get(RetTy); -

[PATCH] D72052: [UserManual] Update the C++ standard support

2020-01-11 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. +1 Comment at: clang/docs/UsersManual.rst:2557 clang fully implements all of standard C++98 except for exported +templates (which were removed in C++11), and all of standards C++11, C++14, Clang ? :) Repository: rG LLVM Github M

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. https://reviews.llvm.org/D68593 added late SROA to NPM so it would be good to enable it for LPM as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87972/new/ https://reviews.llvm.org/D87972 __

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D87972#2284060 , @MaskRay wrote: > I have tested this patch internally and seen gains and losses. On one > document search related benchmark 3~5% improvement. One zippy (snappy) there > is 3~5% regression. Perhaps we do need

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D87972#2284060 , @MaskRay wrote: > I have tested this patch internally and seen gains and losses. On one > document search related benchmark 3~5% improvement. One zippy (snappy) there > is 3~5% regression. Perhaps we do need

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/test/Misc/loop-opt-setup.c:2 +// RUN: %clang -O1 -fexperimental-new-pass-manager -fno-unroll-loops -S -o - %s -emit-llvm | FileCheck %s -check-prefixes=CHECK-ALL,CHECK-NEWPM +// RUN: %clang -O1 -fno-experimental-new-pass-manager

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. X86 data collected by @lebedev.ri looks good as well. @greend for arm?:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87972/new/ https://reviews.llvm.org/D87972 ___ cfe-commit

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-25 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Does that sound reasonable? Yes IMHO. >> What are the next suggested steps? It would be great to isolate and check the cases which regressed a bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87972/new/ https://rev

[PATCH] D85097: [Sema] add warning for comparisons like 'x<=y<=z'

2020-08-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/test/Sema/warn-compare-op-parentheses.c:49 + b = p1 > p2 < p3; + // expected-warning@-1 {{comparisons like 'x<=y<=z' are interpreted as '(x<=y ? 1 : 0) <= z'}} + // expected-note@-2 {{place parentheses around the '>' compariso

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:115 cl::desc("The number of memory instructions to scan for " "dead store elimination (default = 100)")); static cl::opt Memo

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 accepted this revision. xbolva00 added a subscriber: spatel. xbolva00 added a comment. This revision is now accepted and ready to land. Thanks, amazing work! I agree that this should be enabled now and do not wait anymore. @nikic @spatel ? Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2020-12-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Status? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops

2020-12-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Can you reland this patch now? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86844/new/ https://reviews.llvm.org/D86844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-10-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> I'm not really sure what are my potential next steps here. Maybe just add option to disable late SROA? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87972/new/ https://reviews.llvm.org/D87972 _

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-10-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 accepted this revision. xbolva00 added a comment. >> I'll just say this LGTM as it establishes parity with what NewPM has been >> doing for a while already. +1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87972/new/ https://reviews.llvm

[PATCH] D87990: [Diagnostics] Diagnose -Wsizeof-array-div for array of pointers

2020-10-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGcaf28b0a1288: [Diagnostics] Diagnose -Wsizeof-array-div for array of pointers (authored by xbolva00). Herald added a proj

[PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2020-10-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D17993#2325616 , @CJ-Johnson wrote: > In D17993#2325610 , @jdoerfert wrote: > >> Can you please upload again with full context? > > My apologies, I am new to LLVM contribution. What is t

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2020-10-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. +1 for revert Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66324/new/ https://reviews.llvm.org/D66324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[PATCH] D17993: [CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments.

2020-11-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In that code there is a comment: >> These flags are required for GCC 6 builds as undefined behaviour in OpenJDK >> code So you should really fix UB... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17993/new/ https://rev

[PATCH] D99439: Update @llvm.powi to handle different int sizes for the exponent

2021-05-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. What about IR backward compatibility? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99439/new/ https://reviews.llvm.org/D99439 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D99439: Update @llvm.powi to handle different int sizes for the exponent

2021-05-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/test/Transforms/InstCombine/pow_fp_int16.ll:3 -; PR42190 +; Test case was copied from pow_fp_int.ll but adjusted for 16-bit int. +; Assuming that we can't generate test checks for the same reason (PR42740). Preco

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. You dont have to use -Wno-… You can use pragma to disable this warning for certain location in the code. -1 for revert just because of this reason. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews

[PATCH] D102090: [CMake][ELF] Link libLLVM.so and libclang-cpp.so with -Bsymbolic-functions

2021-05-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added subscribers: nikic, xbolva00. xbolva00 added a comment. >> I cannot figure out how to make -fno-semantic-interposition specific to >> llvm/ and clang/. Maybe @nikic knows? I think he is interested in this work, since the base (reverted) commit introduced 4% compile time improveme

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/include/llvm/IR/MatrixBuilder.h:242 +auto *Cmp = B.CreateICmpULT(Idx, NumElts); +if (!isa(Cmp)) { + Function *TheFn = Prefer early exit? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D102478: [Matrix] Emit assumption that matrix indices are valid.

2021-05-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/include/llvm/IR/MatrixBuilder.h:245 + Intrinsic::getDeclaration(getModule(), Intrinsic::assume); + B.CreateCall(TheFn->getFunctionType(), TheFn, {Cmp}, Name); +} B.CreateAssumption(Cmp) may work w

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-05-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Also fix a few places where this warning is correctly triggered. Create new patch please - dont mix fixes with new warning within one patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100581/new/ https://reviews.llv

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-25 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Would it be fine to revert this for now to work out the kinks? I dont think. This is a known problem, not caused by this patch, just exposed. You can search bugzilla for it, simply, if there is an UB, llvm should emit a “ret”. Repository: rG LLVM Github Monorepo

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D96418#2783541 , @leonardchan wrote: >> Well, no, I'm afraid it is actually clear that that code does have UB >> according to the C++ standard. Perhaps you mean that it *shouldn't* have >> UB, or that Clang should define its

[PATCH] D96223: [clang-tidy] Simplify static assert check

2021-05-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D96223#2788712 , @aaron.ballman wrote: > In D96223#2788681 , @lebedev.ri > wrote: > >> Reverted in be6b9e8ae71768d2e09ec14619ca4ecfdef553fa >>

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D100581#2792854 , @Abpostelnicu wrote: > I think there is a false positive with this @george.burgess.iv: > In this >

[PATCH] D93040: [InlineFunction] Use llvm.experimental.noalias.scope.decl for noalias arguments.

2021-01-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. http://llvm-compile-time-tracker.com/compare.php?from=344afa853fcfcc085cb5c957b4a07c7ea013bb1b&to=2b9a834c43cb1f93d33958c14b695896bb4e9c1e&stat=size-text Codesize regression 1% for tramp3d. Can you check it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D99439: Update @llvm.powi to handle different int sizes for the exponent

2021-09-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Herald added a subscriber: ctetreau. Just to mention, 'llvm.experimental.constrained.powi' uses i32. Probably not a big deal, just small inconsistency with llvm.powi. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99439/new

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 375115. xbolva00 added a comment. Introduced -Wbitwise-instead-of-logical flag. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Looks OK now? or something more to be done? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 375118. xbolva00 edited the summary of this revision. xbolva00 added a comment. Addressed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Maybe we should emit note like “cast one or both operands to int to silence this warning” (any idea for better note text?)? I think it could be useful. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 375960. xbolva00 added a comment. Herald added subscribers: sstefan1, s.egerton, simoncook, aheejin, dschuff. Herald added a reviewer: jdoerfert. Emit note to explain a user how to silence this warning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 375969. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaChecking.cpp clang/p.

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 3 inline comments as done. xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:69 def note_cast_to_void : Note<"cast expression to void to silence warning">; +def note_cast_operand_to_int : Note<"cast one or both operands

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added a comment. @rpbeltran @nathanchance @aaron.ballman Are you OK with the current state of this patch? Well, it is clear that some code in linux kernel/Chromium/etc needs to adjusted, but I think in many cases it would (atleast) improve read

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Why just no special case "= {0};" pattern and do not warn in that case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110656/new/ https://reviews.llvm.org/D110656 ___ cfe-commit

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 376279. xbolva00 added a comment. Updated warning-wall.c test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/Diagnostic

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: nathanchance. xbolva00 added a comment. >> If there are other patterns, I'd love to know what they are. Well, I dont know :) but something may arise so some testing would be useful. If possible, @beanz could share list of new warnings from LLVM build here? Also mayb

[PATCH] D110668: [clang-cl] Accept `#pragma warning(disable : N)` for some N

2021-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Please next time give a bit more time to potential reviewers / other folks outside your org. The whole lifecycle of this patch (postee - landed) took < 24h. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110668/new/ https

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGf62d18ff140f: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side… (authored by xbolva00). Repos

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Sema/Sema.h:5120 + /// + /// \param Statement If Statement is non-null, delay reporting the + /// diagnostic until the function body is parsed, and then do a basic Please adjust documentation, the

[PATCH] D110745: Redefine deref(N) attribute family as point-in-time semantics (aka deref-at-point)

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. This really needs to be properly benchmarked. Comment at: llvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll:9 ; Simple memcpy to alloca from constant address space argument. define i8 @memcpy_constant_arg_ptr_to_alloca([32 x i8] addrs

[PATCH] D110668: [clang-cl] Accept `#pragma warning(disable : N)` for some N

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: aaron.ballman. xbolva00 added a comment. In D110668#3036361 , @thakis wrote: > In D110668#3034576 , @xbolva00 > wrote: > >> Please next time give a bit more time to potential reviewer

[PATCH] D96419: [clang] Add -ffinite-loops & -fno-finite-loops options.

2021-02-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1923 + if (Arg *A = Args.getLastArg(OPT_save_temps_EQ)) +Opts.SaveTempsFilePrefix = Not needed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

<    2   3   4   5   6   7   8   9   10   11   >