mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	Add a DEBUG() output to GVN that prints the instruction clobbering a load.
This is useful when trying to figure out why GVN didn't eliminate redundant loads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -1158,8 +1158,18 @@ bool GVN::processLoad(LoadInst *L, SmallVectorImpl<Instruction*> &toErase) { | |||||||
|   MemDepResult dep = MD->getDependency(L); |   MemDepResult dep = MD->getDependency(L); | ||||||
|    |    | ||||||
|   // If the value isn't available, don't do anything! |   // If the value isn't available, don't do anything! | ||||||
|   if (dep.isClobber()) |   if (dep.isClobber()) { | ||||||
|  |     DEBUG( | ||||||
|  |       // fast print dep, using operator<< on instruction would be too slow | ||||||
|  |       DOUT << "GVN: load "; | ||||||
|  |       WriteAsOperand(*DOUT.stream(), L); | ||||||
|  |       Instruction *I = dep.getInst(); | ||||||
|  |       DOUT << " is clobbered by " << I->getOpcodeName() << " instruction "; | ||||||
|  |       WriteAsOperand(*DOUT.stream(), I, false); | ||||||
|  |       DOUT << "\n"; | ||||||
|  |     ); | ||||||
|     return false; |     return false; | ||||||
|  |   } | ||||||
|  |  | ||||||
|   // If it is defined in another block, try harder. |   // If it is defined in another block, try harder. | ||||||
|   if (dep.isNonLocal()) |   if (dep.isNonLocal()) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user