This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] fix a crash bug in NVPTXFavorNonGenericAddrSpaces
ClosedPublic

Authored by jingyue on Jun 9 2015, 1:37 PM.

Details

Summary

We used to assume V->RAUW only modifies the operand list of V's user.
However, if V and V's user are Constants, RAUW may replace and invalidate V's
user entirely.

This patch fixes the above issue by letting the caller replace the
operand instead of calling RAUW on Constants.

Diff Detail

Event Timeline

jingyue updated this revision to Diff 27397.Jun 9 2015, 1:37 PM
jingyue retitled this revision from to [NVPTX] fix a crash bug in NVPTXFavorNonGenericAddrSpaces.
jingyue updated this object.
jingyue edited the test plan for this revision. (Show Details)
jingyue added reviewers: broune, jholewinski.
jingyue added a subscriber: Unknown Object (MLST).
jholewinski accepted this revision.Jun 9 2015, 1:48 PM
jholewinski edited edge metadata.

Looks reasonable to me. Thanks!

This revision is now accepted and ready to land.Jun 9 2015, 1:48 PM
broune accepted this revision.Jun 9 2015, 2:47 PM
broune edited edge metadata.

Looks good to me.

jingyue updated this revision to Diff 27403.Jun 9 2015, 2:52 PM
jingyue edited edge metadata.

a minor bug

jingyue closed this revision.Jun 9 2015, 2:54 PM