[LLVMdev] alias-aware scheduling

Evan Cheng evan.cheng at apple.com
Tue Dec 19 17:06:31 PST 2006


>
>>> Attached is a patch which implements this. I copied some routines  
>>> from
>>> DAGCombiner.cpp for using SDOperands with alias queries; it should
>>> probably be factored out somewhere so the code can be shared. I
>>> reorganized SelectionDAGLowering::getLoadFrom a little, to make it
>>> simpler to use in other contexts.
>>>
>>> Also, the patch fixes a bug where SelectionDAG::getLoad and
>>> SelectionDAG::getStore were being called with the wrong arguments,
>>> with
>>> a default argument helping to hide it.
>>
>> Can you be more specific about what the bugs are?
>
> Sure. SelectionDAG::getStore and getLoad are declared like this:
>
>   SDOperand getLoad(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr,
>                     const Value *SV, int SVOffset, bool  
> isVolatile=false);
>
>   SDOperand getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
>                      const Value *SV, int SVOffset, bool  
> isVolatile=false);
>
> In SelectionDAGISel.cpp in SelectionDAGLowering::getLoadFrom and
> SelectionDAGLowering::visitStore they are called like this:
>
>     L = DAG.getLoad(TLI.getValueType(Ty), Root, Ptr, SV, isVolatile);
>
>   DAG.setRoot(DAG.getStore(getRoot(), Src, Ptr, I.getOperand(1),
>                            I.isVolatile()));
>
> The isVolatile arguments are being passed to the SVOffset parameters.

Ah, good catch. I'll fix this. Thanks.

Evan

>
> Dan
>
> -- 
> Dan Gohman, Cray Inc. <djg at cray.com>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list