Page MenuHomePhabricator

samparker (Sam Parker)
part-timer

Projects

User does not belong to any projects.

User Details

User Since
May 11 2015, 7:59 AM (273 w, 5 d)

Recent Activity

Fri, Aug 7

samparker accepted D85454: [ARM] Allow vecreduce_add in tail predicated loops.

CodeGen looks a little better! LGTM

Fri, Aug 7, 1:14 AM · Restricted Project
samparker added inline comments to D83377: [ARM] Expand distributing increments to also handle existing pre/post inc instructions..
Fri, Aug 7, 1:08 AM · Restricted Project
samparker accepted D85452: [ARM] Add VADDV and VMLAV patterns for v16i16.

Nice. LGTM

Fri, Aug 7, 12:11 AM · Restricted Project

Thu, Aug 6

samparker added inline comments to D85138: [ARM][MVE] Enable tail predication for loops containing MVE gather/scatters.
Thu, Aug 6, 2:04 AM · Restricted Project
samparker added inline comments to D85410: [ARM][MVE] Allow loops containing strides != 1 to be tail predicated with gather/scatters enabled.
Thu, Aug 6, 1:58 AM · Restricted Project

Wed, Aug 5

samparker added a comment to D85283: [ARM][CostModel] Implement getCFInstrCost.

Registers are free unless you go over a limit.

Yes, good point.

Wed, Aug 5, 7:14 AM · Restricted Project
samparker added a comment to D85283: [ARM][CostModel] Implement getCFInstrCost.

Do you mean it's the cost of a phi that is altering things?

I believe so, since I figure there's plenty more of them than branches and returns that would affect the vectorizer. I think register usages should still represent some cost, because they are important physical resources, but I suspect that the vectorizer is taking the scalar cost and multiplying it by the vector factor, even though we're likely to still only use a single register.

Wed, Aug 5, 5:05 AM · Restricted Project
samparker committed rGf2675ab45fbb: [ARM][CostModel] Implement getCFInstrCost (authored by samparker).
[ARM][CostModel] Implement getCFInstrCost
Wed, Aug 5, 4:45 AM
samparker closed D85283: [ARM][CostModel] Implement getCFInstrCost.
Wed, Aug 5, 4:45 AM · Restricted Project
samparker added a comment to D85283: [ARM][CostModel] Implement getCFInstrCost.

If I build up the will, I'll take a look at the vectorizer and figure out how it's using these costs... I'm assuming it's the cost of the phi that causes the problems which, as a register, sounds counter-intuitive to be 'free'.

Wed, Aug 5, 4:32 AM · Restricted Project
samparker requested review of D85283: [ARM][CostModel] Implement getCFInstrCost.
Wed, Aug 5, 1:41 AM · Restricted Project

Tue, Aug 4

samparker added inline comments to D85138: [ARM][MVE] Enable tail predication for loops containing MVE gather/scatters.
Tue, Aug 4, 5:32 AM · Restricted Project

Mon, Aug 3

samparker accepted D79767: [ARM] Macro fuse t2LoopDec and t2LoopEnd.

My understanding is that it is a terminator that produces a value, and that does not work very well. If you need to spill the value, you would have not place to spill it.

This.
It also could also have the benefit of other instructions using the value in LR too. Maybe it makes reverting easier too, but I can't even remember now... Either way, I think trying to fuse the operations is quite a bit less invasive than trying to re-implement how we do these loops :) and if it can give us some little improvements, let's do it.

Mon, Aug 3, 3:48 AM · Restricted Project
samparker accepted D85110: [ARM] Convert VPSEL to VMOV in tail predicated loops.

Thanks for sorting this out.

Mon, Aug 3, 3:34 AM · Restricted Project
samparker updated the diff for D82091: [ARM][CostModel] Select instruction costs..

Yeah, makes sense, it's now using isThumb and I've cleaned up the predicate a bit too. The thumbv7 select costs tests have been updated accordingly too.

Mon, Aug 3, 3:04 AM · Restricted Project

Fri, Jul 17

samparker updated the diff for D82091: [ARM][CostModel] Select instruction costs..

Rebased and cleaned up the logic a bit.

Fri, Jul 17, 6:21 AM · Restricted Project
samparker updated the diff for D82438: [SimplifyCFG] Cost required selects.

Rebased after precommitting the test.

