This is an archive of the discontinued LLVM Phabricator instance.

[Refactor] Eliminate the global variable "InsnToMemAcc".
ClosedPublic

Authored by etherzhhb on Feb 12 2016, 11:11 PM.

Details

Summary

Eliminate the global variable "InsnToMemAcc" to make Scop/ScopInfo become more protable, such that we can safely use them in a CallGraphSCC pass.

Diff Detail

Repository
rL LLVM

Event Timeline

etherzhhb updated this revision to Diff 47901.Feb 12 2016, 11:11 PM
etherzhhb retitled this revision from to [Refactor] Eliminate the global variable "InsnToMemAcc"..
etherzhhb updated this object.
etherzhhb set the repository for this revision to rL LLVM.
etherzhhb added a subscriber: Restricted Project.
jdoerfert edited edge metadata.Feb 13 2016, 6:37 AM

Comments are inlined.

include/polly/ScopDetection.h
225

Why mutable? If you try to modify it but the "const" state of almost all methods in the ScopDetection is blocking you, put the InstToMemAcc into the DetectionContext, that is what we always did and what makes it clear it belongs to this detection context.

523

In methods like "getBoxedLoops" you can easily see how you can access the "correct" InstToMemAcc once it is moved to the DetectionContext.

lib/Analysis/ScopDetection.cpp
505

Thank you sooo much! Finally, somebody removed that thing...

include/polly/ScopDetection.h
225

Ok

523

ok

etherzhhb updated this revision to Diff 47912.Feb 13 2016, 8:02 AM
etherzhhb edited edge metadata.
etherzhhb marked 2 inline comments as done.
jdoerfert accepted this revision.Feb 14 2016, 2:47 PM
jdoerfert edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Feb 14 2016, 2:47 PM
This revision was automatically updated to reflect the committed changes.