ikudrin (Igor Kudrin)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Mon, Sep 18

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

Formatted.

Mon, Sep 18, 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.

Mon, Sep 18, 1:46 AM · lld

Fri, Sep 15

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.

Fri, Sep 15, 7:38 AM · lld

Tue, Sep 12

ikudrin added inline comments to D37626: [ELF] Scan .eh_frame sections precisely in order to eliminate unused LSDAs and personality routines..
Tue, Sep 12, 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.
Tue, Sep 12, 7:20 AM · lld

Fri, Sep 8

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

Thu, Sep 7

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

LGTM.

Thu, Sep 7, 7:58 PM
ikudrin added inline comments to D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Thu, Sep 7, 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().

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

Wed, Sep 6

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.

Wed, Sep 6, 4:49 AM
ikudrin added inline comments to D36813: [Coverage] Build sorted and unique segments.
Wed, Sep 6, 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.

Wed, Sep 6, 12:17 AM · lld

Tue, Sep 5

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

Mon, Sep 4

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.

Mon, Sep 4, 3:29 AM · lld

Fri, Sep 1

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.

Fri, Sep 1, 12:00 AM

Thu, Aug 31

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.

Thu, Aug 31, 10:19 PM · lld
ikudrin created D37332: [lld] Avoid promoting an undefined weak entry symbol to global..
Thu, Aug 31, 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.

Thu, Aug 31, 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

Sep 18 2016

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

The patch is under review for a long time and the described problem is still here. As we've seen the issue in practice, I'm sure that others may also run into it, and I do believe it should be fixed, one way or another.

Sep 18 2016, 11:55 PM

Sep 1 2016

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

Ping...

Sep 1 2016, 4:30 AM

Aug 31 2016

ikudrin committed rL280199: [Coverage] Suppress creating a code region if the same area is covered by an….
[Coverage] Suppress creating a code region if the same area is covered by an…
Aug 31 2016, 12:12 AM
ikudrin closed D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region. by committing rL280199: [Coverage] Suppress creating a code region if the same area is covered by an….
Aug 31 2016, 12:12 AM
ikudrin committed rL280198: [Coverage] Make sorting criteria for CounterMappingRegions local..
[Coverage] Make sorting criteria for CounterMappingRegions local.
Aug 31 2016, 12:09 AM
ikudrin closed D24034: [Coverage] Make sorting criteria for CounterMappingRegions local. by committing rL280198: [Coverage] Make sorting criteria for CounterMappingRegions local..
Aug 31 2016, 12:09 AM

Aug 30 2016

ikudrin added inline comments to D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region..
Aug 30 2016, 9:19 AM
ikudrin added a dependency for D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region.: D24034: [Coverage] Make sorting criteria for CounterMappingRegions local..
Aug 30 2016, 9:12 AM
ikudrin added a dependent revision for D24034: [Coverage] Make sorting criteria for CounterMappingRegions local.: D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region..
Aug 30 2016, 9:12 AM
ikudrin updated the diff for D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region..
  • Removed a default value in emitSourceRegions(), added the corresponding argument to its call in EmptyCoverageMappingBuilder::write().
  • Removed an additional sorting step in CounterCoverageMappingBuilder::write(), the patch is now depends on the extended sorting creteria in CoverageMappingWriter::write(), see D24034.
Aug 30 2016, 9:12 AM
ikudrin retitled D24034: [Coverage] Make sorting criteria for CounterMappingRegions local. from to [Coverage] Make sorting criteria for CounterMappingRegions local..
Aug 30 2016, 9:04 AM

Aug 29 2016

ikudrin committed rL279962: [Coverage] Prevent creating a redundant counter if a nested body ends with a….
[Coverage] Prevent creating a redundant counter if a nested body ends with a…
Aug 29 2016, 4:57 AM
ikudrin closed D23160: [Coverage] Prevent creating a redundant counter if a nested body ends with a macro. by committing rL279962: [Coverage] Prevent creating a redundant counter if a nested body ends with a….
Aug 29 2016, 4:57 AM
ikudrin added a comment to D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region..

This patch fixes the following issue:

$ cat > test.cpp << EOF
void dummy() {}
Aug 29 2016, 4:49 AM
ikudrin added a comment to D23160: [Coverage] Prevent creating a redundant counter if a nested body ends with a macro..

I figured out that the last issue is an independent one, so I prepared a separate fix for it: D23987.

Aug 29 2016, 3:35 AM
ikudrin retitled D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region. from to [Coverage] Suppress creating a code region if the same area is covered by an expansion region..
Aug 29 2016, 3:32 AM

Aug 10 2016

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

The issue in the current implementation of the libc++abi library looks like a time bomb. Even though its probability could be considered as very low, in fact, it depends on the type of an application. At least, we ran into it in our environment.

Aug 10 2016, 3:07 AM

Aug 5 2016

