diff options
author | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2001-11-12 20:31:47 +0000 |
---|---|---|
committer | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2001-11-12 20:31:47 +0000 |
commit | 24e29431bc02b8100eb68718c67e979a6f63e86e (patch) | |
tree | 3f96c3d802347b16e869c42f932314a4e53f7686 /llvm/lib/Target/Sparc/SparcRegInfo.cpp | |
parent | f0cd13bc284e13b9bcb7276107efe2b8df6d0b8a (diff) | |
download | bcm5719-llvm-24e29431bc02b8100eb68718c67e979a6f63e86e.tar.gz bcm5719-llvm-24e29431bc02b8100eb68718c67e979a6f63e86e.zip |
Canged ColorCallArg so that when a call arg is directly pushed on to stack
for argument passing, that instruction is directly added to the InstructionsBefore
set of the called machine instruction - i.e., it is not reordered.
llvm-svn: 1277
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcRegInfo.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp index 4040b02579d..b576d05e6fa 100644 --- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcRegInfo.cpp @@ -668,7 +668,11 @@ void UltraSparcRegInfo::colorCallArgs(const MachineInstr *const CallMI, AdMI = cpReg2MemMI(UniLRReg, getStackPointer(), argOffset, RegType ); } - AddedInstrnsBefore.push_back( AdMI ); // Now add the instruction + // Now add the instruction. We can directly add to + // CallAI->InstrnsBefore since we are just saving a reg on stack + // + CallAI->InstrnsBefore.push_back( AdMI ); + //cerr << "\nCaution: Passing a reg on stack"; } else { // LR is not colored (i.e., spilled) @@ -683,6 +687,7 @@ void UltraSparcRegInfo::colorCallArgs(const MachineInstr *const CallMI, AdMI = cpMem2RegMI(getFramePointer(), LR->getSpillOffFromFP(), UniArgReg, RegType ); + cerr << "\nCaution: Loading a spilled val to a reg as a call arg"; AddedInstrnsBefore.push_back( AdMI ); // Now add the instruction } @@ -728,7 +733,7 @@ void UltraSparcRegInfo::colorCallArgs(const MachineInstr *const CallMI, CallAI->InstrnsBefore.push_back( Ad3 ); CallAI->InstrnsBefore.push_back( Ad4 ); - cerr << "\n Caution: Call arg moved from stack to stack"; + cerr << "\nCaution: Call arg moved from stack2stack for: " << *CallMI ; } } |