[PATCH] D117965: [AlwaysInliner] Enable call site inlining to make flatten attribute working again (PR53360)

2022-01-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/lib/Transforms/IPO/AlwaysInliner.cpp:95 - // Remember to try and delete this function afterward. This both avoids - // re-walking the rest of the module and avoids dealing with any iterator - // invalidation issues

[PATCH] D117965: [AlwaysInliner] Enable call site inlining to make flatten attribute working again (PR53360)

2022-01-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added reviewers: leonardchan, aeubanks. Herald added subscribers: ormris, hiraditya. xbolva00 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Problem: Migration to new PM broke flat

[PATCH] D117091: [Clang] Add attributes alloc_size and alloc_align to mm_malloc

2022-01-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 402207. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117091/new/ https://reviews.llvm.org/D117091 Files: clang/lib/Headers/mm_malloc.h clang/test/Headers/mm_malloc.c Index: clang/test/Headers/mm_malloc.c ==

[PATCH] D117091: [Clang] Add attributes alloc_size and alloc_align to mm_malloc

2022-01-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 402206. xbolva00 added a comment. Added testcase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117091/new/ https://reviews.llvm.org/D117091 Files: clang/lib/Headers/mm_malloc.h clang/test/Headers/mm_malloc.c Index: clang/test/Headers/mm_mall

[PATCH] D117091: [Clang] Add attributes alloc_size and alloc_align to mm_malloc

2022-01-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Yes, test for alignment should be possible, something like _Bool alig_test(void) { // CHECK: ret i1 true yvoid *p = _mm_malloc(2014, 16); _Bool ret = ((__SIZE_TYPE__)p % 16) == 0; _mm_free(p); return ret; } For alloc size not sure how..

[PATCH] D117091: [Clang] Add attributes alloc_size and alloc_align to mm_malloc

2022-01-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added reviewers: reames, rjmccall, jdoerfert. xbolva00 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. alloc align https://clang.llvm.org/docs/AttributeReference.html#alloc-align alloc size https://c

[PATCH] D114425: [clang] Add __builtin_bswap128

2022-01-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. int num = …; __builtin_bswap64(num); // works, no error __builtin_bswap128(num); // should work as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114425/new/ https://reviews.llvm.org/D114425 _

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn:10 output = "$target_gen_dir/config.h" values = [ +"BUG_REPORT_URL=https://github.com/llvm/llvm-project/issues/";, This url should redirect to github

[PATCH] D116262: [clang] adds `__remove_reference` as a compiler built-in

2021-12-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Missing description / motivation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116262/new/ https://reviews.llvm.org/D116262 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D114425: [clang] Add __builtin_bswap128

2021-12-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Looks fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114425/new/ https://reviews.llvm.org/D114425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D114425: [clang] Add __builtin_bswap128

2021-12-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Please update Release Notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114425/new/ https://reviews.llvm.org/D114425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D115471: [clang] number labels in asm goto strings after tied inputs

2021-12-11 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/ReleaseNotes.rst:157 ABI stability. +- When using ``asm goto`` with outputs whose constraint modifier is ``"+"``, we + now change the numbering of the labels to occur after hidden tied inputs for there is

[PATCH] D100879: [Clang] Propagate guaranteed alignment for malloc and others

2021-11-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Just curious, did you try firefox with malloc? (If you care about the best performance). “ It also mentions that forcing jemalloc to have 16-byte alignment will significantly slow down its performance.” It would be interesting to see real world data, like firefox benc

[PATCH] D100879: [Clang] Propagate guaranteed alignment for malloc and others

2021-11-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D100879#3144751 , @collares wrote: > In https://bugzilla.mozilla.org/show_bug.cgi?id=1741454, oxalica discovered > this breaks jemalloc-using code, since jemalloc does not guarantee 16-byte > alignment. Not sure if jemalloc

[PATCH] D107347: [Sema] haveSameParameterTypes - fix repeated isNull() test

2021-10-17 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. Could be changed to the assert in the future…. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107347/new/ https://reviews.llvm.org/D10734

[PATCH] D111215: clang release notes: document the -Wbool-operation improvement

2021-10-06 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. First form is better I think. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111215/new/ https://reviews.llvm.org/D111215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D111215: clang release notes: document the -Wbool-operation improvement

2021-10-06 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. One small comment about side effects, otherwise LG. Please wait a +-day for potentional review comments. Comment at: clang/docs/ReleaseNotes.rst:54 -- ... +- -Wbitwise

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

2021-10-06 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D108003#3044853 , @sylvestre.ledru wrote: > It found a few issues on Firefox: > https://bugzilla.mozilla.org/show_bug.cgi?id=1734285 > > I think it should be added it in the release notes: > https://reviews.llvm.org/D111215

[PATCH] D111215: clang release notes: document the -Wbool-operation improvement

2021-10-06 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/ReleaseNotes.rst:54 -- ... +- -Wbool-operation warns about use of bitwise with boolean operands -Wbitwise-instead-of-logical (part of -Wbool-operation) warns … ? Repository: rG LLVM Github Monorepo

[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] 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] 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] 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] 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] 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] 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 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 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] 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-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 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-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-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. 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 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] 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] D103088: [clang] pre-0388 array parm list initialization