Fri, Jul 17, 6:17 AM · Restricted Project
samparker committed rGed48e6fa65dd: [NFC][ARM] Add SimplifyCFG test (authored by samparker).
[NFC][ARM] Add SimplifyCFG test
Fri, Jul 17, 6:08 AM
samparker accepted D83953: [HWLoops] Stop converting to a while loop when it would be unsafe to.

Nice and tidy fix, thanks!

Fri, Jul 17, 1:12 AM · Restricted Project

Thu, Jul 16

samparker added a comment to D83313: [MachineOutliner] Fix liveness computing..

@efriedma Was there much more to do on your original patch?

Thu, Jul 16, 2:01 AM · Restricted Project
samparker accepted D83907: [ARM] Don't mark vctp as having sideeffects.
Thu, Jul 16, 1:07 AM · Restricted Project

Tue, Jul 14

samparker committed rGa5405a2f0503: [NFC][ARM] Add SimplifyCFG tests (authored by samparker).
[NFC][ARM] Add SimplifyCFG tests
Tue, Jul 14, 3:11 AM
samparker updated the diff for D82438: [SimplifyCFG] Cost required selects.

Cheers, added a run for armv8a.

Tue, Jul 14, 1:56 AM · Restricted Project

Mon, Jul 13

samparker added a comment to D82438: [SimplifyCFG] Cost required selects.

ping

Mon, Jul 13, 12:24 AM · Restricted Project

Jul 8 2020

samparker added a comment to D83313: [MachineOutliner] Fix liveness computing..

I guess I just don't understand why the BX_RET wouldn't be marked with using the link register in the first place?

Jul 8 2020, 12:57 AM · Restricted Project

Jul 3 2020

samparker committed rG18850981c827: [NFC][SimplifyCFG] Move X86 tests into subdir (authored by samparker).
[NFC][SimplifyCFG] Move X86 tests into subdir
Jul 3 2020, 6:58 AM
samparker committed rG0724153bbeb5: [CostModel] Fix cast crash (authored by samparker).
[CostModel] Fix cast crash
Jul 3 2020, 12:30 AM
samparker closed D82453: [CostModel] Fix for cast crash.
Jul 3 2020, 12:29 AM · Restricted Project
samparker added a comment to D79164: [CostModel] getCFInstrCost.

I suspect that the getCFInstr maybe used in an odd way by the vectorizer for these changes to make such a difference. I'm suspect that the vectorizer is multiplying the cost of it, where 0 or 1 would make quite a difference, but where it just shouldn't be... hopefully the cost of a branch and phi doesn't change that much after vectorization / scalarization.

Jul 3 2020, 12:29 AM · Restricted Project

Jul 2 2020

samparker updated the diff for D82453: [CostModel] Fix for cast crash.

Thanks, fixed typo.

Jul 2 2020, 4:47 AM · Restricted Project
samparker updated the diff for D79483: [CostModel] Replace getUserCost with getInstructionCost..

Renamed getUserCost to getInstructionCost.

Jul 2 2020, 4:15 AM · Restricted Project
samparker added inline comments to D82953: [ARM][MVE] Only tail-fold integer add reductions.
Jul 2 2020, 2:38 AM · Restricted Project
samparker added inline comments to D82953: [ARM][MVE] Only tail-fold integer add reductions.
Jul 2 2020, 1:33 AM · Restricted Project
samparker added a comment to D79483: [CostModel] Replace getUserCost with getInstructionCost..

Is getUserCost a better name than getInstructionCost? I wonder if we're moving in the wrong direction.

I'd prefer to use getInstructionCost too.

Jul 2 2020, 12:29 AM · Restricted Project

Jul 1 2020

samparker added a comment to D82951: [ARM] Enable outliner at -Oz for M-class.

Thanks, I'm hoping that doing it just for M-class at the moment won't disrupt too many people if there are some bug to fix.

so maybe wait for it before committing it.

Sure!

Jul 1 2020, 8:05 AM · Restricted Project
samparker removed a reviewer for D53710: [FileCheck] Warn if a prefix is only used in LABEL checks: samparker.
Jul 1 2020, 5:22 AM
samparker added a comment to D66580: [ARM] Fold VPNOT into vpt blocks.

Can this be abandoned now?

