xbolva00 (Dávid Bolvanský)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 5 2018, 5:18 PM (14 w, 5 d)

Recent Activity

Yesterday

xbolva00 added a comment to D48386: [clang] Mark libm functions writeonly when we care about errno.

Ping :)

Mon, Jul 16, 11:23 AM

Sat, Jul 14

xbolva00 added a comment to D48828: [InstSimplify] fold extracting from std::pair.

Looks nice!

Sat, Jul 14, 6:37 AM
xbolva00 added a comment to D35014: [X86] Improvement in CodeGen instruction selection for LEAs..

Please rebase. Thanks.

Sat, Jul 14, 4:37 AM

Sun, Jul 1

xbolva00 updated subscribers of D48721: Patch to fix pragma metadata for do-while loops.
Sun, Jul 1, 2:28 PM · Restricted Project
xbolva00 resigned from D45653: Enable sibling-call optimization for functions returning structs.
Sun, Jul 1, 6:04 AM

Thu, Jun 28

xbolva00 added a comment to D48721: Patch to fix pragma metadata for do-while loops.

Please upload patch with full context

Thu, Jun 28, 7:00 AM · Restricted Project
xbolva00 added inline comments to D48706: [X86] Suppress load folding into and/or/xor if it will prevent matching btr/bts/btc..
Thu, Jun 28, 12:29 AM

Sat, Jun 23

xbolva00 accepted D48516: ADT: Use EBO to shrink SmallVector size 1.

Looks fine

Sat, Jun 23, 10:36 AM
xbolva00 added inline comments to D46662: [X86] condition branches folding for three-way conditional codes.
Sat, Jun 23, 5:09 AM
xbolva00 added a comment to D47346: [X86] Add a new pass to fold extension into load instructions in previous BB.

This looks nice. Any more reviews?

Sat, Jun 23, 5:03 AM

Thu, Jun 21

xbolva00 added inline comments to rL333740: Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp….
Thu, Jun 21, 9:40 AM

Wed, Jun 20

xbolva00 added inline comments to D48388: [NFC][EarlyCSE] Understand WriteOnly function calls in EarlyCSE with MSSA.
Wed, Jun 20, 12:44 PM
xbolva00 added a comment to D47423: Simplify recursive launder.invariant.group and strip.

Looks fine

Wed, Jun 20, 9:19 AM

Mon, Jun 18

xbolva00 added inline comments to D47895: llvm: Add support for "-fno-delete-null-pointer-checks".
Mon, Jun 18, 1:00 PM

Jun 16 2018

xbolva00 added a comment to D48223: Allow binop C1, (select cc, CF, CT) -> select folding.

What about
(X / Y) != 0 -> X >= Y ?

Jun 16 2018, 2:50 AM

Jun 12 2018

xbolva00 abandoned D47198: [InstCombine] Replace malloc+strcpy with malloc+memcpy.
Jun 12 2018, 12:27 PM
xbolva00 abandoned D47345: [InstructionCombining] Replace small heap allocations with local variables.
Jun 12 2018, 12:27 PM
xbolva00 abandoned D47237: [DSE] Calloc-strlen optimizations.
Jun 12 2018, 12:26 PM

Jun 10 2018

xbolva00 added a comment to D47345: [InstructionCombining] Replace small heap allocations with local variables.

Friendly ping :)

Jun 10 2018, 9:38 AM

Jun 9 2018

xbolva00 accepted D47973: [ADT] Change the behavior of `StringRef::rsplit()` when the separator is not found..

Makes sense, thanks

Jun 9 2018, 5:19 AM

Jun 7 2018

xbolva00 added a comment to D47894: [clang]: Add support for "-fno-delete-null-pointer-checks".

The problem would come from propagating nonnull-ness from something which isn't inherently nonnull. For example, strlen has a nonnull argument, so strlen(NULL) is UB, therefore given int z = strlen(x); if (x) {...}, we can remove the null check. (Not sure we actually do this transform at the moment, but it's something we could do in the future.)

Jun 7 2018, 3:10 PM
xbolva00 added inline comments to D47895: llvm: Add support for "-fno-delete-null-pointer-checks".
Jun 7 2018, 11:19 AM
xbolva00 added a comment to D47135: [analyzer] A checker for dangling internal buffer pointers in C++.

