This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix chains for memory ops dependent on argument loads
ClosedPublic

Authored by arsenm on Jun 25 2015, 12:18 PM.

Details

Reviewers
tstellarAMD
Summary

Most loads and stores are derived from pointers derived from
a kernel argument load inserted during argument lowering.
This was just using the EntryToken chain for the argument loads,
and any users of these loads were also on the EntryToken chain.

Return the chain of the lowered argument load so that dependent loads
end up on the correct chain.

No test since I'm not aware of any case where this actually
broke.

This does break a handful of tests due to stores no longer being merged, because
GatherAllAliases gives up on analyzing cases where the pointer is loaded. We will probably
need to handle this specific case since we know the loaded pointer is from constant memory.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 28491.Jun 25 2015, 12:18 PM
arsenm retitled this revision from to AMDGPU: Fix chains for memory ops dependent on argument loads .
arsenm updated this object.
arsenm edited the test plan for this revision. (Show Details)
arsenm added a subscriber: Unknown Object (MLST).
This revision is now accepted and ready to land.Jul 10 2015, 2:15 PM
arsenm closed this revision.Jul 10 2015, 3:52 PM

r241960 with a small piece split into r241954.

I removed the parts where the CopyFromReg chains were added, since it's apparently OK to have those be on the same chain as the users of the copied value