[PATCH] [RFC] __builtin___clear_cache support in LLVM

Tim Northover t.p.northover at gmail.com
Fri Mar 14 12:16:09 PDT 2014

Hi Renato,

> 1. Is the name @llvm.clear_cache good enough? Is this the right way to implement a builtin?

For me, the benefit of moving it into the compiler would be
optimisation opportunities. __clear_cache is rather a sledge-hammer of
a call, nuking lots of internal state on ARM. It would be useful to
know whether we really did need to clear both icache and dcache, for

Actually, I can't think of any other examples off the top of my head,
but that would be useful. Do other architectures, or people more
versed in OS programming know of any?



More information about the llvm-commits mailing list