Ping

Jun 7 2018, 8:13 AM

Jun 3 2018

xbolva00 accepted D47406: [ADT] Add `StringRef::rsplit(StringRef Separator)`..

lg

Jun 3 2018, 9:41 AM

Jun 2 2018

xbolva00 added inline comments to D47345: [InstructionCombining] Replace small heap allocations with local variables.
Jun 2 2018, 11:55 AM
xbolva00 added inline comments to D47345: [InstructionCombining] Replace small heap allocations with local variables.
Jun 2 2018, 11:40 AM
xbolva00 added a comment to D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen.

I would like to see more negative tests.
What does it do if the len/size is a constant?
Variable that wasn't just assigned with strlen() return?

Thanks for the comment! What do you mean by negative test?

Jun 2 2018, 9:15 AM · Restricted Project

Jun 1 2018

xbolva00 accepted D47135: [analyzer] A checker for dangling internal buffer pointers in C++.

Looks fine, awesome feature!

Jun 1 2018, 3:03 PM
xbolva00 added a comment to D34796: upporting -f(no)-reorder-functions flag, clang side change.

Ping

Jun 1 2018, 2:55 PM

May 31 2018

xbolva00 added a comment to D45736: [SimplifyLibcalls] Replace locked IO with unlocked IO.
May 31 2018, 12:16 PM
xbolva00 abandoned D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove.

Okey, abandoning this patch since these functions are deprecated away and doing SPEC two times just to prove something.. No, it is a waste of time.

May 31 2018, 9:53 AM
xbolva00 committed rL333668: [SimplifyLibcalls] [NFC] Cleanup, improvements.
[SimplifyLibcalls] [NFC] Cleanup, improvements
May 31 2018, 9:43 AM
xbolva00 closed D47397: [SimplifyLibcalls] [NFC] Cleanup, improvements.
May 31 2018, 9:43 AM
xbolva00 added a comment to D45736: [SimplifyLibcalls] Replace locked IO with unlocked IO.

Not sure about benchmarks, if there are any for C FILE IO. But in my tests and programs I see small improvements - yes, they read and write a lot from / to files.

May 31 2018, 7:10 AM
xbolva00 added a comment to D45736: [SimplifyLibcalls] Replace locked IO with unlocked IO.
May 31 2018, 7:03 AM

May 30 2018

xbolva00 added a reviewer for D47397: [SimplifyLibcalls] [NFC] Cleanup, improvements: spatel.
May 30 2018, 12:44 PM
xbolva00 added a comment to D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen.

memcpy(crypt_buf, passwd, passwd_len); <--- warning
memcpy(crypt_buf + passwd_len, salt, salt_len);

This is a false warning since it appends strings using memcpy. But no idea what to do and if it is possible to avoid these false warnings.

I have just tested it because of the malloc() function. I'm using CodeChecker and leaved the default settings, so IsSafeFunctionsAreAvailable = 1. Because of the malloc strncpy_s() cannot handle this case, but if the check would ran with IsSafeFunctionsAreAvailable = 0, it rewrites it to strncpy(crypt_buf, passwd, passwd_len + 1) which is a good transformation, as the official memcpy()'s result not null-terminated.

May 30 2018, 9:14 AM · Restricted Project
xbolva00 added a comment to D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen.

memcpy(crypt_buf, passwd, passwd_len); <--- warning
memcpy(crypt_buf + passwd_len, salt, salt_len);

May 30 2018, 8:40 AM · Restricted Project
xbolva00 added a comment to D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen.

Thanks! Happy to see it is more powerful now :)

May 30 2018, 8:28 AM · Restricted Project

May 29 2018

xbolva00 added a comment to D47397: [SimplifyLibcalls] [NFC] Cleanup, improvements.

Is it ok?

May 29 2018, 12:23 PM
xbolva00 added a comment to D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove.

ping

May 29 2018, 4:40 AM

May 28 2018

xbolva00 added a comment to D45653: Enable sibling-call optimization for functions returning structs.

Ping

May 28 2018, 9:00 AM

May 26 2018

