[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2020-03-10 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. I believe my previous comments have indeed been addressed. Comment at: clang/docs/ClangCommandLineReference.rst:2958 + +Put global and static data smaller than the limitation into a special section (RISCV only) + lenary wrote: > "(RISC-

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-17 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D74704#1878921 , @lenary wrote: > I am worried about the interaction between `-fuse-ld=lld` and linker > relaxation (which is not supported by LLD, as I understand it) > > 1. clang could ignore `-fuse-ld=lld` when linker relaxat

[PATCH] D69590: [RISCV] Fix ILP32D lowering for double+double/double+int return types

2020-01-14 Thread James Clarke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3d6c492d7a98: [RISCV] Fix ILP32D lowering for double+double/double+int return types (authored by jrtc27). Changed prior to commit: https://reviews.llvm.org/D69590?vs=226981&id=237912#toc Repository:

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-02 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2844 +The builtins ``__builtin_align_up``, ``__builtin_align_down``, return their +first argument aligned up/down to the next multiple of the second argument. +The builtin ``__builtin_is_aligned`` returns

[PATCH] D72056: [RISCV] Generate PIC address sequence for medany -fno-pic

2020-01-01 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/lib/Target/TargetMachine.cpp:192 return false; +// RISC-V non-small code models prefer avoiding copy relocations. +if (TT.isRISCV() && getCodeModel() != CodeModel::Small) MaskRay wrote: > jrtc27 wrote:

[PATCH] D72056: [RISCV] Generate PIC address sequence for medany -fno-pic

2020-01-01 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. I am still of the view that we should support rewriting the instruction stream in the linker when necessary like BFD does. We need to do this to be able to link in GCC-compiled code, including libraries. It is a very simple thing to do with a patch available that provide

[PATCH] D62686: [RISCV] Add support for save/restore of callee-saved registers via libcalls

2019-12-16 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:668 +.setMIFlag(MachineInstr::FrameSetup); + +// Add registers spilled in libcall as liveins. lewis-revill wrote: > shiva0217 wrote: > > GCC will generate stack adj

[PATCH] D69590: [RISCV] Fix ILP32D lowering for double+double/double+int return types

2019-10-29 Thread James Clarke via Phabricator via cfe-commits
jrtc27 created this revision. jrtc27 added a reviewer: asb. Herald added subscribers: cfe-commits, sameer.abuasal, pzheng, s.egerton, lenary, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, apa

[PATCH] D54214: [RISCV] Set triple based on -march flag

2019-10-22 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D54214#1718043 , @simoncook wrote: > Ping, before I rebased this did anyone have any other thoughts on flag > precedence? The precedence seems sensible; it's what MIPS is doing for -mabi vs -target just above.

[PATCH] D58531: [clang] Specify type of pthread_create builtin

2019-10-08 Thread James Clarke via Phabricator via cfe-commits
jrtc27 marked an inline comment as done. jrtc27 added a comment. In D58531#1662466 , @jdoerfert wrote: > I like the patch and I think it is fine. > > Small nits: > Could we have a test for " we can detect dodgy pthread_create declarations" > and maybe `

[PATCH] D58531: [clang] Specify type of pthread_create builtin

2019-10-08 Thread James Clarke via Phabricator via cfe-commits
jrtc27 updated this revision to Diff 223871. jrtc27 added a comment. Rebased, added explicit no-warning test, clang-format'ed, updated assertion message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58531/new/ https://reviews.llvm.org/D58531 Fil

[PATCH] D68526: [Diagnostics] Silence -Wsizeof-array-div for character buffers

2019-10-08 Thread James Clarke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG67f542aba72f: [Diagnostics] Silence -Wsizeof-array-div for character buffers (authored by jrtc27). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68526/new/

[PATCH] D68526: [Diagnostics] Silence -Wsizeof-array-div for character buffers

2019-10-08 Thread James Clarke via Phabricator via cfe-commits
jrtc27 updated this revision to Diff 223823. jrtc27 added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68526/new/ https://reviews.llvm.org/D68526 Files: clang/lib/Sema/SemaExpr.cpp clang/test/Sema/div-sizeof-array.cpp Ind

[PATCH] D68368: [ItaniumMangle] Fix mangling of GNU __null in an expression to match GCC

2019-10-07 Thread James Clarke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL374013: [ItaniumMangle] Fix mangling of GNU __null in an expression to match GCC (authored by jrtc27, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior t

[PATCH] D68526: [Diagnostics] Silence -Wsizeof-array-div for character buffers

2019-10-06 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D68526#1696587 , @lebedev.ri wrote: > There's not a single word in the patch's description. If I were to add a description, it would be something like: Character buffers are sometimes used to represent a pool of memory that

[PATCH] D68526: [Diagnostics] Silence -Wsizeof-array-div for character buffers

2019-10-06 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Having said that, the one warning this raised in FreeBSD (at least for our configuration) was a completely unnecessary use of a character buffer and could be cleaned up, so maybe this case is a useful one to catch. Does anyone else have an opinion on this? Repository:

[PATCH] D68526: [Diagnostics] Silence -Wsizeof-array-div for character buffers

2019-10-04 Thread James Clarke via Phabricator via cfe-commits
jrtc27 created this revision. jrtc27 added reviewers: rsmith, xbolva00. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68526 Files: clang/lib/Sema/SemaExpr.cpp clang/test/Sema/div-sizeof-array.cpp Index

[PATCH] D68368: [ItaniumMangle] Fix mangling of GNU __null in an expression to match GCC

2019-10-02 Thread James Clarke via Phabricator via cfe-commits
jrtc27 created this revision. jrtc27 added a reviewer: rsmith. Herald added subscribers: cfe-commits, erik.pilkington. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68368 Files: clang/lib/AST/ItaniumMangle.cpp clang/test/CodeGenCXX/mangle-expr

[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

2019-09-16 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/trunk/include/llvm/IR/DiagnosticInfo.h:79 + DK_FirstPluginKind, + DK_MisExpect }; Is this not going to clash with the first caller to `getNextAvailablePluginDiagnosticKind`? `DK_FirstPluginKind` is special and s

[PATCH] D58531: [clang] Specify type of pthread_create builtin

2019-09-08 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D58531#1611356 , @jdoerfert wrote: > In D58531#1599209 , @probinson wrote: > > > We've started running into this too in building the PS4 system. +jdoerfert > > who added pthread_create to

[PATCH] D67185: [RISCV] Add support for -ffixed-xX flags

2019-09-04 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/test/CodeGen/RISCV/reserved-regs.ll:71 + +; X1-NOT: lw ra, +; X1-NOT: ld ra, lenary wrote: > These tests aren't going to test what you think they are, or at least aren't > going to fail when you hope they are, as th

[PATCH] D57795: [RISCV] Add FreeBSD targets

2019-06-06 Thread James Clarke via Phabricator via cfe-commits
jrtc27 updated this revision to Diff 203359. jrtc27 added a comment. Sorted OS case statements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57795/new/ https://reviews.llvm.org/D57795 Files: clang/lib/Basic/Targets.cpp clang/lib/Driver/ToolCha

[PATCH] D61464: [RiscV] Typo in register aliases

2019-05-02 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Ouch; LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61464/new/ https://reviews.llvm.org/D61464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D58531: [clang] Specify type of pthread_create builtin

2019-02-21 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. A separate point is whether it makes sense to be emitting this warning in the first place for `GE_Missing_type`. I'd argue that, if we don't know the type of the builtin, we should never emit the warning, since otherwise we always emit the warning even for legitimate ins

[PATCH] D58531: [clang] Specify type of pthread_create builtin

2019-02-21 Thread James Clarke via Phabricator via cfe-commits
jrtc27 created this revision. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. Currently, pthread_create's type string is empty, so GetBuiltinType fails and any header declaring it gives a -Wbuiltin-requires-header warning, which gives a false-positive when including pthr

[PATCH] D57450: [RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets with atomics

2019-02-19 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Also worth noting that the frontend needs to know the max width otherwise `warn_atomic_op_misaligned` will be triggered with the message `large atomic operation may incur significant performance penalty` (name is misleading since the `%select{large|misaligned}0` means it

[PATCH] D54295: [WIP, RISCV] Add inline asm constraint A for RISC-V

2019-02-06 Thread James Clarke via Phabricator via cfe-commits
jrtc27 requested changes to this revision. jrtc27 added inline comments. This revision now requires changes to proceed. Herald added a project: clang. Comment at: test/CodeGen/riscv-inline-asm.c:32 +// CHECK-LABEL: define void @test_A(i32* %p) +// CHECK: call void asm volatile ""

[PATCH] D57795: [RISCV] Add FreeBSD targets

2019-02-05 Thread James Clarke via Phabricator via cfe-commits
jrtc27 created this revision. jrtc27 added a reviewer: asb. Herald added subscribers: cfe-commits, rkruppe, rogfer01, shiva0217, kito-cheng, emaste. Herald added a project: clang. Repository: rC Clang https://reviews.llvm.org/D57795 Files: lib/Basic/Targets.cpp lib/Driver/ToolChains/FreeB

[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2019-02-05 Thread James Clarke via Phabricator via cfe-commits
jrtc27 requested changes to this revision. jrtc27 added a comment. This revision now requires changes to proceed. Please update `docs/ClangCommandLineReference.rst`. Also, in my limited testing, GCC just seems to pass the `-msmall-data-limit=...` flag straight through to the linker through `COLL

[PATCH] D57055: [RISCV] Mark TLS as supported

2019-01-22 Thread James Clarke via Phabricator via cfe-commits
jrtc27 requested changes to this revision. jrtc27 added inline comments. This revision now requires changes to proceed. Comment at: lib/Basic/Targets/RISCV.h:39 HasD(false), HasC(false) { -TLSSupported = false; +TLSSupported = true; LongDoubleWidth = 128; --

[PATCH] D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux

2018-12-05 Thread James Clarke via Phabricator via cfe-commits
jrtc27 requested changes to this revision. jrtc27 added a comment. This revision now requires changes to proceed. Yes, this is a stupid situation to be in, but 32-bit PowerPC on SUSE really does use `/usr/lib/gcc/powerpc64-suse-linux`: root@redpanda:/var/tmp/build-root/openSUSE_Factory_PowerP

[PATCH] D53392: [RISCV] Collect library directories and triples for riscv64 triple too

2018-10-18 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: test/Driver/riscv64-toolchain.c:71 +// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \ +// RUN: -target riscv64-linux-unknown-elf \ +// RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ This (and belo

[PATCH] D53392: [RISCV] Collect library directories and triples for riscv64 triple too

2018-10-18 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: lib/Driver/ToolChains/Gnu.cpp:1912 - static const char *const RISCV32LibDirs[] = {"/lib", "/lib32"}; + static const char *const RISCVLibDirs[] = {"/lib", "/lib32"}; static const char *const RISCVTriples[] = {"riscv32-unknown-linux-

[PATCH] D43630: [Driver] Fix search paths on x32

2018-08-22 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D43630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-23 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: lib/Basic/Targets/Sparc.cpp:52 + +// Double precision floating-point register +{{"d0"}, "f0"}, {{"d1"}, "f2"}, {{"d2"}, "f4"}, {{"d3"}, "f6"}, jyknight wrote: > AFAICT, gcc doesn't actually accept "d" and "q

[PATCH] D47137: [Sparc] Add floating-point register names

2018-05-21 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added a comment. What about the V9 `dX` and `qX` aliases and `f32` to `f63`? Repository: rC Clang https://reviews.llvm.org/D47137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D43630: [Driver] Fix search paths on x32

2018-02-22 Thread James Clarke via Phabricator via cfe-commits
jrtc27 created this revision. Herald added a subscriber: cfe-commits. When targeting x32, the x32 libraries and headers should be used, not the x86_64 ones (which may not even be available), so prioritise those and use the right multiarch triple. Repository: rC Clang https://reviews.llvm.org/