diff options
author | Renato Golin <renato.golin@linaro.org> | 2014-03-26 12:52:28 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2014-03-26 12:52:28 +0000 |
commit | c0a3c1d66b479b4e1e72e70d65bbfb2ee66c16f6 (patch) | |
tree | 5af7c84d2f3007ac25b226f0c18503db70f08cf3 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 732f0f73a732a6dbde036003cbaed24ce58c66a5 (diff) | |
download | bcm5719-llvm-c0a3c1d66b479b4e1e72e70d65bbfb2ee66c16f6.tar.gz bcm5719-llvm-c0a3c1d66b479b4e1e72e70d65bbfb2ee66c16f6.zip |
Add @llvm.clear_cache builtin
Implementing the LLVM part of the call to __builtin___clear_cache
which translates into an intrinsic @llvm.clear_cache and is lowered
by each target, either to a call to __clear_cache or nothing at all
incase the caches are unified.
Updating LangRef and adding some tests for the implemented architectures.
Other archs will have to implement the method in case this builtin
has to be compiled for it, since the default behaviour is to bail
unimplemented.
A Clang patch is required for the builtin to be lowered into the
llvm intrinsic. This will be done next.
llvm-svn: 204802
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index bd80a503e21..639ff82ffd3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5386,6 +5386,8 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) { (void)getControlRoot(); return 0; } + case Intrinsic::clear_cache: + return TLI->getClearCacheBuiltinName(); case Intrinsic::donothing: // ignore return 0; |