This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Use undef for calls with unused arguments.
AbandonedPublic

Authored by jdoerfert on Oct 7 2019, 7:46 PM.

Details

Reviewers
uenoku
sstefan1
Summary

If an argument is unused, we can pass in undef instead of the original
value to remove the use of the original value completely.

Event Timeline

jdoerfert created this revision.Oct 7 2019, 7:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2019, 7:46 PM
jdoerfert updated this revision to Diff 224262.Oct 9 2019, 11:51 PM

Update tests, keep it in ValueSimplify for now

I have no problem with this going in as is. I have one question though. Why do we have to wait for ValueSimplify to finish? Wouldn't it be useful for AAIsDead to have isDeadArg(Arg) and then ValueSimplify could use that to decide whether to simplify or not?

I have no problem with this going in as is. I have one question though. Why do we have to wait for ValueSimplify to finish? Wouldn't it be useful for AAIsDead to have isDeadArg(Arg) and then ValueSimplify could use that to decide whether to simplify or not?

You are right. I'll replace it with a AAIsDead solution instead shortly.

jdoerfert abandoned this revision.Oct 13 2019, 1:13 AM

Dropped in favor of D68925.