diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-11 17:31:57 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-11 17:31:57 +0000 |
commit | bb919dfb6bfe6c3f8b119a2341fb647f6d18a150 (patch) | |
tree | 2247003e684bbd62b468104686e4cee76bc7396f /llvm/lib/Target/X86/X86SelectionDAGInfo.h | |
parent | 3937e28da01728c12f9f4b6e79b66425e6ab082b (diff) | |
download | bcm5719-llvm-bb919dfb6bfe6c3f8b119a2341fb647f6d18a150.tar.gz bcm5719-llvm-bb919dfb6bfe6c3f8b119a2341fb647f6d18a150.zip |
Implement a bunch more TargetSelectionDAGInfo infrastructure.
Move EmitTargetCodeForMemcpy, EmitTargetCodeForMemset, and
EmitTargetCodeForMemmove out of TargetLowering and into
SelectionDAGInfo to exercise this.
llvm-svn: 103481
Diffstat (limited to 'llvm/lib/Target/X86/X86SelectionDAGInfo.h')
-rw-r--r-- | llvm/lib/Target/X86/X86SelectionDAGInfo.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86SelectionDAGInfo.h b/llvm/lib/Target/X86/X86SelectionDAGInfo.h index 983475461f5..4f30f31eac8 100644 --- a/llvm/lib/Target/X86/X86SelectionDAGInfo.h +++ b/llvm/lib/Target/X86/X86SelectionDAGInfo.h @@ -18,10 +18,40 @@ namespace llvm { +class X86TargetLowering; +class X86TargetMachine; +class X86Subtarget; + class X86SelectionDAGInfo : public TargetSelectionDAGInfo { + /// Subtarget - Keep a pointer to the X86Subtarget around so that we can + /// make the right decision when generating code for different targets. + const X86Subtarget *Subtarget; + + const X86TargetLowering &TLI; + public: - X86SelectionDAGInfo(); + explicit X86SelectionDAGInfo(const X86TargetMachine &TM); ~X86SelectionDAGInfo(); + + virtual + SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl, + SDValue Chain, + SDValue Dst, SDValue Src, + SDValue Size, unsigned Align, + bool isVolatile, + const Value *DstSV, + uint64_t DstSVOff) const; + + virtual + SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl, + SDValue Chain, + SDValue Dst, SDValue Src, + SDValue Size, unsigned Align, + bool isVolatile, bool AlwaysInline, + const Value *DstSV, + uint64_t DstSVOff, + const Value *SrcSV, + uint64_t SrcSVOff) const; }; } |