@@ -73,8 +73,8 @@ class FunctionLoweringInfo {
7373 // / allocated to hold a pointer to the hidden sret parameter.
7474 Register DemoteRegister;
7575
76- // / MBBMap - A mapping from LLVM basic blocks to their machine code entry .
77- DenseMap< const BasicBlock*, MachineBasicBlock *> MBBMap;
76+ // / A mapping from LLVM basic block number to their machine block .
77+ SmallVector< MachineBasicBlock *> MBBMap;
7878
7979 // / ValueMap - Since we emit code for the function a basic block at a time,
8080 // / we must remember which virtual registers hold the values for
@@ -172,9 +172,9 @@ class FunctionLoweringInfo {
172172 // / for a value.
173173 DenseMap<const Value *, ISD::NodeType> PreferredExtendType;
174174
175- // / VisitedBBs - The set of basic blocks visited thus far by instruction
176- // / selection .
177- SmallPtrSet< const BasicBlock*, 4 > VisitedBBs;
175+ // / The set of basic blocks visited thus far by instruction selection. Indexed
176+ // / by basic block number .
177+ SmallVector< bool > VisitedBBs;
178178
179179 // / PHINodesToUpdate - A list of phi instructions whose operand list will
180180 // / be updated after processing the current basic block.
@@ -213,7 +213,8 @@ class FunctionLoweringInfo {
213213 }
214214
215215 MachineBasicBlock *getMBB (const BasicBlock *BB) const {
216- return MBBMap.lookup (BB);
216+ assert (BB->getNumber () < MBBMap.size () && " uninitialized MBBMap?" );
217+ return MBBMap[BB->getNumber ()];
217218 }
218219
219220 Register CreateReg (MVT VT, bool isDivergent = false );
0 commit comments