Page MenuHomePhabricator
Feed Advanced Search

Yesterday

critson updated the diff for D88535: CodeGen: Fix livein calculation in MachineBasicBlock splitAt.

Revise the fix to address the underlying problem in the original code.

Wed, Sep 30, 6:44 PM · Restricted Project
critson added a comment to D88535: CodeGen: Fix livein calculation in MachineBasicBlock splitAt.

Fix in what way? How was it broken before?

Wed, Sep 30, 8:53 AM · Restricted Project
critson added a comment to D88537: [AMDGPU] SIInsertSkips: Tidy block splitting to use splitAt.
Wed, Sep 30, 12:50 AM · Restricted Project
critson requested review of D88537: [AMDGPU] SIInsertSkips: Tidy block splitting to use splitAt.
Wed, Sep 30, 12:49 AM · Restricted Project
critson requested review of D88535: CodeGen: Fix livein calculation in MachineBasicBlock splitAt.
Wed, Sep 30, 12:44 AM · Restricted Project

Thu, Sep 24

critson accepted D87543: AMDGPU: Always split si_end_cf blocks.

SI_KILL_CLEANUP pseudos are inserted to mark points where control flow merges and hence the exec mask can be evaluated for early termination of a pixel shader.
These early terminations are added by SIInsertSkips which contains the logic for determining if it is safe to early terminate at a given point.

Thu, Sep 24, 2:08 AM · Restricted Project

Wed, Sep 23

critson committed rG1e0500d4f7f1: [AMDGPU] Consider all SGPR uses as unique in constant bus verify (authored by critson).
[AMDGPU] Consider all SGPR uses as unique in constant bus verify
Wed, Sep 23, 6:54 PM
critson closed D87748: [AMDGPU] Consider all SGPR uses as unique in constant bus verify.
Wed, Sep 23, 6:53 PM · Restricted Project

Tue, Sep 22

critson added inline comments to D87748: [AMDGPU] Consider all SGPR uses as unique in constant bus verify.
Tue, Sep 22, 6:26 PM · Restricted Project
critson updated the diff for D87748: [AMDGPU] Consider all SGPR uses as unique in constant bus verify.

Improve test.

Tue, Sep 22, 5:47 AM · Restricted Project
critson added a comment to D88081: [AMDGPU] Move WQM Pass after MI Scheduler.

This passes VulkanCTS as much as stock LLVM does for graphics.
I still need to do some porting work so I can test performance impact.

Tue, Sep 22, 3:06 AM · Restricted Project
critson requested review of D88081: [AMDGPU] Move WQM Pass after MI Scheduler.
Tue, Sep 22, 3:04 AM · Restricted Project

Thu, Sep 17

critson added a comment to D87748: [AMDGPU] Consider all SGPR uses as unique in constant bus verify.

Needs test

Thu, Sep 17, 4:23 AM · Restricted Project
critson updated the diff for D87748: [AMDGPU] Consider all SGPR uses as unique in constant bus verify.

Add basic test.

Thu, Sep 17, 4:22 AM · Restricted Project

Wed, Sep 16

critson added a comment to D87585: [AMDGPU] Dynamically clear renamable to avoid constant bus errors.

I will review shader changes; however, I do not think Machine Copy Propagation propagates constants.

True. But this can also help with stalls:

v_mov v0, s0
v_mov v1, v0

->

v_mov v0, s0
v_mov v1, s0
Wed, Sep 16, 8:55 PM · Restricted Project
critson added a comment to D87585: [AMDGPU] Dynamically clear renamable to avoid constant bus errors.

Are there any other significant changes? I'm thinking of things like this that would help with dependency stalls on gfx10:

v_mov v0, 0
v_mov v1, v0

->

v_mov v0, 0
v_mov v1, 0

I started this change as I am looking at moving WQM after MI scheduling, and this potentially leaves some additional copies around.
But I could addressed these with very limited special case copy elimination in the WQM pass itself.

Does anyone have an opinion on whether I should continue pushing this?

Honestly it does not sound like a good justification for a new pass.

Agreed, but maybe it's worth revisiting after the WQM pass has been moved.

Wed, Sep 16, 1:34 AM · Restricted Project
critson abandoned D87585: [AMDGPU] Dynamically clear renamable to avoid constant bus errors.

