ikudrin (Igor Kudrin)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 6 2015, 10:51 PM (114 w, 6 d)

Recent Activity

Thu, Nov 16

ikudrin added inline comments to D38790: [ELF] Do not keep symbols if they referenced only from discarded sections..
Thu, Nov 16, 3:41 AM · lld

Thu, Nov 9

ikudrin abandoned D25608: [libclang] Make tests for python bindings pass on Windows..
Thu, Nov 9, 8:27 PM
ikudrin abandoned D34612: [ELF] Do not add a .tbss section into a PT_LOAD segment in case of using a linker script..
Thu, Nov 9, 8:27 PM · lld
ikudrin updated the diff for D38790: [ELF] Do not keep symbols if they referenced only from discarded sections..
  • Rebase on the top.
  • Add flag 'Live' to Symbol.
  • Determine most of the alive symbols during GC phase.
Thu, Nov 9, 3:17 AM · lld

Fri, Oct 27

ikudrin added inline comments to D38790: [ELF] Do not keep symbols if they referenced only from discarded sections..
Fri, Oct 27, 6:05 AM · lld

Thu, Oct 26

ikudrin added a comment to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

I believe that the complexity in both cases is similar. Here we have two kinds of edges with distinct traversal functions. There we have to convert these edges in advance so that we can use only one traversal function. And distinct traversal function is not that different from the conversion function. But conversion always requires additional space and time to store edges, while the traversal function might be called several times. But my opinion might be biased.

Thu, Oct 26, 5:02 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
  • Address review comments;
  • Rebase on the tip.
Thu, Oct 26, 4:34 AM · lld

Wed, Oct 25

ikudrin added a comment to D38790: [ELF] Do not keep symbols if they referenced only from discarded sections..

The symbol is not in a dead section but referenced from it. Right now I don't know any existing way to say if a symbol is referenced only from dead sections or not.

Wed, Oct 25, 9:22 PM · lld
ikudrin added a comment to D39278: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows..

Thanks! If you don't mind, I'll leave the mentioned improvements to ones who understand python and lit better than me.

