Page MenuHomePhabricator
Feed Advanced Search

Tue, Sep 22

atrosinenko added a comment to D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z.

The (aWidth - 1) - clzsi(a) change is correct, but why is the ctz change?

Tue, Sep 22, 3:22 AM · Restricted Project

Fri, Sep 11

atrosinenko added a comment to D87520: [tests][compiler-rt] Implement generic_ldbl{80,128}_test targets.

See rG553833958fd as an example.

Fri, Sep 11, 9:17 AM · Restricted Project
atrosinenko requested review of D87520: [tests][compiler-rt] Implement generic_ldbl{80,128}_test targets.
Fri, Sep 11, 9:13 AM · Restricted Project

Wed, Sep 9

atrosinenko added a comment to D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z.

Ping.

Wed, Sep 9, 8:45 AM · Restricted Project
atrosinenko added a comment to D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls.

Ping.

Wed, Sep 9, 8:44 AM · Restricted Project

Tue, Sep 1

atrosinenko committed rG553833958fde: [builtins] Fix divtf3_test.c (authored by atrosinenko).
[builtins] Fix divtf3_test.c
Tue, Sep 1, 2:21 PM
atrosinenko committed rG93eed63d2f31: [builtins] Make __div[sdt]f3 handle denormal results (authored by atrosinenko).
[builtins] Make __div[sdt]f3 handle denormal results
Tue, Sep 1, 11:55 AM
atrosinenko closed D85032: [builtins] Make divXf3 handle denormal results.
Tue, Sep 1, 11:54 AM · Restricted Project
atrosinenko committed rG0e90d8d4fed8: [builtins] Unify the softfloat division implementation (authored by atrosinenko).
[builtins] Unify the softfloat division implementation
Tue, Sep 1, 9:25 AM
atrosinenko closed D85031: [builtins] Unify the softfloat division implementation.
Tue, Sep 1, 9:25 AM · Restricted Project

Aug 31 2020

atrosinenko added a comment to D85031: [builtins] Unify the softfloat division implementation.

Thank you very much for review!

Aug 31 2020, 2:00 PM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Update after the latest comments.

Aug 31 2020, 1:50 PM · Restricted Project
atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

Re-upload after amending parent diff + add minor clarification.

Aug 31 2020, 6:26 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Clarify rounding-related part of function.

Aug 31 2020, 6:15 AM · Restricted Project
atrosinenko added a comment to D86453: [AArch64] Support conversion between fp16 and fp128.

Hi atrosinenko, do you think this patch need any more change on the testing side?
The fp_lib.h/int_lib.h change would most likely require in a more complex without
much gain in organization imho.

Aug 31 2020, 4:30 AM · Restricted Project, Restricted Project

Aug 30 2020

