[llvm] [MC/DC][Coverage] Split out Read-modfy-Write to rmw_or(ptr, i8) (PR #96040)
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 15:19:55 PDT 2024
================
@@ -937,6 +949,44 @@ Value *InstrLowerer::getCounterAddress(InstrProfCntrInstBase *I) {
return Builder.CreateIntToPtr(Add, Addr->getType());
}
+Function *InstrLowerer::createRMWOrFunc() {
+ auto &Ctx = M.getContext();
+ auto *Int8Ty = Type::getInt8Ty(Ctx);
+ // void alwaysinline rmw_or(ptr, i8)
+ Function *Fn = Function::Create(
+ FunctionType::get(Type::getVoidTy(Ctx),
+ {PointerType::getUnqual(Ctx), Int8Ty}, false),
+ Function::LinkageTypes::PrivateLinkage, "rmw_or", M);
----------------
chapuni wrote:
I suppose private named functions wouldn't clash. Let me reconfirm later.
(I guess it might be unnamed)
https://github.com/llvm/llvm-project/pull/96040
More information about the llvm-commits
mailing list