[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-10-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. As discussed in D156716 , it is not clear if I have to add FeatureFPAC to every relevant CPU. Maybe it is worth conservatively assuming that this feature should only be enabled manually by the user as a precaution against "I have CP

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-09-29 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 557488. atrosinenko added a comment. Updated the patch: - added FPAC to `Extensions` array in AArch64TargetParser.h, so it can be used in `-march=...+fpac` command line option. Adding one more feature seems mostly harmless after PR 65423

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-08-14 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko planned changes to this revision. atrosinenko added a comment. Looks like adding FeatureFPAC may require changes in more places - need to investigate whether I have to add something like AEK_FPAC constant, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-08-01 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: ab, kristof.beyls, apazos, pcc, psmith, t.p.northover. Herald added a subscriber: hiraditya. Herald added a project: All. atrosinenko requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llv

[PATCH] D85917: [MSP430] Fix passing C structs and unions as function arguments

2023-07-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Sorry for a hung patch. After getting the approval I had doubts that I interpret the corner cases of LLVM IR correctly. Thus, I postponed the patch these days to not subtly break the stable targets while fixing one issue on MSP430. I can re-evaluate this patch if i

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2022-01-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4bcd2588a986: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z (authored by atrosinenko). Repository: rG LLVM Github Monorep

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2022-01-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9595f0051000: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls (authored by atrosinenko). Repository: rG LLVM Github Monore

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2020-09-22 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. In D86547#2284095 , @MaskRay wrote: > The `(aWidth - 1) - clzsi(a)` change is correct, but why is the ctz change? `d.s.low` and `d.s.high` are `su_int`. While some helpers from `libgcc` are documented with `int`, `long`, etc.

[PATCH] D87520: [tests][compiler-rt] Implement generic_ldbl{80,128}_test targets

2020-09-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. See rG553833958fd as an example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87520/new/ https://reviews.llvm.org/D87520

[PATCH] D87520: [tests][compiler-rt] Implement generic_ldbl{80,128}_test targets

2020-09-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: MaskRay, howard.hinnant, samsonov. Herald added subscribers: Sanitizers, mgorny, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. Herald added a subscriber: aheejin. This patch introduces two

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2020-09-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86547/new/ https://reviews.llvm.org/D86547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2020-09-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86546/new/ https://reviews.llvm.org/D86546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-09-01 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG93eed63d2f31: [builtins] Make __div[sdt]f3 handle denormal results (authored by atrosinenko). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-09-01 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0e90d8d4fed8: [builtins] Unify the softfloat division implementation (authored by atrosinenko). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Thank you very much for review! I have amended this diff based on the latest comment by @scanon. So, I will land D85031 and then D85032: [builtins] Make divXf3 handle denormal results if there are

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 289022. atrosinenko added a comment. Update after the latest comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/divdf3.c

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288935. atrosinenko added a comment. Re-upload after amending parent diff + add minor clarification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compil

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288932. atrosinenko added a comment. Clarify rounding-related part of function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/di

[PATCH] D86400: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations

2020-08-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG11cf6346fd49: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations (authored by atrosinenko). Repository: rG LLVM Github Mon

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288851. atrosinenko added a comment. Herald added a subscriber: danielkiss. Re-upload after amending parent diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Fi

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288850. atrosinenko added a comment. Herald added a subscriber: danielkiss. Add more clarifications, fix explanation for "why it is enough to adjust only once in case of overflow". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288625. atrosinenko added a comment. Re-upload after changing parent diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compiler-rt/lib/builtins/fp_div_

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288623. atrosinenko added a comment. Add some other explanations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/divdf3.c compi

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288599. atrosinenko added a comment. 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. Particularly, the reasoning about possible overflow of intermediate results

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/fp_div_impl.inc:142 + // An error due to truncated C + an error due to truncated x_UQ0_hw: + // e_0 <= 3/4 - 1/sqrt(2) + 2^-W0 + 2^-HW + sepavloff wrote: > Should the right part contain `1/

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288348. atrosinenko added a comment. No-change re-upload: rebase onto current master branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/li

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288349. atrosinenko added a comment. No-change re-upload: rebase onto current master branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compiler-rt/li

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. 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

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288305. atrosinenko added a comment. - 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Uploaded because it was already approved and no other review comments received since then. Anyway, please feel free to request followup changes if needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86277/new/ https:

[PATCH] D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Uploaded because it was already approved and no other review comments received since then. Anyway, please feel free to request followup changes if needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86289/new/ https:

[PATCH] D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG182d14db07f1: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file (authored by atrosinenko). Repository: rG LLVM Github Monor

[PATCH] D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGfce035eae980: [NFC][compiler-rt] Factor out __mulo[sdt]i4 implementations to .inc file (authored by atrosinenko). Changed prior to commit: https:/

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

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko abandoned this revision. atrosinenko added a comment. 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

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: efriedma, MaskRay, aykevl, uabelho. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. `__builtin_c[tl]z` accepts `unsigned int` argument that is not alway

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: efriedma, MaskRay, aykevl, uabelho. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. Use s[iu]_int instead of `(unsigned) int` and d[ui]_int instead of `

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Uploaded, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84932/new/ https://reviews.llvm.org/D84932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb9f49d13fd44: [compiler-rt][builtins] Add more test cases for __div[sdt]f3 LibCalls (authored by atrosinenko). Changed prior to commit: https://reviews.llvm.org/D84932?vs=286523&id=287650#toc Repositor

[PATCH] D86299: [compiler-rt][builtins] Factor out some common bit manipulations

2020-08-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/int_mulo_impl.inc:22 +// themselves indefinitely when compiled with UBSan. +#if defined(__clang__) +#define NO_UBSAN __attribute__((no_sanitize("undefined"))) MaskRay wrote: > AFAIK LLVM_USE_

[PATCH] D86299: [compiler-rt][builtins] Factor out some common bit manipulations

2020-08-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 287479. atrosinenko added a comment. Explicilty mention that UBSan have to be manually configured in trap-on-error mode to operate of builtins library. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86299/ne

[PATCH] D86414: [compiler-rt][builtins] Fix some other cases of UB

2020-08-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 287359. atrosinenko added a comment. Re-upload with properly set parent review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86414/new/ https://reviews.llvm.org/D86414 Files: compiler-rt/lib/builtins/ab

[PATCH] D86299: [compiler-rt][builtins] Factor out some common bit manipulations

2020-08-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 287355. atrosinenko added a comment. Reupload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86299/new/ https://reviews.llvm.org/D86299 Files: compiler-rt/lib/builtins/fixdfdi.c compiler-rt/lib/builtin

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 287354. atrosinenko added a comment. Re-upload after parent commits were changed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compiler-rt/lib/builtins/

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 287351. atrosinenko added a comment. Addressed the review comments mostly by clarifying the explanations. I expect this code to have no **unresolved** review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D86414: [compiler-rt][builtins] Fix some other cases of UB

2020-08-22 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: scanon, koviankevin, MaskRay, howard.hinnant. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. This patch eliminates some other UB in a slightly more tri

[PATCH] D86400: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations

2020-08-22 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: MaskRay, aykevl, uabelho. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. An attempt was made to generically recreate these functions as close to the o

[PATCH] D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file

2020-08-21 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/int_mulv_impl.inc:1 -//===-- mulvdi3.c - Implement __mulvdi3 ---===// +//===-- int_mulv_impl.inc - Implement __mulv[sdt]i3 ---===// // M

[PATCH] D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file

2020-08-21 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 287032. atrosinenko added a comment. Explicitly mark .inc file as a C source like is already done for almost all `*_impl.inc` files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86289/new/ https://reviews

[PATCH] D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file

2020-08-21 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 287031. atrosinenko added a comment. Explicitly mark .inc file as a C source like is already done for almost all `*_impl.inc` files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86277/new/ https://reviews

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-20 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. //Some general context:// The final goal was to have an explanation why this particular number of iteration (3, 4 or 5, depending on type) are enough for any `a` and `b` passed as input arguments taking into account errors due to particular finite precision computat

[PATCH] D86299: [compiler-rt][builtins] Factor out some common bit manipulations

2020-08-20 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: howard.hinnant, jfb, vsk, lebedev.ri. Herald added subscribers: Sanitizers, dexonsmith, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. This patch incapsulates some commonly used hacks in a

[PATCH] D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file

2020-08-20 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: MaskRay, kamleshbhalui, luismarques, efriedma, aykevl. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. The existing implementations are almost identica

[PATCH] D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file

2020-08-20 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: MaskRay, kamleshbhalui, luismarques, efriedma, aykevl. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. The existing implementations are almost identica

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

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a subscriber: scanon. atrosinenko added a comment. 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 `c

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

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: efriedma, MaskRay, aykevl, uabelho. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. This patch drops implicit assumptions on int/unsigned types being at

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/test/builtins/Unit/divdf3_test.c:80 +// divisor is 1.0 as UQ1.31 +if (test__divdf3(0x1.0p+0, 0x1.0001p+0, UINT64_C(0x3fefffe0))) return 1; sepavloff wrote: > atrosinenko wrote:

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286523. atrosinenko added a comment. Fix the misleading comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84932/new/ https://reviews.llvm.org/D84932 Files: compiler-rt/test/builtins/Unit/divdf3_test

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286514. atrosinenko added a comment. Rebase the entire patch stack against the up-to-date master and re-upload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84932/new/ https://reviews.llvm.org/D84932 File

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286517. atrosinenko added a comment. Rebase the entire patch stack against the up-to-date master and re-upload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 File

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286516. atrosinenko added a comment. Rebase the entire patch stack against the up-to-date master and re-upload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 File

[PATCH] D85731: [NFC][builtins] Make softfloat-related errors less noisy

2020-08-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286513. atrosinenko added a comment. Rebase the entire patch stack against the up-to-date master and re-upload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85731/new/ https://reviews.llvm.org/D85731 File

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. @sepavloff 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 im

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286255. atrosinenko added a comment. Address the review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84932/new/ https://reviews.llvm.org/D84932 Files: compiler-rt/test/builtins/Unit/divdf3_tes

[PATCH] D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack

2020-08-17 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. @rjmccall 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 Clan

[PATCH] D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack

2020-08-17 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286097. atrosinenko added a comment. Add a test for insufficiently aligned source. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86020/new/ https://reviews.llvm.org/D86020 Files: llvm/include/llvm/IR/Ins

[PATCH] D85917: [MSP430] Fix passing C structs and unions as function arguments

2020-08-17 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286038. atrosinenko added a comment. Update with implicit pointers being passed through. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85917/new/ https://reviews.llvm.org/D85917 Files: clang/lib/CodeGen/

[PATCH] D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack

2020-08-17 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 286037. atrosinenko added a comment. Restrict transformation to passing through `byref` arguments, not arbitrary pointers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86020/new/ https://reviews.llvm.org/

[PATCH] D86020: [MemCpyOptimizer] Optimize passing byref function arguments down the stack

2020-08-15 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: arsenm, jdoerfert, rjmccall, rampitec. Herald added subscribers: cfe-commits, hiraditya. Herald added projects: clang, LLVM. atrosinenko requested review of this revision. Herald added a subscriber: wdng. When a byref function argumen

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-08-14 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. In D84602#2206512 , @aaron.ballman wrote: > 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 perha

[PATCH] D85917: [MSP430] Fix passing C structs and unions as function arguments

2020-08-13 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 285436. atrosinenko added a comment. Restore test formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85917/new/ https://reviews.llvm.org/D85917 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/Code

[PATCH] D85917: [MSP430] Fix passing C structs and unions as function arguments

2020-08-13 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: asl, krisb, arsenm, rjmccall, jdoerfert. Herald added a project: clang. atrosinenko requested review of this revision. Herald added a subscriber: wdng. Pass structures, classes and unions by reference on MSP430, according to Section

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-13 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-13 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-12 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. On linter diagnostics: error messages are due to linter trying to lint `*.inc` file that is not self-contained by design. D85731: [builtins] Make softfloat-related errors less noisy tries to make those errors more meaningful, at lea

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-12 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84932/new/ https://reviews.llvm.org/D84932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 284779. atrosinenko added a comment. Re-upload after D85731: [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`.

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 284777. atrosinenko added a comment. Re-upload after D85731: [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`.

[PATCH] D85731: [builtins] Make softfloat-related errors less noisy

2020-08-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: asl, scanon, howard.hinnant. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. atrosinenko requested review of this revision. Choose SINGLE_PRECISION by default in fp_lib.h after `#error`ing when incorrectly c

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 284624. atrosinenko added a comment. Re-upload after amending previous commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compiler-rt/lib/builtins/fp_d

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 284623. atrosinenko added a comment. Refactoring Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/divdf3.c compiler-rt/lib/builti

[PATCH] D84636: [RFC] Make the default LibCall implementations from compiler-rt builtins library more customizable

2020-08-10 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Another note to myself: add `AUX_DECLS(__LibCallName)` to every generic implementation file. They were forgotten unintentionally. Comment at: compiler-rt/lib/builtins/arm-libcall-overrides.h:8 +//===-

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-08-06 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. I suspect there might be some terminology clash, so clarifying a bit just in case. It was probably better to refer to these functions as //LibCalls// - functions from the compiler support library (such as `libgcc`) such as `__adddf3`. While there are `__popcount[sd

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-06 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84932/new/ https://reviews.llvm.org/D84932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D85113: [ABI][NFC] Fix the confusion of ByVal and ByRef argument names

2020-08-06 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. @rjmccall Uploaded, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85113/new/ https://reviews.llvm.org/D85113 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D85113: [ABI][NFC] Fix the confusion of ByVal and ByRef argument names

2020-08-06 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5a07490d7611: [ABI][NFC] Fix the confusion of ByVal and ByRef argument names (authored by atrosinenko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85113/n

[PATCH] D84636: [RFC] Make the default LibCall implementations from compiler-rt builtins library more customizable

2020-08-05 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84636/new/ https://reviews.llvm.org/D84636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D85113: [ABI][NFC] Fix the confusion of ByVal and ByRef argument names

2020-08-03 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: majnemer, rjmccall, jpienaar. Herald added a project: clang. atrosinenko requested review of this revision. The second argument of getNaturalAlignIndirect() was `bool ByRef`, but the implementation was just delegating to getIndirect()

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-07-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Here are the benchmark and fuzzing harness used to test this patch. F12453076: fuzz_divXf3.sh F12453075: divXf3_fuzzer.c F12453074: bench_divXf3.sh F12453

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-07-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 282225. atrosinenko added a comment. Revert auto-linting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/divdf3.c compiler-rt/li

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-07-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: koviankevin, joerg, efriedma, compnerd, scanon. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. atrosinenko requested review of this revision. This is the last patch from the patchset introducing proper supp

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-07-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: koviankevin, joerg, efriedma, compnerd, scanon. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. atrosinenko requested review of this revision. atrosinenko updated this revision to Diff 282225. atrosinenko add

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-07-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: koviankevin, joerg, efriedma, compnerd, scanon. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. atrosinenko requested review of this revision. This patch - makes the three tests look more uniformly - adds m

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-07-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 281198. atrosinenko added a comment. Fix some review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84602/new/ https://reviews.llvm.org/D84602 Files: clang/include/clang/Basic/Attr.td clang/in

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-07-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. In D84602#2176584 , @rjmccall wrote: > Is there only one special calling convention, or is there any chance that > different builtin functions would use different conventions? It depends on how to define "builtin calling conv

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-07-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1465 + let Spellings = [Clang<"msp430_builtin">]; + let Documentation = [Undocumented]; +} aaron.ballman wrote: > No new, undocumented attributes, please. Or is this attribute not

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-07-26 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: asl, aaron.ballman, rjmccall. Herald added subscribers: llvm-commits, hiraditya. Herald added projects: clang, LLVM. According to MSP430 EABI document , Section 6.3, some of compiler

[PATCH] D84058: Pass -rtlib=libgcc in tests conditioned on the default.

2020-07-17 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a reviewer: atrosinenko. atrosinenko added a comment. If I get it right, the only thing this patch weakens about msp430-toolchain.c test is an assumption that libgcc is used by default. On one hand, now there is no `clang_rt.builtins` for MSP430, so testing this assumption mak

[PATCH] D81676: [MSP430] Align the toolchain definition with the TI's msp430-gcc v9.2.0

2020-07-17 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. After a final retesting, this patch was updated a bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D81676 ___ cfe-commits mailing list

[PATCH] D81676: [MSP430] Align the toolchain definition with the TI's msp430-gcc v9.2.0

2020-07-17 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG16a4350f76d2: [MSP430] Actualize the toolchain description (authored by atrosinenko). Changed prior to commit: https://reviews.llvm.org/D81676?vs=276693&id=278741#toc Repository: rG LLVM Github Monor

[PATCH] D81676: [MSP430] Align the toolchain definition with the TI's msp430-gcc v9.2.0

2020-07-14 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Thank you! Will probably land it tomorrow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D81676 ___ cfe-commits mailing list cfe-commits

  1   2   >