Page MenuHomePhabricator

yurai007 (Dawid Jurczak)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 18 2021, 2:38 AM (15 w, 4 d)

Recent Activity

Today

yurai007 committed rG06206a8cd1b1: [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc (authored by yurai007).
[BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc
Thu, Aug 5, 7:20 AM
yurai007 closed D103523: [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc.
Thu, Aug 5, 7:19 AM · Restricted Project
yurai007 updated the diff for D103523: [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc.

Rebased again.

Thu, Aug 5, 7:16 AM · Restricted Project
yurai007 committed rGf8cdde719507: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into… (authored by yurai007).
[SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into…
Thu, Aug 5, 7:10 AM
yurai007 closed D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.
Thu, Aug 5, 7:10 AM · Restricted Project
yurai007 updated the diff for D103523: [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc.

Rebased.

Thu, Aug 5, 4:05 AM · Restricted Project
yurai007 updated the diff for D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.

Rebased.

Thu, Aug 5, 3:34 AM · Restricted Project

Yesterday

yurai007 added a comment to D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.

Ping^2

Wed, Aug 4, 10:52 AM · Restricted Project
yurai007 committed rG238139be0952: [DSE][NFC] Clean up DeadStoreElimination from unused variables (authored by yurai007).
[DSE][NFC] Clean up DeadStoreElimination from unused variables
Wed, Aug 4, 10:50 AM
yurai007 closed D106446: [DSE][NFC] Clean up DeadStoreElimination from unused variables.
Wed, Aug 4, 10:49 AM · Restricted Project
yurai007 updated the diff for D106446: [DSE][NFC] Clean up DeadStoreElimination from unused variables.
Wed, Aug 4, 8:13 AM · Restricted Project

Fri, Jul 30

yurai007 added a comment to rG5c315bee8c9d: [DSE] Transform memset + malloc --> calloc (PR25892).

Can we please cherry pick this for release-13?

I know it is focused on fixes but this is too good to pass up.

Fri, Jul 30, 6:07 AM

Thu, Jul 29

yurai007 committed rG5c315bee8c9d: [DSE] Transform memset + malloc --> calloc (PR25892) (authored by yurai007).
[DSE] Transform memset + malloc --> calloc (PR25892)
Thu, Jul 29, 9:34 AM
yurai007 requested review of D107075: [LoopIdiom] Transform loop containing memcpy into memmove.
Thu, Jul 29, 7:19 AM · Restricted Project

Wed, Jul 28

yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Disabled transformation on HWASan as well. Maybe it's too paranoid but I don't have AAarch64 hardware to verify.

Wed, Jul 28, 2:49 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Wed, Jul 28, 2:45 AM · Restricted Project

Tue, Jul 27

yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Don't transform when function is calloc or it's instrumented with ASan.

Tue, Jul 27, 5:13 AM · Restricted Project

Mon, Jul 26

yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

@delcypher: Thanks for letting me know. Now patch is reverted, Before submitting again I will fix heap-overflow.cpp test.

Mon, Jul 26, 2:19 AM · Restricted Project

Fri, Jul 23

yurai007 added a reverting change for rG43234b159512: [DSE] Transform memset + malloc --> calloc (PR25892): rGbc536c710150: Revert "[DSE] Transform memset + malloc --> calloc (PR25892)".
Fri, Jul 23, 2:55 AM
yurai007 committed rGbc536c710150: Revert "[DSE] Transform memset + malloc --> calloc (PR25892)" (authored by yurai007).
Revert "[DSE] Transform memset + malloc --> calloc (PR25892)"
Fri, Jul 23, 2:55 AM
yurai007 added a reverting change for D103009: [DSE] Transform memset + malloc --> calloc (PR25892): rGbc536c710150: Revert "[DSE] Transform memset + malloc --> calloc (PR25892)".
Fri, Jul 23, 2:55 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

*Meant libc, not libc++ but nevermind.

Fri, Jul 23, 2:46 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

@jeroen.dobbelaere: Yes, I think DSE should special case calloc to avoid infinite recursion (like it does for memset) in libc++. Thanks for catching this. I'm reverting change to fix.

Fri, Jul 23, 2:42 AM · Restricted Project

Thu, Jul 22

yurai007 added a comment to D106446: [DSE][NFC] Clean up DeadStoreElimination from unused variables.

Thanks for approval. I think premerge failures are unrelated to this change. Similar libarcher/openmp errors can be seen in many other reviews for couple weeks.

Thu, Jul 22, 7:28 AM · Restricted Project
yurai007 committed rG11338e998df1: [LoopIdiom] Transform memmove-like loop into memmove (PR46179) (authored by yurai007).
[LoopIdiom] Transform memmove-like loop into memmove (PR46179)
Thu, Jul 22, 4:07 AM
yurai007 closed D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Thu, Jul 22, 4:06 AM · Restricted Project

Wed, Jul 21

yurai007 requested review of D106446: [DSE][NFC] Clean up DeadStoreElimination from unused variables.
Wed, Jul 21, 7:39 AM · Restricted Project
yurai007 added a comment to D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.

@nikic: Kindly ping, all comments were addressed.

Wed, Jul 21, 7:29 AM · Restricted Project

Tue, Jul 20

yurai007 committed rG43234b159512: [DSE] Transform memset + malloc --> calloc (PR25892) (authored by yurai007).
[DSE] Transform memset + malloc --> calloc (PR25892)
Tue, Jul 20, 2:51 AM
yurai007 closed D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Tue, Jul 20, 2:51 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Tue, Jul 20, 12:10 AM · Restricted Project

Mon, Jul 19

yurai007 added a comment to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).

Updated just with short FIXME information added to do_not_form_memmove4 UT.

Mon, Jul 19, 6:53 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Mon, Jul 19, 6:51 AM · Restricted Project

Fri, Jul 16

yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Thanks. I updated patch and now optimization is disabled for functions with sanitize_memory attribute.
Detecting linear pattern would be possible but I'm not convinced it's worth effort. Anyway now it should work with MSan.

Fri, Jul 16, 5:58 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Fixed Msan.

Fri, Jul 16, 5:57 AM · Restricted Project

Thu, Jul 15

yurai007 added a comment to D104636: [LoopIdiom] [LoopNest] let the pass deal with runtime memset size.

Just minor comment regarding potential benefits and benchmarking. If I understand patch correctly it flatten multilevel loop with memset into one memset. According simple microbenchmarks: https://godbolt.org/z/MTnYcvvYo on my x86-64 Skylake flattening memset in double loop (memset_3D) into 1 memset gives between even 800% performance boost (on small WS) to ~80% boost (when WS > LLC).
But how useful such transformation would be in practice? I'm not sure. We need to keep in mind that memset is usually just part of initialization/reusing memory code so in real world benchmarks flattening memsets loop may be less beneficial than microbenchmarks shows.

Thu, Jul 15, 5:49 AM · Restricted Project
yurai007 added a comment to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).

Can you add a testcase for a case where both IsMemCpy and UseMemMove are true? I think you'll end up bailing out due to the alias check, but I'd like to be sure.

Thu, Jul 15, 3:09 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Hello @kcc @eugenis @pgousseau, sorry for bothering you. I added you to this review because transformation introduced in this change breaks msan_test (memcpy_unaligned/TestUnalignedMemcpy unit test).
I'm quite convinced that after my change Clang does what GCC would do if compliled msan_test.cpp file with -Ofast: https://godbolt.org/z/f7s81hjaM
Therefore I'm pretty sure that transformation works correctly (as on GCC) but it simply doesn't play well with MSan.
Since I'm not MSan expert it would be great if you could take a look on this and confirm whether or not my understanding of issue is correct.

Thu, Jul 15, 2:24 AM · Restricted Project
yurai007 added reviewers for D103009: [DSE] Transform memset + malloc --> calloc (PR25892): kcc, eugenis, pgousseau.
Thu, Jul 15, 2:21 AM · Restricted Project

Fri, Jul 9

yurai007 retitled D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation from [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from memset+malloc into calloc transformation to [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.
Fri, Jul 9, 2:39 AM · Restricted Project
yurai007 added a comment to D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.

Rebased and addressed comments.

Fri, Jul 9, 2:38 AM · Restricted Project
yurai007 updated the diff for D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.
Fri, Jul 9, 2:37 AM · Restricted Project
yurai007 committed rG375694a07bcb: Transform memset + malloc --> calloc (PR25892) (authored by yurai007).
Transform memset + malloc --> calloc (PR25892)
Fri, Jul 9, 2:02 AM
yurai007 closed D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Fri, Jul 9, 2:02 AM · Restricted Project

Jul 6 2021

yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Rebased.

Jul 6 2021, 12:29 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jul 6 2021, 12:29 AM · Restricted Project

Jun 30 2021

yurai007 added inline comments to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 30 2021, 11:06 AM · Restricted Project
yurai007 added a comment to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).

Added test covering IsMemCpy + UseMemMove path.

Jun 30 2021, 11:05 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 30 2021, 11:03 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 30 2021, 4:17 AM · Restricted Project

Jun 29 2021

yurai007 added inline comments to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 29 2021, 7:53 AM · Restricted Project
yurai007 added a comment to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).

Fixed last comment.

Jun 29 2021, 7:03 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 29 2021, 7:02 AM · Restricted Project
yurai007 added inline comments to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 29 2021, 6:59 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

@nikic: Thanks for your review and LGTM it. Looks like I cannot push it myself to main: "Permission to llvm/llvm-project.git denied to yurai007".

Jun 29 2021, 3:12 AM · Restricted Project

Jun 28 2021

yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 28 2021, 12:24 PM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Rebased and addressed yesterday comments.

Jun 28 2021, 6:04 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 28 2021, 6:02 AM · Restricted Project

Jun 27 2021

yurai007 added a comment to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).

@efriedma : Thank you for review! Now all comments are addressed and change pass on CI.

Jun 27 2021, 2:40 AM · Restricted Project

Jun 24 2021

yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

@xbolva00: Ok. Added more reviewers.

Jun 24 2021, 2:58 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 24 2021, 2:55 AM · Restricted Project

Jun 23 2021

yurai007 added inline comments to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 23 2021, 7:59 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 23 2021, 7:56 AM · Restricted Project
yurai007 added reviewers for D103009: [DSE] Transform memset + malloc --> calloc (PR25892): lebedev.ri, spatel, greened.
Jun 23 2021, 6:57 AM · Restricted Project
yurai007 added inline comments to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 23 2021, 6:52 AM · Restricted Project
yurai007 added a comment to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).

Added protection against overlapping.

Jun 23 2021, 6:37 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 23 2021, 6:36 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Ping^2.

Jun 23 2021, 4:13 AM · Restricted Project

Jun 18 2021

yurai007 added inline comments to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 18 2021, 5:58 AM · Restricted Project
yurai007 added inline comments to D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 18 2021, 5:11 AM · Restricted Project
yurai007 updated the diff for D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 18 2021, 5:09 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

@nikic @xbolva00: All comments addressed.

Jun 18 2021, 12:13 AM · Restricted Project

Jun 17 2021

yurai007 requested review of D104464: [LoopIdiom] Transform memmove-like loop into memmove (PR46179).
Jun 17 2021, 7:43 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

I played a little bit with patch and checked how it performs with GCC unit tests added together with similar change in GCC on 2014.

Jun 17 2021, 3:27 AM · Restricted Project

Jun 15 2021

yurai007 added inline comments to D104028: [llvm][Inliner] Add an optional PriorityInlineOrder.
Jun 15 2021, 8:15 AM · Restricted Project
yurai007 added inline comments to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 15 2021, 4:32 AM · Restricted Project
yurai007 added inline comments to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 15 2021, 3:46 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

@nikic: All comments were addressed.

Jun 15 2021, 2:59 AM · Restricted Project

Jun 11 2021

yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 11 2021, 5:36 AM · Restricted Project
yurai007 added inline comments to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 11 2021, 5:32 AM · Restricted Project
yurai007 added inline comments to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 11 2021, 3:48 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

More tests.

Jun 11 2021, 3:42 AM · Restricted Project

Jun 10 2021

yurai007 added inline comments to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 10 2021, 4:47 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
Jun 10 2021, 4:41 AM · Restricted Project

Jun 7 2021

yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Ping.

Jun 7 2021, 3:07 AM · Restricted Project

Jun 2 2021

yurai007 added a comment to D103523: [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc.

@xbolva00: Could you please also take a look on D103009? D103009 is required for this change and now should be ready to land as well.

Jun 2 2021, 7:56 AM · Restricted Project
yurai007 added a comment to D103523: [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc.

Rely on D103451.

Jun 2 2021, 6:48 AM · Restricted Project
yurai007 requested review of D103523: [BuildLibCalls][NFC] Remove redundant attribute list from emitCalloc.
Jun 2 2021, 6:46 AM · Restricted Project
yurai007 updated the diff for D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.

Rebased to D103009.

Jun 2 2021, 6:01 AM · Restricted Project

Jun 1 2021

yurai007 added a comment to D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.

TODO: rebase when D103009 is delivered.

Jun 1 2021, 5:06 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

@xbolva00 @nikic @hubert.reinterpretcast: I think now after addressing all comments and passing on CI it's in good shape.

Jun 1 2021, 5:02 AM · Restricted Project
yurai007 requested review of D103451: [SimplifyLibCalls][NFC] Clean up LibCallSimplifier from 'memset + malloc into calloc' transformation.
Jun 1 2021, 4:58 AM · Restricted Project

May 31 2021

yurai007 abandoned D101176: [SimplifyLibCalls] Transform malloc to calloc with redundant memsets elimination (PR25892).
May 31 2021, 11:21 AM · Restricted Project
yurai007 added a comment to D101176: [SimplifyLibCalls] Transform malloc to calloc with redundant memsets elimination (PR25892).

Abandoned because of better approach: https://reviews.llvm.org/D103009

May 31 2021, 11:21 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Thanks. Updated patch with (hopefully) proper LibFunc_malloc detection. Extra checks are stolen from LibCallSimplifier.

May 31 2021, 7:54 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
May 31 2021, 7:54 AM · Restricted Project
yurai007 updated the diff for D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
May 31 2021, 6:26 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Just ignore my previous comment about test. It doesn't explain how we moved from non-inlined new[] to calloc. Indeed better explanation was suggested by @xbolva00.

May 31 2021, 6:25 AM · Restricted Project
yurai007 added inline comments to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).
May 31 2021, 4:51 AM · Restricted Project
yurai007 added a comment to D103009: [DSE] Transform memset + malloc --> calloc (PR25892).

Regarding OutOfMemoryTest: https://github.com/llvm/llvm-project/blob/main/compiler-rt/test/fuzzer/OutOfMemoryTest.cpp failure explanation.
Test has silent assumption that in every loop iteration we request 268MB virtual memory and get 268MB physical memory allocated.
This is the case for malloc+memset combo (page faults trigger actual physical allocation in kernel) but not for calloc (physical memory allocation is deferred - it's faster, which is the whole point of our calloc transformation).
In consequence after my patch there is no OOM in OutOfMemoryTest so UT fails.
It can be easily fixed by saying "we _really_ want allocate and touch physical memory, not only virtual one" which end up in new volatile char[] + std::fill duo.

May 31 2021, 4:43 AM · Restricted Project