[X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges

The variable X86DomainReassignment::EnclosedEdges is used to store registers that have been enclosed in some closure, so those registers will be ignored when create new closures. But there is no registers has ever been put into this set, so a single register can be enclosed in multiple closures, it significantly increase compile time.

This patch adds a register into EnclosedEdges when it is enclosed into a closure.

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

llvm-svn: 355430
This commit is contained in:
Guozhi Wei 2019-03-05 18:54:34 +00:00
parent ca26808da9
commit f124e75656
1 changed files with 1 additions and 0 deletions

View File

@ -556,6 +556,7 @@ void X86DomainReassignment::buildClosure(Closure &C, unsigned Reg) {
// Register already in this closure.
if (!C.insertEdge(CurReg))
continue;
EnclosedEdges.insert(Reg);
MachineInstr *DefMI = MRI->getVRegDef(CurReg);
encloseInstr(C, DefMI);