mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-03 14:21:30 +00:00 
			
		
		
		
	git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
//===- DemoteRegToStack.h - Move a virtual reg. to stack --------*- C++ -*-===//
 | 
						|
// 
 | 
						|
//                     The LLVM Compiler Infrastructure
 | 
						|
//
 | 
						|
// This file was developed by the LLVM research group and is distributed under
 | 
						|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
 | 
						|
// 
 | 
						|
//===----------------------------------------------------------------------===//
 | 
						|
//
 | 
						|
// This file provides the function:
 | 
						|
//     AllocaInst* DemoteRegToStack(Instruction& X):
 | 
						|
//
 | 
						|
// This function takes a virtual register computed by an
 | 
						|
// Instruction& X and replaces it with a slot in the stack frame,
 | 
						|
// allocated via alloca.  It has to:
 | 
						|
// (1) Identify all Phi operations that have X as an operand and
 | 
						|
//     transitively other Phis that use such Phis; 
 | 
						|
// (2) Store all values merged with X via Phi operations to the stack slot;
 | 
						|
// (3) Load the value from the stack slot just before any use of X or any
 | 
						|
//     of the Phis that were eliminated; and
 | 
						|
// (4) Delete X and all the Phis, which should all now be dead.
 | 
						|
//
 | 
						|
// Returns the pointer to the alloca inserted to create a stack slot for X.
 | 
						|
//
 | 
						|
//===----------------------------------------------------------------------===//
 | 
						|
 | 
						|
namespace llvm {
 | 
						|
 | 
						|
class Instruction;
 | 
						|
class AllocaInst;
 | 
						|
 | 
						|
AllocaInst *DemoteRegToStack(Instruction &X);
 | 
						|
 | 
						|
} // End llvm namespace
 |