diff options
author | Austin Seipp <austin@well-typed.com> | 2013-10-01 21:13:14 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2013-10-01 21:26:47 -0500 |
commit | fd74014079f14bd3ab50e328e52c44ef97d40e05 (patch) | |
tree | da31c992a76d3816a4f1012ceb1eb4e68d0fb556 /compiler/cmm/PprC.hs | |
parent | 627d1e008cbe4d9318b2466394420a968d1659da (diff) | |
download | haskell-fd74014079f14bd3ab50e328e52c44ef97d40e05.tar.gz |
Add support for prefetch with locality levels.
This patch adds support for several new primitive operations which
support using processor-specific instructions to help guide data and
cache locality decisions. We have levels ranging from [0..3]
For LLVM, we generate llvm.prefetch intrinsics at the proper locality
level (similar to GCC.)
For x86 we generate prefetch{NTA, t2, t1, t0} instructions. On SPARC and
PowerPC, the locality levels are ignored.
This closes #8256.
Authored-by: Carter Tazio Schonwald <carter.schonwald@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/cmm/PprC.hs')
-rw-r--r-- | compiler/cmm/PprC.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index c468161c73..32fd8b4feb 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -759,7 +759,9 @@ pprCallishMachOp_for_C mop MO_Add2 {} -> unsupported MO_U_Mul2 {} -> unsupported MO_Touch -> unsupported - MO_Prefetch_Data -> unsupported + (MO_Prefetch_Data _ ) -> unsupported + --- we could support prefetch via "__builtin_prefetch" + --- Not adding it for now where unsupported = panic ("pprCallishMachOp_for_C: " ++ show mop ++ " not supported!") |