Jul 1 2020, 5:22 AM · Restricted Project
samparker created D82951: [ARM] Enable outliner at -Oz for M-class.
Jul 1 2020, 5:22 AM · Restricted Project
samparker committed rGf0ecfb789bb2: [NFC][ARM] Add test. (authored by samparker).
[NFC][ARM] Add test.
Jul 1 2020, 1:36 AM
samparker committed rG3ee580d0176f: [ARM][LowOverheadLoops] Handle reductions (authored by samparker).
[ARM][LowOverheadLoops] Handle reductions
Jul 1 2020, 1:03 AM
samparker closed D75533: [ARM][LowOverheadLoops] Handle reductions.
Jul 1 2020, 1:02 AM · Restricted Project
samparker added a comment to D79483: [CostModel] Replace getUserCost with getInstructionCost..

ping

Jul 1 2020, 1:02 AM · Restricted Project
samparker added inline comments to D75533: [ARM][LowOverheadLoops] Handle reductions.
Jul 1 2020, 12:29 AM · Restricted Project

Jun 30 2020

samparker updated the diff for D82438: [SimplifyCFG] Cost required selects.
  • Reduced test case further
  • Now multiplying cost by TTI::Basic.
Jun 30 2020, 8:06 AM · Restricted Project
samparker added inline comments to D82438: [SimplifyCFG] Cost required selects.
Jun 30 2020, 8:06 AM · Restricted Project
samparker updated the diff for D82453: [CostModel] Fix for cast crash.

Updated according to @dfukalov suggestions.

Jun 30 2020, 8:06 AM · Restricted Project
samparker accepted D82773: [ARM][MVE] Tail-predication: clean-up removing unused code.

Not sure if we'll have to revisit this again if we're doing, say a reduction, and but also have a VCMP in the loop which writes to the VPR meaning it needs to be spilled and restored for the VPSEL... But we can cross that bridge if we come to it, cheers!

Jun 30 2020, 7:00 AM · Restricted Project
samparker committed rG2723a9dd6d33: [NFC][ARM] Tail predication reduction tests (authored by samparker).
[NFC][ARM] Tail predication reduction tests
Jun 30 2020, 5:56 AM
samparker updated the diff for D75533: [ARM][LowOverheadLoops] Handle reductions.
  • Rebased after adding tests in reductions.ll.
  • Re-added support for VADDi8 and VADDi16.
  • Added some extra comments and TODOs.
Jun 30 2020, 5:55 AM · Restricted Project

Jun 29 2020

samparker added a reviewer for D82438: [SimplifyCFG] Cost required selects: mkazantsev.
Jun 29 2020, 11:57 PM · Restricted Project
samparker accepted D81813: [ARM] MVE FP16 cost adjustments .
Jun 29 2020, 8:03 AM · Restricted Project
samparker accepted D82456: [ARM] Use BaseT::getMemoryOpCost for getMemoryOpCost.
Jun 29 2020, 7:31 AM · Restricted Project
samparker accepted D82457: [ARM] Add extra extend and trunc costs for cast instructions.
Jun 29 2020, 7:31 AM · Restricted Project
samparker updated the diff for D75533: [ARM][LowOverheadLoops] Handle reductions.

Rebased, which has made checking the VPSEL predicate a much more simple task.

Jun 29 2020, 5:54 AM · Restricted Project
samparker accepted D82755: [AArch64] Add getCFInstrCost, treat branches as free for throughput..

LGTM - and sorry for causing trouble.

Jun 29 2020, 4:49 AM · Restricted Project
samparker accepted D81397: [ARM] Better reductions.

Sorry, forgot about this. Please add a quick comment about the importance of 4 lanes for FP16 operations.

Jun 29 2020, 2:39 AM · Restricted Project
samparker accepted D82565: Fix invalid alignment in DAGCombiner::isLegalNarrowLdSt.

Thanks.

Jun 29 2020, 1:02 AM · Restricted Project
samparker accepted D82570: [ARM] Allow the fabs intrinsic to be tail predicated.

Cheers!

Jun 29 2020, 1:02 AM · Restricted Project

Jun 24 2020

samparker created D82453: [CostModel] Fix for cast crash.
Jun 24 2020, 4:49 AM · Restricted Project
samparker updated the diff for D79483: [CostModel] Replace getUserCost with getInstructionCost..

Updated with final patch now that all the other pieces are in.