ikudrin committed rL277833: Fix gdb pretty printers to work with Python 3..
Fix gdb pretty printers to work with Python 3.
Aug 5 2016, 9:56 AM
ikudrin closed D23202: Fix gdb pretty printers to work with Python 3. by committing rL277833: Fix gdb pretty printers to work with Python 3..
Aug 5 2016, 9:56 AM
ikudrin added a comment to D23202: Fix gdb pretty printers to work with Python 3..

They are really helpful, especially for looking into things like SmallVector, which uses AlignedCharArrayUnion to store items. Personally, I'd prefer debug dumpers for QtCreator, but this variant is more universal.

Aug 5 2016, 9:28 AM
ikudrin retitled D23202: Fix gdb pretty printers to work with Python 3. from to Fix gdb pretty printers to work with Python 3..
Aug 5 2016, 6:37 AM
ikudrin added a comment to D23160: [Coverage] Prevent creating a redundant counter if a nested body ends with a macro..

I've reduced the last sample to the following:

    0|    1|void dummy() {}
     |    2|
    0|    3|#define MACRO_1 dummy()
     |    4|
    1|    5|#define MACRO_2 MACRO_1
     |    6|
    1|    7|int main() {
    1|    8|  int i = 0;
    1|    9|  if (i > 5)
    1|   10|    MACRO_2;
------------------
|  |      1|    5|#define MACRO_2 MACRO_1
|  |  ------------------
|  |  |  |      0|    3|#define MACRO_1 dummy()
|  |  ------------------
------------------
    1|   11|  return 0;
    1|   12|}

Right now, I don't have a good idea how to fix this.

Aug 5 2016, 6:09 AM

Aug 4 2016

ikudrin added a comment to D23160: [Coverage] Prevent creating a redundant counter if a nested body ends with a macro..
In D23160#506061, @vsk wrote:

I guess it never makes sense to have two regions with the exact same start/end loc, and different counters. Do you think we should add assertions in llvm (either in llvm-cov, or in the coverage reader) which guard against this?

Aug 4 2016, 10:43 PM
ikudrin added a comment to D23160: [Coverage] Prevent creating a redundant counter if a nested body ends with a macro..

The motivation sample:

$ cat > test.cpp << EOF
void dummy() {}
Aug 4 2016, 6:16 AM
ikudrin retitled D23160: [Coverage] Prevent creating a redundant counter if a nested body ends with a macro. from to [Coverage] Prevent creating a redundant counter if a nested body ends with a macro..
Aug 4 2016, 5:22 AM

Jun 23 2016

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

This patch is under review for more than two months, and I believe I've addressed all the comments. Could someone take a look at it, please?

Jun 23 2016, 9:38 AM

Jun 13 2016

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

Ping.

Jun 13 2016, 2:10 AM

Jun 7 2016

ikudrin committed rL271995: Reapply [Coverage] Fix an assertion failure if the definition of an unused….
Reapply [Coverage] Fix an assertion failure if the definition of an unused…
Jun 7 2016, 3:14 AM

Jun 6 2016

ikudrin committed rL271976: Revert [Coverage] Fix an assertion failure if the definition of an unused….
Revert [Coverage] Fix an assertion failure if the definition of an unused…
Jun 6 2016, 9:18 PM
ikudrin committed rL271969: [Coverage] Fix an assertion failure if the definition of an unused function….
[Coverage] Fix an assertion failure if the definition of an unused function…
Jun 6 2016, 7:23 PM
ikudrin closed D20997: [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files. by committing rL271969: [Coverage] Fix an assertion failure if the definition of an unused function….
Jun 6 2016, 7:23 PM
ikudrin added a comment to D20878: [Coverage] Do not push a new region after a CXXTryStmt.

I agree that it'd be expensive to put a new counter after each function call. Even if there is no throw statement within a TU, called functions still may raise exceptions.
Anyway, if we come across a try statement, we can guess that some exceptions are expected and do our best to support constructions like this:

try {
  ...
}
catch (...) {
  ...
  throw;
}
Jun 6 2016, 5:47 PM
ikudrin updated the diff for D20997: [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files..
  • Use StartFileID and EndFileID variables to eliminate redundant calls to SM.getFileID().
  • Add comment strings to asserts.
Jun 6 2016, 5:05 PM

Jun 4 2016

ikudrin retitled D20997: [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files. from to [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files..
Jun 4 2016, 4:36 AM

Jun 2 2016

ikudrin added a comment to D20878: [Coverage] Do not push a new region after a CXXTryStmt.

So, our tool isn't accurate in the case of throwing an exception. Is there a case where this patch makes things better than they were before? Is it possible to improve handling of exceptions instead?

Jun 2 2016, 2:34 AM

May 20 2016

ikudrin abandoned D20287: [Coverage] Ensure that the hash for a used function is non-zero..

This change is not needed anymore because the whole issue was fixed in D20286.

May 20 2016, 2:26 AM