llvm.org GIT mirror llvm / dae9c83
[PowerPC] Remove wild call to RegScavenger::initRegState(). This call should in fact be made by RegScavenger::enterBasicBlock() called below. The first call does nothing except for triggering UB, indicated by UBSan (passing nullptr to memset()). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254548 91177308-0d34-0410-b5e6-96231b3b80d8 Alexey Samsonov 4 years ago
2 changed file(s) with 4 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
7272
7373 /// Start tracking liveness from the begin of the specific basic block.
7474 void enterBasicBlock(MachineBasicBlock *mbb);
75
76 /// Allow resetting register state info for multiple
77 /// passes over/within the same function.
78 void initRegState();
7975
8076 /// Move the internal MBB iterator and update register states.
8177 void forward();
179175 unsigned InstrLimit,
180176 MachineBasicBlock::iterator &UseMI);
181177
178 /// Allow resetting register state info for multiple
179 /// passes over/within the same function.
180 void initRegState();
182181 };
183182
184183 } // End llvm namespace
568568 if ((UseAtEnd && MBB->isReturnBlock()) ||
569569 (!UseAtEnd && (&MBB->getParent()->front() == MBB)))
570570 return true;
571
572 RS.initRegState();
571
573572 RS.enterBasicBlock(MBB);
574573
575574 if (UseAtEnd && !MBB->empty()) {