Jun 24 2020, 3:44 AM · Restricted Project
samparker created D82438: [SimplifyCFG] Cost required selects.
Jun 24 2020, 1:02 AM · Restricted Project
samparker updated the diff for D82091: [ARM][CostModel] Select instruction costs..

Now only +1 for the IT block when we're querying for code size. But we now +1 for i1 values too to account for (some) cost of rematerialising those values.

Jun 24 2020, 12:29 AM · Restricted Project
samparker accepted D82383: [NFCI][CostModel] Add const to Value*..

Thanks!

Jun 24 2020, 12:29 AM · Restricted Project

Jun 23 2020

samparker added a comment to D81813: [ARM] MVE FP16 cost adjustments .

There's a lot of changes here... would it be worth committing them as separate patches: MVE, NEON and generic, or splitting of memory and cast?

Jun 23 2020, 1:00 AM · Restricted Project
samparker updated the diff for D82091: [ARM][CostModel] Select instruction costs..

Fixed typo and also predicated the code for an M-class subtarget.

Jun 23 2020, 12:28 AM · Restricted Project

Jun 18 2020

samparker added a comment to D82091: [ARM][CostModel] Select instruction costs..

Can you explain where the cost of 2 is coming form?

Well the IT isn't guaranteed to be free, it still takes up code size and, of course, it doesn't even exist for T1. But in my testing, a few months ago, it wasn't worth differentiating between M-profile versions - but I will double check. The cmsis numbers for the M33 look good, it doesn't effect many kernels but they're all decent improvements.

Jun 18 2020, 8:06 AM · Restricted Project
samparker created D82091: [ARM][CostModel] Select instruction costs..
Jun 18 2020, 6:30 AM · Restricted Project
samparker added a comment to D78937: [CostModel] Use isExtLoad in BasicTTI.

It is dangerous with how we have things set up at the moment for anything to look at the _type_ of the context instruction

But now we're checking that the queried type matches the type of context instruction too, so I'm not really what other conclusion to draw other than that the user asking: what is the cost of this instruction? Based on the currently limited API, what scenario do you think this would not generally be true?

Jun 18 2020, 5:24 AM · Restricted Project
samparker updated the diff for D78937: [CostModel] Use isExtLoad in BasicTTI.

I've tried to address @dmgreen comments about TLI being queried for an instruction which doesn't match the queried types, so this is now checked. But this wasn't good for X86, as a lot of SLP tests remained scalars, so I've added the TLI check into the X86 backend too. This also reverts the previous test change for PPC.

Jun 18 2020, 3:14 AM · Restricted Project

Jun 17 2020

samparker added a reverting change for rG3e39760f8eaa: Revert "Return "[InstCombine] Simplify compare of Phi with constant inputs…: rG5bf0858c0b4c: Return "[InstCombine] Simplify compare of Phi with constant inputs against a….
Jun 17 2020, 3:45 AM
samparker committed rG5bf0858c0b4c: Return "[InstCombine] Simplify compare of Phi with constant inputs against a… (authored by samparker).
Return "[InstCombine] Simplify compare of Phi with constant inputs against a…
Jun 17 2020, 3:45 AM
samparker added a comment to rG23291b9863c8: Return "[InstCombine] Simplify compare of Phi with constant inputs against a….

I've been struggling to create a reproducer, though I can see the changes happening. I think my real problem is that simplify-cfg creates selects of i1 after the phi insertions. I will revert my revert and look into solving the problem.

Jun 17 2020, 3:44 AM

Jun 16 2020

samparker committed rG7158f285a867: [CostModel] Unify getCFInstrCost (authored by samparker).
[CostModel] Unify getCFInstrCost
Jun 16 2020, 1:04 AM
samparker closed D79849: [NFCI][CostModel] Unify getCFInstrCost.
Jun 16 2020, 1:04 AM · Restricted Project

Jun 15 2020

samparker committed rG2596da31740f: [CostModel] getCFInstrCost in getUserCost. (authored by samparker).
[CostModel] getCFInstrCost in getUserCost.
Jun 15 2020, 1:36 AM
samparker closed D79164: [CostModel] getCFInstrCost.
Jun 15 2020, 1:36 AM · Restricted Project
samparker committed rG321ebfd1753a: [NFCI][CostModel] Unify FNeg cost (authored by samparker).
[NFCI][CostModel] Unify FNeg cost
Jun 15 2020, 1:04 AM
samparker closed D81635: [NFCI][CostModel] Unify FNeg cost.
Jun 15 2020, 1:03 AM · Restricted Project
samparker committed rG51541c068a83: [CostModel] Unify ExtractElement cost. (authored by samparker).
[CostModel] Unify ExtractElement cost.
Jun 15 2020, 12:31 AM
samparker added a comment to rG23291b9863c8: Return "[InstCombine] Simplify compare of Phi with constant inputs against a….

