Page MenuHomePhabricator

asb (Alex Bradbury)
Director and Co-founder, lowRISC CIC

Projects

User does not belong to any projects.

User Details

User Since
Aug 6 2013, 5:31 AM (371 w, 5 d)

Recent Activity

Thu, Sep 17

asb accepted D84414: [RISCV] Support Shadow Call Stack.

I think once @jrtc27 confirms all her issues are addressed this is good to land.

Thu, Sep 17, 5:49 AM · Restricted Project, Restricted Project

Thu, Sep 3

asb accepted D85366: [RISCV] Do not mandate scheduling for CSR instructions.

LGTM, thanks.

Thu, Sep 3, 4:55 AM · Restricted Project
asb added a comment to D86836: Support a list of CostPerUse values.

It looks like others are reviewing the implementation details, but I just wanted to chime in to say that this looks like a useful feature for the RISC-V backend too. Currently we set CostPerUse for some registers in order to tweak register allocation in a way that benefits codegen when the compressed instruction set extension is enabled. Although the impact is _very_ minimal, this slightly harms targets that don't support the compressed instruction set (admittedly, this isn't really true of any shipping RISC-V processor so not a big concern). It would be good to use this vary the CostPerUse depending on target RISC-V features.

Thu, Sep 3, 4:49 AM · Restricted Project
asb accepted D87069: [NFC][RISCV] Simplify pass arg of RISCVMergeBaseOffsetOpt.
Thu, Sep 3, 4:44 AM · Restricted Project

Aug 21 2020

asb accepted D86286: [RISCV] Fix inaccurate annotations on PseudoBRIND.
Aug 21 2020, 2:30 AM · Restricted Project
asb added a comment to D77152: [SelectionDAG] Better legalization for FSHL and FSHR.

No objections accepting from the RISC-V side. I don't have a set of execution tests for the fshl/fshr changes to validate them, but I didn't see anything obviously wrong. The changes primarily affect the (still experimental) bitmanip extension also, so the bar for review is somewhat lower. The change does seem to improve srliw lowering in a few places in the GCC torture suite as well (in a way that is both correct and beneficial).

Aug 21 2020, 2:27 AM · Restricted Project

Aug 20 2020

asb committed rG1ecf120246e7: [index-while-building] Fix build with -DBUILD_SHARED_LIBS=True (authored by asb).
[index-while-building] Fix build with -DBUILD_SHARED_LIBS=True
Aug 20 2020, 7:14 AM
asb added a comment to D85366: [RISCV] Do not mandate scheduling for CSR instructions.

The description of isNotDuplicable in MachineInstr.h is:

/// Return true if this instruction cannot be safely duplicated.
/// For example, if the instruction has a unique labels attached
/// to it, duplicating it would cause multiple definition errors.
bool isNotDuplicable(QueryType Type = AnyInBundle) const {
  return hasProperty(MCID::NotDuplicable, Type);
}

I don't think this obviously applies to CSRs, and the property doesn't seem to be applied to instructions that modify control registers for other in-tree targets.

Aug 20 2020, 2:28 AM · Restricted Project

Aug 6 2020

asb accepted D85015: [RISCV] Enable MCCodeEmitter instruction predicate verifier.

Thanks for spotting this one - LGTM.

Aug 6 2020, 6:43 AM · Restricted Project
asb added a comment to D84833: Implement indirect branch generation in position independent code for the RISC-V target.

@jrtc27 are you happy with this patch in its current form or are there outstanding issues to be addressed?

Aug 6 2020, 6:28 AM · Restricted Project

Jul 30 2020

asb added a comment to D84833: Implement indirect branch generation in position independent code for the RISC-V target.

@jrtc27 are you happy with this patch now? Thanks for your review on this and thanks @msizanoen1 for providing this fix.

Jul 30 2020, 5:37 AM · Restricted Project

Jul 21 2020

asb added a comment to D79870: [RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbb asm instructions.

It's a shame this just missed the creation of the llvm 11.0 branch, do we think it's worth trying to get this backported since it only just missed?

Jul 21 2020, 6:51 AM · Restricted Project

Jul 16 2020

asb accepted D71124: [RISCV] support clang driver to select cpu.

LGTM, thanks!

Jul 16 2020, 7:06 AM · Restricted Project, Restricted Project

Jul 14 2020

asb added a comment to D83059: [RISCV] Use Generated Instruction Uncompresser.

I'm getting a test failure on rv64-relax-all.s with this patch?

Jul 14 2020, 11:04 PM · Restricted Project
asb added a comment to D77443: [RISCV] Fix RISCVInstrInfo::getInstSizeInBytes for atomics pseudos.

Hi @jrtc27 - it would be nice to get this in before LLVM 11 branches. Will you have time to add the extra comment and commit today?

Jul 14 2020, 10:56 PM · Restricted Project
asb added a comment to D65802: [DAGCombiner] Rebuild (setcc x, y, ==) from (xor (xor x, y), 1).

This looks good to land IMHO. It's a nice improvement for RISC-V, and it seems to have been sufficiently reviewed by people active with the DAGCombiner. Thanks Roger.

Jul 14 2020, 10:53 PM · Restricted Project
asb accepted D83819: [RISCV] Add error checking for extensions missing separating underscores.

LGTM, thanks!

Jul 14 2020, 10:28 PM · Restricted Project
asb added a comment to D71124: [RISCV] support clang driver to select cpu.

I've added some suggestions to clarify the code comments. I think before landing it would be good to address the crash Sam pointed out for an invalid -march, but otherwise I think this looks good to me (at least, it seems worth landing this and if further issues crop up we can fix them and request them for merging into the LLVM 11 branch).

Jul 14 2020, 10:14 PM · Restricted Project, Restricted Project
asb added a comment to D83754: [Attributor] Unittest for Attributor.

This broke the build for -DBUILD_SHARED_LIBS=True. I've committed rG5282a6186c which fixes it for me.

Jul 14 2020, 9:07 PM · Restricted Project
asb committed rG5282a6186cfb: [Attributor] Fix build of unittest with DBUILD_SHARED_LIBS=True (authored by asb).
[Attributor] Fix build of unittest with DBUILD_SHARED_LIBS=True
Jul 14 2020, 9:06 PM

Jul 9 2020

asb accepted D77030: [RISCV] refactor FeatureRVCHints to make ProcessorModel more intuitive.

Let's go for it! Thanks.

Jul 9 2020, 10:50 AM · Restricted Project
asb added a comment to D81583: Update SystemZ ABI to handle C++20 [[no_unique_address]] attribute.

This LGTM from a RISC-V perspective. I'll likely follow up with a RISC-V test case similar to the SystemZ one post-commit, but given this is really fixing a cross-platform ABI issue this seems non-urgent. Thanks for spotting and addressing this issue.

Jul 9 2020, 4:40 AM · Restricted Project
asb accepted D82988: [RISCV] Avoid Splitting MBB in RISCVExpandPseudo.

Got it, thanks. In that case LGTM and please tweak the commit message (the last paragraph specifically) so it's clear that the two changes are interlinked.

Jul 9 2020, 3:03 AM · Restricted Project

Jul 8 2020

asb accepted D81805: [RISCV] Fix isStoreToStackSlot.

This looks good to me, good catch. I do see a codegen change on regstack-1.c from the GCC Torture Suite, so it might be worth having a quick look to see if it's easy to make a test case based on that.

Jul 8 2020, 11:45 PM · Restricted Project
asb requested changes to D82988: [RISCV] Avoid Splitting MBB in RISCVExpandPseudo.

This is a nice simplification, thanks. My only request before committing is to split out the RISCVTargetMachine to a separate pass, as that is logically distinct.

Jul 8 2020, 10:37 PM · Restricted Project
asb accepted D77443: [RISCV] Fix RISCVInstrInfo::getInstSizeInBytes for atomics pseudos.

LGTM, +1 on adding a comment to the expansion functions noting the need to update getInstSizeInBytes. Thanks!

Jul 8 2020, 10:25 PM · Restricted Project
asb added a comment to D80802: [RISCV] Upgrade RVV MC to v0.9..

I've gone through and can't see any obvious issues. I defer to one of the RISC-V Vector extension usual suspects for giving a LGTM on the detail of the altered instructions etc. Once we have that, this looks good to land IMHO.

Jul 8 2020, 10:19 PM · Restricted Project, Restricted Project
asb added inline comments to D83159: [RISCV][test] Add a new codegen test of add-mul transform.
Jul 8 2020, 10:08 PM · Restricted Project
asb added a comment to D71124: [RISCV] support clang driver to select cpu.

This has been hanging around for a while, but I think we'd basically agreed this is the right logic. The comments have ended up referring to flags that don't exist on Clang making it a little hard to follow, and I've added a request to slightly expand testing. If you make those cleanups I think it should be ready for a final review and merge.

Jul 8 2020, 9:52 PM · Restricted Project, Restricted Project

Jun 30 2020

asb accepted D82913: [RISCV] Add mcountinhibit CSR.

Looks good to me, thanks for catching this.

Jun 30 2020, 9:39 PM · Restricted Project

Jun 25 2020

asb added inline comments to D69987: [RISCV] Assemble/Disassemble v-ext instructions..
Jun 25 2020, 6:20 AM · Restricted Project, Restricted Project
asb accepted D69987: [RISCV] Assemble/Disassemble v-ext instructions..

The patch as it stands now LGTM and I think it can be committed. Is there any objection remaining?

Any further comments @simoncook @asb?

Jun 25 2020, 5:52 AM · Restricted Project, Restricted Project

Jun 18 2020

asb accepted D80526: [RISCV64] emit correct lib call for fp(double) to ui/si.

Thanks, this looks good to me. I wasn't aware of MakeLibCallOptions and IsSoften - I think I've wanted something like that before.

Jun 18 2020, 5:57 AM · Restricted Project

Jun 12 2020

asb committed rG3dcfd482cb17: [CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets… (authored by asb).
[CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets…
Jun 12 2020, 2:41 AM
asb closed D79155: [CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets with limited native integer widths.
Jun 12 2020, 2:41 AM · Restricted Project
asb added a comment to D79155: [CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets with limited native integer widths.

Please add a comment explaining what OffsetInRecord means; then LGTM.

Jun 12 2020, 1:35 AM · Restricted Project

Jun 10 2020

asb added a comment to D79155: [CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets with limited native integer widths.

Ping on this. The patch still applies cleanly against current HEAD.

Jun 10 2020, 11:12 PM · Restricted Project
asb committed rGd9bc8bd54a70: [RISCV] Make visibility of overridden methods in RISCVISelLowering match the… (authored by asb).
[RISCV] Make visibility of overridden methods in RISCVISelLowering match the…
Jun 10 2020, 1:36 AM
asb closed D79928: [RISCV] Make visibility of overridden methods in RISCVISelLowering match the parent.
Jun 10 2020, 1:36 AM · Restricted Project

Jun 9 2020

asb added reviewers for D81348: [compiler-rt][builtins] Add tests for atomic builtins support functions: jfb, jyknight.

I think there's value in adding these tests (I note libatomic in GCC has a similar set of simple functionality tests), and this seems a sensible way to do it.

Jun 9 2020, 2:42 AM · Restricted Project
asb added a comment to D81391: [RISC-V] Do not crash when using -ftrapping-math.

Disclaimer: I haven't swotted up on these constrained intrinsics to review the proposed lowering yet, but added a quick note on the setOperationAction calls. I agree with Luis the test cases would probably be easier to read if using the hard float ABI. I think you're lacking any test coverage for f32 as well.

Jun 9 2020, 1:03 AM · Restricted Project

May 28 2020

asb added a comment to D79870: [RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbb asm instructions.

Sorry for the delay on this - the lockdown situation is really hurting my review time, though it looks like my childcare situation will improve from the week after next.

May 28 2020, 7:34 AM · Restricted Project

May 19 2020

asb added inline comments to D79141: [RISCV] Better Split Stack Pointer Adjustment for RVC.
May 19 2020, 1:03 AM · Restricted Project

May 14 2020

asb accepted D79770: [RISCV] Fix passing two floating-point values in complex separately by two GPRs on RV64 .

Good catch, thanks for the fix! The logic was incorrectly written assuming isFloatingType would return false for complex values which is of course incorrect.

May 14 2020, 3:10 AM · Restricted Project
asb added a comment to D78545: [RISCV] Make CanLowerReturn protected for downstream maintenance.

Please check D79928 which cleans up the visibility of all of these overridden methods.

May 14 2020, 2:38 AM · Restricted Project
asb created D79928: [RISCV] Make visibility of overridden methods in RISCVISelLowering match the parent.
May 14 2020, 2:38 AM · Restricted Project
asb added a comment to D79492: [RISCV] Improve constant materialization.

I'm in favour of merging a patch that is functionally correct and makes incremental improvements. I'd rather avoid any regression in codesize though if possible. How feasible would it to be to avoid that case? It may be worthwhile leaving some of the materialisation improvements for a follow-up patch in order to land the clear wins now.

May 14 2020, 2:05 AM · Restricted Project

May 12 2020

asb accepted D79635: [RISCV] Split the pseudo instruction splitting pass.

Thanks, this looks good to me. PreSched2 is logically a better place for the standard pseudo expansions, though I'm not seeing any codegen changes at all with e.g. the GCC torture suite. But I'm happy to land this as-is.

May 12 2020, 12:30 AM · Restricted Project
asb added a comment to D79690: [RISCV] Fold ADDIs into load/stores with nonzero offsets.

Could you rebase please? This isn't applying cleanly for me on current master.

May 12 2020, 12:30 AM · Restricted Project

May 11 2020

asb added a comment to D78545: [RISCV] Make CanLowerReturn protected for downstream maintenance.

Looks like this landed while I was composing the below:

May 11 2020, 11:25 PM · Restricted Project

May 7 2020

asb added a comment to D67348: [RISCV] Add codegen pattern matching for bit manipulation assembly instructions..

Hi Paolo. I'm sorry this has been left hanging for some time. On the one hand, with this being an experimental feature and purely additive the bar for merging is slightly lower than e.g. a rewrite of all our existing codegen patterns (which could cause new regressions). On the other hand, this pre-commit review is realistically going to be the time when the codegen patterns and associated tests get most scrutiny and it would be a shame to skip that.

May 7 2020, 6:12 AM · Restricted Project

May 6 2020

asb added a comment to D79492: [RISCV] Improve constant materialization.

Thanks, this is a good improvement. Two thoughts, mainly for discussion rather than blocking issues:

May 6 2020, 11:59 PM · Restricted Project
asb requested changes to D79141: [RISCV] Better Split Stack Pointer Adjustment for RVC.

Thanks Sam. I left a few minor comments inline. From looking at the diff in compiler output on the GCC torture suite, I do see a few cases where there is a potential regression. e.g. loop-ivopts-2.c, which represents a case where the stack adjustment is large, but doesn't overflow the 12-bit immediate fields of addi and s[d|w]. The prologue and epilogue are both two instructions and become three instructions with this patch (although it is a code size win).

May 6 2020, 11:59 PM · Restricted Project
asb added a comment to D79521: [RISCV] Add SiFive's interrupt modes.

Just to understand the current status with respect to GCC, am I right that support for these attributes is not in upstream GCC? @kito-cheng is there any plan to upstream?

May 6 2020, 11:15 PM · Restricted Project
asb accepted D79523: [RISCV] Support Constant Pools in Load/Store Peephole.

LGTM, thanks. Left an inline comment pointing out a TODO that can now be removed thanks to this.

May 6 2020, 10:42 PM · Restricted Project

May 5 2020

asb accepted D78764: [RISCV] Update debug scratch register names.

LGTM, thanks. Left one tiny nit inline.

May 5 2020, 8:03 AM · Restricted Project

Apr 30 2020

asb added inline comments to D78905: [RISCV][NFC] Tests for indirect float conversion.
Apr 30 2020, 4:43 AM · Restricted Project
asb added a comment to D78907: [RISCV][NFC] Add tests for checking isnan patterns.
In D78907#2012344, @asb wrote:

LGTM. Minor nit: using %0 and %2 as the only two named values seems odd though? Most other tests in test/CodeGen/RISCV use a/b/... for arguments and %0/%1/%2/... in the body.

I generated the testcases in Clang (actually using godbolt, but it's doing the same IR lowering as clang HEAD is), which is why the arguments don't have names. I can re-introduce them if that's easier.

Apr 30 2020, 4:43 AM · Restricted Project
asb accepted D78907: [RISCV][NFC] Add tests for checking isnan patterns.

LGTM. Minor nit: using %0 and %2 as the only two named values seems odd though? Most other tests in test/CodeGen/RISCV use a/b/... for arguments and %0/%1/%2/... in the body.

Apr 30 2020, 3:37 AM · Restricted Project
asb accepted D78908: [RISCV] Add patterns for checking isnan.

LGTM, thanks!

Apr 30 2020, 3:37 AM · Restricted Project
asb added inline comments to D78908: [RISCV] Add patterns for checking isnan.
Apr 30 2020, 2:25 AM · Restricted Project
asb added inline comments to D78906: [RISCV] Add patterns for indirect float conversions.
Apr 30 2020, 2:25 AM · Restricted Project
asb added inline comments to D78905: [RISCV][NFC] Tests for indirect float conversion.
Apr 30 2020, 2:25 AM · Restricted Project
asb added a comment to D78764: [RISCV] Update debug scratch register names.

Sorry to ask you to move things back, but I think the debug CSR tests would make most sense in machine-csr-names.s on the basis that the privileged spec does list those CSRs in the "machine-level CSR names" table.

Apr 30 2020, 1:12 AM · Restricted Project
asb updated the diff for D79155: [CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets with limited native integer widths.

Updated patch to include full context.

Apr 30 2020, 1:12 AM · Restricted Project
asb updated subscribers of D79155: [CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets with limited native integer widths.
Apr 30 2020, 12:34 AM · Restricted Project
asb created D79155: [CodeGen] Increase applicability of ffine-grained-bitfield-accesses for targets with limited native integer widths.
Apr 30 2020, 12:34 AM · Restricted Project

Apr 23 2020

asb added a comment to D78583: [RISCV] Add instruction definition for dret.

Thanks for the patch, as we discussed last week I think supporting dret with the same ease as the privileged instructions is the right path. Given dret is defined in the debug spec rather than the privileged spec, could you please:

  • Move the test to a new test file debug-valid.s
  • Move the DRET instruction definition to a new section of RISCVInstrInfo.td with an internal header like
//===----------------------------------------------------------------------===//
// Debug instructions
//===----------------------------------------------------------------------===//
Apr 23 2020, 8:04 AM · Restricted Project

Apr 9 2020

asb added a comment to D73891: [RISCV] Support experimental/unratified extensions.

I've approved D65649 now, so I think this one can land as soon as that one does.

Apr 9 2020, 8:07 AM · Restricted Project
asb accepted D65649: [RISCV] Add MC encodings and tests of the Bit Manipulation extension.

I think we should land this and continue further development in-tree. There might be a few minor refactorings I want to propose after the fact, but these shouldn't block this going forwards.

Apr 9 2020, 7:34 AM · Restricted Project
asb added a comment to D77030: [RISCV] refactor FeatureRVCHints to make ProcessorModel more intuitive.

I can see the argument for changing the default of EnableRVCHintInstrs. Might we be better just doing that, and keeping it as "rvc-hints" to avoid adding negative features?

Apr 9 2020, 5:55 AM · Restricted Project
asb accepted D77567: [RISCV] Implement evaluateBranch.

Thanks Simon, LGTM. I noted a tiny nit re the test file.

Apr 9 2020, 5:55 AM · Restricted Project

Mar 26 2020

asb added a comment to D65649: [RISCV] Add MC encodings and tests of the Bit Manipulation extension.

I agree, it seems more like a sketch of what they should be, but the mentioning of the size improvements suggested to me perhaps they should be, since evaluating the potential "what the final B extension should look like" it probably should be included. There is the question of where this should be enabled, my first thought (which this patch implements) is Zbb because it seemed the most logical, but maybe given the instructions stated state does another subextension make sense for its evaluation? These are all experimental so I think there's some leeway to some option, but I think it would be good to land it if we think people may be using it/want to evaluate it. I suspect there's many valid routes with this being experimental, we just need to choose one we have concensus around making sense. Perhaps a topic for today's call?

Mar 26 2020, 8:38 AM · Restricted Project
asb added a comment to D65649: [RISCV] Add MC encodings and tests of the Bit Manipulation extension.

Submitting the comments I have so far - need to continue going through in more detail.

Mar 26 2020, 8:38 AM · Restricted Project
asb accepted D76767: [RISCV] Support negative constants in CompressInstEmitter.

This is a much simpler fix! Looks good to me.

Mar 26 2020, 8:06 AM · Restricted Project
asb added a comment to D65649: [RISCV] Add MC encodings and tests of the Bit Manipulation extension.

I'm reviewing this with an eye to merging it, but one big thing that comes to mind is the compressed instructions. The draft bitmanip spec describes these under "Future compressed instructions" and says "It presumably would make sense for a future revision of the “C” extension to include compressed opcodes for those instructions." My reading is that this is more of a sketch of potential encodings and a less firm proposal than the 32-bit encodings described elsewhere in the spec. Do you disagree with that assessment?

Mar 26 2020, 7:33 AM · Restricted Project
asb added a comment to D76828: [RISC-V] Support __builtin_thread_pointer .

Thanks for the patch. I added a couple of nits - please rename the test file to thread-pointer.ll to match what other backends do and make it more discoverable. Also, although there different is minor we do use update_llc_test_checks.py for essentially all RISC-V tests so it would be good to use that for thread-pointer.ll as well.

Mar 26 2020, 7:00 AM · Restricted Project
asb added a comment to D76767: [RISCV] Support negative constants in CompressInstEmitter.

I was thinking about making it clearer why this cast is necessary. The first thought was obviously to add a comment to explain (similar to the comment in your review description). But maybe there's an argument for adding a small helper? Although it would literally just be doing a cast, it's name and description should make it much clearer what is going on. I don't feel super strongly about that approach though - so do speak up if you disagree!

Mar 26 2020, 5:55 AM · Restricted Project
asb accepted D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.

This LGTM, thanks Luis!

Mar 26 2020, 5:23 AM · Restricted Project, Restricted Project

Mar 19 2020

asb 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.

I'm not sure that's something we want to do. Those are reserved for HINT instructions. The spec says:

This HINT encoding has been chosen so that simple implementations can ignore HINTs alto-
gether, and instead execute a HINT as a regular computational instruction that happens not to
mutate the architectural state.

If the core truly supports those HINTs then it shouldn't trap. If we are trapping presumably it's because the core is just executing the HINT as a plain load/store. That would typically be a NOP, but the address must be invalid and so we are trapping. In that case we are correctly identifying it as a READ or WRITE.

Mar 19 2020, 6:59 AM · Restricted Project, Restricted Project
asb added a comment to D65649: [RISCV] Add MC encodings and tests of the Bit Manipulation extension.

This is starting to look good. I've checked all the encodings, and other than c.zext.w having the wrong value all the encodings are right.

One thing I would consider is to make reviewing/future changes easier, I would define all the instructions in the order they appear in the Chapter 2.11 Opcode Encodings tables. This way, it will be easier to see for future revisions what has changed and make sure the encodings are up to date. This might end up with a few more let Predicates = directives, but we can rearrange and tidy this up when it is all ratified.

Mar 19 2020, 6:59 AM · Restricted Project
asb accepted D73891: [RISCV] Support experimental/unratified extensions.

LGTM, thanks Simon!

Mar 19 2020, 6:27 AM · Restricted Project

Mar 5 2020

asb added a comment to D75168: [sanitizer][RISCV] Implement SignalContext::GetWriteFlag for RISC-V.

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 5 2020, 9:50 AM · Restricted Project, Restricted Project
asb accepted D75522: [compiler-rt][builtins][RISCV] Port __clear_cache to RISC-V Linux.

LGTM, thanks!

Mar 5 2020, 8:13 AM · Restricted Project, Restricted Project

Feb 27 2020

asb added a comment to D75099: [AVR] Include AVR by default in LLVM builds.

Hi Dylan - on the mailing list thread for this I raised a concern about disassembler support based on comments I'd seen in a recent patch. Can you please clarify the current status there?

Feb 27 2020, 5:22 AM · Restricted Project

Feb 20 2020

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

Yes, if @jrtc27 commits I'd be supportive of a cherry-pick to the release branch.

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

Yes, please backport (if possible) all other related changes mentioned above (if they are not yet part of 10.0).

This would help distributions to avoid hacking LDFLAGS / build systems files while building LLVM/Clang stack on Linux.

Feb 20 2020, 7:53 AM · Restricted Project
asb updated subscribers of D74596: [RISCV] Correct the CallPreservedMask for the function call in an interrupt handler.

@hans this patch fixes a reported bug https://bugs.llvm.org/show_bug.cgi?id=42984 and is non-invasive. I'd be in favour of cherry-picking for 10.0 if you're ok with that.

Feb 20 2020, 5:55 AM · Restricted Project
asb accepted D74453: [LegalizeTypes][RISCV] Correctly sign-extend comparison for ATOMIC_CMP_XCHG.

Great fix, thanks @jrtc27. Please do go ahead and commit.

Feb 20 2020, 5:28 AM · Restricted Project

Feb 19 2020

asb added a comment to D68964: cmake/modules/CheckAtomic.cmake: catch false positives in RISC-V.

CC @hans for 10.0

+asb from code_owners.txt, what do you think?

Feb 19 2020, 9:31 AM · Restricted Project

Feb 6 2020

asb added a comment to D74022: [ELF][RISCV] Add R_RISCV_IRELATIVE.

Thanks for implementing this - I'd personally like to see the psABI proposal https://github.com/riscv/riscv-elf-psabi-doc/pull/131 merged before merging into LLVM/LLD.

Feb 6 2020, 5:32 AM · Restricted Project

Jan 23 2020

asb added a comment to D71820: [lld][RISCV] Print error when encountering R_RISCV_ALIGN.

@MaskRay, @ruiu, would you be in favour of this being backported to 10.0?

Jan 23 2020, 5:53 AM · Restricted Project
asb added a comment to D73211: [RISCV] Fix evaluating %pcrel_lo against global and weak symbols.

I've filed a request to merge this into the release branch here https://bugs.llvm.org/show_bug.cgi?id=44631 - thanks for the fix James!

Jan 23 2020, 5:35 AM · Restricted Project

Jan 14 2020

asb added inline comments to D70837: [RISCV] Support ABI checking with per function target-features.
Jan 14 2020, 6:35 AM · Restricted Project

Jan 13 2020

asb accepted D69590: [RISCV] Fix ILP32D lowering for double+double/double+int return types.

This looks good to me, thanks James. I had a closer step through of the logic here to convince myself.

Jan 13 2020, 5:39 AM · Restricted Project

Jan 10 2020

asb accepted D72471: [RISCV] Check register class for AMO memory operands.

Thanks for the fix! As Sam says, explaining the issue in the commit message would be useful.

Jan 10 2020, 5:36 AM · Restricted Project

Jan 9 2020

asb accepted D67495: [RISCV] Collect Statistics on Compressed Instructions.
Jan 9 2020, 6:27 AM · Restricted Project
asb added a comment to 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.

My understanding is that instructions only go through one of these functions. RISCVAsmParser.cpp is used by the assembler only, and the RISCVAsmPrinter.cpp is only used by LLVM CodeGen. This should mean that instructions are not double-counted (today). Yes I'm not sure why we have both, I think @asb did this to ensure better layering.

Jan 9 2020, 6:27 AM · Restricted Project

Dec 19 2019

asb accepted D71536: [RISCV] Don't crash on unsupported relocations.

LGTM, thanks.

Dec 19 2019, 7:13 AM · Restricted Project

Dec 16 2019

asb requested changes to D71536: [RISCV] Don't crash on unsupported relocations.

Please update the check so it checks the error location too, like we do for other *invalid.s checks.

Dec 16 2019, 6:08 AM · Restricted Project