Follow up verifier fix for issue noted by Stas in D87748.

Wed, Sep 16, 1:21 AM · Restricted Project
critson requested review of D87748: [AMDGPU] Consider all SGPR uses as unique in constant bus verify.
Wed, Sep 16, 1:19 AM · Restricted Project

Tue, Sep 15

critson added a comment to D87585: [AMDGPU] Dynamically clear renamable to avoid constant bus errors.

The numbers for this change are not vastly compelling.
I looked at 11598 game shaders and compiled these for GFX7, GFX9 and GFX10.
On GFX7, 1 shader lost 1 instruction.
On GFX9, 1 shader lost 1 instruction, but 64 shaders gained 1 instruction.
On GFX10, 1 shader lost 1 instruction, but 2 shaders gained 1 instruction.

Tue, Sep 15, 8:01 AM · Restricted Project

Mon, Sep 14

critson added a comment to D87585: [AMDGPU] Dynamically clear renamable to avoid constant bus errors.

Where/why is renameable set in the first place? Can we just avoid setting it to begin with?

Looks like it was originally done to avoid passes like MachineCopyPropagation from introducing constant bus violations: rG1d531013876c02b18df678a5f67d6a7d94e392b9

Mon, Sep 14, 7:59 AM · Restricted Project

Sun, Sep 13

critson added inline comments to D87542: AMDGPU: Don't sometimes allow instructions before lowered si_end_cf.
Sun, Sep 13, 12:36 AM · Restricted Project
critson requested review of D87585: [AMDGPU] Dynamically clear renamable to avoid constant bus errors.
Sun, Sep 13, 12:27 AM · Restricted Project

Aug 21 2020

critson accepted D86253: [AMDGPU] Avoid sorting stalls in regbank-reassign.

LGTM

Aug 21 2020, 12:12 AM · Restricted Project

Aug 19 2020

critson added inline comments to D86253: [AMDGPU] Avoid sorting stalls in regbank-reassign.
Aug 19 2020, 8:52 PM · Restricted Project

Aug 13 2020

critson committed rGd538c5837a2c: [AMDGPU] Fix missed SI_RETURN_TO_EPILOG in pre-emit peephole (authored by critson).
[AMDGPU] Fix missed SI_RETURN_TO_EPILOG in pre-emit peephole
Aug 13 2020, 5:53 AM
critson closed D85872: [AMDGPU] Fix missed SI_RETURN_TO_EPILOG in pre-emit peephole.
Aug 13 2020, 5:53 AM · Restricted Project

Aug 12 2020

critson updated the diff for D85872: [AMDGPU] Fix missed SI_RETURN_TO_EPILOG in pre-emit peephole.
  • Rebase on to pre-committed test.
Aug 12 2020, 9:12 PM · Restricted Project
critson committed rG2781f3003bab: [AMDGPU] Pre-commit test for D85872 (authored by critson).
[AMDGPU] Pre-commit test for D85872
Aug 12 2020, 9:08 PM
critson requested review of D85872: [AMDGPU] Fix missed SI_RETURN_TO_EPILOG in pre-emit peephole.
Aug 12 2020, 8:54 PM · Restricted Project
critson updated the diff for D67767: [AMDGPU] Add llvm.amdgcn.wqm.demote intrinsic.
  • Rebase and update for changes in other code.
  • Rename intrinsic wqm.helper to wqm.live (it provides live lanes).
  • Add initial GlobalISel support.
  • Add GlobalISel tests (some ported by @mbrkusanin).
Aug 12 2020, 7:33 AM · Restricted Project

Aug 8 2020

critson added a comment to D85530: [AMDGPU] Don't cluster stores.

I tried this change with game traces on GFX10.

Aug 8 2020, 6:25 PM · Restricted Project

Aug 5 2020

critson added a comment to D82643: [AMDGPU] Remove -amdgpu-verify-regbanks-reassign.

I like the alternative solution #1.

Aug 5 2020, 3:21 AM · Restricted Project

Aug 3 2020

critson committed rG57899934eab1: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks (authored by critson).
[AMDGPU] Make GCNRegBankReassign assign based on subreg banks
Aug 3 2020, 8:55 PM
critson closed D84910: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks.
Aug 3 2020, 8:55 PM · Restricted Project

