OSDN Git Service

[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)
commitd694a38690887172a285fbc1fdd3aee1ecec4d20
treeddda1f57dd684eb205fc54af9d20c66b73a69cbb
parent082879a7af32ea0f6a51691816fef262da901986
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321213 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86DomainReassignment.cpp