Skip to content

Conversation

@jmmartinez
Copy link
Contributor

Currently a WIP, I've only updated a single test to depict the change (there are ~50 tests that need update).

Differential Revision: https://reviews.llvm.org/D156679

@jmmartinez jmmartinez requested review from arsenm and jayfoad September 8, 2023 09:52
@jmmartinez jmmartinez self-assigned this Sep 8, 2023
@jmmartinez jmmartinez requested a review from a team as a code owner September 8, 2023 09:52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an unrelated clean up? Please commit it separately.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why your patch would ever cause an extra waitcnt like this.

Copy link
Contributor

@jayfoad jayfoad Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is my understanding correct? Previously we used TrackedWaitcntSet to distinguish pre-existing waitcnts from waitcnts inserted by this pass. Now we don't need that, all we need is to know the difference between hard and soft waitcnts?

Comment on lines +1288 to +1470
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these needed? The definition of S_WAITCNT above does not have them.

@jmmartinez jmmartinez force-pushed the D156679 branch 2 times, most recently from c70532e to 9eb43d6 Compare September 20, 2023 09:04
@jayfoad
Copy link
Contributor

jayfoad commented Sep 20, 2023

1st, 2nd and 4th commits seem like obvious cleanups. LGTM, please commit them separately.

@jmmartinez jmmartinez changed the title [WIP][AMDGPU][SIInsertWaitcnts] Do not add s_waitcnt when the counters are known to be 0 already [AMDGPU][SIInsertWaitcnts] Do not add s_waitcnt when the counters are known to be 0 already Oct 30, 2023
@kzhuravl
Copy link
Contributor

kzhuravl commented Nov 2, 2023

Hi Juan, the CQE cycle came back green, so this PR can be merged. Thanks!

"amdgcn-skip-cache-invalidations", cl::init(false), cl::Hidden,
cl::desc("Use this to skip inserting cache invalidating instructions."));

static cl::opt<bool> AmdgcnDisableSoftWaitcnt(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this I suggest you change memory-legalizer-atomic-fence.ll to use -stop-after=si-memory-legalizer (and generate the checks in it with utils/update_mir_test_checks.py).

@jmmartinez
Copy link
Contributor Author

@kzhuravl that's awesome! Thanks for the update.

However, I am not able to rebase and address Jay's review since I don't have a PC available (for the next 6 months).

If somebody else could move the PR forward it would be great. Otherwise I'll finish it when I'm back.

@kzhuravl
Copy link
Contributor

kzhuravl commented Nov 7, 2023

Hi @jwanggit86, can you please take over this PR? This needs to be rebased, and review comments addressed, thanks!

@jwanggit86
Copy link
Contributor

@kzhuravl Sure. I'll take over.

@kzhuravl kzhuravl assigned Pierre-vh and unassigned jmmartinez and jwanggit86 Nov 18, 2023
@kzhuravl
Copy link
Contributor

@Pierre-vh got some cycles to look into this now, so re-assigning to him.

@Pierre-vh
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment