Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

nagisa (Simonas Kazlauskas)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 24 2016, 1:28 AM (373 w, 5 d)

Recent Activity

Jan 6 2022

nagisa accepted D116628: [X86] add dwarf information for loop stack probe.
Jan 6 2022, 5:16 PM · Restricted Project
nagisa added a comment to D116628: [X86] add dwarf information for loop stack probe.

LGTM after the code change is applied.

Jan 6 2022, 3:37 AM · Restricted Project

Apr 1 2021

nagisa added a comment to D99045: [x86] Improve selection of the mov instruction in FrameLowering.

Happy to pre-commit the tests if this is something that we actually want to do.

Apr 1 2021, 4:52 PM · Restricted Project
nagisa added reviewers for D99045: [x86] Improve selection of the mov instruction in FrameLowering: rnk, pavel.v.chupin, cdavis5x.
Apr 1 2021, 4:51 PM · Restricted Project
nagisa updated the diff for D99045: [x86] Improve selection of the mov instruction in FrameLowering.

Rebase

Apr 1 2021, 4:50 PM · Restricted Project
nagisa published D99045: [x86] Improve selection of the mov instruction in FrameLowering for review.
Apr 1 2021, 4:03 PM · Restricted Project

Mar 31 2021

nagisa added a comment to D99682: [SelectionDAG] Teach SelectionDAG::FoldConstantArithmetic to handle SPLAT_VECTOR.

Please rebase on top of master to verify this fixes the issue mentioned in D88785.

Mar 31 2021, 3:36 PM · Restricted Project
nagisa committed rG777a58e05b22: Support {S,U}REMEqFold before legalization (authored by nagisa).
Support {S,U}REMEqFold before legalization
Mar 31 2021, 3:36 PM
nagisa added inline comments to D88785: Support {S,U}REMEqFold before legalization.
Mar 31 2021, 3:36 PM · Restricted Project
nagisa closed D88785: Support {S,U}REMEqFold before legalization.
Mar 31 2021, 3:35 PM · Restricted Project
nagisa added reviewers for D99585: [X86] add dwarf information for loop stack probe: serge-sans-paille, nagisa, efriedma, lkail.
Mar 31 2021, 2:51 PM · Restricted Project, Restricted Project
nagisa added a comment to D99579: [X86] add dwarf annotation for inline stack probe.

Landed this, thank you!

Mar 31 2021, 2:33 PM · Restricted Project
nagisa committed rG1c268a8ff4e9: [X86] add dwarf annotation for inline stack probe (authored by YangKeao).
[X86] add dwarf annotation for inline stack probe
Mar 31 2021, 2:33 PM
nagisa closed D99579: [X86] add dwarf annotation for inline stack probe.
Mar 31 2021, 2:33 PM · Restricted Project
nagisa updated the diff for D88785: Support {S,U}REMEqFold before legalization.

Address review commends, rebase

Mar 31 2021, 1:38 PM · Restricted Project
nagisa added inline comments to D88785: Support {S,U}REMEqFold before legalization.
Mar 31 2021, 12:45 PM · Restricted Project

Mar 30 2021

nagisa accepted D99579: [X86] add dwarf annotation for inline stack probe.

You can remove these notices by running arc diff again with clang-format in your PATH. It is also fine to just leave these messages in – CI will verify the formatting as well and fail if its not correct. Only then it is strictly necessary to rediff your code.

Mar 30 2021, 5:16 AM · Restricted Project

Mar 29 2021

nagisa added a comment to D98789: [PEI] add dwarf information for stack probe.

@YangKeao Will you be pursuing this further? Should I take over this for you?

Mar 29 2021, 3:13 PM · Restricted Project
nagisa added inline comments to D88785: Support {S,U}REMEqFold before legalization.
Mar 29 2021, 5:12 AM · Restricted Project
nagisa updated the diff for D88785: Support {S,U}REMEqFold before legalization.

Address review comments, rebase

Mar 29 2021, 5:12 AM · Restricted Project

Mar 28 2021

nagisa added a comment to D98600: [X86][FastISel] Fix with.overflow eflags clobber (PR49587).

None from me. As I said I'm not too qualified to have much say in fastisel, so my other comments are broadly ignorable. I do think that some fix for this needs to land (and be nominated for a backport into LLVM 12) sooner rather than later

Mar 28 2021, 5:27 AM · Restricted Project

Mar 22 2021

nagisa added a comment to D98906: [X86] Improve lowering of the unrolled inline-asm probing.

Be careful about referencing stack locations below the red-zone.

