aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86SelectionDAGInfo.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2012-07-09 10:52:46 -0700
committerDerek Schuff <dschuff@chromium.org>2012-07-09 11:00:37 -0700
commit5dbcc7e0c9c12f4a4042fb4a226654aee927999c (patch)
treeb316a3370e9286cb4e6f81b2f9d8bd8b54ce5123 /lib/Target/X86/X86SelectionDAGInfo.cpp
parent86dc97be9ac3b4804528e087b04b4f4192cdee54 (diff)
LOCALMODs from hg 0b098ca44de7 against r158408 (hg 90a87d6bfe45)
(only non-new files; new files in git 4f429c8b) Change-Id: Ia39f818088485bd90e4d048db404f8d6ba5f836b
Diffstat (limited to 'lib/Target/X86/X86SelectionDAGInfo.cpp')
-rw-r--r--lib/Target/X86/X86SelectionDAGInfo.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/X86/X86SelectionDAGInfo.cpp b/lib/Target/X86/X86SelectionDAGInfo.cpp
index 7c6788f578..f770178dbd 100644
--- a/lib/Target/X86/X86SelectionDAGInfo.cpp
+++ b/lib/Target/X86/X86SelectionDAGInfo.cpp
@@ -35,6 +35,14 @@ X86SelectionDAGInfo::EmitTargetCodeForMemset(SelectionDAG &DAG, DebugLoc dl,
MachinePointerInfo DstPtrInfo) const {
ConstantSDNode *ConstantSize = dyn_cast<ConstantSDNode>(Size);
+ // @LOCALMOD-BEGIN
+ if (Subtarget->isTargetNaCl()) {
+ // TODO: Can we allow this optimization for Native Client?
+ // At the very least, pointer size needs to be fixed below.
+ return SDValue();
+ }
+ // @LOCALMOD-END
+
// If to a segment-relative address space, use the default lowering.
if (DstPtrInfo.getAddrSpace() >= 256)
return SDValue();
@@ -190,6 +198,13 @@ X86SelectionDAGInfo::EmitTargetCodeForMemcpy(SelectionDAG &DAG, DebugLoc dl,
if (!AlwaysInline && SizeVal > Subtarget->getMaxInlineSizeThreshold())
return SDValue();
+ // @LOCALMOD-BEGIN
+ if (Subtarget->isTargetNaCl()) {
+ // TODO(pdox): Allow use of the NaCl pseudo-instruction for REP MOV
+ return SDValue();
+ }
+ // @LOCALMOD-END
+
/// If not DWORD aligned, it is more efficient to call the library. However
/// if calling the library is not allowed (AlwaysInline), then soldier on as
/// the code generated here is better than the long load-store sequence we