Repository navigation
Check Race Condition for TGSM - #48
Conversation
|
Hi Xiang Li (@python3kgae), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
David Peixotto (dmpots)
left a comment
There was a problem hiding this comment.
I think your check is not sufficient to detect the race conditions. Checking if the block post-dominates the entry will only catch the cases where the store is not protected by an if. We could still have cases like
if (TID != 0) GI[0] = TID;
where the store is under a conditional, but many threads are writing to the shared memory.
I suppose this patch brings us closer to what the d3d compiler does, which is a good thing.
| CollectFixAddressAccess(GEP, fixAddrTGSMList); | ||
| } | ||
| } | ||
| if (isa<StoreInst>(U)) |
There was a problem hiding this comment.
else if (isa store) {
}
| static void | ||
| ValidateTGSMRaceCondition(std::vector<Instruction *> &fixAddrTGSMList, | ||
| ValidationContext &ValCtx) { | ||
| for (auto &F : ValCtx.DxilMod.GetModule()->functions()) { |
There was a problem hiding this comment.
This is computing post-dom for all functions even those that may not have any instructions in the list. It seems like it would be better to only compute dom tree for those functions that have instructions we need to check.
* [spirv] Add debug name for functions.
* [spirv] Add debug name for functions.
* [spirv] Add debug name for functions.
No description provided.