[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-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] 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] 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] 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-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 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] 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] D81282: [builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

2020-06-05 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: howard.hinnant, samsonov. Herald added subscribers: Sanitizers, mgorny. Herald added a project: Sanitizers. There are two different _generic_ lists of source files in the compiler-rt/lib/builtins/CMakeLists.txt. Now there is no simpl

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-05 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added a reviewer: howard.hinnant. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. This patch changes types of some integer function arguments or return values from `si_int` to the default `int` type (`typedef`ed to `native_

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-08 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: aykevl, MaskRay, efriedma, uabelho, howard.hinnant. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. Some parts of existing codebase assume the default `int` type to be (at least) 32 bit wide. On 16 bit targ

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-08 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/fp_lib.h:49 -static __inline int rep_clz(rep_t a) { return __builtin_clz(a); } +static __inline int rep_clz(rep_t a) { return clzsi(a); } MaskRay wrote: > Why is this needed? First of all

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/fp_lib.h:49 -static __inline int rep_clz(rep_t a) { return __builtin_clz(a); } +static __inline int rep_clz(rep_t a) { return clzsi(a); } efriedma wrote: > MaskRay wrote: > > atrosinenko

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. In D81285#2082394 , @aykevl wrote: > I'm not sure whether `native_int` is any clearer than just `int`. I'm afraid > it only introduces more complexity ("What's `native_int`? Oh, it's just > `int`"). I'm not particularly ins

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/int_lib.h:112 -uint32_t __inline __builtin_ctz(uint32_t value) { +int __inline __builtin_ctz(uint32_t value) { unsigned long trailing_zero = 0; aykevl wrote: > Why `int` and not `native_

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

2020-06-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: broadwaylamb, sepavloff. Herald added subscribers: s.egerton, dexonsmith, simoncook, emaste. Herald added a reviewer: espindola. Herald added a project: clang. atrosinenko edited the summary of this revision. This patch updates the to

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

2020-06-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 271610. atrosinenko added a comment. fix unit test: add another "-lgcc" and (hopefully) fix path separators on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D816

[PATCH] D81282: [builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

2020-06-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 271612. atrosinenko added a comment. 1. Since different quite unrelated patches failed on Jun 5 with quite the same messages, just rebase onto current `master` expecting build failure to go away 2. Ping Repository: rG LLVM Github Monorepo CHANGES SIN

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

2020-06-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 271670. atrosinenko added a comment. Fix test once again (replace more literal slashes with regex). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D81676 Files: clang/i

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

2020-07-07 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko marked 3 inline comments as done. atrosinenko added inline comments. Comment at: clang/lib/Driver/ToolChains/MSP430.cpp:154 + SmallString<128> MultilibInclude(GCCInstallation.getInstallPath()); + llvm::sys::path::append(MultilibInclude, "include"); ---

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

2020-07-07 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 275959. atrosinenko added a comment. Address the review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D81676 Files: clang/include/clang/Driver/Options.td c

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

2020-07-07 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 275983. atrosinenko added a comment. Fix path separators in unit test on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D81676 Files: clang/include/clang/Driver

[PATCH] D82646: [MSP430] Align the _Complex ABI with current msp430-gcc

2020-07-08 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 276480. atrosinenko added a comment. Support int/long/long long `_Complex` types (GCC extension). According to msp430-gcc v9.2.0, they behave identically. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82646

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

2020-07-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 276686. atrosinenko added a comment. Just add the test on `-rtlib=compiler-rt` handling as everything other is ready for basic clang_rt.builtins support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/

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

2020-07-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 276693. atrosinenko added a comment. Just an automatic rebase to (possibly) fix failing "Apply patch" step. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D81676 Files:

[PATCH] D82646: [MSP430] Align the _Complex ABI with current msp430-gcc

2020-07-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG67422e429475: [MSP430] Align the _Complex ABI with current msp430-gcc (authored by atrosinenko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82646/new/ ht

[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

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 271671. atrosinenko added a comment. Rebase onto working upstream commit to (hopefully) make tests pass for my patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81408/new/ https://reviews.llvm.org/D81408

[PATCH] D81282: [builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

2020-06-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. @samsonov Something strange happens with the compiler-rt tests: when this patch was initially uploaded, the tests were failed with seemingly unrelated failures: B59287 . Some tests are broken upstream, I concluded. Today I have reba

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Those flaky test failures seems to be due to `ld.lld` being not built from source as part of testing `compiler-rt/`-only patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81408/new/ https://reviews.llvm.org

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 271963. atrosinenko added a comment. Replaced `native_int` by plain `int`, as @aykevl suggested. On one hand, I have no specific preference for using some descriptive name such as `native_int`, `default_int`, etc. (that should suggest it was chosen inte

[PATCH] D82184: [MSP430] Update register names

2020-06-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: echristo, rjmccall, krisb, mskvortsov, pftbest. Herald added a subscriber: hiraditya. Herald added projects: clang, LLVM. When writing a unit test on replacing standard epilogue sequences with `BR __mspabi_func_epilog_`, by manually

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-20 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a subscriber: goncharov. atrosinenko added a comment. In D81408#2104572 , @efriedma wrote: > > Those flaky test failures seems to be due to ld.lld being not built from > > source as part of testing compiler-rt/-only patches. > > That sho

[PATCH] D82184: [MSP430] Update register names

2020-06-22 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 272391. atrosinenko added a comment. Fix compile error when building with older compilers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82184/new/ https://reviews.llvm.org/D82184 Files: clang/lib/Basic/

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

2020-06-22 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko marked 3 inline comments as done. atrosinenko added a comment. Thank you for the comments. Will send an update soon. Comment at: clang/lib/Driver/ToolChains/MSP430.cpp:155 SmallString<128> Dir(computeSysRoot()); llvm::sys::path::append(Dir, "include"); addS

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-23 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. > could you please clarify what exactly is wrong? Windows not building > 'compiler-rt'? Yes. Maybe I misunderstood the intention. It just looked quite strange to me that when only the `compiler-rt/` subtree of the repository was changed, pre-merge check was optimiz

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

2020-06-23 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 272639. atrosinenko added a comment. Address the review comments. Now include directories should be set in a much more similar way to msp430-gcc v8.3.1. The test was added as well. The most significant difference is that Clang adds one **extra** include

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

2020-06-23 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 272743. atrosinenko added a comment. Unit test: fix for path separators on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://reviews.llvm.org/D81676 Files: clang/include/clang/Driv

[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

2020-06-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Thank you! In D81285#2110102 , @MaskRay wrote: > > This patch changes types of some integer function arguments or return > > values from si_int to the default int type (typedefed to native_int to make > > it obvious this is

[PATCH] D81282: [builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

2020-06-25 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/D81282/new/ https://reviews.llvm.org/D81282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D81282: [builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

2020-06-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 273452. atrosinenko added a comment. Move missed `powitf2.c` source as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81282/new/ https://reviews.llvm.org/D81282 Files: compiler-rt/lib/builtins/CMake

[PATCH] D81282: [builtins] Move more float128-related helpers to GENERIC_TF_SOURCES list

2020-06-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko marked an inline comment as done. atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/CMakeLists.txt:142 powisf2.c powitf2.c subdf3.c efriedma wrote: > Missed powitf? Fixed, thank you. Repository: rG LLVM Github Monore

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

2020-06-26 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Meanwhile, msp430-gcc v9.2.0 was released on Jun 12. Will recheck against the new version slightly later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new

[PATCH] D82646: [MSP430] Align the _Complex ABI with current msp430-gcc

2020-06-26 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: krisb, awygle, pftbest. Herald added a project: clang. Assembler output is checked against msp430-gcc 9.2.0.50 from TI. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82646 Files: clang/lib/CodeGen/TargetInfo.cp

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

2020-06-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 274504. atrosinenko added a comment. - Rebase onto an up-to-date upstream commit - Recheck against v9.2.0 - Misc fixes and improvements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81676/new/ https://revie

[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] 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 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] 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] 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-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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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 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

  1   2   >