xbolva00 added inline comments to D45517: [analyzer] False positive refutation with Z3.
May 26 2018, 2:30 PM
xbolva00 added inline comments to D47135: [analyzer] A checker for dangling internal buffer pointers in C++.
May 26 2018, 2:06 PM
xbolva00 updated the summary of D47397: [SimplifyLibcalls] [NFC] Cleanup, improvements.
May 26 2018, 5:06 AM
xbolva00 added inline comments to D46052: GNUstep Objective-C ABI version 2.
May 26 2018, 4:30 AM
xbolva00 added inline comments to D46052: GNUstep Objective-C ABI version 2.
May 26 2018, 4:22 AM
xbolva00 added a reviewer for D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove: efriedma.
May 26 2018, 3:12 AM
xbolva00 committed rL333340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError.
[ClangDiagnostics] Silence warning about fallthrough after PrintFatalError
May 26 2018, 2:28 AM
xbolva00 committed rC333340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError.
[ClangDiagnostics] Silence warning about fallthrough after PrintFatalError
May 26 2018, 2:28 AM
xbolva00 closed D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError.
May 26 2018, 2:28 AM
xbolva00 closed D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError.
May 26 2018, 2:28 AM

May 25 2018

xbolva00 created D47397: [SimplifyLibcalls] [NFC] Cleanup, improvements.
May 25 2018, 4:06 PM
xbolva00 added a comment to D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError.

Ok?

May 25 2018, 2:09 PM
xbolva00 added inline comments to D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 25 2018, 2:04 PM
xbolva00 updated the diff for D47345: [InstructionCombining] Replace small heap allocations with local variables.
  • Check number of frees
May 25 2018, 1:27 PM
xbolva00 added inline comments to D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 25 2018, 1:03 PM
xbolva00 added inline comments to D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 25 2018, 1:00 PM
xbolva00 retitled D47345: [InstructionCombining] Replace small heap allocations with local variables from [InstructionCombining] Replace small allocations with local/global variable to [InstructionCombining] Replace small heap allocations with local variables.
May 25 2018, 12:32 PM
xbolva00 added a comment to D47345: [InstructionCombining] Replace small heap allocations with local variables.

Maybe the code is ready?

May 25 2018, 12:21 PM
xbolva00 updated the diff for D47345: [InstructionCombining] Replace small heap allocations with local variables.
  • Detect IrreducibleCFG
May 25 2018, 12:21 PM
xbolva00 updated the summary of D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 25 2018, 11:48 AM
xbolva00 updated the diff for D47345: [InstructionCombining] Replace small heap allocations with local variables.

Addressed review comments

May 25 2018, 11:48 AM
xbolva00 added inline comments to D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 25 2018, 11:45 AM
xbolva00 added a comment to D47345: [InstructionCombining] Replace small heap allocations with local variables.

Maybe introduce local cache to track:
Function --- Number of malloc -> alloca?

May 25 2018, 10:36 AM
xbolva00 added a reviewer for D47345: [InstructionCombining] Replace small heap allocations with local variables: efriedma.
May 25 2018, 9:44 AM
xbolva00 updated the diff for D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 25 2018, 9:43 AM
xbolva00 added inline comments to D47067: Update NRVO logic to support early return.
May 25 2018, 4:44 AM
xbolva00 added inline comments to D45150: Less conservative LoopSafetyInfo for headers.
May 25 2018, 4:37 AM

May 24 2018

xbolva00 added inline comments to D47237: [DSE] Calloc-strlen optimizations.
May 24 2018, 5:44 PM
xbolva00 added inline comments to D47237: [DSE] Calloc-strlen optimizations.
May 24 2018, 5:42 PM
xbolva00 added a comment to D47237: [DSE] Calloc-strlen optimizations.

I can't imagine a situation where this transform would trigger in practice... but maybe I don't write enough C code. How often does this trigger on some large codebase, like the LLVM testsuite?

May 24 2018, 5:39 PM
xbolva00 updated the diff for D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError.

Add correct NORETURN attribute

May 24 2018, 5:31 PM
xbolva00 added a comment to D47237: [DSE] Calloc-strlen optimizations.

But I would like to fix things from the code review, maybe @efriedma can look at it? He already gave me some advices related to DSE. After major notes would be addressed, I would do benchmarks :)

