This is an archive of the discontinued LLVM Phabricator instance.

Fix a crash in the assumption cache when inlining indirect function calls
ClosedPublic

Authored by dotdash on Feb 10 2015, 5:19 AM.

Details

Summary

Instances of the AssumptionCache are per function, so we can't re-use
the same AssumptionCache instance when recursing in the CallAnalyzer to
analyze a different function. Instead we have to pass the
AssumptionCacheTracker to the CallAnalyzer so it can get the right
AssumptionCache on demand.

Diff Detail

Repository
rL LLVM

Event Timeline

dotdash updated this revision to Diff 19668.Feb 10 2015, 5:19 AM
dotdash retitled this revision from to Fix a crash in the assumption cache when inlining indirect function calls.
dotdash updated this object.
dotdash edited the test plan for this revision. (Show Details)
dotdash added a reviewer: hfinkel.
dotdash added subscribers: hans, Unknown Object (MLST).

Not sure if this still qualifies for 3.6 (I guess it's not strictly a regression since llvm.assume is new?), but it'd be nice if it would as we hit this bug with rustc when using llvm.assume.

hfinkel edited edge metadata.

Seems right to me. Chandler, I think you touched this last, thoughts?

hans added a subscriber: hansw.Feb 11 2015, 3:03 PM
chandlerc accepted this revision.Feb 12 2015, 1:03 PM
chandlerc edited edge metadata.

Yes, this is obviously correct. Thanks for the fix!

Also, yes, this should go into 3.6.

This revision is now accepted and ready to land.Feb 12 2015, 1:03 PM
This revision was automatically updated to reflect the committed changes.