ruiu (Rui Ueyama)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 18 2013, 12:16 AM (270 w, 8 h)

Recent Activity

Wed, Jun 13

ruiu updated the diff for D48112: Simplify PPC64::calcEFlags()..
  • clarified the error message
Wed, Jun 13, 5:23 PM
ruiu updated the diff for D48112: Simplify PPC64::calcEFlags()..
  • separated error message for v1 and unknown eflags
  • added a test
Wed, Jun 13, 5:22 PM
ruiu added a comment to D47540: [lld] Enable Visual Studio compatible output.

I do not have a concrete proposal at the moment, but before fixing the error reporting interface, I want to make sure that it is as simple and less intrusive as possible. For example, a simple additional text processing to convert Unix-style error message to MSVC style might work (which is a bit hacky but the least intrusive). There are other ideas, perhaps. I'd like to explore more possibilities before setting my mind.

Wed, Jun 13, 3:44 PM
ruiu accepted D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

In any case, this change makes sense to me. Thanks!

Wed, Jun 13, 3:37 PM
ruiu added a comment to D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

The clang way: one movabsq plus a R_X86_64_RELATIVE relocation that is supposed to be resolved by the dynamic loader.
The GCC way: two instructions but no relocation to be resolved.

The clang way is still position-independent.

Wed, Jun 13, 3:31 PM
ruiu added inline comments to D48091: [PPC64] Add TLS initial exec to local exec relaxation.
Wed, Jun 13, 3:23 PM
ruiu added inline comments to D48082: [PPC64] Add TLS global dynamic to local exec relaxation.
Wed, Jun 13, 3:18 PM
ruiu added a comment to D47540: [lld] Enable Visual Studio compatible output.

I noticed that MSVC link.exe doesn't show the error message in such a format that you can jump the source location when a link error occurs. Is this a configuration error in my environment, or is it expected?

Wed, Jun 13, 3:13 PM
ruiu added inline comments to D48153: Add TARGET(foo) linker script directive..
Wed, Jun 13, 2:57 PM
ruiu created D48153: Add TARGET(foo) linker script directive..
Wed, Jun 13, 2:31 PM
ruiu added inline comments to D48090: [PPC64] global dynamic to initial exec relaxation.
Wed, Jun 13, 1:55 PM
ruiu added a comment to D48146: ELF: Implement --icf=safe using address-significance tables..

Overall looking pretty good.

Wed, Jun 13, 1:16 PM
ruiu created D48147: Add comment to scatter-bit operation, make it faster and rename it..
Wed, Jun 13, 1:04 PM
ruiu committed rL334647: Remove needless bitwise-AND..
Remove needless bitwise-AND.
Wed, Jun 13, 1:03 PM
ruiu committed rLLD334647: Remove needless bitwise-AND..
Remove needless bitwise-AND.
Wed, Jun 13, 1:02 PM
ruiu committed rL334646: Make a function non-member because it doesn't depend on any class..
Make a function non-member because it doesn't depend on any class.
Wed, Jun 13, 12:54 PM
ruiu committed rLLD334646: Make a function non-member because it doesn't depend on any class..
Make a function non-member because it doesn't depend on any class.
Wed, Jun 13, 12:54 PM
ruiu committed rLLD334645: Apply clang-format..
Apply clang-format.
Wed, Jun 13, 12:54 PM
ruiu committed rL334645: Apply clang-format..
Apply clang-format.
Wed, Jun 13, 12:54 PM
ruiu accepted D47791: Initial support for Hexagon target..
Wed, Jun 13, 10:54 AM · lld
ruiu added inline comments to D48112: Simplify PPC64::calcEFlags()..
Wed, Jun 13, 10:25 AM
ruiu added a comment to D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