The x86-64 ABI mandates a 128 bytes red zone. Your new instruction would effectively write a zero at a location below the red-zone.
That region of memory is not reserved, and should be considered volatile. For example: signals and interrupt handlers are allowed to modify it.

Mar 22 2021, 8:15 AM · Restricted Project
nagisa added a comment to D98789: [PEI] add dwarf information for stack probe.

Looks like my alternative has caveats of its own. Can you please split your change into two parts? One that affects only the unrolled case (which I believe should be good to land) and the other which affects the loop case (potentially subject to further discussion).

Mar 22 2021, 6:58 AM · Restricted Project
nagisa added a comment to D98906: [X86] Improve lowering of the unrolled inline-asm probing.

Ah, I see!

Mar 22 2021, 6:45 AM · Restricted Project

Mar 21 2021

nagisa updated the summary of D98906: [X86] Improve lowering of the unrolled inline-asm probing.
Mar 21 2021, 7:16 AM · Restricted Project
nagisa added inline comments to D96004: [AArch64] Stack probing for function prologues.
Mar 21 2021, 6:58 AM · Restricted Project, Restricted Project
nagisa added a comment to D96004: [AArch64] Stack probing for function prologues.

Can you please pre-commit the tests so that it is easier to see how the codegen changes? E.g. I suspect the CFI directives in prologue are already broken before your changes and so my comments aren't super relevant.

Mar 21 2021, 6:50 AM · Restricted Project, Restricted Project

Mar 19 2021

nagisa added a comment to D88785: Support {S,U}REMEqFold before legalization.

Done!

Mar 19 2021, 9:58 AM · Restricted Project
nagisa updated the diff for D88785: Support {S,U}REMEqFold before legalization.

rebase

Mar 19 2021, 9:55 AM · Restricted Project
nagisa committed rGc2313a45307e: [X86, NFC] Update stack-clash tests using the automated tooling (authored by nagisa).
[X86, NFC] Update stack-clash tests using the automated tooling
Mar 19 2021, 5:02 AM
nagisa closed D98909: [X86, NFC] Update stack-clash tests using the automated tooling.
Mar 19 2021, 5:02 AM · Restricted Project
nagisa added a comment to D98789: [PEI] add dwarf information for stack probe.

btw I prototyped a D98906: [X86] Improve lowering of the unrolled inline-asm probing yesterday as an alternative approach towards improving the unrolled case.

Mar 19 2021, 2:44 AM · Restricted Project

Mar 18 2021

nagisa retitled D98906: [X86] Improve lowering of the unrolled inline-asm probing from [X86] Improve lowering of unrolled inline-asm probing to [X86] Improve lowering of the unrolled inline-asm probing.
Mar 18 2021, 6:37 PM · Restricted Project
nagisa published D98906: [X86] Improve lowering of the unrolled inline-asm probing for review.
Mar 18 2021, 6:37 PM · Restricted Project
nagisa added a comment to D98789: [PEI] add dwarf information for stack probe.

I investigated this a little bit, and it seems like using createVirtualRegister won't work here, after all. It seems that this code does in fact run after regalloc happens. I'm out of ideas, but I also am not that familiar with this area to give any useful advice or guidance here.

Mar 18 2021, 6:22 PM · Restricted Project
nagisa added a comment to D98909: [X86, NFC] Update stack-clash tests using the automated tooling.

I submitted this as a diff to give an opportunity for people to object. Will land it in 24 hours or so if there aren't any.

Mar 18 2021, 5:22 PM · Restricted Project
nagisa requested review of D98909: [X86, NFC] Update stack-clash tests using the automated tooling.
Mar 18 2021, 5:20 PM · Restricted Project
nagisa added a comment to D98857: [DAG] computeKnownBits - add ISD::MULHS/MULHU/SMUL_LOHI/UMUL_LOHI handling.

I think you may be able to quite easily add a case for S/UMUL_LOHI here as well (but unsure if its necessary, just noticing that its not explicitly handled here)

Mar 18 2021, 4:25 PM · Restricted Project
nagisa added a comment to D88785: Support {S,U}REMEqFold before legalization.

@RKSimon I cherry-picked your patch on top of mine and there were no changes in test output (as reported by check-llvm), sadly. If anything your differential makes improvements introduced by this differential slightly less impressive.

Mar 18 2021, 3:37 PM · Restricted Project
nagisa updated the diff for D88785: Support {S,U}REMEqFold before legalization.

rebase

Mar 18 2021, 3:24 PM · Restricted Project
nagisa added a comment to D98789: [PEI] add dwarf information for stack probe.

See createVirtualRegister.

Mar 18 2021, 10:01 AM · Restricted Project
nagisa added a comment to D98789: [PEI] add dwarf information for stack probe.

