[llvm-commits] [llvm] r58824 - in /llvm/trunk: include/llvm/Intrinsics.td lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/CodeGen/StackProtector.cpp

Chris Lattner clattner at apple.com
Sat Nov 15 21:54:51 PST 2008


On Nov 6, 2008, at 5:24 PM, Bill Wendling wrote:

> Author: void
> Date: Thu Nov  6 19:23:58 2008
> New Revision: 58824
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58824&view=rev
> Log:
> - Modify the stack protector algorithm so that the stack slot is  
> allocated in
>  LLVM IR code and not in the selection DAG ISel. This is a cleaner  
> solution.

This is very nice.  I like this approach a lot.

> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Thu  
> Nov  6 19:23:58 2008
> @@ -3801,14 +3801,10 @@
>     MachineFrameInfo *MFI = MF.getFrameInfo();
>     MVT PtrTy = TLI.getPointerTy();
>
> +    SDValue Src = getValue(I.getOperand(1));   // The guard's value.
> +    AllocaInst *Slot = cast<AllocaInst>(I.getOperand(2));

Okay, from this I infer that the second argument must be an alloca.   
Please add a check for this requirement to the verifier.

-Chris




More information about the llvm-commits mailing list