Wed, Oct 25, 7:38 PM · lld
ikudrin committed rL316635: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows..
[lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows.
Wed, Oct 25, 7:32 PM
ikudrin closed D39278: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows. by committing rL316635: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows..
Wed, Oct 25, 7:31 PM · lld
ikudrin added inline comments to D39278: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows..
Wed, Oct 25, 4:33 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Ping. Is there anything I can do to improve this patch? I suppose I am hardly able to make D38391 quicker than this one.

Wed, Oct 25, 1:43 AM · lld
ikudrin updated the diff for D38790: [ELF] Do not keep symbols if they referenced only from discarded sections..
  • Rebased on the tip.
  • Slightly improved tests.
Wed, Oct 25, 1:12 AM · lld

Tue, Oct 24

ikudrin created D39278: [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows..
Tue, Oct 24, 11:44 PM · lld

Oct 11 2017

ikudrin created D38790: [ELF] Do not keep symbols if they referenced only from discarded sections..
Oct 11 2017, 2:26 AM · lld

Oct 3 2017

ikudrin closed D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Oct 3 2017, 5:30 AM · lld
ikudrin added 1 commit(s) for D37332: [lld] Avoid promoting an undefined weak entry symbol to global.: rL314790: [ELF] Avoid promoting an undefined weak entry symbol to global..
Oct 3 2017, 5:29 AM · lld
ikudrin added an edge to rL314790: [ELF] Avoid promoting an undefined weak entry symbol to global.: D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Oct 3 2017, 5:29 AM
ikudrin committed rL314790: [ELF] Avoid promoting an undefined weak entry symbol to global..
[ELF] Avoid promoting an undefined weak entry symbol to global.
Oct 3 2017, 5:25 AM
ikudrin committed rL314789: [ELF] Keep symbols specified by '-u' over LTO..
[ELF] Keep symbols specified by '-u' over LTO.
Oct 3 2017, 5:19 AM
ikudrin closed D38348: [ELF] Keep symbols specified by '-u' over LTO. by committing rL314789: [ELF] Keep symbols specified by '-u' over LTO..
Oct 3 2017, 5:19 AM · lld

Oct 1 2017

ikudrin added a comment to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

I guess the same. Moreover:

  • This patch process any CIE once while D38391 has to store a pointer to it for each corresponding input section.
  • D38391 also stores pointers to personality function sections and LSDA sections for each input section which use them.
Oct 1 2017, 9:38 PM · lld
ikudrin added a comment to D38348: [ELF] Keep symbols specified by '-u' over LTO..
In D38348#885488, @ruiu wrote:

I'm not sure if this is the right thing to do. It feels like I could argue either this is correct or this is incorrect.

Oct 1 2017, 9:22 PM · lld

Sep 29 2017

ikudrin added a comment to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
In D37626#882892, @ruiu wrote:

How about this?

  1. Add a new member, EhSectionPieces vector, to InputSection. It holds the input section's FDEs and CIEs if exists. At the beginning of markLive, scan all .eh_frame sections to initialize the vectors.
  2. To represent edges between InputSections through .eh_frame section pieces, explicitly add these dependencies to InputSection::DependentSections. For example, if a function has .eh_frame pieces, its personality function is added to its DependentSection. You can initialize it at the beginning of markLive.

    After doing the above two things, all dependencies are explicitly represented, and all you have to do is to traverse the graph, make .eh_frame pieces alive, and visit DependentSections as usual. I think this is a cleaner way of doing garbage-collecting.
Sep 29 2017, 1:52 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Addressed review comments.

Sep 29 2017, 1:31 AM · lld
ikudrin created D38391: [ELF] Scan .eh_frame sections to prepare a dependency tree before traversing alive sections in markLive()..
Sep 29 2017, 1:29 AM

Sep 28 2017

ikudrin added a dependent revision for D38348: [ELF] Keep symbols specified by '-u' over LTO.: D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Sep 28 2017, 2:48 AM · lld
ikudrin added a dependency for D37332: [lld] Avoid promoting an undefined weak entry symbol to global.: D38348: [ELF] Keep symbols specified by '-u' over LTO..
Sep 28 2017, 2:48 AM · lld
ikudrin updated the diff for D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

Extract handling of '-u' symbols into a separate patch, see D38348.

Sep 28 2017, 2:47 AM · lld
ikudrin created D38348: [ELF] Keep symbols specified by '-u' over LTO..
Sep 28 2017, 2:44 AM · lld

Sep 27 2017

ikudrin added a comment to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

I assumed that here...

Sep 27 2017, 8:46 PM · lld
ikudrin added a comment to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

Ping. What can I do to improve the patch?

Sep 27 2017, 8:05 AM · lld
ikudrin added a comment to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Ping. Is there anything I can do to proceed the patch?

Sep 27 2017, 8:02 AM · lld

Sep 21 2017

ikudrin added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Sep 21 2017, 7:18 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
  • Update to the current tip.
  • Address review comments.
Sep 21 2017, 6:50 AM · lld

Sep 18 2017

ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Formatted.

Sep 18 2017, 8:44 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Refactored scanEhFrameSection.

Sep 18 2017, 1:46 AM · lld

Sep 15 2017

ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..

Update the patch to incorporate the latest changes in the master branch.

Sep 15 2017, 7:38 AM · lld

Sep 12 2017

ikudrin added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Sep 12 2017, 7:35 AM · lld
ikudrin updated the diff for D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
  • Substituted a sorted vector for a DenseMap.
  • Improved (hopefully) comments.
Sep 12 2017, 7:20 AM · lld

Sep 8 2017

ikudrin created D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Sep 8 2017, 8:01 AM · lld

Sep 7 2017

ikudrin added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Sep 7 2017, 9:29 PM · lld
ikudrin accepted D36813: [Coverage] Build sorted and unique segments.

LGTM.

Sep 7 2017, 7:58 PM
ikudrin added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Sep 7 2017, 6:09 AM · lld
ikudrin updated the diff for D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

Use fetchIfLazy() instead of addEntrySymbol().

Sep 7 2017, 5:52 AM · lld
ikudrin added inline comments to D36813: [Coverage] Build sorted and unique segments.
Sep 7 2017, 3:26 AM

Sep 6 2017

ikudrin added a comment to D37387: [Coverage] Report errors when reading malformed source regions.

It looks like Phabricator doesn't let me download binary files. But overall the patch looks good.

Sep 6 2017, 4:49 AM
ikudrin added inline comments to D36813: [Coverage] Build sorted and unique segments.
Sep 6 2017, 4:46 AM
ikudrin updated the diff for D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

Did you mean something like this?
I am inclined not to mix an entry symbol into Config->Undefined in order to preserve clarity.

Sep 6 2017, 12:17 AM · lld

Sep 5 2017

ikudrin added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Sep 5 2017, 4:57 PM · lld

Sep 4 2017

ikudrin updated the diff for D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

Yes, this variant is more straightforward. However, as addUndefined() implicitly marks the symbol to be preserved by LTO, we now have to set that flag directly; overwise, many tests in the lto test-suite fail. Moreover, without that flag, the entry field in the ELF header is not filled correctly in case of LTO because symbol _start is missing.

Sep 4 2017, 3:29 AM · lld

Sep 1 2017

ikudrin added a comment to D36813: [Coverage] Build sorted and unique segments.

Yes, if it's possible, I'd like to see all the patches (one way or another), just to have the whole picture.

Sep 1 2017, 12:00 AM

Aug 31 2017

ikudrin added a comment to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..

We came across the issue in our environment, where an ELF linker is used only as an intermediate step and the value of entry field in the header is ignored. But in one of the libraries, we have a weak reference to _start, because sometimes this symbol might be defined for a special purpose. I can guess that for some other embedded environments and third-party libraries the same situation might take place.

Aug 31 2017, 10:19 PM · lld
ikudrin created D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Aug 31 2017, 6:07 AM · lld
ikudrin added a comment to D36813: [Coverage] Build sorted and unique segments.

The patch doesn't apply to the current tip clearly. And after applying it manually and fix compilation errors, I have two failing tests for llvm-cov: tools/llvm-cov/showLineExecutionCounts.cpp and tools/llvm-cov/threads.c, both of which fail with "Coverage segments not unique or sorted" assertion.

Aug 31 2017, 4:44 AM

Aug 20 2017

ikudrin added a comment to D36901: [Coverage] Add an expensive test for the segment builder.

LGTM

Aug 20 2017, 10:34 PM

Aug 17 2017

ikudrin added inline comments to D36813: [Coverage] Build sorted and unique segments.
Aug 17 2017, 12:25 AM

Aug 3 2017

ikudrin added a comment to D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals.

I'd like to say that I'm quite happy with this set of patches. We use them for Arm32 target with relatively large executables, and they seem to work well. It'd be great if these patches are ported to the release branch as well.

Aug 3 2017, 11:41 PM

Jul 21 2017

ikudrin committed rL308728: [ELF] Avoid data race in ObjectFile<ELFT>::getDILineInfo()..
[ELF] Avoid data race in ObjectFile<ELFT>::getDILineInfo().
Jul 21 2017, 4:27 AM
ikudrin closed D35537: [ELF] Avoid data race in ObjectFile<ELFT>::getDILineInfo(). by committing rL308728: [ELF] Avoid data race in ObjectFile<ELFT>::getDILineInfo()..
Jul 21 2017, 4:27 AM · lld

Jul 18 2017

ikudrin created D35537: [ELF] Avoid data race in ObjectFile<ELFT>::getDILineInfo()..
Jul 18 2017, 3:06 AM · lld

Jul 17 2017

ikudrin added a comment to D34692: [LLD][ELF] Add support for multiple passes to createThunks().

This is a copy of a comment from D34689.

Jul 17 2017, 7:11 AM
ikudrin added a comment to D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals.

It is possible that a precreated thunk section stays empty in the first pass, but is used in the next pass. In that case, it isn't added into ISR in ThunkCreator::mergeThunks(). For example:

$ cat a.s
	.global _start, foo
.section .text.start,"ax",%progbits
_start:
	bl _start
.section .text.dummy1,"ax",%progbits
.space 0xfffffe
.section .text.foo,"ax",%progbits
foo:
	bl _start
$ llvm-mc -filetype=obj -triple=thumbv7a-none-linux-gnueabi a.s -o a.o
$ ld.lld a.o -o a.out
$ objdump -d a.out
a.out:     file format elf32-littlearm
Jul 17 2017, 5:17 AM

Jul 14 2017

ikudrin committed rL308003: [ELF] Fix writing the content of the .got section in a wrong place..
[ELF] Fix writing the content of the .got section in a wrong place.
Jul 14 2017, 1:11 AM
ikudrin closed D34232: [ELF] Fix writing the content of the .got section in a wrong place. by committing rL308003: [ELF] Fix writing the content of the .got section in a wrong place..
Jul 14 2017, 1:11 AM · lld

Jul 13 2017

ikudrin added inline comments to D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals.
Jul 13 2017, 8:01 AM
ikudrin added inline comments to D34689: [LLD][ELF] Pre-create ThunkSections at Target specific intervals.
Jul 13 2017, 4:13 AM

Jun 26 2017

ikudrin added inline comments to D34612: [ELF] Do not add a .tbss section into a PT_LOAD segment in case of using a linker script..
Jun 26 2017, 8:52 PM · lld
ikudrin created D34612: [ELF] Do not add a .tbss section into a PT_LOAD segment in case of using a linker script..
Jun 26 2017, 3:27 AM · lld

Jun 21 2017

ikudrin committed rL305983: [ELF] Add an apostrophe after a file name when reporting discarded sections..
[ELF] Add an apostrophe after a file name when reporting discarded sections.
Jun 21 2017, 9:08 PM
ikudrin closed D34442: [ELF] Add an apostrophe after a file name when reporting discarded sections. by committing rL305983: [ELF] Add an apostrophe after a file name when reporting discarded sections..
Jun 21 2017, 9:08 PM · lld
ikudrin added a comment to D34232: [ELF] Fix writing the content of the .got section in a wrong place..

As far as I could check, other sections are not affected by the similar problem. Most of them don't call relocate*() methods. InputSection::writeTo uses unshifted Buf when calling relocate(). And EhInputSection avoids the problem because SectionBase::getOffset() doesn't add OutSecOff for them.

Jun 21 2017, 8:55 PM · lld
ikudrin added a comment to D34232: [ELF] Fix writing the content of the .got section in a wrong place..

Ping.

Jun 21 2017, 4:44 AM · lld
ikudrin created D34442: [ELF] Add an apostrophe after a file name when reporting discarded sections..
Jun 21 2017, 4:43 AM · lld

Jun 14 2017

ikudrin created D34232: [ELF] Fix writing the content of the .got section in a wrong place..
Jun 14 2017, 10:30 PM · lld

Feb 19 2017

ikudrin committed rL295605: [llvm-cov] Respect Windows line endings when parsing demangled symbols..
[llvm-cov] Respect Windows line endings when parsing demangled symbols.
Feb 19 2017, 6:38 AM
ikudrin closed D30096: [llvm-cov] Respect Windows line endings when parsing demangled symbols by committing rL295605: [llvm-cov] Respect Windows line endings when parsing demangled symbols..
Feb 19 2017, 6:38 AM

Feb 17 2017

ikudrin created D30096: [llvm-cov] Respect Windows line endings when parsing demangled symbols.
Feb 17 2017, 7:39 AM

Nov 8 2016

ikudrin added a comment to D26150: [libc++abi] Fix test_exception_storage_nodynmem on MacOS.

Done: rL286337.

Nov 8 2016, 8:25 PM
ikudrin committed rL286337: [libc++abi] Remove the test for checking using of fallback malloc in case of….
[libc++abi] Remove the test for checking using of fallback malloc in case of…
Nov 8 2016, 8:24 PM
ikudrin added a comment to D26150: [libc++abi] Fix test_exception_storage_nodynmem on MacOS.

The test is too implementation-specific, and trying to override a function like calloc makes it fragile. Unfortunately, I didn't find a better way to test the library's behavior in case of memory exhaustion, but now I believe that this test doesn't add any significant value. I'm going to remove it if no one objects.

Nov 8 2016, 7:30 PM

Nov 7 2016

ikudrin added a comment to D25608: [libclang] Make tests for python bindings pass on Windows..

Ping.

Nov 7 2016, 1:54 AM
ikudrin added a comment to D26150: [libc++abi] Fix test_exception_storage_nodynmem on MacOS.

This test is extremely fragile. Maybe, it is better to disable it, or even delete it altogether.

Nov 7 2016, 1:45 AM

Oct 20 2016

ikudrin added a comment to D25608: [libclang] Make tests for python bindings pass on Windows..

Ping.

Oct 20 2016, 2:39 AM

Oct 18 2016

ikudrin committed rL284464: [libclang] Add missing cursor kinds to python bindings..
[libclang] Add missing cursor kinds to python bindings.
Oct 18 2016, 2:51 AM
ikudrin closed D25673: [libclang] Add missing cursor kinds to python bindings. by committing rL284464: [libclang] Add missing cursor kinds to python bindings..
Oct 18 2016, 2:51 AM
ikudrin committed rL284463: [libclang] Fix a failure in a test for python bindings on CursorKind..
[libclang] Fix a failure in a test for python bindings on CursorKind.
Oct 18 2016, 2:39 AM
ikudrin closed D25470: [libclang] Fix a failure in a test for python bindings on CursorKind.OVERLOAD_CANDIDATE. by committing rL284463: [libclang] Fix a failure in a test for python bindings on CursorKind..
Oct 18 2016, 2:39 AM

Oct 17 2016

ikudrin retitled D25673: [libclang] Add missing cursor kinds to python bindings. from to [libclang] Add missing cursor kinds to python bindings..
Oct 17 2016, 6:27 AM

Oct 14 2016

ikudrin accepted D25539: [Coverage] Support for C++17 switch initializers.

LGTM.

Oct 14 2016, 7:07 AM
ikudrin accepted D25572: [Coverage] Support for C++17 if initializers.

LGTM.

Oct 14 2016, 7:07 AM
ikudrin retitled D25608: [libclang] Make tests for python bindings pass on Windows. from to [libclang] Make tests for python bindings pass on Windows..
Oct 14 2016, 4:20 AM

Oct 11 2016

ikudrin retitled D25470: [libclang] Fix a failure in a test for python bindings on CursorKind.OVERLOAD_CANDIDATE. from to [libclang] Fix a failure in a test for python bindings on CursorKind.OVERLOAD_CANDIDATE..
Oct 11 2016, 6:17 AM

Oct 7 2016

ikudrin committed rL283531: Recommit r282692: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals….
Recommit r282692: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals…
Oct 7 2016, 2:01 AM
ikudrin closed D17815: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of dynamic memory exhaustion. by committing rL283531: Recommit r282692: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals….
Oct 7 2016, 2:01 AM

Sep 30 2016

ikudrin reopened D17815: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of dynamic memory exhaustion..

@rmaprath: There are some issues in the test which upset build bots and I need some time to fix them. You don't need to wait for me, I'll put my patch on the top of yours when my fix is ready.

Sep 30 2016, 4:54 AM

Sep 29 2016

ikudrin committed rL282703: Revert r282692: Use fallback_malloc to allocate __cxa_eh_globals in case of….
Revert r282692: Use fallback_malloc to allocate __cxa_eh_globals in case of…
Sep 29 2016, 1:20 AM

Sep 28 2016

ikudrin committed rL282692: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of….
[libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of…
Sep 28 2016, 11:47 PM
ikudrin closed D17815: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of dynamic memory exhaustion. by committing rL282692: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of….
Sep 28 2016, 11:46 PM