[llvm-commits] [llvm] r103802 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/ARM/ lib/Target/Blackfin/ lib/Target/CellSPU/ lib/Target/MBlaze/ lib/Target/MBlaze/AsmPrinter/ lib/Target/Mips/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/ lib/Target/SystemZ/ lib/Target/X86/

Bill Wendling wendling at apple.com
Fri May 14 14:27:51 PDT 2010


On May 14, 2010, at 2:14 PM, Bill Wendling wrote:

> Author: void
> Date: Fri May 14 16:14:32 2010
> New Revision: 103802
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=103802&view=rev
> Log:
> Rename "HasCalls" in MachineFrameInfo to "AdjustsStack" to better describe what
> the variable actually tracks.
> 
> N.B., several back-ends are using "HasCalls" as being synonymous for something
> that adjusts the stack. This isn't 100% correct and should be looked into.
> 
> 
[snip...]

> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=103802&r1=103801&r2=103802&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri May 14 16:14:32 2010
> @@ -28,6 +28,7 @@
> #include "llvm/CodeGen/FastISel.h"
> #include "llvm/CodeGen/GCStrategy.h"
> #include "llvm/CodeGen/GCMetadata.h"
> +#include "llvm/CodeGen/MachineFrameInfo.h"
> #include "llvm/CodeGen/MachineFunction.h"
> #include "llvm/CodeGen/MachineInstrBuilder.h"
> #include "llvm/CodeGen/MachineModuleInfo.h"
> @@ -605,6 +606,19 @@
>     delete Scheduler;
>   }
> 
> +  // Determine if there are any calls in this machine function.
> +  MachineFrameInfo *MFI = MF->getFrameInfo();
> +  if (!MFI->hasCalls()) {
> +    for (MachineBasicBlock::iterator
> +           I = BB->begin(), E = BB->end(); I != E; ++I) {
> +      const TargetInstrDesc &TID = TM.getInstrInfo()->get(I->getOpcode());
> +      if (I->isInlineAsm() || (TID.isCall() && !TID.isReturn())) {
> +        MFI->setHasCalls(true);
> +        break;
> +      }
> +    }
> +  }
> +
>   // Free the SelectionDAG state, now that we're finished with it.
>   CurDAG->clear();
> 
> 
This slipped in there. I'm going to resurrect the HasCalls variable to indicate what its name suggests. Stay tuned!

-bw





More information about the llvm-commits mailing list