OK moved the test to x86-64-reloc-gotoff64.s, and renamed x86-64-reloc-got.s to `x86
gcc -O2 -S -mcmodel=medium -fPIC a.c emits the expected two instructions whose sum computes the pc-relative address (runtime address of _DYNAMIC)
clang emits a movabsq instruction which compiles to a R_X86_64_RELATIVE relocation after linking, which is not useful to the dynamic loader.

Wed, Jun 13, 10:16 AM

Tue, Jun 12

ruiu updated the diff for D48112: Simplify PPC64::calcEFlags()..
  • simplify
Tue, Jun 12, 6:50 PM
ruiu updated the diff for D48112: Simplify PPC64::calcEFlags()..
  • simplify
Tue, Jun 12, 6:48 PM
ruiu created D48112: Simplify PPC64::calcEFlags()..
Tue, Jun 12, 6:20 PM
ruiu committed rLLD334564: Use shorter names for #lo, #hi, #ha, etc. NFC..
Use shorter names for #lo, #hi, #ha, etc. NFC.
Tue, Jun 12, 5:55 PM
ruiu committed rL334564: Use shorter names for #lo, #hi, #ha, etc. NFC..
Use shorter names for #lo, #hi, #ha, etc. NFC.
Tue, Jun 12, 5:54 PM
ruiu closed D48093: Use shorter names for #lo, #hi, #ha, etc. NFC..
Tue, Jun 12, 5:54 PM
ruiu added a comment to D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

First of all, please do not remove x86-64-reloc-gotoff64.s. I'd write your new test to that file instead. It is easier to maintain two separate test files than having one larger test file.

Tue, Jun 12, 5:52 PM
ruiu added a comment to D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

Well, I still think separating the test is better to keep the test files manageable.

Tue, Jun 12, 4:31 PM
ruiu added a comment to D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

Could you create a new test file for the new test case?

Tue, Jun 12, 3:03 PM
ruiu committed rL334552: Fix /WholeArchive bug..
Fix /WholeArchive bug.
Tue, Jun 12, 2:52 PM
ruiu committed rLLD334552: Fix /WholeArchive bug..
Fix /WholeArchive bug.
Tue, Jun 12, 2:52 PM
ruiu closed D47565: Fix /WholeArchive bug..
Tue, Jun 12, 2:52 PM
ruiu closed D47565: Fix /WholeArchive bug..
Tue, Jun 12, 2:52 PM
ruiu updated the diff for D47565: Fix /WholeArchive bug..
  • Remove O(n^2)-ness.
Tue, Jun 12, 2:30 PM
ruiu added a comment to D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

Test is not only important to not break the feature in the future, but it helps readers a lot by demonstrating the issue in action, so even for a change that's not ready for submission, adding test is greatly appreciated.

Tue, Jun 12, 2:21 PM
ruiu added a comment to D48095: [ELF][X86_64] Use R_GOTREL_FROM_END instead of R_GOTREL for R_X86_64_GOTOFF64.

As always, can you add a test?

Tue, Jun 12, 2:19 PM
ruiu added a comment to D47565: Fix /WholeArchive bug..

Let me try. I'll make a change and upload shortly.

Tue, Jun 12, 2:01 PM
ruiu created D48093: Use shorter names for #lo, #hi, #ha, etc. NFC..
Tue, Jun 12, 1:45 PM
ruiu accepted D48092: [COFF] Fix crash when emitting symbol tables with GC.

LGTM

Tue, Jun 12, 1:37 PM
ruiu committed rLLD334534: Handle R_X86_64_GOTOFF64..
Handle R_X86_64_GOTOFF64.
Tue, Jun 12, 1:31 PM
ruiu committed rL334534: Handle R_X86_64_GOTOFF64..
Handle R_X86_64_GOTOFF64.
Tue, Jun 12, 1:31 PM
ruiu closed D48058: Handle R_X86_64_GOTOFF64..
Tue, Jun 12, 1:31 PM
ruiu accepted D47098: [ELF] Support R_X86_64_GOTPC{32,64}.

LGTM

Tue, Jun 12, 1:22 PM
ruiu added a comment to D48090: [PPC64] global dynamic to initial exec relaxation.

Can you give me a pointer to the spec describing these relaxations?

Tue, Jun 12, 1:16 PM
ruiu added inline comments to D48091: [PPC64] Add TLS initial exec to local exec relaxation.
Tue, Jun 12, 1:13 PM
ruiu added a comment to D48058: Handle R_X86_64_GOTOFF64..

It is not me who requested you remove GOTOFF64 relocation support from your patch, but if you have a patch with a title "Add R_X86_64_GOTPC{32,64} support", I wouldn't be surprised if you are requested to remove code to support other types of relocations, as patches shouldn't contain unrelated changes. A best practice is to separate a patch to two or more.

Tue, Jun 12, 12:53 PM
ruiu added inline comments to D47098: [ELF] Support R_X86_64_GOTPC{32,64}.
Tue, Jun 12, 12:46 PM
ruiu added inline comments to D47098: [ELF] Support R_X86_64_GOTPC{32,64}.
Tue, Jun 12, 12:44 PM
ruiu added a comment to D47098: [ELF] Support R_X86_64_GOTPC{32,64}.

I applied this patch but the test failed. Can you fix?

Tue, Jun 12, 11:31 AM

Mon, Jun 11

ruiu created D48058: Handle R_X86_64_GOTOFF64..
Mon, Jun 11, 4:56 PM
ruiu accepted D47998: [Darwin] Use errorHandler from liblldCommon.

Thank you for doing this. Though we probably should discuss the future plan at some point, this seems like a pure improvement to me.

Mon, Jun 11, 12:44 PM
ruiu accepted D47975: [ELF] Fix copy relocation when two symbols share the same Symbol instance..

LGTM

Mon, Jun 11, 12:35 PM
ruiu added a comment to D47975: [ELF] Fix copy relocation when two symbols share the same Symbol instance..

Could you add a test?

Mon, Jun 11, 11:30 AM

Fri, Jun 8

ruiu committed rLLD334342: Fix build broken by r334341..
Fix build broken by r334341.
Fri, Jun 8, 6:02 PM
ruiu committed rL334342: Fix build broken by r334341..
Fix build broken by r334341.
Fri, Jun 8, 6:02 PM
ruiu committed rL334341: Remove a dead variable..
Remove a dead variable.
Fri, Jun 8, 6:00 PM
ruiu committed rLLD334341: Remove a dead variable..
Remove a dead variable.
Fri, Jun 8, 6:00 PM
ruiu accepted D47578: Do not enforce absolute path argv0 in windows.

Well, I don't think that pointing out that we shouldn't convert strings between UTF8 and UTF16 back and forth is nitpicking, but yeah, this has already been addressed, so feel free to submit. LGTM.

Fri, Jun 8, 5:55 PM
ruiu added a comment to D46205: Set MemoryBuffer's RequiresNullTerminator to false by default..

Yes, I'll create a follow-up patch to remove RequiresNullTerminator from this function and create a new function for those that needs that functionality.

Fri, Jun 8, 4:33 PM
ruiu added a comment to D46205: Set MemoryBuffer's RequiresNullTerminator to false by default..

I believe this patch is ready for submit, though I didn't get any LGTM for this. Could you review it for me?

Fri, Jun 8, 3:16 PM
ruiu added inline comments to D47578: Do not enforce absolute path argv0 in windows.
Fri, Jun 8, 2:36 PM
ruiu added inline comments to D47578: Do not enforce absolute path argv0 in windows.
Fri, Jun 8, 2:35 PM

Thu, Jun 7

ruiu committed rLLD334250: Expand comments..
Expand comments.
Thu, Jun 7, 5:23 PM
ruiu committed rL334250: Expand comments..
Expand comments.
Thu, Jun 7, 5:22 PM
ruiu added inline comments to D47791: Initial support for Hexagon target..
Thu, Jun 7, 4:34 PM · lld
ruiu added a comment to D47901: [WIP] [WebAssembly] Update .debug_line section PC addresses during LEB optimization.

For now, bytecode offset (function or file relative) is used in role of the PC -- for call stack, for profiler, and we also successfully adapted it for source maps. I'm not sure what moving to index (of wasm operator?) base will change, but it will only will add complexity and will not solve this particular issue.

Thu, Jun 7, 3:38 PM
ruiu added a comment to D47901: [WIP] [WebAssembly] Update .debug_line section PC addresses during LEB optimization.

As to making it a separate tool to compress wasm text section, I believe that's an option, though I'm not sure if it is ideal. I imagine that the tool compresses text section by optimize LEB128-encoded numbers and then strip debug sections to produce production binary. That doesn't sound like a bad idea, at least, and maybe that's a good idea. But I'd like to hear from wasm developers about it, as it affects their workflow.

Thu, Jun 7, 3:31 PM
ruiu added a comment to D47901: [WIP] [WebAssembly] Update .debug_line section PC addresses during LEB optimization.

There's no notion of "PC" in wasm, no? You cannot take an address of a function and call it indirectly later. Well, you can do that, but what you get is not an address in the regular mean. It's an index, if I understand correctly. So, by PC, what do you mean?

Thu, Jun 7, 3:27 PM
ruiu added a comment to D47901: [WIP] [WebAssembly] Update .debug_line section PC addresses during LEB optimization.

I do imagine that "there's no way to create an executable with debug info if you are creating a release build" is unacceptable. So, we need to support both -O2 with debug info. But is this the only way to do this? This seems a bit too complicated to me. Maybe just code is complicated and the algorithm might not, but it is hard to tell because of the lack of any explanation of the algorithm.

Thu, Jun 7, 3:11 PM
ruiu added inline comments to D47901: [WIP] [WebAssembly] Update .debug_line section PC addresses during LEB optimization.
Thu, Jun 7, 12:59 PM
ruiu added inline comments to D47578: Do not enforce absolute path argv0 in windows.
Thu, Jun 7, 12:54 PM

Wed, Jun 6

ruiu added a comment to D47806: [WebAssembly] Add --export-all flag.

LGTM

Wed, Jun 6, 6:27 PM
ruiu accepted D47806: [WebAssembly] Add --export-all flag.
Wed, Jun 6, 6:27 PM
ruiu added inline comments to D47806: [WebAssembly] Add --export-all flag.
Wed, Jun 6, 6:16 PM
ruiu committed rL334148: Expand the file comment for the error handlers..
Expand the file comment for the error handlers.
Wed, Jun 6, 5:09 PM
ruiu committed rLLD334148: Expand the file comment for the error handlers..
Expand the file comment for the error handlers.
Wed, Jun 6, 5:09 PM
ruiu closed D47790: Expand the file comment for the error handlers..
Wed, Jun 6, 5:09 PM
ruiu added a comment to D47790: Expand the file comment for the error handlers..

Is this OK?

Wed, Jun 6, 4:43 PM
ruiu added a comment to D47578: Do not enforce absolute path argv0 in windows.

So the best practice is, when you get a UTF-16 string from an Windows API, you should convert it to UTF-8 as soon as you can so that you can always process strings as UTF-8. Likewise, you should always keep all string in UTF-8 in memory and convert them to UTF-16 just before passing them to an Windows API if necessary. If you find yourself writing UTF-8 ↔ UTF-16 conversion code too frequently, that's like a signal that you are not doing text processing in UTF-8. Basically you need to do coding conversion up to only once for each new string.

Wed, Jun 6, 2:46 PM
ruiu added a comment to D47578: Do not enforce absolute path argv0 in windows.

It seems you converted the same string back and forth between UTF-8 and UTF-16 to call Windows functions and LLVM functions. That's not only a waste of time (which is not a big problem) but complicates the code.

Wed, Jun 6, 2:36 PM
ruiu added a comment to D47540: [lld] Enable Visual Studio compatible output.

Could you share a few real examples of error messages with and without this patch to see how they look like?

Wed, Jun 6, 2:17 PM
ruiu accepted D47602: Correct aligment computation for shared object symbols.

LGTM

Wed, Jun 6, 1:56 PM
ruiu committed rLLD334129: Remove an unrelated file accidentally submitted as part of r334095..
Remove an unrelated file accidentally submitted as part of r334095.
Wed, Jun 6, 1:50 PM
ruiu committed rL334129: Remove an unrelated file accidentally submitted as part of r334095..
Remove an unrelated file accidentally submitted as part of r334095.
Wed, Jun 6, 1:50 PM
ruiu added inline comments to D47791: Initial support for Hexagon target..
Wed, Jun 6, 11:29 AM · lld
ruiu added inline comments to D47799: [COFF] add /errorrepro to save reproducer on error.
Wed, Jun 6, 11:14 AM

Tue, Jun 5

ruiu added a comment to D47799: [COFF] add /errorrepro to save reproducer on error.

What was the motivation for this new option? Given that it is easy to write run the same command again with /linkrepro, I don't see an immediate need to add this as a new option.

Tue, Jun 5, 2:32 PM
ruiu added inline comments to D47791: Initial support for Hexagon target..
Tue, Jun 5, 11:27 AM · lld
ruiu added inline comments to D47791: Initial support for Hexagon target..
Tue, Jun 5, 11:09 AM · lld
ruiu created D47790: Expand the file comment for the error handlers..
Tue, Jun 5, 11:03 AM
ruiu added inline comments to D47602: Correct aligment computation for shared object symbols.
Tue, Jun 5, 9:26 AM
ruiu committed rLLD334024: Do not show unrelated "-m is missing" error message..
Do not show unrelated "-m is missing" error message.
Tue, Jun 5, 9:19 AM
ruiu committed rL334024: Do not show unrelated "-m is missing" error message..
Do not show unrelated "-m is missing" error message.
Tue, Jun 5, 9:18 AM
ruiu accepted D47598: [PPC64] Add support for local-exec TLS model.

LGTM

Tue, Jun 5, 8:52 AM
ruiu added a comment to D47669: [cmake] Support LLD for CLANG_ORDER_FILE.

LGTM

Tue, Jun 5, 8:48 AM
ruiu added a comment to D47588: Print out "Alias for -foo" instead of repeating the same help message for -foo..

I would probably prefer this dumb but simple change over making a change to OptTable.cpp so that it synthesizes "Alias for ..." strings for alias options. If we have hundreds of lines of aliases, that might help, but for this 30+ options, maybe it's a bit too much?

Tue, Jun 5, 8:39 AM
ruiu accepted D47734: AMDGPU/LLD: Handle R_AMDGPU_REL64 relocation.

LGTM

Tue, Jun 5, 8:31 AM
ruiu added a comment to D47479: Add support for Hexagon .

Do you have a plan to work on this, or did you just abandon your port?

Tue, Jun 5, 8:28 AM · Restricted Project