[PATCH] D12313: Introduce __builtin_nontemporal_store and __builtin_nontemporal_load.

Michael Zolotukhin via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 22:55:58 PDT 2015


mzolotukhin created this revision.
mzolotukhin added reviewers: rsmith, aaron.ballman, doug.gregor, t.p.northover, ab, mcrosier, hfinkel, majnemer.
mzolotukhin added a subscriber: cfe-commits.
Herald added a subscriber: aemerson.

Currently clang provides no general way to generate nontemporal loads/stores.
There are some architecture specific builtins for doing so (e.g. in x86), but
there is no way to generate non-temporal store on, e.g. AArch64. This patch adds
generic builtins which are expanded to a simple store with '!nontemporal'
attribute in IR.
Previously I tried to tackle the same issue by introducing
__attribute__((nontemporal)) (see D12221), but was convinced that builtins might
fit for such use better.

Does the patch look good?

Thanks,
Michael

http://reviews.llvm.org/D12313

Files:
  include/clang/Basic/Builtins.def
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/CodeGen/CGBuiltin.cpp
  lib/Sema/SemaChecking.cpp
  test/CodeGen/Nontemporal.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12313.33048.patch
Type: text/x-patch
Size: 16457 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150825/8d03147a/attachment-0001.bin>


More information about the cfe-commits mailing list