Jul 31 2020

critson added inline comments to D84910: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks.
Jul 31 2020, 8:58 PM · Restricted Project
critson updated the diff for D84910: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks.
  • Exclude sub-registers that cover all banks from stall calculations.
Jul 31 2020, 8:45 PM · Restricted Project
critson added a comment to D84910: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks.

LGTM

Jul 31 2020, 9:02 AM · Restricted Project
critson updated the diff for D84910: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks.
  • Fix further edge cases involved with sub-registers.
  • Add additional tests to cover bugs fixed.
Jul 31 2020, 9:02 AM · Restricted Project

Jul 30 2020

critson updated the diff for D84910: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks.

Correctly handle determining banks for wide sub-registers.

Jul 30 2020, 5:41 AM · Restricted Project

Jul 29 2020

critson requested review of D84910: [AMDGPU] Make GCNRegBankReassign assign based on subreg banks.
Jul 29 2020, 9:54 PM · Restricted Project

Jul 16 2020

critson committed rG3a1866574834: [AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation (authored by critson).
[AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation
Jul 16 2020, 7:49 PM
critson closed D83850: [AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation.
Jul 16 2020, 7:49 PM · Restricted Project
critson added inline comments to D83850: [AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation.
Jul 16 2020, 6:54 AM · Restricted Project
critson updated the diff for D83850: [AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation.

Add missing test diffs.

Jul 16 2020, 6:37 AM · Restricted Project

Jul 15 2020

critson committed rG5bf2a9dd40db: [AMDGPU] Update VMEM scalar write hazard mitigation sequence (authored by critson).
[AMDGPU] Update VMEM scalar write hazard mitigation sequence
Jul 15 2020, 7:39 PM
critson closed D83872: [AMDGPU] Update VMEM scalar write hazard mitigation sequence.
Jul 15 2020, 7:39 PM · Restricted Project
Herald added a project to D83872: [AMDGPU] Update VMEM scalar write hazard mitigation sequence: Restricted Project.
Jul 15 2020, 7:10 AM · Restricted Project

Jul 14 2020

Herald added a project to D83850: [AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation: Restricted Project.
Jul 14 2020, 10:49 PM · Restricted Project
critson committed rG674226126da6: [AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns (authored by critson).
[AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns
Jul 14 2020, 7:03 PM
critson closed D83641: [AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns.
Jul 14 2020, 7:03 PM · Restricted Project
critson updated the diff for D83641: [AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns.

Change assertion to llvm_unreachable.

Jul 14 2020, 5:14 AM · Restricted Project
critson added inline comments to D83641: [AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns.
Jul 14 2020, 5:14 AM · Restricted Project
critson updated the diff for D83641: [AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns.

Rebase on top of test pre-commit.
Add assertions relating to MaskValue.

Jul 14 2020, 12:42 AM · Restricted Project
critson committed rGe5f022cad99a: [AMDGPU][NFC] Tidy sgpr-control-flow.ll whitespace (authored by critson).
[AMDGPU][NFC] Tidy sgpr-control-flow.ll whitespace
Jul 14 2020, 12:04 AM

Jul 13 2020

critson committed rG74c14202d90b: [AMDGPU] Propagate dead flag during pre-RA exec mask optimizations (authored by critson).
[AMDGPU] Propagate dead flag during pre-RA exec mask optimizations
Jul 13 2020, 8:54 PM
critson closed D83637: [AMDGPU] Propagate dead flag during pre-RA exec mask optimizations.
Jul 13 2020, 8:54 PM · Restricted Project
critson added inline comments to D83641: [AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns.
Jul 13 2020, 8:21 PM · Restricted Project
critson updated the diff for D83637: [AMDGPU] Propagate dead flag during pre-RA exec mask optimizations.

Hard code SCC operand number.

Jul 13 2020, 9:17 AM · Restricted Project

Jul 12 2020

Herald added a project to D83641: [AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns: Restricted Project.
Jul 12 2020, 1:30 AM · Restricted Project

Jul 11 2020

Herald added a project to D83637: [AMDGPU] Propagate dead flag during pre-RA exec mask optimizations: Restricted Project.
Jul 11 2020, 8:41 PM · Restricted Project

Jul 6 2020

critson committed rG560292fa990a: [AMDGPU] Update isFMAFasterThanFMulAndFAdd assumptions (authored by critson).
[AMDGPU] Update isFMAFasterThanFMulAndFAdd assumptions
Jul 6 2020, 11:42 PM
critson closed D83207: [AMDGPU] Update isFMAFasterThanFMulAndFAdd assumptions.
Jul 6 2020, 11:42 PM · Restricted Project
critson added a comment to D83207: [AMDGPU] Update isFMAFasterThanFMulAndFAdd assumptions.

Technically this is NFC with current hardware configurations, but I would like to be able to decouple this from MAD/MAC.

Jul 6 2020, 3:37 AM · Restricted Project
Herald added a project to D83207: [AMDGPU] Update isFMAFasterThanFMulAndFAdd assumptions: Restricted Project.
Jul 6 2020, 3:36 AM · Restricted Project

Jul 2 2020

critson committed rG42ca2070d7de: [AMDGPU] Insert PS early exit at end of control flow (authored by critson).
[AMDGPU] Insert PS early exit at end of control flow
Jul 2 2020, 10:07 PM
critson committed rG7ec6927badec: Revert "[AMDGPU] Insert PS early exit at end of control flow" (authored by critson).
Revert "[AMDGPU] Insert PS early exit at end of control flow"
Jul 2 2020, 9:35 PM
critson added a reverting change for rG2bfcacf0ad36: [AMDGPU] Insert PS early exit at end of control flow: rG7ec6927badec: Revert "[AMDGPU] Insert PS early exit at end of control flow".
Jul 2 2020, 9:35 PM
critson committed rG2bfcacf0ad36: [AMDGPU] Insert PS early exit at end of control flow (authored by critson).
[AMDGPU] Insert PS early exit at end of control flow
Jul 2 2020, 8:29 PM
critson closed D82737: [AMDGPU] Insert PS early exit at end of control flow.
Jul 2 2020, 8:29 PM · Restricted Project
critson committed rGa3daa3f75a01: [AMDGPU] Unify early PS termination blocks (authored by critson).
[AMDGPU] Unify early PS termination blocks
Jul 2 2020, 6:54 PM
critson closed D82641: [AMDGPU] Unify early PS termination blocks.
Jul 2 2020, 6:54 PM · Restricted Project

Jun 30 2020

critson updated the diff for D82737: [AMDGPU] Insert PS early exit at end of control flow.
  • Rebase
  • Add comment
Jun 30 2020, 2:40 AM · Restricted Project
critson updated the diff for D82641: [AMDGPU] Unify early PS termination blocks.
  • Rebase
  • Rename generateEndPgm
  • Edit comment for clarity
  • Add explicit test to skip-if-dead.ll
Jun 30 2020, 2:08 AM · Restricted Project
critson added inline comments to D82641: [AMDGPU] Unify early PS termination blocks.
Jun 30 2020, 2:08 AM · Restricted Project

Jun 29 2020

critson added a comment to D82737: [AMDGPU] Insert PS early exit at end of control flow.

Can you explain the reasoning behind how you decide where to insert SI_KILL_CLEANUP?

Jun 29 2020, 10:00 PM · Restricted Project
critson added a comment to D82737: [AMDGPU] Insert PS early exit at end of control flow.

I appreciate there might be some resistance to this way of doing things, i.e. relying on control flow lowering to insert cleanup markers. As an alternative I can rewrite this to look directly at the exec mask processing during the insert skips pass.

Jun 29 2020, 12:29 AM · Restricted Project

Jun 28 2020

critson abandoned D81821: [AMDGPU] Make overlaps with ScratchRSrcReg fatal errors.
Jun 28 2020, 11:57 PM · Restricted Project
critson created D82737: [AMDGPU] Insert PS early exit at end of control flow.
Jun 28 2020, 11:57 PM · Restricted Project
critson updated the diff for D82641: [AMDGPU] Unify early PS termination blocks.

Rework this on top of D77544.
Make insertion of skips near the beginning of blocks work correctly by splitting blocks.

Jun 28 2020, 10:28 PM · Restricted Project
critson updated the summary of D82641: [AMDGPU] Unify early PS termination blocks.
Jun 28 2020, 10:28 PM · Restricted Project

Jun 27 2020

critson added a comment to D82641: [AMDGPU] Unify early PS termination blocks.

We are trying to have the kill intrinsic handling early during the instruction selection.
I can try to incorporate it all entirely there including the unify block code (if can't find a better place now to have it).
I will also update D77544 if this patch goes upstream.

Jun 27 2020, 3:56 AM · Restricted Project

Jun 26 2020

critson added a comment to D82641: [AMDGPU] Unify early PS termination blocks.

This is a stepping stop to adding early termination in more places because it means termination can be added anywhere in a basic block (without splitting basic blocks).

Jun 26 2020, 4:18 AM · Restricted Project
critson created D82641: [AMDGPU] Unify early PS termination blocks.
Jun 26 2020, 4:18 AM · Restricted Project

Jun 23 2020

critson added a comment to D67767: [AMDGPU] Add llvm.amdgcn.wqm.demote intrinsic.

Ping - I would like to get this moving again.

Does it make sense to wait until the WQM pass is moved?

Jun 23 2020, 6:21 AM · Restricted Project

Jun 19 2020

critson committed rG4a7de36afc78: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills (authored by critson).
[AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills
Jun 19 2020, 8:36 PM
critson closed D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.
Jun 19 2020, 8:35 PM · Restricted Project
critson updated the diff for D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.

Address comments on foldMemoryOperandImpl.

Jun 19 2020, 6:27 AM · Restricted Project
critson added a comment to D67767: [AMDGPU] Add llvm.amdgcn.wqm.demote intrinsic.

Ping - I would like to get this moving again.

Jun 19 2020, 3:11 AM · Restricted Project
critson updated the diff for D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.
  • Add test for foldMemoryOperandImpl
  • Rework code in foldMemoryOperandImpl to remove references to specific physical registers
Jun 19 2020, 2:39 AM · Restricted Project

Jun 18 2020

critson committed rG8f3b2c8aa317: AMDGPU/GlobalISel: Remove selection of MAD/MAC when not available (authored by critson).
AMDGPU/GlobalISel: Remove selection of MAD/MAC when not available
Jun 18 2020, 6:36 PM
critson closed D81990: AMDGPU/GlobalISel: Remove selection of MAD/MAC when not available.
Jun 18 2020, 6:36 PM · Restricted Project

Jun 17 2020

critson updated the diff for D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.

This is the simplified version which blocks spill/reload of exec from occuring.

Jun 17 2020, 10:07 PM · Restricted Project
critson updated the diff for D81990: AMDGPU/GlobalISel: Remove selection of MAD/MAC when not available.

Simplify test changes.

Jun 17 2020, 6:54 PM · Restricted Project
critson updated the diff for D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.

Fix error in test update.

Jun 17 2020, 5:21 AM · Restricted Project
critson added a comment to D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.

Can you try to constrain the class of the virtual register earlier to avoid this from happening instead? I think that should avoid this coming up (e.g. we do MRI.constrainRegClass(SrcReg, &AMDGPU::SReg_32_XM0RegClass) already to try avoiding m0 spills, plus in foldMemoryOperandImpl to avoid another problem when spills are optimized out)

Jun 17 2020, 4:49 AM · Restricted Project
critson updated the diff for D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.

Update spill-special-sgpr.mir for auto updated version.

Jun 17 2020, 4:49 AM · Restricted Project
critson committed rGac8a2f132b01: [AMDGPU] Fix failure in VCC spilling (authored by critson).
[AMDGPU] Fix failure in VCC spilling
Jun 17 2020, 4:17 AM
critson closed D81224: [AMDGPU] Fix failure in VCC spilling.
Jun 17 2020, 4:17 AM · Restricted Project

Jun 16 2020

critson created D81990: AMDGPU/GlobalISel: Remove selection of MAD/MAC when not available.
Jun 16 2020, 10:23 PM · Restricted Project
critson created D81914: [AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills.
Jun 16 2020, 1:36 AM · Restricted Project