Page MenuHomePhabricator

luismarques (Luís Marques)
Software/hardware engineer at lowRISC

Projects

User does not belong to any projects.

User Details

User Since
Nov 2 2018, 7:48 AM (74 w, 4 d)

Mostly LLVM work.

Recent Activity

Sat, Apr 4

luismarques added a comment to D77443: [RISCV] Fix RISCVInstrInfo::getInstSizeInBytes for atomics pseudos.

Thanks for the fix Jessica.
Looking at, say, doAtomicBinOpExpansion it's not immediately obvious why some of those values are correct. Can you please provide more info, ideally in the code?
Is there really no way to provide tests for these?

Sat, Apr 4, 1:49 PM · Restricted Project

Thu, Apr 2

luismarques added a comment to D77018: [MC][RISCV] Make .reloc support arbitrary relocation types.

I think this looks good. I'll let @lenary have another look.

Thu, Apr 2, 10:50 AM · Restricted Project

Tue, Mar 31

luismarques added a comment to D77117: [RISCV] Split RISCVISelDAGToDAG.cpp to RISCVISelDAGToDAG.h and RISCVISelDAGToDAG.cpp.

For the downstream RISCV maintenance, it would be easier to inherent the RISCVISelDAGToDAG and only override the method need to customize for the custom provider ISA extension without touching RISCVISelDAGToDAG.cpp which may cause conflict when upgrading the downstream LLVM version.
I think it could be helpful for other RISCV downstream maintenance. Could it be the sufficient reason to split out the header?

Tue, Mar 31, 10:33 AM · Restricted Project

Thu, Mar 26