Thanks, done in 3e39760f8eaa.

Jun 15 2020, 12:31 AM
samparker closed D81643: [NFCI][CostModel] Unify ExtractElement cost..
Jun 15 2020, 12:31 AM · Restricted Project

Jun 14 2020

samparker committed rG3e39760f8eaa: Revert "Return "[InstCombine] Simplify compare of Phi with constant inputs… (authored by samparker).
Revert "Return "[InstCombine] Simplify compare of Phi with constant inputs…
Jun 14 2020, 11:58 PM
samparker added a reverting change for rG23291b9863c8: Return "[InstCombine] Simplify compare of Phi with constant inputs against a…: rG3e39760f8eaa: Revert "Return "[InstCombine] Simplify compare of Phi with constant inputs….
Jun 14 2020, 11:58 PM

Jun 11 2020

samparker added a comment to D80127: [ARM][MachineOutliner] Add LR RegSave mode..

Great stuff, I look forward to the other patches then :)

Jun 11 2020, 7:41 AM · Restricted Project
samparker committed rG3d5f7c853173: [IR] Remove assert from ShuffleVectorInst (authored by samparker).
[IR] Remove assert from ShuffleVectorInst
Jun 11 2020, 7:09 AM
samparker closed D81634: Remove assert from ShuffleVectorInst.
Jun 11 2020, 7:09 AM · Restricted Project
samparker added inline comments to D81634: Remove assert from ShuffleVectorInst.
Jun 11 2020, 7:08 AM · Restricted Project
samparker accepted D81637: [ARM] VCVTT fpround instruction selection.

LGTM

Jun 11 2020, 6:35 AM · Restricted Project
samparker updated the diff for D81634: Remove assert from ShuffleVectorInst.
  • Changed return value and added comment.
  • Added a few internal UndefValue where possible.
  • Moved test.
Jun 11 2020, 6:01 AM · Restricted Project
samparker accepted D80127: [ARM][MachineOutliner] Add LR RegSave mode..

I just run some numbers on the test suite and the results are already looking very good with 1.4% geomean reduction for T32, so many thanks! Is this the final patch of the set?

Jun 11 2020, 6:01 AM · Restricted Project
samparker added a comment to D81634: Remove assert from ShuffleVectorInst.

Was the failure only a fuzzer problem?

Not sure, but either it seems harsh to assert of technically legal IR.

Jun 11 2020, 5:26 AM · Restricted Project
samparker accepted D81639: [ARM] Remove hasSideEffects from FP converts.

Sounds good.

Jun 11 2020, 4:13 AM · Restricted Project
samparker created D81643: [NFCI][CostModel] Unify ExtractElement cost..
Jun 11 2020, 3:37 AM · Restricted Project
samparker created D81636: [PowerPC][CostModel] remove getUserCost.
Jun 11 2020, 2:26 AM · Restricted Project
samparker created D81635: [NFCI][CostModel] Unify FNeg cost.
Jun 11 2020, 2:26 AM · Restricted Project
samparker created D81634: Remove assert from ShuffleVectorInst.
Jun 11 2020, 1:14 AM · Restricted Project

Jun 10 2020

samparker updated the diff for D79164: [CostModel] getCFInstrCost.

Rebased and cleaned up the test changes.

Jun 10 2020, 5:25 AM · Restricted Project
samparker added inline comments to D81448: [CostModel] Unify Shuffle and InsertElement Costs.
Jun 10 2020, 4:52 AM · Restricted Project
samparker added inline comments to D41350: [DAGCombine] Improve ReduceLoadWidth for SRL.
Jun 10 2020, 2:08 AM · Restricted Project
samparker committed rGfa8bff0cd1ad: [CostModel] Unify getArithmeticInstrCost (authored by samparker).
[CostModel] Unify getArithmeticInstrCost
Jun 10 2020, 1:36 AM