atrosinenko committed rG11cf6346fd49: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations (authored by atrosinenko).
[NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations
Aug 30 2020, 6:42 AM
atrosinenko closed D86400: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations.
Aug 30 2020, 6:42 AM · Restricted Project
atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

Re-upload after amending parent diff.

Aug 30 2020, 6:03 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Add more clarifications, fix explanation for "why it is enough to adjust only once in case of overflow".

Aug 30 2020, 6:01 AM · Restricted Project

Aug 28 2020

atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

Re-upload after changing parent diff.

Aug 28 2020, 8:57 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Add some other explanations.

Aug 28 2020, 8:57 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

This update is expected to be completely NFC w.r.t. code behavior and significantly clarify the proof up to the end of half-width iterations.

Aug 28 2020, 7:01 AM · Restricted Project

Aug 27 2020

atrosinenko added inline comments to D85031: [builtins] Unify the softfloat division implementation.
Aug 27 2020, 9:14 AM · Restricted Project
atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

No-change re-upload: rebase onto current master branch.

Aug 27 2020, 8:35 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

No-change re-upload: rebase onto current master branch.

Aug 27 2020, 8:34 AM · Restricted Project
atrosinenko added a comment to D84602: [MSP430] Expose msp430_builtin calling convention to C code.

Pinging @echristo in case there is some trivial way to allocate a calling convention ID (but probably there is not, unless GCC allocated one already). As I understand, without this ID the debugger may show some misleading output for a limited number of LibCalls. On the other hand, it will not help either, unless the debugger knows this ID.

Aug 27 2020, 6:21 AM · Restricted Project, Restricted Project
atrosinenko updated the diff for D84602: [MSP430] Expose msp430_builtin calling convention to C code.
  • Rebase onto current master branch
  • Add a dummy switch case with FIXME, as suggested by @aaron.ballman
  • Applied a couple of style fixes proposed by linter
Aug 27 2020, 6:10 AM · Restricted Project, Restricted Project
atrosinenko added a comment to D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file.

Uploaded because it was already approved and no other review comments received since then. Anyway, please feel free to request followup changes if needed.

Aug 27 2020, 4:38 AM · Restricted Project
atrosinenko added a comment to D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file.

Uploaded because it was already approved and no other review comments received since then. Anyway, please feel free to request followup changes if needed.

Aug 27 2020, 4:37 AM · Restricted Project
atrosinenko committed rGfce035eae980: [NFC][compiler-rt] Factor out __mulo[sdt]i4 implementations to .inc file (authored by atrosinenko).
[NFC][compiler-rt] Factor out __mulo[sdt]i4 implementations to .inc file
Aug 27 2020, 4:37 AM
atrosinenko committed rG182d14db07f1: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file (authored by atrosinenko).
[NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file
Aug 27 2020, 4:37 AM
atrosinenko closed D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file.
Aug 27 2020, 4:37 AM · Restricted Project
atrosinenko closed D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file.
Aug 27 2020, 4:36 AM · Restricted Project

Aug 25 2020

atrosinenko abandoned D86221: [compiler-rt][builtins] Do not assume int to be at least 32 bit wide.

Replaced this by D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls and D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z. These two patches include everything except for factoring out src_rep_t_clz() and rep_clz() to clzdi() for now.

Aug 25 2020, 9:16 AM · Restricted Project
atrosinenko requested review of D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z.
Aug 25 2020, 9:10 AM · Restricted Project
atrosinenko requested review of D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls.
Aug 25 2020, 9:09 AM · Restricted Project
atrosinenko added a comment to D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.

Uploaded, thank you!

Aug 25 2020, 6:24 AM · Restricted Project
atrosinenko committed rGe1edc1c76dc1: [Utils] Add highlighting definition for byref IR attribute (authored by atrosinenko).
[Utils] Add highlighting definition for byref IR attribute
Aug 25 2020, 6:23 AM
atrosinenko committed rGb9f49d13fd44: [compiler-rt][builtins] Add more test cases for __div[sdt]f3 LibCalls (authored by atrosinenko).
[compiler-rt][builtins] Add more test cases for __div[sdt]f3 LibCalls
Aug 25 2020, 6:23 AM
atrosinenko closed D85768: [Utils] Add highlighting definition for byref IR attribute.
Aug 25 2020, 6:23 AM · Restricted Project
atrosinenko closed D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.
Aug 25 2020, 6:23 AM · Restricted Project
atrosinenko added inline comments to D86453: [AArch64] Support conversion between fp16 and fp128.
Aug 25 2020, 3:28 AM · Restricted Project, Restricted Project

Aug 24 2020

atrosinenko added inline comments to D86299: [compiler-rt][builtins] Factor out some common bit manipulations.
Aug 24 2020, 1:28 PM · Restricted Project
atrosinenko updated the diff for D86299: [compiler-rt][builtins] Factor out some common bit manipulations.

Explicilty mention that UBSan have to be manually configured in trap-on-error mode to operate of builtins library.

Aug 24 2020, 1:20 PM · Restricted Project
atrosinenko added a comment to D84877: Support for soft fp16 to fp64 IEEE conversions.

Sorry for such an iterative feedback. A couple of general thoughts:

  • It may be worth looking at D86453: [AArch64] Support conversion between fp16 and fp128: if I get it right, it introduces a TYPE_FP16 macro to be used instead of uint16_t when using it instead of half-size float. When one of this patch and D86453 lands, the other one will probably need some updates
  • Unlike many other tests, this one always checks all the test cases instead of failing with non-zero exit code on the first failed one. If something goes wrong with this libcall, build log can be flooded with up to 65k warning lines. Still I'm not sure whether this is an issue.
Aug 24 2020, 10:02 AM · Restricted Project, Restricted Project
atrosinenko added a comment to D86162: [libc] Add two-way strstr algorithm..

As far as testing, both the brute force and the two-way algorithms pass the unit tests and the fuzz test for strstr.

Aug 24 2020, 7:33 AM · Restricted Project
atrosinenko added inline comments to D86453: [AArch64] Support conversion between fp16 and fp128.
Aug 24 2020, 7:12 AM · Restricted Project, Restricted Project
atrosinenko added a reviewer for D86299: [compiler-rt][builtins] Factor out some common bit manipulations: MaskRay.
Aug 24 2020, 5:54 AM · Restricted Project
atrosinenko updated the diff for D86414: [compiler-rt][builtins] Fix some other cases of UB.

Re-upload with properly set parent review.

Aug 24 2020, 5:53 AM · Restricted Project
atrosinenko updated the diff for D86299: [compiler-rt][builtins] Factor out some common bit manipulations.

Reupload.

Aug 24 2020, 5:51 AM · Restricted Project
atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

Re-upload after parent commits were changed.

Aug 24 2020, 5:40 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Addressed the review comments mostly by clarifying the explanations.

Aug 24 2020, 5:36 AM · Restricted Project

Aug 22 2020

atrosinenko requested review of D86414: [compiler-rt][builtins] Fix some other cases of UB.
Aug 22 2020, 11:51 PM · Restricted Project
atrosinenko requested review of D86400: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations.
Aug 22 2020, 9:25 AM · Restricted Project

Aug 21 2020

atrosinenko added inline comments to D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file.
Aug 21 2020, 7:40 AM · Restricted Project
atrosinenko updated the diff for D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file.

Explicitly mark .inc file as a C source like is already done for almost all *_impl.inc files.

Aug 21 2020, 7:31 AM · Restricted Project
atrosinenko updated the diff for D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file.

Explicitly mark .inc file as a C source like is already done for almost all *_impl.inc files.

Aug 21 2020, 7:29 AM · Restricted Project
atrosinenko added a reviewer for D84877: Support for soft fp16 to fp64 IEEE conversions: atrosinenko.

Thanks @ldrumm! Some comments on the test follow.

Aug 21 2020, 3:55 AM · Restricted Project, Restricted Project

Aug 20 2020

atrosinenko added a comment to D85031: [builtins] Unify the softfloat division implementation.

Thank you @sepavloff !

Aug 20 2020, 10:23 AM · Restricted Project
atrosinenko requested review of D86299: [compiler-rt][builtins] Factor out some common bit manipulations.
Aug 20 2020, 8:52 AM · Restricted Project
atrosinenko requested review of D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file.
Aug 20 2020, 7:13 AM · Restricted Project
atrosinenko requested review of D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file.
Aug 20 2020, 3:36 AM · Restricted Project

Aug 19 2020

atrosinenko updated subscribers of D86221: [compiler-rt][builtins] Do not assume int to be at least 32 bit wide.

On one hand, this clzdi() implementation should be completely harmless when fallback is implemented via clzsi(). On the other hand, it may possibly be completely removed. This code snippet mimics one already existing for clzsi in int_types.h and for currently supported targets it can probably be even as simple as this (provided we can use C99):

Aug 19 2020, 10:49 AM · Restricted Project
atrosinenko requested review of D86221: [compiler-rt][builtins] Do not assume int to be at least 32 bit wide.
Aug 19 2020, 8:45 AM · Restricted Project
atrosinenko added inline comments to D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.
Aug 19 2020, 3:18 AM · Restricted Project
atrosinenko updated the diff for D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.

Fix the misleading comment.

Aug 19 2020, 3:17 AM · Restricted Project
atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

Rebase the entire patch stack against the up-to-date master and re-upload.

Aug 19 2020, 2:45 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Rebase the entire patch stack against the up-to-date master and re-upload.

Aug 19 2020, 2:45 AM · Restricted Project
atrosinenko updated the diff for D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.

Rebase the entire patch stack against the up-to-date master and re-upload.

Aug 19 2020, 2:44 AM · Restricted Project
atrosinenko updated the diff for D85731: [NFC][builtins] Make softfloat-related errors less noisy.

Rebase the entire patch stack against the up-to-date master and re-upload.

Aug 19 2020, 2:44 AM · Restricted Project

Aug 18 2020

atrosinenko added a comment to D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.

Thank you for the test cases. Looks like it is worth completely rewriting the three tests as table-driven tests, so for example adding four cases for [+-]Inf / [+-]0.0 would be almost as easy as testing only one of them (something similar is already implemented for udivmod?i4_test.c). The differences between adjacent test cases would be more visually obvious, as well.

Aug 18 2020, 5:31 AM · Restricted Project
atrosinenko updated the diff for D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.

Address the review comments.

Aug 18 2020, 5:13 AM · Restricted Project

Aug 17 2020

atrosinenko added a comment to D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack.

Maybe I overestimated similarity of byval and recently introduced byref... Looks like some aliasing restrictions are not mentioned in LLVM Language Reference. For example, the only way for Clang to emit the byref attribute to LLVM IR I know about is via ABIArgInfo with Kind == IndirectAliased introduced in D79744: clang: Use byref for aggregate kernel arguments - and it has a note that "The object is known to not be through any other references for the duration of the call, and the callee must not itself modify the object". This seems to be necessary for correctness of this transformation. If LLVM Language Reference does not mention such restrictions intentionally, then it may be clang that should be responsible for such optimizations.

Aug 17 2020, 11:39 AM · Restricted Project, Restricted Project
atrosinenko updated the diff for D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack.

Add a test for insufficiently aligned source.

Aug 17 2020, 11:25 AM · Restricted Project, Restricted Project
atrosinenko updated the diff for D85917: [MSP430] Fix passing C structs and unions as function arguments.

Update with implicit pointers being passed through.

Aug 17 2020, 9:09 AM · Restricted Project
atrosinenko updated the diff for D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack.

Restrict transformation to passing through byref arguments, not arbitrary pointers.

Aug 17 2020, 9:05 AM · Restricted Project, Restricted Project

Aug 15 2020

atrosinenko requested review of D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack.
Aug 15 2020, 9:52 AM · Restricted Project, Restricted Project

Aug 14 2020

atrosinenko retitled D85731: [NFC][builtins] Make softfloat-related errors less noisy from [builtins] Make softfloat-related errors less noisy to [NFC][builtins] Make softfloat-related errors less noisy.
Aug 14 2020, 3:41 AM · Restricted Project
atrosinenko added a comment to D84602: [MSP430] Expose msp430_builtin calling convention to C code.

I still think this case needs some work to keep the bots happy. I would probably go with:

case CC_MSP430Builtin:

// FIXME: Currently unsupported
break;

But perhaps @echristo has opinions since this involves debugging information.

Aug 14 2020, 3:19 AM · Restricted Project, Restricted Project
atrosinenko added a comment to D84417: [MSP430] Do not use __mspabi_cmp[fd] for FP comparisons.

Hmm, this probably needs further investigations... On one hand, condition codes such as ISD::SETNE are explicit "Don't care operations: undefined if the input is a nan" - that is, exactly how the __mspabi_cmp[fd] are described in MSP430 EABI document. On the other hand, how a fully fledged comparison libcall can be specified then?

Aug 14 2020, 3:09 AM · Restricted Project
atrosinenko added a comment to D84605: [IR][MSP430] Expose the "msp430_builtin" calling convention to .ll.

A shy ping :)

Aug 14 2020, 2:04 AM · Restricted Project

Aug 13 2020

atrosinenko updated the diff for D85917: [MSP430] Fix passing C structs and unions as function arguments.

Restore test formatting.

Aug 13 2020, 11:16 AM · Restricted Project
atrosinenko requested review of D85917: [MSP430] Fix passing C structs and unions as function arguments.
Aug 13 2020, 11:13 AM · Restricted Project
atrosinenko added a comment to D85032: [builtins] Make divXf3 handle denormal results.

Ping.

Aug 13 2020, 3:10 AM · Restricted Project
atrosinenko added a comment to D85031: [builtins] Unify the softfloat division implementation.

Ping.

Aug 13 2020, 3:10 AM · Restricted Project
atrosinenko added a comment to D78663: [builtins] Add 32-bit shift builtins.

Thanks @aykevl! This could be useful for MSP430 as well. Especially, the tests would be worth reusing even for target-specific assembly re-implementation of these routines.

Aug 13 2020, 3:04 AM · Restricted Project
atrosinenko added a reviewer for D78663: [builtins] Add 32-bit shift builtins: atrosinenko.

A bit of comment fine-tuning. :)