luismarques committed rGad1466f8cbc5: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V (authored by luismarques).
[sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V
Thu, Mar 26, 1:03 PM
luismarques closed D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.
Thu, Mar 26, 1:03 PM · Restricted Project, Restricted Project
luismarques added inline comments to D76828: [RISC-V] Support __builtin_thread_pointer .
Thu, Mar 26, 7:00 AM · Restricted Project
luismarques accepted D76828: [RISC-V] Support __builtin_thread_pointer .

LGTM. Thanks!

Thu, Mar 26, 6:28 AM · Restricted Project
luismarques requested changes to D76828: [RISC-V] Support __builtin_thread_pointer .

Please add tests.

Thu, Mar 26, 4:50 AM · Restricted Project

Mon, Mar 23

luismarques updated the diff for D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.

Fix copy paste issue in the updated patch.

Mon, Mar 23, 8:08 AM · Restricted Project, Restricted Project
luismarques updated the diff for D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.

Properly handle compressed reserved instructions.

Mon, Mar 23, 7:36 AM · Restricted Project, Restricted Project
luismarques added a comment to D74767: [CMake][NFC] Clean up CheckAtomic.cmake.

Ping.

Mon, Mar 23, 5:58 AM · Restricted Project

Thu, Mar 19

luismarques added a comment to D74453: [LegalizeTypes][RISCV] Correctly sign-extend comparison for ATOMIC_CMP_XCHG.

Hey @jrtc27 . Is there anything blocking this patch being committed?

Thu, Mar 19, 6:59 AM · Restricted Project

Tue, Mar 17

luismarques accepted D75729: [RISCV] Select +0.0 immediate using fmv.{w,d}.x / fcvt.d.w.

LGTM!

Tue, Mar 17, 11:16 AM · Restricted Project

Wed, Mar 11

luismarques added a comment to D75729: [RISCV] Select +0.0 immediate using fmv.{w,d}.x / fcvt.d.w.

Unless you fast-path register zero (or the value itself being zero), a naive implementation is going to have to do a full integer->float conversion, which is more likely to be a multi-cycle operation, regardless of rounding mode. Contrast that with an fmv, which is a special case of fsgnj, but the generic case is still just bit selection and concatenation, so it should always be single-cycle. Having said that, the Rocket schedule (and reading the code) indicates that both are 2-cycle operations, and for the Bluespec Piccolo/Flute cores both are 1-cycle operations, but the GCC schedule for the 7 series SiFive cores claims that fmv will be in the A pipe (address, i.e. loads/stores, but also any FP<->int given that already needs to be present on the load/store paths), and fcvt will be in the B pipe (branches, but also mul/div and and any other FP ops).

Actually I got confused, fmv.x.?and fmv.?.x aren't special cases of fsgnj (that's only true for the FP<->FP fmv's), but their own instructions outright. The rest of what I said still applies though.

Wed, Mar 11, 2:07 PM · Restricted Project
luismarques added a comment to D75729: [RISCV] Select +0.0 immediate using fmv.{w,d}.x / fcvt.d.w.

I'm happy to use those fmv.{s,d}.x instead.

Wed, Mar 11, 12:29 PM · Restricted Project
luismarques added a comment to D75729: [RISCV] Select +0.0 immediate using fmv.{w,d}.x / fcvt.d.w.

Perhaps these are slightly better than just fcvt everywhere because they avoid the rounding mode required by fcvt.s.w / fcvt.s.l / fcvt.d.l?

Wed, Mar 11, 5:08 AM · Restricted Project

Mar 6 2020

luismarques accepted D75728: [NFC][RISCV] Test for 0.0 fp immediate.

LGTM.

Mar 6 2020, 3:18 AM · Restricted Project
luismarques added a comment to D75729: [RISCV] Select +0.0 immediate using fmv.{w,d}.x / fcvt.d.w.

GCC seems to use fmv.s.x / fmv.d.x (the former of which now should be called fmv.w.x? ) instead of fcvt, not sure why. A quick Googling returned:

Mar 6 2020, 3:18 AM · Restricted Project
luismarques added a comment to D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.
In D75168#1907941, @asb wrote:

There are some cases where you need to perform more checking in order to be future proof for possible new standard extensions. Specifically, review the RVC Instruction Set Listings in the RISC-V spec and check for where an encoding is marked as "RES" (reserved). e.g. C.LWSP is valid only if rd!=0, and the version with rd=0 is a reserved encoding. Similar with C.LDSP. I think it's just those two.

Mar 6 2020, 1:39 AM · Restricted Project, Restricted Project

Mar 5 2020

luismarques closed D75522: [compiler-rt][builtins][RISCV] Port __clear_cache to RISC-V Linux.

Closing revision.
(My commit message clean-up went overboard and accidentally deleted the Differential Revision line).

Mar 5 2020, 11:32 AM · Restricted Project, Restricted Project
luismarques committed rG99a8cc2b7d89: [compiler-rt][builtins][RISCV] Port __clear_cache to RISC-V Linux (authored by luismarques).
[compiler-rt][builtins][RISCV] Port __clear_cache to RISC-V Linux
Mar 5 2020, 8:46 AM

Mar 3 2020

luismarques created D75522: [compiler-rt][builtins][RISCV] Port __clear_cache to RISC-V Linux.
Mar 3 2020, 7:12 AM · Restricted Project, Restricted Project

Feb 27 2020

luismarques accepted D73339: [RISCV] Compress instructions based on function features.

LGTM.

Feb 27 2020, 9:20 AM · Restricted Project

Feb 26 2020

luismarques updated the diff for D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.

Fix preprocessor conditional compilation block conditions.

Feb 26 2020, 6:33 AM · Restricted Project, Restricted Project
luismarques created D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.
Feb 26 2020, 5:08 AM · Restricted Project, Restricted Project

Feb 25 2020

luismarques committed rG91f7f0d8e3ef: [RISCV] Fix sysroot tests without GCC on RISC-V hosts with GCC (authored by luismarques).
[RISCV] Fix sysroot tests without GCC on RISC-V hosts with GCC
Feb 25 2020, 6:19 AM
luismarques closed D75061: [RISCV] Fix sysroot tests without GCC on RISC-V hosts with GCC.
Feb 25 2020, 6:19 AM · Restricted Project

Feb 24 2020

luismarques created D75061: [RISCV] Fix sysroot tests without GCC on RISC-V hosts with GCC.
Feb 24 2020, 9:17 AM · Restricted Project

Feb 21 2020

luismarques committed rG0781e93a6eaa: [CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops.c for RISC-V (authored by luismarques).
[CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops.c for RISC-V
Feb 21 2020, 11:36 AM
luismarques closed D74847: [CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops.c for RISC-V.
Feb 21 2020, 11:36 AM · Restricted Project
luismarques updated the diff for D74847: [CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops.c for RISC-V.

As suggested by @efriedma, the patch was reworked to have one target with native atomics, and one without. No RUN run with a default target remains.

Feb 21 2020, 9:00 AM · Restricted Project
luismarques added a comment to D66870: [Sanitizers] Add support for RISC-V 64-bit.

Hello,Can you tell me the resaon why it wasn't support for risc-v before ? Why not add the support for rv32 this time?

Feb 21 2020, 1:35 AM · Restricted Project, Restricted Project

Feb 20 2020

luismarques added a comment to D68964: cmake/modules/CheckAtomic.cmake: catch false positives in RISC-V.
In D68964#1884694, @asb wrote:

It's unfortunate, but as Hans says this series of patches is likely too much at this stage in the release process. If there's a 10.0.1, perhaps it makes sense there. They benefit the RISC-V community, but there's a risk of regressing somewhere else in a way that's probably not fair to other targets and their release testers.

Feb 20 2020, 8:03 AM · Restricted Project
luismarques added a comment to D68964: cmake/modules/CheckAtomic.cmake: catch false positives in RISC-V.

Oh I see. I've backed it out again in d75ce45777d9802d43b555993fde8ed6562fb368, this is too much stuff to land so late. I think it can wait until the 11 release.

Feb 20 2020, 7:53 AM · Restricted Project
luismarques added a comment to D74847: [CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops.c for RISC-V.

I'm not really a big fan of running tests with the host target triple, anyway; it seems to create work with almost no benefit. I'd be happy to just run the test with one target that has native atomics, and one target that doesn't. (The relevant code is all target-independent, aside from the atomic widths, so we aren't really gaining anything by testing more targets.)

Feb 20 2020, 7:44 AM · Restricted Project
luismarques added a comment to D68964: cmake/modules/CheckAtomic.cmake: catch false positives in RISC-V.
In D68964#1882946, @asb wrote:

The backport request seems ok to me, assuming you're happy taking a patch like this at this stage in the release process.

Feb 20 2020, 6:31 AM · Restricted Project
luismarques committed rG689f1e85ba68: [compiler-rt] [builtins] Fix logb / logbl tests (authored by luismarques).
[compiler-rt] [builtins] Fix logb / logbl tests
Feb 20 2020, 2:17 AM
luismarques closed D74826: [compiler-rt] [builtins] Fix logb / logbl tests.
Feb 20 2020, 2:17 AM · Restricted Project, Restricted Project

Feb 19 2020

luismarques created D74847: [CodeGen][RISCV] Fix clang/test/CodeGen/atomic_ops.c for RISC-V.
Feb 19 2020, 9:31 AM · Restricted Project
luismarques updated the summary of D74826: [compiler-rt] [builtins] Fix logb / logbl tests.
Feb 19 2020, 5:34 AM · Restricted Project, Restricted Project
luismarques created D74826: [compiler-rt] [builtins] Fix logb / logbl tests.
Feb 19 2020, 5:19 AM · Restricted Project, Restricted Project

Feb 18 2020

luismarques created D74767: [CMake][NFC] Clean up CheckAtomic.cmake.
Feb 18 2020, 6:52 AM · Restricted Project

Feb 17 2020

luismarques committed rGd4a4a32cd94e: [Support] Check for atomics64 when deciding if '-latomic' is needed (authored by gokturk).
[Support] Check for atomics64 when deciding if '-latomic' is needed
Feb 17 2020, 11:57 PM
luismarques closed D69444: [Support] Check for atomics64 when deciding if '-latomic' is needed.
Feb 17 2020, 11:57 PM · Restricted Project
luismarques committed rG09856feb3cc1: [dsymutil] Explicitly link against libatomic when necessary (authored by gokturk).
[dsymutil] Explicitly link against libatomic when necessary
Feb 17 2020, 2:36 PM
luismarques closed D69003: [dsymutil] Explicitly link against libatomic when necessary.
Feb 17 2020, 2:36 PM · Restricted Project
luismarques committed rGcef85193b2cc: [CMake] CheckAtomic.cmake: catch false positives in RISC-V (authored by gokturk).
[CMake] CheckAtomic.cmake: catch false positives in RISC-V
Feb 17 2020, 10:58 AM
luismarques closed D68964: cmake/modules/CheckAtomic.cmake: catch false positives in RISC-V.
Feb 17 2020, 10:58 AM · Restricted Project
luismarques committed rG351ed50dcb2a: Reland "[clang-tools-extra] fix the check for if '-latomic' is necessary"" (authored by gokturk).
Reland "[clang-tools-extra] fix the check for if '-latomic' is necessary""
Feb 17 2020, 8:56 AM
luismarques committed rGf128f442a3d2: [CMake] Fix setting result of libatomic check for MSVC (authored by luismarques).
[CMake] Fix setting result of libatomic check for MSVC
Feb 17 2020, 7:38 AM

Feb 14 2020

luismarques added a comment to D68899: llvm/cmake/config.guess: add support for riscv32 and riscv64.

Thanks for the insight @Meinersbur .
This patch broke some ARM builds, I'll re-land it after solving that.

Feb 14 2020, 3:16 PM · Restricted Project
luismarques added a reverting change for rG1d40c4150630: [clang-tools-extra] fix the check for if '-latomic' is necessary: rG13700c383fdb: Revert "[clang-tools-extra] fix the check for if '-latomic' is necessary".
Feb 14 2020, 7:10 AM
luismarques committed rG13700c383fdb: Revert "[clang-tools-extra] fix the check for if '-latomic' is necessary" (authored by luismarques).
Revert "[clang-tools-extra] fix the check for if '-latomic' is necessary"
Feb 14 2020, 7:10 AM
luismarques committed rG1d40c4150630: [clang-tools-extra] fix the check for if '-latomic' is necessary (authored by gokturk).
[clang-tools-extra] fix the check for if '-latomic' is necessary
Feb 14 2020, 6:23 AM
luismarques closed D69869: [clang-tools-extra] fix the check for if '-latomic' is necessary.
Feb 14 2020, 6:23 AM · Restricted Project
luismarques accepted D69869: [clang-tools-extra] fix the check for if '-latomic' is necessary.

Whether or not GCC behaves the way it should behave regarding atomics, this seems like a sensible patch to make things work given the current situation.
LGTM.

Feb 14 2020, 6:14 AM · Restricted Project
luismarques committed rG9816e726e747: [Driver][RISCV] Add RedHat Linux RISC-V triple (authored by luismarques).
[Driver][RISCV] Add RedHat Linux RISC-V triple
Feb 14 2020, 5:48 AM
luismarques closed D74399: [Driver][RISCV] Add RedHat Linux RISC-V triple.
Feb 14 2020, 5:48 AM · Restricted Project
luismarques added inline comments to D74596: [RISCV] Correct the CallPreservedMask for the function call in an interrupt handler.
Feb 14 2020, 5:38 AM · Restricted Project
luismarques committed rGde1c2877a9ff: llvm/cmake/config.guess: add support for riscv32 and riscv64 (authored by luismarques).
llvm/cmake/config.guess: add support for riscv32 and riscv64
Feb 14 2020, 3:56 AM
luismarques closed D68899: llvm/cmake/config.guess: add support for riscv32 and riscv64.
Feb 14 2020, 3:56 AM · Restricted Project

Feb 12 2020

luismarques updated the diff for D74399: [Driver][RISCV] Add RedHat Linux RISC-V triple.

Correct paths.

Feb 12 2020, 9:56 AM · Restricted Project
luismarques accepted D68899: llvm/cmake/config.guess: add support for riscv32 and riscv64.

LGTM.

Feb 12 2020, 9:47 AM · Restricted Project
luismarques updated the diff for D74399: [Driver][RISCV] Add RedHat Linux RISC-V triple.

Adds a test (using the RISC-V Fedora 31 paths).

Feb 12 2020, 8:14 AM · Restricted Project
luismarques added a comment to D68899: llvm/cmake/config.guess: add support for riscv32 and riscv64.

The current config.guess is GPL-2 or later. The upstream config.guess is GPL-3. I was under the impression that LLVM upstream wanted to maintain a GPL-2 license. So I wrote my own version.

Feb 12 2020, 7:18 AM · Restricted Project
luismarques added a comment to D74338: [TableGen] Support combining AssemblerPredicates with ORs.

This seems reasonable. Looking forward to seeing this fleshed out with tests.
I see no problem with not supporting both AND and OR at the same time for now, as that could be added later if the need becomes clear.

Feb 12 2020, 6:40 AM · Restricted Project
luismarques added a comment to D73339: [RISCV] Compress instructions based on function features.

As for testing this, it feels a shame to have to duplicate testcases like I have with compress.ll to cover both cases. Does it make sense to extend the ForceFunctionAttrsPass to add target-features to all functions, in which case we can have just one test case and check both ways of having attributes set? (unless anyone knows any other way we can minimize test duplication?)

Feb 12 2020, 5:54 AM · Restricted Project
luismarques added a comment to D73627: [DebugInfo] Fix dumping CIE ID in .eh_frame sections..

LGTM.

Feb 12 2020, 5:36 AM · debug-info, Restricted Project
luismarques accepted D73699: [RISCV] Implement mayBeEmittedAsTailCall for tail call optimization.

LGTM.

Feb 12 2020, 2:24 AM · Restricted Project

Feb 11 2020

luismarques added a comment to D68899: llvm/cmake/config.guess: add support for riscv32 and riscv64.

Isn't the correct fix for this to update config.guess with the authoritative one from GNU?

Feb 11 2020, 10:15 AM · Restricted Project
luismarques created D74399: [Driver][RISCV] Add RedHat Linux RISC-V triple.
Feb 11 2020, 5:34 AM · Restricted Project

Feb 7 2020

luismarques added a comment to D73339: [RISCV] Compress instructions based on function features.

Copying the the STI isn't quite trivial, and we're only using a small subset of what it provides, in compressInst. Can't this be done more tightly?

Feb 7 2020, 9:49 AM · Restricted Project
luismarques accepted D73862: [RISCV] Fix incorrect FP base CFI offset for variable argument functions.
Feb 7 2020, 8:37 AM · Restricted Project
luismarques added a comment to D73862: [RISCV] Fix incorrect FP base CFI offset for variable argument functions.

LGTM (just tweak the comment).

Feb 7 2020, 8:36 AM · Restricted Project
luismarques added a comment to D73699: [RISCV] Implement mayBeEmittedAsTailCall for tail call optimization.

Overall it looks good to me. Can you please just address the test review comments?

Feb 7 2020, 5:27 AM · Restricted Project

Feb 4 2020

luismarques added inline comments to D73699: [RISCV] Implement mayBeEmittedAsTailCall for tail call optimization.
Feb 4 2020, 6:23 AM · Restricted Project

Jan 31 2020

luismarques committed rG24cba3312f6c: [RISCV] Implement jump pseudo-instruction (authored by luismarques).
[RISCV] Implement jump pseudo-instruction
Jan 31 2020, 2:35 PM
luismarques closed D73178: [RISCV] Implement jump pseudo-instruction.
Jan 31 2020, 2:35 PM · Restricted Project
luismarques committed rG081f1f622a40: [RISCV] Implement jump pseudo-instruction (authored by luismarques).
[RISCV] Implement jump pseudo-instruction
Jan 31 2020, 2:26 PM

Jan 22 2020

luismarques created D73178: [RISCV] Implement jump pseudo-instruction.
Jan 22 2020, 5:20 AM · Restricted Project

Jan 15 2020

luismarques committed rG46e3edcc2c89: [RISCV] Fix test for inline asm z constraint modifier (authored by luismarques).
[RISCV] Fix test for inline asm z constraint modifier
Jan 15 2020, 5:52 AM
luismarques closed D72134: [RISCV] Fix test for inline asm z constraint modifier.
Jan 15 2020, 5:52 AM · Restricted Project

Jan 13 2020

luismarques committed rG043c5eafa878: [RISCV] Handle globals and block addresses in asm operands (authored by luismarques).
[RISCV] Handle globals and block addresses in asm operands
Jan 13 2020, 7:44 AM
luismarques closed D72275: [RISCV] Handle globals and block addresses in asm operands.
Jan 13 2020, 7:44 AM · Restricted Project
luismarques accepted D62190: [RISCV] Allow shrink wrapping for RISC-V.

Thanks for the patch Lewis. Overall it LGTM, and it would be great to merge this in time for the LLVM 10.0 release.

Jan 13 2020, 5:48 AM · Restricted Project

Jan 7 2020

luismarques committed rG27e6b171e0be: [RISCV][Docs] Add RISC-V asm template argument modifiers (authored by luismarques).
[RISCV][Docs] Add RISC-V asm template argument modifiers
Jan 7 2020, 3:13 AM

Jan 6 2020

luismarques created D72275: [RISCV] Handle globals and block addresses in asm operands.
Jan 6 2020, 8:11 AM · Restricted Project

Jan 3 2020

luismarques created D72134: [RISCV] Fix test for inline asm z constraint modifier.
Jan 3 2020, 2:54 AM · Restricted Project

Jan 2 2020

luismarques accepted D67495: [RISCV] Collect Statistics on Compressed Instructions.

LGTM. My only concern was if it made sense to use the same statistic to count in both places, and if we could end up double counting the instructions emitted (now, or in a future LLVM version). After a quick look I didn't really see other targets using the same approach, but I also can't think of a way where this ends up actually being problematic.

Jan 2 2020, 2:25 AM · Restricted Project

Dec 23 2019

luismarques added a comment to D71777: [RISCV][NFC] Deduplicate Atomic Intrinsic Definitions.

I would personally rather this remain unindented, much like we do with namespace llvm etc.

Dec 23 2019, 12:32 PM · Restricted Project
luismarques accepted D71777: [RISCV][NFC] Deduplicate Atomic Intrinsic Definitions.

LGTM.

Dec 23 2019, 12:00 PM · Restricted Project
luismarques committed rG5b1d0dc6bf06: [RISCV][NFC] Fix use of missing attribute groups in tests (authored by luismarques).
[RISCV][NFC] Fix use of missing attribute groups in tests
Dec 23 2019, 7:44 AM

Dec 19 2019

luismarques committed rGec4f06a77ded: [RISCV] Don't crash on unsupported relocations (authored by luismarques).
[RISCV] Don't crash on unsupported relocations
Dec 19 2019, 9:23 AM
luismarques closed D71536: [RISCV] Don't crash on unsupported relocations.
Dec 19 2019, 9:23 AM · Restricted Project
luismarques updated the diff for D71536: [RISCV] Don't crash on unsupported relocations.

Add RUN line for riscv64

Dec 19 2019, 6:53 AM · Restricted Project
luismarques updated the diff for D71536: [RISCV] Don't crash on unsupported relocations.

Update test CHECKs to check for line number/columns.

Dec 19 2019, 3:07 AM · Restricted Project

Dec 17 2019

luismarques committed rGe332a0961935: [RISCV][NFC] Trivial cleanup (authored by luismarques).
[RISCV][NFC] Trivial cleanup
Dec 17 2019, 3:48 AM

Dec 16 2019

luismarques accepted D68362: [libunwind][RISCV] Add 64-bit RISC-V support.

LGTM.

Dec 16 2019, 4:55 AM · Restricted Project
luismarques created D71536: [RISCV] Don't crash on unsupported relocations.
Dec 16 2019, 3:34 AM · Restricted Project

Dec 11 2019

luismarques added inline comments to D70401: [WIP][RISCV] Implement ilp32e ABI.
Dec 11 2019, 12:09 PM · Restricted Project, Restricted Project