[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

2020-10-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88410/new/ https://reviews.llvm.org/D88410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D88352: [clang][AVR] Add more devices

2020-10-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Herald added a subscriber: dexonsmith. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88352/new/ https://reviews.llvm.org/D88352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

2020-09-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: dylanmckay, aykevl. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. benshi001 requested review of this revision. Improve avr-ld options for total 249 devices: 1. the argument of "-L" (device library sub path)

[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

2020-09-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. For some devices, the library sub path "-L" and family name "-m" are not always equal. -L/usr/lib/avr/lib/XXX" "-L/usr/lib/gcc/avr/5.4.0/XXX" "-mYYY" XXX and YYY do not always equal to each other. But current clang/lib/Driver/ToolChains/AVR.cpp assumes they equal.

[PATCH] D88352: [clang][AVR] Add more devices

2020-09-26 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 294486. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88352/new/ https://reviews.llvm.org/D88352 Files: clang/lib/Basic/Targets/AVR.cpp clang/test/Misc/target-invalid-cpu-note.c Index: clang/test/Misc/target-invalid-cpu-note.c

[PATCH] D88352: [clang][AVR] Add more devices

2020-09-25 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: dylanmckay, aykevl. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. benshi001 requested review of this revision. AVR.cpp should be kept up-to-date with AVRDevices.td Repository: rG LLVM Github Monorepo

[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

2020-09-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 294854. benshi001 edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88410/new/ https://reviews.llvm.org/D88410 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-link-mcu-family-unimplemented.c

[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

2020-09-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 294872. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88410/new/ https://reviews.llvm.org/D88410 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-link-mcu-family-unimplemented.c clang/test/Driver/avr-mmcu.c Index:

[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

2020-09-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. I think this patch is OK to be committed. And I hope 1. Temporarily using an array for more devices, before a solution of getting info from the tblgen. 2. Distinghuish the arguments for "-L" and "-m". It is correct for atmega328 that avr-ld needs

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2020-12-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: dylanmckay, aykevl. Herald added a subscriber: Jim. benshi001 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D88410: [clang][AVR] Improve avr-ld command line options

2020-11-17 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbba96c996555: [clang][AVR] Improve avr-ld command line options (authored by benshi001). Changed prior to commit: https://reviews.llvm.org/D88410?vs=294872=305792#toc Repository: rG LLVM Github

[PATCH] D88352: [clang][AVR] Add more devices

2020-10-28 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5be50d79c0b8: [NFC][clang][AVR] Add more devices (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88352/new/

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2021-01-24 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 318821. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93579/new/ https://reviews.llvm.org/D93579 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/Inputs/basic_avr_tree/bin/avr-ld

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2021-01-24 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 318881. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93579/new/ https://reviews.llvm.org/D93579 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/Inputs/basic_avr_tree/bin/avr-ld

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2021-01-24 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added a comment. In D93579#2518307 , @MaskRay wrote: > If you remove your system GCC avr, does the test still work? This is the > criteria whether the patch is acceptable. Yes. The "make

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2021-01-24 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. committed as https://github.com/llvm/llvm-project/commit/89a5147e5a0c2e886cdf7ffa34799c069d825940 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93579/new/ https://reviews.llvm.org/D93579 ___ cfe-commits mailing

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2021-01-25 Thread Ben Shi via Phabricator via cfe-commits
benshi001 reopened this revision. benshi001 added a comment. This revision is now accepted and ready to land. It still cases many build failures, due to not enough test. I will redo it with a full test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93579/new/

[PATCH] D95529: [AVR][clang] Fix a bug in AVR toolchain search paths

2021-02-02 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9b0b435d7931: [AVR][clang] Fix a bug in AVR toolchain search paths (authored by benshi001). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D93579: [clang][AVR] Improve avr-ld command line options

2021-02-03 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd38973aa4d6a: [clang][AVR] Improve avr-ld command line options (authored by benshi001). Changed prior to commit: https://reviews.llvm.org/D93579?vs=318881=321035#toc Repository: rG LLVM Github

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-08 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 350755. benshi001 retitled this revision from "[RISCV][clang] Improve deduction of default ABI for some special archs" to "[clang][RISCV][test] Add more tests of the -mabi and -march options". benshi001 edited the summary of this revision. CHANGES SINCE

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-08 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. How to formulate the default abi and arch is still under discussion. https://github.com/riscv/riscv-toolchain-conventions/issues/13 But the tests can be added first, for contrast of future changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103878/new/

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 350828. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103878/new/ https://reviews.llvm.org/D103878 Files: clang/test/Driver/riscv-abi.c clang/test/Driver/riscv-arch.c Index: clang/test/Driver/riscv-arch.c

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D103878#2807034 , @MaskRay wrote: > How do the new tests provide additional coverage? For these tests, 1. there is no tests for mabi=ilp32e, and my patch covers that. 2. the tests in riscv-abi.c will show default abi

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added inline comments. Comment at: clang/test/Driver/riscv-arch.c:45 + +// CHECK-ILP32: "-target-feature" "+m" +// CHECK-ILP32-SAME: "-target-feature" "+f" MaskRay wrote: > I suggest the style used in

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 350788. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103878/new/ https://reviews.llvm.org/D103878 Files: clang/test/Driver/riscv-abi.c clang/test/Driver/riscv-arch.c Index: clang/test/Driver/riscv-arch.c

[PATCH] D104192: [clang][RISCV] Change implicit ARCH for explicitly specified ABI

2021-06-13 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: asb, luismarques, MaskRay, craig.topper. Herald added subscribers: vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng,

[PATCH] D104192: [clang][RISCV] Change implicit ARCH for explicitly specified ABI

2021-06-13 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D104192#2815757 , @MaskRay wrote: > The thing looks weird. My mental model (ppc) is that `-march` can infer > `-mabi`, not the other way around... The original way in Driver/Toolchains/Arch/RISCV.cpp is if

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D103878#2809033 , @luismarques wrote: > In D103878#2807118 , @benshi001 > wrote: > >> 1. there is no tests for mabi=ilp32e, and my patch covers that. >> 2. the tests in riscv-abi.c

[PATCH] D103878: [clang][RISCV][test] Add more tests of the -mabi and -march options

2021-06-09 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb0eb3919835a: [clang][RISCV][test] Add more tests of the -mabi and -march options (authored by benshi001). Changed prior to commit: https://reviews.llvm.org/D103878?vs=350828=351025#toc Repository:

[PATCH] D100701: [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-05-13 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: clang/lib/Basic/Targets/AVR.cpp:313 + Builder.defineMacro("__UINT16_TYPE__", "unsigned int"); + Builder.defineMacro("__INT16_TYPE__", "int"); efriedma wrote: > Redefining `__INT16_TYPE__` like this is unusual.

[PATCH] D102547: [clang][AVR] Redefine [u]int16_t to be compatible with avr-gcc

2021-05-15 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added a reviewer: efriedma. Herald added subscribers: Jim, jfb, dylanmckay. benshi001 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D102547: [clang][AVR] Redefine [u]int16_t to be compatible with avr-gcc

2021-05-15 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 345611. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102547/new/ https://reviews.llvm.org/D102547 Files: clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/TargetInfo.cpp clang/lib/Basic/Targets/AVR.cpp clang/lib/Basic/Targets/AVR.h

[PATCH] D102547: [clang][AVR] Redefine [u]int16_t to be compatible with avr-gcc

2021-05-17 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb99e2c56166a: [clang][AVR] Redefine [u]int16_t to be compatible with avr-gcc (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-05-17 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a reviewer: efriedma. benshi001 added a subscriber: efriedma. benshi001 added a comment. @efriedma Could you please help me review this patch? It relates to the one you have reviewed for me, and is also about wrong mangled function name in c++ on AVR. The previous patch has

[PATCH] D100701: [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-05-12 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG892c56eabe25: [clang][AVR] Redefine some types to be compatible with avr-gcc (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100701: [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-05-15 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added inline comments. Comment at: clang/lib/Basic/Targets/AVR.cpp:313 + Builder.defineMacro("__UINT16_TYPE__", "unsigned int"); + Builder.defineMacro("__INT16_TYPE__", "int"); efriedma wrote: > benshi001

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-05-30 Thread Ben Shi 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 rGc1ee4fb5af49: [clang][AVR] Add avr-libc/include to clang system include paths (authored by benshi001). Repository: rG LLVM Github Monorepo

[PATCH] D99237: [AVR][clang] Fix wrong calling convention in functions return struct type

2021-06-28 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc94c8d8b5d99: [AVR][clang] Fix wrong calling convention in functions return struct type (authored by benshi001). Changed prior to commit: https://reviews.llvm.org/D99237?vs=335368=355111#toc

[PATCH] D105626: [RISCV][Clang] Add macro __riscv_zvlsseg for RVV Zvlsseg builtins

2021-07-08 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG88326bbce38c: [RISCV][clang] Add macro __riscv_zvlsseg for RVV Zvlsseg builtins (authored by jacquesguan, committed by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D99237: [AVR][clang] Fix wrong calling convention in functions return struct type

2021-03-23 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 332871. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99237/new/ https://reviews.llvm.org/D99237 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/avr/struct.c Index: clang/test/CodeGen/avr/struct.c

[PATCH] D99237: [AVR][clang] Fix wrong calling convention in functions return struct type

2021-03-23 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: dylanmckay, aykevl, MaskRay. Herald added a subscriber: Jim. benshi001 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. According to AVR ABI (https://gcc.gnu.org/wiki/avr-gcc),

[PATCH] D99237: [AVR][clang] Fix wrong calling convention in functions return struct type

2021-03-26 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. fully fixes https://bugs.llvm.org/show_bug.cgi?id=39251 partially fixes https://bugs.llvm.org/show_bug.cgi?id=46140 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99237/new/ https://reviews.llvm.org/D99237 ___

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-26 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. fixes https://bugs.llvm.org/show_bug.cgi?id=31568 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/ https://reviews.llvm.org/D96853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-26 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. > I am guessing this will only be supported by 1 target in clang? Then target > address spaces make sense otherwise you can also extend the language address > space enum. Are you also planning to add `__flashN`? >

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-27 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 333659. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/ https://reviews.llvm.org/D96853 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Basic/Targets/AVR.cpp clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-31 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticFrontendKinds.td:159 +def err_verify_nonconst_addrspace : Error< + "qualifier 'const' is needed for variables in address space '%0'">;

[PATCH] D99237: [AVR][clang] Fix wrong calling convention in functions return struct type

2021-04-01 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 334885. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99237/new/ https://reviews.llvm.org/D99237 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/avr/struct.c Index: clang/test/CodeGen/avr/struct.c

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-01 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:356 +void AVRToolChain::AddClangSystemIncludeArgs(const ArgList , + ArgStringList ) const {

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-02 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added a comment. In D97669#2661560 , @Anastasia wrote: > Is `stdio.h` used by anything? No. `stdio.h` is not used. But if I do `#include `, then `-I /usr/lib/avr/include` must be specified in the

[PATCH] D99237: [AVR][clang] Fix wrong calling convention in functions return struct type

2021-04-05 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 335368. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99237/new/ https://reviews.llvm.org/D99237 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/avr/struct.c Index: clang/test/CodeGen/avr/struct.c

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:356 +void AVRToolChain::AddClangSystemIncludeArgs(const ArgList , + ArgStringList ) const { Anastasia wrote: > benshi001 wrote: > >

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked 2 inline comments as done. benshi001 added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:356 +void AVRToolChain::AddClangSystemIncludeArgs(const ArgList , + ArgStringList ) const {

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-04-04 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added a comment. In D96853#2661168 , @Anastasia wrote: > In D96853#2660443 , @benshi001 wrote: > >> In D96853#2659266 ,

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-30 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 334336. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/ https://reviews.llvm.org/D96853 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/lib/Basic/Targets/AVR.cpp clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-30 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 334330. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/ https://reviews.llvm.org/D96853 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/lib/Basic/Targets/AVR.cpp clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-30 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D96853#2659266 , @Anastasia wrote: > Btw is any pointer conversion between address space 1 and the default address > space allowed? I.e. is the following code valid: > > __flash static const int var1[] = {111, 222, 333}; >

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-30 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D96853#2659266 , @Anastasia wrote: > Btw is any pointer conversion between address space 1 and the default address > space allowed? I.e. is the following code valid: > > __flash static const int var1[] = {111, 222, 333}; >

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-30 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked 3 inline comments as done. benshi001 added inline comments. Comment at: clang/test/CodeGen/avr-flash.c:1 +// RUN: %clang_cc1 -triple avr -emit-llvm-only -verify %s + benshi001 wrote: > Anastasia wrote: > > If you are only checking the

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-30 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: clang/test/CodeGen/avr-flash.c:1 +// RUN: %clang_cc1 -triple avr -emit-llvm-only -verify %s + Anastasia wrote: > If you are only checking the diagnostics you should pass: > > `-emit-llvm-only` -> `-syntax-only` > >

[PATCH] D99237: [AVR][clang] Fix wrong calling convention in functions return struct type

2021-03-24 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. This patch just fix the wrong return type in ABI. The wrong parameters passing with be fixed in another patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99237/new/ https://reviews.llvm.org/D99237 ___

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-03-01 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. This patch In D97669#2596073 , @aykevl wrote: > Looks reasonable to me. But again, I would like this to be reviewed also by > someone familiar with the internals of Clang (I'm not). Actually this patch is copied from msp430,

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-03-01 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Herald added a subscriber: ormris. The wrong `stdio.h` (usr/include/stdio.h) is included with a simple a.c like #include ... However the expected one is avr-libc's `stdio.h`, and this patch add avr-libc's include/ to clang system include paths. Repository:

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-03-01 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: dylanmckay, MaskRay, aykevl. Herald added a subscriber: Jim. benshi001 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-03-01 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 327361. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/ https://reviews.llvm.org/D96853 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Basic/Targets/AVR.cpp clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-03-03 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Although the bug can be avoided via "-I /usr/lib/avr/include" in clang's command line option, I expect clang to have the save behaviour as avr-gcc. And for avr-gcc, `avr-gcc a.c -mmcu=xxx` will automatically include avr-libc's header files and link avr-libc's

[PATCH] D100022: [clang][NFC] Fix method names not in accordance with coding style requirement

2021-04-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added a reviewer: Anastasia. Herald added subscribers: frasercrmck, phosek, kerbowa, luismarques, apazos, sameer.abuasal, s.egerton, Jim, mstorsjo, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng, jrtc27,

[PATCH] D100022: [clang][NFC] Fix method names not in accordance with coding style requirement

2021-04-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. It seems the class `ToolChain` and its sub classes also have other methods not in accordance with the coding style. But fixing all of them really needs big effort. Can we fix addClangSystemIncludeArgs first, and then let https://reviews.llvm.org/D97669 pass ?

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-08 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D97669#2676826 , @Anastasia wrote: > In D97669#2665865 , @benshi001 wrote: > >> In D97669#2661560 , @Anastasia >> wrote: >> >>> Is `stdio.h`

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-14 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D97669#2688771 , @Anastasia wrote: > In D97669#2687419 , @benshi001 wrote: > >> In D97669#2685698 , @Anastasia >> wrote: >> >>> In

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-14 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 337591. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97669/new/ https://reviews.llvm.org/D97669 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/lib/Driver/ToolChains/AVR.h clang/test/Driver/Inputs/basic_avr_tree/usr/lib/avr/include/.keep

[PATCH] D100616: [clang] Fix a potential assert failure

2021-04-15 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added a reviewer: MaskRay. Herald added subscribers: s.egerton, simoncook, dschuff. benshi001 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. The calculation of LargestBuiltinID needs all

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-04-09 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f173c0c42d0: [clang][AVR] Support variable decorator __flash (authored by benshi001). Changed prior to commit: https://reviews.llvm.org/D96853?vs=334336=336593#toc Repository: rG LLVM Github

[PATCH] D97669: [clang][AVR] Add avr-libc/include to clang system include paths

2021-04-13 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D97669#2685698 , @Anastasia wrote: > In D97669#2678460 , @benshi001 wrote: > >> In D97669#2676826 , @Anastasia >> wrote: >> >>> In

[PATCH] D100616: [clang][NFC] Fix a potential assert failure

2021-04-16 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added inline comments. Comment at: clang/include/clang/Basic/TargetBuiltins.h:334 static constexpr uint64_t LargestBuiltinID = std::max( {NEON::FirstTSBuiltin, ARM::LastTSBuiltin, SVE::FirstTSBuiltin,

[PATCH] D100616: [clang][NFC] Fix a potential assert failure

2021-04-16 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 338045. benshi001 retitled this revision from "[clang] Fix a potential assert failure" to "[clang][NFC] Fix a potential assert failure". benshi001 added a reviewer: craig.topper. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100616/new/

[PATCH] D100616: [clang][NFC] Fix a potential assert failure

2021-04-16 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. benshi001 marked an inline comment as done. Closed by commit rG06995fe256ec: [clang][NFC] Fix a potential assert failure (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100701: [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-04-17 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Though the disabled test builtins.cpp can pass after my another patch https://reviews.llvm.org/D97669, it will still fail on llvm build machines, since there are no avr-libc installed on them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100701: [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-04-17 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: aykevl, dylanmckay. Herald added a subscriber: Jim. benshi001 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D100701: [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-04-17 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Some key points, 1. This patch fixes the bug https://bugs.llvm.org/show_bug.cgi?id=31530 . 2. The test builtins.cpp is disabled on AVR, due to uint16_t is defined to unsigned short. The underlying reason is that the system's libc/stdint.h is used instead of

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-02-17 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: dylanmckay, aykevl. Herald added a subscriber: Jim. benshi001 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-02-17 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. This patch immitates avr-gcc behavior on `__flash` 1. `__flash` variables are put into `.section .progmem.data` 2. `__flash` non-const variables are rejected. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-02-21 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 325285. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/ https://reviews.llvm.org/D96853 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Basic/Targets/AVR.cpp clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-02-21 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 325286. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96853/new/ https://reviews.llvm.org/D96853 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Basic/Targets/AVR.cpp clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D96853: [clang][AVR] Support variable decorator '__flash'

2021-02-20 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D96853#2577133 , @aykevl wrote: > I am not very familiar with Clang so I can't say much about it. Although I > wonder whether a macro is the right way to implement this? Is there something > similar in other targets? (GPUs

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-16 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb31199bab486: [AVR][clang] Improve search for avr-libc installation path (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/

[PATCH] D107684: [NFC][AVR][clang] Add test for D107672

2021-08-16 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. It seems we need not adding this test, since a similiar test is added in https://reviews.llvm.org/rGb31199bab4865deef4e778d7a028c8ec64285654 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107684/new/

[PATCH] D109232: [CUDA][NFC] Fix a wrong assert message

2021-09-03 Thread Ben Shi 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 rG12fee64daf57: [CUDA][NFC] Fix wrong assert information (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D109232: [CUDA][NFC] Fix a wrong assert message

2021-09-03 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: tra, Hahnfeld, fodinabor, yaxunl. benshi001 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D109232 Files:

[PATCH] D103136: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-seriesø

2021-09-06 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/lib/Target/AVR/AVRDevices.td:515 +def : Device<"attiny1614", FamilyXMEGA, ELFArchXMEGA3>; +def : Device<"attiny416", FamilyXMEGA, ELFArchXMEGA3>; +def : Device<"attiny816", FamilyXMEGA, ELFArchXMEGA3>;

[PATCH] D103136: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-seriesø

2021-09-06 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a reviewer: benshi001. benshi001 added a comment. I though the test clang/test/Misc/target-invalid-cpu-note.c should also be updated. BTW: What info (especially name and email) would like to see in the commit message ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D103136: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-seriesø

2021-09-07 Thread Ben Shi 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 rGb0d4d969e22e: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-series (authored by justinlatimer, committed by benshi001). Changed prior to

[PATCH] D103136: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-seriesø

2021-09-06 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/lib/Target/AVR/AVRDevices.td:515 +def : Device<"attiny1614", FamilyXMEGA, ELFArchXMEGA3>; +def : Device<"attiny416", FamilyXMEGA, ELFArchXMEGA3>; +def : Device<"attiny816", FamilyXMEGA, ELFArchXMEGA3>;

[PATCH] D103136: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-seriesø

2021-09-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Please tell me your email address which will be shown in the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103136/new/ https://reviews.llvm.org/D103136 ___

[PATCH] D103136: [AVR] Add support for the tinyAVR 0-series and tinyAVR 1-seriesø

2021-09-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. Sorry, I happened to find that the list in `lib/Driver/ToolChains/AVR.cpp` also needs update. {"at90s1200", "", "avr1", 0}, {"attiny11", "", "avr1", 0}, {"attiny12", "", "avr1", 0}, {"attiny15", "", "avr1", 0}, {"attiny28", "", "avr1",

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 365089. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-toolchain.c Index: clang/test/Driver/avr-toolchain.c

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. @MaskRay I have update my patch based on your new test avr-toolchain.c. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 365347. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-toolchain.c Index:

[PATCH] D107797: [Driver][test] Improve avr-toolchain.c

2021-08-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 accepted this revision. benshi001 added a comment. Good! Then I can rebase my patch on your test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107797/new/ https://reviews.llvm.org/D107797 ___

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 364938. benshi001 retitled this revision from "[AVR][clang] Search avr-libc installtion path according to avr-gcc's" to "[AVR][clang] Improve search for avr-libc installation path". benshi001 edited the summary of this revision. CHANGES SINCE LAST ACTION

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added a comment. Thanks. I have added some comments about our agreed logic, as discussed in https://reviews.llvm.org/D107672. I think this way is clear enough. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/

  1   2   3   4   >