aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-04-08 07:37:57 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-04-08 07:37:57 +0000
commitc3b0c341e731b27b550ee9dcded9c17232b296b8 (patch)
treef3b7545cc43d3f374b20ac331424afc413d83d70 /include
parent8ef5caa80a5f40ba34d02f32f6ba4b4601268f89 (diff)
downloadexternal_llvm-c3b0c341e731b27b550ee9dcded9c17232b296b8.zip
external_llvm-c3b0c341e731b27b550ee9dcded9c17232b296b8.tar.gz
external_llvm-c3b0c341e731b27b550ee9dcded9c17232b296b8.tar.bz2
Avoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store of immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetLowering.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 1a94b44..91d7dfa 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -638,11 +638,13 @@ public:
/// probably because the source does not need to be loaded. If
/// 'NonScalarIntSafe' is true, that means it's safe to return a
/// non-scalar-integer type, e.g. empty string source, constant, or loaded
- /// from memory. It returns EVT::Other if SelectionDAG should be responsible
- /// for determining it.
+ /// from memory. 'MemcpyStrSrc' indicates whether the memcpy source is
+ /// constant so it does not need to be loaded.
+ /// It returns EVT::Other if SelectionDAG should be responsible for
+ /// determining the type.
virtual EVT getOptimalMemOpType(uint64_t Size,
unsigned DstAlign, unsigned SrcAlign,
- bool NonScalarIntSafe,
+ bool NonScalarIntSafe, bool MemcpyStrSrc,
SelectionDAG &DAG) const {
return MVT::Other;
}