2021-09-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Commited without approval? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103088/new/ https://reviews.llvm.org/D103088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2021-09-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ping I think I will start with AND only as this is more error prone pattern. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 ___ cfe-commits mailing list cfe-commits@lists.

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

2021-08-27 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> I'll run this warning against ChromeOS and see if I spot any interesting >> results. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 ___ cfe-commits mailing lis

[PATCH] D108138: [SimplifyCFG] Remove switch statements before vectorization

2021-08-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> I had a look at the LowerSwitch pass as suggested by @junparser, and I did >> find that running it before vectorisation transforms the switch and allows >> the same loops to be vectorised. However, I did find that if the loop is not >> vectorised then the switch is

[PATCH] D108138: [SimplifyCFG] Remove switch statements before vectorization

2021-08-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> I could try to change LowerSwitch to create branches which SimplifyCFG will >> be able to recognise and replace with a switch, or try to change SimplifyCFG >> to recognise this pattern of compares & branches. 2. option is better. Repository: rG LLVM Github Mon

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D104854#2957529 , @spatel wrote: > In D104854#2957471 , @sepavloff > wrote: > >> In D104854#2957423 , @spatel wrote: >> >>> Is it intentional

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

2021-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> and it would be more of an optimization than correctness issue as far as I >> understand Yeah, this is right, indeed. Maybe @rpbeltran has some idea or motivating cases for OR pattern? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://revi

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

2021-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. @rpbeltran please check new revision, I added support for bitwise OR. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2021-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D108003#2955009 , @aeubanks wrote: > In D108003#2944178 , @aeubanks > wrote: > >> I ran this over Chrome and ran into a use case that looks legitimate. It >> seems like the pattern i

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

2021-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 367611. xbolva00 edited the summary of this revision. xbolva00 added a comment. - Only warn when both sides have potentional side effects (conversative, but covers motivating case, reduces useless noise - which may hide real bug - caused by this warning) -

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

2021-08-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D108003#2955058 , @rpbeltran wrote: > This patch seems like a great contribution! Really glad to see this being > added. I did have a question though on why this only appears to catch "&" vs > "&&" instead of doing the same

[PATCH] D108138: [SimplifyCFG] Remove switch statements before vectorization

2021-08-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added subscribers: nikic, xbolva00. xbolva00 added a comment. Also check @nikic’s https://reviews.llvm.org/D95296 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108138/new/ https://reviews.llvm.org/D108138 _