Any register that isn't callee-preserved could be used (or any register in general if its spilled first), assuming it isn't used for something else already. I did a quick search in an effort to figure out which registers are callee-saved on x86, but couldn't find anything definitive :(

It seems that different platform will have different set of callee-preserved register. I also found them in the list in LLVM (which is refered in the function getCalleeSavedRegs of llvm/lib/Target/X86/X86RegisterInfo.cpp). Sadly, it seems like RDI is more likely to be a callee-saved register.

Only considering the SYSV and Windows, all callee-saved registers are:

X86::RBX, X86::R12, X86::R13, X86::R14, X86::R15, X86::RBP
X86::RBX, X86::RBP, X86::RDI, X86::RSI, X86::R12, X86::R13, X86::R14, X86::R15, X86::XMM6, X86::XMM7, X86::XMM8, X86::XMM9, X86::XMM10, X86::XMM11, X86::XMM12, X86::XMM13, X86::XMM14, X86::XMM15

And all available dwarf registers are:

32bit:
EAX, EDX, ECX, EBX, ESI, EDI, EBP, ESP, EIP
64bit, X86-64:
RAX, RDX, RCX, RBX, RSI, RDI, RBP, RSP, R8-R15, RIP

For 64bit, RAX, RCX, RDX, R8-R11 could be a good choice, and for 32 bit, it could only be choosen from EAX, ECX, EDX

Mar 18 2021, 9:40 AM · Restricted Project
nagisa added a comment to D98789: [PEI] add dwarf information for stack probe.

Make sense. I tried to use r11 + offset to represent CFA temporarily. However, r11d cannot be used as a dwarf register on x86_32.

Mar 18 2021, 5:44 AM · Restricted Project

Mar 17 2021

nagisa added reviewers for D98789: [PEI] add dwarf information for stack probe: serge-sans-paille, nagisa, efriedma, lkail.
Mar 17 2021, 10:51 AM · Restricted Project

Mar 16 2021

nagisa committed rG6513995be37b: [InstSimplify] Restrict a GEP transform to avoid provenance changes (authored by nagisa).
[InstSimplify] Restrict a GEP transform to avoid provenance changes
Mar 16 2021, 9:53 AM
nagisa closed D98611: [InstSimplify] Restrict a GEP transform to avoid provenance changes.
Mar 16 2021, 9:53 AM · Restricted Project
nagisa committed rGa97732480012: [InstSimplify] Match PtrToInt more directly in a GEP transform (NFC) (authored by nagisa).
[InstSimplify] Match PtrToInt more directly in a GEP transform (NFC)
Mar 16 2021, 6:45 AM
nagisa closed D98672: [InstSimplify] Match PtrToInt more directly in a GEP transform (NFC).
Mar 16 2021, 6:45 AM · Restricted Project
nagisa updated the summary of D98611: [InstSimplify] Restrict a GEP transform to avoid provenance changes.
Mar 16 2021, 6:42 AM · Restricted Project

Mar 15 2021

nagisa added a comment to D98611: [InstSimplify] Restrict a GEP transform to avoid provenance changes.

