This is an archive of the discontinued LLVM Phabricator instance.

CFL AA Bugfix -- Mark no-args function return values as unknown values
ClosedPublic

Authored by george.burgess.iv on Aug 27 2015, 10:22 AM.

Details

Reviewers
hfinkel
Summary

Fix an issue where we wouldn't properly note that the return value of a no-args function could alias something an escaped variable.

(So, for the given test case, we wouldn't properly detect that %Escapes and %Retrieved may alias)

Thanks to Chandler, Richard, and Nick for pinging me about this! :)

Diff Detail

Event Timeline

george.burgess.iv retitled this revision from to CFL AA Bugfix -- Mark no-args function return values as unknown values.
george.burgess.iv updated this object.
george.burgess.iv added a reviewer: hfinkel.
george.burgess.iv added a subscriber: llvm-commits.
hfinkel added inline comments.Aug 27 2015, 12:56 PM
lib/Analysis/CFLAliasAnalysis.cpp
418

Is this necessary if the function returns void?

george.burgess.iv marked an inline comment as done.

Added type != void && len(args) == 0 type check

lib/Analysis/CFLAliasAnalysis.cpp
418

Good catch!

hfinkel accepted this revision.Aug 27 2015, 4:23 PM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 27 2015, 4:24 PM

r246240 -- thanks!