[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Not related to your patch, feel free to ignore Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 ___ cfe-commits mailing list cfe-commit

[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-16 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Please drop a change in PowerPC/O3 -pipeline.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891

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

2021-08-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 366490. xbolva00 added a comment. Rebased. Changed the warning text. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaChecking

[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. sqlite3 +1.3% increase of compile time for -O0 -g is simply not acceptable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 ___ cfe-co

[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. http://llvm-compile-time-tracker.com/compare.php?from=530aa7e4da14fb22493ab7e175f8c34dd10333d3&to=435785214f73ff0c92e97f2ade6356e3ba3bf661&stat=instructions Still same problem with -O0 -g. Please wait a bit for more people, dont rush. Repository: rG LLVM Github Monor

[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. http://llvm-compile-time-tracker.com/compare.php?from=1f2d40c47f5f8fd01d91d73a1f52044fe1c83225&to=c4e5425aa579d21530ef1766d7144b38a347f247&stat=instructions Compile time regressions especially for -O0 -g are higher than expected with this patch. Repository: rG LLVM

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

2021-08-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. -Wbool-operation is basically enabled even without -Wall, but yeah, gcc only warns with -Wall specified. I will change it as well. 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-08-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D108003#2944178 , @aeubanks wrote: > I ran this over Chrome and ran into a use case that looks legitimate. It > seems like the pattern in LLVM where we want to run a bunch of > transformations and get if any of them changed

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

2021-08-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Thanks! Well, for those cases, && instead of & looks like a better choice. WDYT? Or is it a very noisy? Restrict more so both sides must have side effects? Maybe we could suggest to use cast - (int)boolRHS - as a way how to silence this warning.. Or any better suggest

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

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 366143. xbolva00 marked an inline comment as not done. xbolva00 added a comment. New test with volatile int. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 Files: clang/include/clang/Basic/DiagnosticGr

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

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as not done. xbolva00 added inline comments. Comment at: clang/test/Sema/warn-bitwise-and-bool.c:21-22 +void test(boolean a, boolean b, int i) { + b = a & b; + b = a & foo(); // expected-warning {{bitwise and of boolean expressions; did y

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

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7428-7430 +def warn_bitwise_and_bool : Warning< + "bitwise and of boolean expressions; did you mean logical and?">, + InGroup; Quuxplusone wrote: > I suggest that the n

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

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 366139. xbolva00 added a comment. Added new tests. Thanks for recommendations. 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-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 366130. 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/te

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

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Open questions: 1, warn for pattern boolA & boolB always? I think that we will have some false positives. 2, restrict this warning even more? RHS must be a call? 3, something similar for bitwise or? @hans @nickdesaulniers maybe you want to try this new warning on Chrome

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

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added reviewers: hans, nickdesaulniers, aaron.ballman, rsmith. xbolva00 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Motivation: https://arstechnica.com/gadgets/2021/07/google-pushed-a-one-charac

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Yes, something like that, plus I think you want put UnreachableCodeFallthrough into group UnreachableCode as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107933/new/ https://reviews.llvm.org/D107933 __

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I think we should just move it, not delete it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107933/new/ https://reviews.llvm.org/D107933 ___ cfe-commits mailing list cfe-commit

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. GCC does not warn (with common -Wall) for this case, right? I think Clang should not as well. ImplicitFallthroughUnreachable could be enabled with -Wunreachable-code, if you think we should have it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> I think we should update this for all of clang instead. But first you need to prove that clang matches gcc x.y.z. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107304/new/ https://reviews.llvm.org/D107304

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

2021-08-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Seems like lnt related things are stable now so maybe it is a good time to update release notes? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D74436 __

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

2021-06-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/UsersManual.rst:1501 - * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=fast``). This is the default behavior. + * ``preci

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

2021-06-10 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/UsersManual.rst:1501 - * ``precise`` Disables optimizations that are not value-safe on floating-point data, although FP contraction (FMA) is enabled (``-ffp-contract=fast``). This is the default behavior. + * ``preci

[PATCH] D103949: Only consider built-in compound assignment operators for -Wunused-but-set-*

2021-06-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ok thanks for info. We should follow gcc in this case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103949/new/ https://reviews.llvm.org/D103949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D103949: Only consider built-in compound assignment operators for -Wunused-but-set-*

2021-06-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. gcc also ignores it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103949/new/ https://reviews.llvm.org/D103949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

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

2021-06-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D100581#2798079 , @raj.khem wrote: > http://sprunge.us/FJzZXL is a file from harfbuzz and it warns > > a.cc:28670:32: error: variable 'supp_size' set but not used > [-Werror,-Wunused-but-set-variable] > unsigned int s

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Maybe Nick could try this patch with linux kernel? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 accepted this revision. xbolva00 added a comment. LG in the current state. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101387/new/ https://reviews.llvm.org/D101387 ___ cfe-commits mailing list

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/test/Driver/stack-protector-guard.c:38 // CHECK-GS: "-cc1" {{.*}}"-mstack-protector-guard-reg=gs" -// INVALID-REG: error: invalid value {{.*}} in 'mstack-protector-guard-reg=','for X86, valid arguments to '-mstack-protector-gua

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Looks better now, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101387/new/ https://reviews.llvm.org/D101387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:279 "-fembed-bitcode is not supported on versions of iOS prior to 6.0">; +def err_drv_negative_columns : Error< +"invalid value '%1' in '%0', value must be 'none' or a positive i

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/test/Driver/stack-protector-guard.c:38 // CHECK-GS: "-cc1" {{.*}}"-mstack-protector-guard-reg=gs" -// INVALID-REG: error: invalid value {{.*}} in 'mstack-protector-guard-reg=','for X86, valid arguments to '-mstack-protector-gua

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/test/Driver/stack-protector-guard.c:38 // CHECK-GS: "-cc1" {{.*}}"-mstack-protector-guard-reg=gs" -// INVALID-REG: error: invalid value {{.*}} in 'mstack-protector-guard-reg=','for X86, valid arguments to '-mstack-protector-gua

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/test/Driver/stack-protector-guard.c:38 // CHECK-GS: "-cc1" {{.*}}"-mstack-protector-guard-reg=gs" -// INVALID-REG: error: invalid value {{.*}} in 'mstack-protector-guard-reg=','for X86, valid arguments to '-mstack-protector-gua

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2021-05-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> When I create the new RFC patch, I'll try to get details on that and include >> it in the description. Great! Thanks. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 _

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2021-05-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Perhaps that should warn even if the RHS is in hex form It would be kinda strange, since in one clang release we ask users to silence warning with hex form and newer release would warn anyway. Not a fan of this decision. >> , or is an enumerator constant, or This

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2021-05-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. No, we want to preserve warning for 2 ^ MACRO or 10 ^ MACRO. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2021-05-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I remember that was interest to support macros too :) tbh I cant remember now such real world case where “macro ^ cst” was an issue but.. it was a long time ago ;) If you are want, you can send patch to to avoid warning in this case, we can discuss it. Repository:

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-04-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:280 +def err_drv_small_columns : Error< +"invalid value '%1' in '%0', expected '%1' to be '%2' or greater">; nickdesaulniers wrote: > xbolva00 wrote: > > nickdesa

[PATCH] D101598: [clang][Sema] adds `[[clang::no_address]]` attribute

2021-04-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D101598#2729865 , @ldionne wrote: > Just for posterity, what we discussed is that since there is a list of > addressable functions in the standard, we should explore adding a warning to > Clang that fires whenever somebody t

[PATCH] D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion

2021-04-29 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:280 +def err_drv_small_columns : Error< +"invalid value '%1' in '%0', expected '%1' to be '%2' or greater">; nickdesaulniers wrote: > xbolva00 wrote: > > nickdesa

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