summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorLama Saba <lama.saba@intel.com>2018-02-11 09:34:12 +0000
committerLama Saba <lama.saba@intel.com>2018-02-11 09:34:12 +0000
commitc2ba6c387ed670ad025898333def10745ae180de (patch)
treef9f12bfa177b128a27147a49e6a7ab61e7817fde /llvm/lib/Target/X86/X86TargetMachine.cpp
parent24d3b28d931a3d695908d06c9399f10aeb0f8625 (diff)
downloadbcm5719-llvm-c2ba6c387ed670ad025898333def10745ae180de.tar.gz
bcm5719-llvm-c2ba6c387ed670ad025898333def10745ae180de.zip
[X86] Reduce Store Forward Block issues in HW
If a load follows a store and reloads data that the store has written to memory, Intel microarchitectures can in many cases forward the data directly from the store to the load, This "store forwarding" saves cycles by enabling the load to directly obtain the data instead of accessing the data from cache or memory. A "store forward block" occurs in cases that a store cannot be forwarded to the load. The most typical case of store forward block on Intel Core microarchiticutre that a small store cannot be forwarded to a large load. The estimated penalty for a store forward block is ~13 cycles. This pass tries to recognize and handle cases where "store forward block" is created by the compiler when lowering memcpy calls to a sequence of a load and a store. The pass currently only handles cases where memcpy is lowered to XMM/YMM registers, it tries to break the memcpy into smaller copies. breaking the memcpy should be possible since there is no atomicity guarantee for loads and stores to XMM/YMM. Change-Id: I620b6dc91583ad9a1444591e3ddc00dd25d81748 llvm-svn: 324835
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index c79f1b41722..fddbb6aebf9 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -449,6 +449,7 @@ void X86PassConfig::addPreRegAlloc() {
addPass(createX86FixupSetCC());
addPass(createX86OptimizeLEAs());
addPass(createX86CallFrameOptimization());
+ addPass(createX86FixupSFB());
}
addPass(createX86WinAllocaExpander());
OpenPOWER on IntegriCloud