[X86] Refactor DomainReassignment pass to make the Closure class not stores reference...
authorCraig Topper <craig.topper@intel.com>
Wed, 20 Dec 2017 19:36:43 +0000 (19:36 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 20 Dec 2017 19:36:43 +0000 (19:36 +0000)
commit8ec5632521e7e60b825440a6fad5d077316e0ba7
tree59acf1fbd750c99934e1e711f428703c19719363
parent303327d58bc1d115cfa81d632dfa443b20bec366
[X86] Refactor DomainReassignment pass to make the Closure class not stores references to the main data structures of the pass itself

Multiple Closure objects can be created and stored for a single function. It's not a good idea to devote so many fields of it to storing pointers and references to global data structures of the pass. The closure class should only store the things needed to represent the closure itself.

This patch refactors many of the methods of Closure to belong to the pass object and to pass around a reference to the current Closure. The Closure class gains a few simple methods to add instructions and edges, and to return iterators to edges and instructions

Differential Revision: https://reviews.llvm.org/D41327

llvm-svn: 321213
llvm/lib/Target/X86/X86DomainReassignment.cpp