I split the NFCs out into a different diff. I also revised the approach slightly in an attempt to reduce code duplication. LMK if that (e.g. P's capture by reference) seems too magical, and I'm happy to revert to duplicating the checks.

Mar 15 2021, 5:08 PM · Restricted Project
nagisa updated the diff for D98611: [InstSimplify] Restrict a GEP transform to avoid provenance changes.

rebase onto D98672

Mar 15 2021, 5:05 PM · Restricted Project
nagisa updated the diff for D98672: [InstSimplify] Match PtrToInt more directly in a GEP transform (NFC).

backout

Mar 15 2021, 5:01 PM · Restricted Project
nagisa updated the diff for D98672: [InstSimplify] Match PtrToInt more directly in a GEP transform (NFC).

Rebase onto D98672

Mar 15 2021, 5:00 PM · Restricted Project
nagisa requested review of D98672: [InstSimplify] Match PtrToInt more directly in a GEP transform (NFC).
Mar 15 2021, 4:56 PM · Restricted Project
nagisa added a comment to D98600: [X86][FastISel] Fix with.overflow eflags clobber (PR49587).

Yeah that looks like the one.

Mar 15 2021, 5:52 AM · Restricted Project
nagisa added a comment to D98600: [X86][FastISel] Fix with.overflow eflags clobber (PR49587).

My feeling is that this fix is a work-around for what is a regression llvm11->12. Here's a comment I had sitting incomplete since yesterday in bugzilla:

Mar 15 2021, 4:21 AM · Restricted Project

Mar 14 2021

nagisa abandoned D98120: [InstCombine] Remove a provenance changing gep transformation.
Mar 14 2021, 2:41 PM · Restricted Project
nagisa updated the diff for D98611: [InstSimplify] Restrict a GEP transform to avoid provenance changes.

revert the comments

Mar 14 2021, 2:28 PM · Restricted Project
nagisa published D98611: [InstSimplify] Restrict a GEP transform to avoid provenance changes for review.
Mar 14 2021, 2:25 PM · Restricted Project
nagisa committed rGf125f28afdb5: [InstSimplify] Add additional GEP transform tests & regenerate (authored by nagisa).
[InstSimplify] Add additional GEP transform tests & regenerate
Mar 14 2021, 2:22 PM
nagisa committed rG7d7001b2cbd0: [InstCombine] Restrict a GEP transform to avoid changing provenance (authored by nagisa).
[InstCombine] Restrict a GEP transform to avoid changing provenance
Mar 14 2021, 7:32 AM
nagisa closed D98588: [InstCombine] Restrict a GEP transform to avoid changing provenance.
Mar 14 2021, 7:32 AM · Restricted Project

Mar 13 2021

nagisa updated the diff for D98588: [InstCombine] Restrict a GEP transform to avoid changing provenance.

Rebase onto precommited test cases, adjust style

Mar 13 2021, 1:49 PM · Restricted Project
nagisa committed rG7ee96429a0b0: [InstCombine] Update GEP tests (authored by nagisa).
[InstCombine] Update GEP tests
Mar 13 2021, 1:40 PM
nagisa updated the diff for D98588: [InstCombine] Restrict a GEP transform to avoid changing provenance.

Adjust the differential name in the test case

Mar 13 2021, 12:00 PM · Restricted Project
nagisa added a comment to D98588: [InstCombine] Restrict a GEP transform to avoid changing provenance.

Not sure what's up with the other test changes, annotated the POIs with inline comments.

Mar 13 2021, 11:58 AM · Restricted Project
nagisa updated the summary of D98588: [InstCombine] Restrict a GEP transform to avoid changing provenance.
Mar 13 2021, 11:56 AM · Restricted Project
nagisa requested review of D98588: [InstCombine] Restrict a GEP transform to avoid changing provenance.
Mar 13 2021, 11:56 AM · Restricted Project

Mar 12 2021

nagisa added a comment to D88785: Support {S,U}REMEqFold before legalization.

I went through the list of what looked like regressions and attempted to root-cause and validate them. So far there seem to be a few major differences between old/new:

Mar 12 2021, 8:40 AM · Restricted Project
nagisa updated the diff for D88785: Support {S,U}REMEqFold before legalization.

Rebase onto newly added tests for illegal types

Mar 12 2021, 7:08 AM · Restricted Project
nagisa committed rGa2eca31da249: Test cases for rem-seteq fold with illegal types (authored by nagisa).
Test cases for rem-seteq fold with illegal types
Mar 12 2021, 6:28 AM
nagisa closed D98339: Test cases for rem-seteq fold with illegal types.
Mar 12 2021, 6:28 AM · Restricted Project
nagisa updated the diff for D98339: Test cases for rem-seteq fold with illegal types.

Rebase before land

Mar 12 2021, 4:30 AM · Restricted Project

Mar 11 2021

nagisa added inline comments to D98339: Test cases for rem-seteq fold with illegal types.
Mar 11 2021, 3:05 PM · Restricted Project
nagisa updated the diff for D98339: Test cases for rem-seteq fold with illegal types.

Adjust the RISCV tests as per the comments.

Mar 11 2021, 3:03 PM · Restricted Project
nagisa added inline comments to D98339: Test cases for rem-seteq fold with illegal types.
Mar 11 2021, 1:24 PM · Restricted Project
nagisa added inline comments to D98339: Test cases for rem-seteq fold with illegal types.
Mar 11 2021, 12:56 PM · Restricted Project
nagisa accepted D98410: [ConstantFold] Handle undef/poison when constant folding smul_fix/smul_fix_sat.

So undef include values that isn't possible for every combination of the other operands.

Mar 11 2021, 6:34 AM · Restricted Project
nagisa added a comment to D98410: [ConstantFold] Handle undef/poison when constant folding smul_fix/smul_fix_sat.

Wouldn't folding C * undef and undef * C into an undef, rather than 0, be valid/better? Is there a reason we cannot do that?

Mar 11 2021, 4:14 AM · Restricted Project

Mar 10 2021

nagisa added inline comments to D98299: [InstSimplify] Simplify smul.fix and smul.fix.sat.
Mar 10 2021, 3:44 PM · Restricted Project
nagisa updated the diff for D98339: Test cases for rem-seteq fold with illegal types.

Split up the test files into srem and urem variants

Mar 10 2021, 1:12 PM · Restricted Project
nagisa added a comment to D98339: Test cases for rem-seteq fold with illegal types.

It might be better to split the srem/urem files - its very minor, but it means that all the srem-seteq-* and urem-seteq-* tests group together in file lists

Mar 10 2021, 5:49 AM · Restricted Project
nagisa requested review of D98339: Test cases for rem-seteq fold with illegal types.
Mar 10 2021, 5:35 AM · Restricted Project

Mar 9 2021

nagisa added inline comments to D88785: Support {S,U}REMEqFold before legalization.
Mar 9 2021, 2:40 PM · Restricted Project
nagisa added a comment to D88785: Support {S,U}REMEqFold before legalization.

In cases where we do end up with a instruction count regression, the reason appears to be because lowering would fall back to BuildUDIV (and the MULHU/SHIFT strength reduction it implements). The BuildUDIV reduction is slightly shorter in instruction count, but it also depends on the target's ability to cheaply compute the higher half of the multiplication result.

Mar 9 2021, 11:30 AM · Restricted Project
nagisa updated the diff for D88785: Support {S,U}REMEqFold before legalization.

rebase

Mar 9 2021, 10:58 AM · Restricted Project

Mar 7 2021

nagisa added a comment to D98145: [FastISel] Don't trivially kill extractvalues (PR49467).

This seems like a reasonable fix, whatever value my review of fastisel code has.

Mar 7 2021, 1:39 PM · Restricted Project

Mar 6 2021

nagisa updated the summary of D98120: [InstCombine] Remove a provenance changing gep transformation.
Mar 6 2021, 1:54 PM · Restricted Project
nagisa updated the diff for D98120: [InstCombine] Remove a provenance changing gep transformation.

lint

Mar 6 2021, 1:52 PM · Restricted Project
nagisa retitled D98120: [InstCombine] Remove a provenance changing gep transformation from [InstCombine] Do not apply provenance losing transformations to GEP to [InstCombine] Remove a provenance changing gep transformation.
Mar 6 2021, 1:52 PM · Restricted Project
nagisa updated the diff for D98120: [InstCombine] Remove a provenance changing gep transformation.

Pivot to removing the provenance losing transformation

Mar 6 2021, 1:51 PM · Restricted Project
nagisa abandoned D98120: [InstCombine] Remove a provenance changing gep transformation.

The issue this was trying to solve was effectively resolved by rG2ad1f5eb1a47: [InstCombine] Don't canonicalize (gep i8* X, -(ptrtoint Y)) as (inttoptr…. I'm happy to abandon this, because the change to the other transformation is of questionable correctness anyway.

Mar 6 2021, 12:22 PM · Restricted Project
nagisa updated the diff for D98120: [InstCombine] Remove a provenance changing gep transformation.

restore a deleted comment

Mar 6 2021, 12:05 PM · Restricted Project
nagisa updated the diff for D98120: [InstCombine] Remove a provenance changing gep transformation.

Rebase

Mar 6 2021, 12:04 PM · Restricted Project
nagisa retitled D98120: [InstCombine] Remove a provenance changing gep transformation from [InstCombine] Do not apply provenance losing operations on GEP to [InstCombine] Do not apply provenance losing transformations to GEP.
Mar 6 2021, 11:30 AM · Restricted Project
nagisa added a comment to D98120: [InstCombine] Remove a provenance changing gep transformation.

I'm quite surprised this change didn't affect any pre-existing tests. It however, is sufficient to resolve one of a fairly easily hit mis-compiles in Rust.

Mar 6 2021, 11:16 AM · Restricted Project
nagisa requested review of D98120: [InstCombine] Remove a provenance changing gep transformation.
Mar 6 2021, 11:13 AM · Restricted Project

Feb 16 2021

nagisa added a comment to D96678: [llvm-dwp] Join dwo paths correctly when DWOPath is absolute.

Just so that it doesn't get lost between hidden comments: I've no commit bit, please commit this for me if this is good to go.

Feb 16 2021, 1:14 PM · Restricted Project
nagisa updated the diff for D96678: [llvm-dwp] Join dwo paths correctly when DWOPath is absolute.

revert the test to its previous form

Feb 16 2021, 1:13 PM · Restricted Project
nagisa updated the diff for D96678: [llvm-dwp] Join dwo paths correctly when DWOPath is absolute.

Check the formatted output from dwarfdump instead

Feb 16 2021, 12:06 PM · Restricted Project