May 24 2018, 5:01 PM
xbolva00 updated the diff for D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 24 2018, 2:46 PM
xbolva00 retitled D47345: [InstructionCombining] Replace small heap allocations with local variables from [InstructionCombing] Replace small allocations with local/global variable to [InstructionCombining] Replace small allocations with local/global variable.
May 24 2018, 2:05 PM
xbolva00 updated the summary of D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 24 2018, 2:03 PM
xbolva00 created D47345: [InstructionCombining] Replace small heap allocations with local variables.
May 24 2018, 2:02 PM
xbolva00 added a reviewer for D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError: rsmith.
May 24 2018, 11:13 AM
xbolva00 added inline comments to D46052: GNUstep Objective-C ABI version 2.
May 24 2018, 11:13 AM
xbolva00 created D47340: [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError.
May 24 2018, 11:03 AM

May 23 2018

xbolva00 added a reviewer for D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove: Prazek.
May 23 2018, 7:05 AM
xbolva00 added inline comments to D47237: [DSE] Calloc-strlen optimizations.
May 23 2018, 7:02 AM

May 22 2018

xbolva00 added a comment to D47237: [DSE] Calloc-strlen optimizations.
In D47237#1109008, @vsk wrote:

Is this a common pattern, or are there real-world benchmarks this improves?

This adds a fair bit of code to a hot part of the compiler, so it'd be worth sharing LNT and CTMark data to make sure there aren't any regressions (http://llvm.org/docs/lnt/quickstart.html, https://github.com/llvm-mirror/test-suite/tree/master/CTMark).

May 22 2018, 8:41 PM
xbolva00 added a comment to D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove.

And two facts..

  1. LLVM already replaces bzero with memset
  2. There are many source codes related to networking which uses bcopy, bcmp.
May 22 2018, 8:28 PM
xbolva00 committed rL333057: [InstCombine] [NFC] Added more tests for unlocked IO transformation.
[InstCombine] [NFC] Added more tests for unlocked IO transformation
May 22 2018, 8:06 PM
This revision was not accepted when it landed; it landed in state Needs Review.
May 22 2018, 8:06 PM
xbolva00 created D47243: [InstCombine] [NFC] Added more tests for unlocked IO transformation.
May 22 2018, 8:05 PM
xbolva00 updated the diff for D47237: [DSE] Calloc-strlen optimizations.
  • Restored blank lines
  • Better get for CallInst
  • Other improvements
May 22 2018, 6:32 PM
xbolva00 added a comment to D47159: [InstCombine] Format String optimizations.

Too bad we cannot transform printf(str) to fputs(str, stdout)/fwrite. It would be quite interesting I think. But since we know how stdout is represented under GNU/glibc, we can do it under condition "isLinux && isGNU" ?

May 22 2018, 6:07 PM
xbolva00 abandoned D47159: [InstCombine] Format String optimizations.
May 22 2018, 5:26 PM
xbolva00 added inline comments to D47237: [DSE] Calloc-strlen optimizations.
May 22 2018, 5:08 PM
xbolva00 retitled D47237: [DSE] Calloc-strlen optimizations from [DSE] Calloc optimizations to [DSE] Calloc-strlen optimizations.
May 22 2018, 5:02 PM
xbolva00 added inline comments to D47237: [DSE] Calloc-strlen optimizations.
May 22 2018, 5:01 PM
xbolva00 created D47237: [DSE] Calloc-strlen optimizations.
May 22 2018, 4:53 PM
xbolva00 committed rL333031: Delete empty test file.
Delete empty test file
May 22 2018, 2:51 PM
This revision was not accepted when it landed; it landed in state Needs Review.
May 22 2018, 2:51 PM
xbolva00 created D47230: Delete empty test file.
May 22 2018, 2:49 PM
xbolva00 added a comment to D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove.

Well, this patch was not so time expensive for me, it is simple. But ok, I understand your concerns related to maintainability. So, should I close this review? Or ok for now, since it is already done?

May 22 2018, 2:34 PM
xbolva00 added a comment to D47214: [InstCombine] Replace bcmp/bcopy with memcmp/memmove.

why?

Anyway these functions call mem* functions, so why not call them directly?

There are an infinite number of optimizations we can implement, but each one adds more maintenance burden. We need to make sure new optimizations "carry their weight".

Do you have example programs or benchmarks that measurably speed up or have smaller code size etc. because of this transform?

May 22 2018, 2:13 PM