Aug 13 2020, 2:47 AM · Restricted Project

Aug 12 2020

atrosinenko added a comment to D85031: [builtins] Unify the softfloat division implementation.

On linter diagnostics: error messages are due to linter trying to lint *.inc file that is not self-contained by design. D85731: [NFC][builtins] Make softfloat-related errors less noisy tries to make those errors more meaningful, at least.

Aug 12 2020, 2:12 AM · Restricted Project
atrosinenko added a reviewer for D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls: sepavloff.
Aug 12 2020, 2:04 AM · Restricted Project
atrosinenko added a reviewer for D85032: [builtins] Make divXf3 handle denormal results: sepavloff.
Aug 12 2020, 2:04 AM · Restricted Project
atrosinenko updated the summary of D85031: [builtins] Unify the softfloat division implementation.
Aug 12 2020, 2:01 AM · Restricted Project
atrosinenko added a comment to D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.

Ping

Aug 12 2020, 1:48 AM · Restricted Project
atrosinenko updated the summary of D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls.
Aug 12 2020, 1:48 AM · Restricted Project

Aug 11 2020

atrosinenko requested review of D85768: [Utils] Add highlighting definition for byref IR attribute.
Aug 11 2020, 12:05 PM · Restricted Project
atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

Re-upload after D85731: [NFC][builtins] Make softfloat-related errors less noisy to get rid of "error: unknown type name 'fp_t'" and similar clang-tidy diagnostics for fp_div_impl.inc.

Aug 11 2020, 9:17 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Re-upload after D85731: [NFC][builtins] Make softfloat-related errors less noisy to get rid of "error: unknown type name 'fp_t'" and similar clang-tidy diagnostics for fp_div_impl.inc.

Aug 11 2020, 9:13 AM · Restricted Project
atrosinenko updated the summary of D85731: [NFC][builtins] Make softfloat-related errors less noisy.
Aug 11 2020, 7:12 AM · Restricted Project
atrosinenko requested review of D85731: [NFC][builtins] Make softfloat-related errors less noisy.
Aug 11 2020, 7:07 AM · Restricted Project
atrosinenko updated the diff for D85032: [builtins] Make divXf3 handle denormal results.

Re-upload after amending previous commit

Aug 11 2020, 2:56 AM · Restricted Project
atrosinenko updated the diff for D85031: [builtins] Unify the softfloat division implementation.

Refactoring

Aug 11 2020, 2:54 AM · Restricted Project