[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand closed this revision. guiand added a comment. Committed as 97de0188dd5d845ff90c8ac779a2ea09688b17df Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://revie

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3573 + case LibFunc_atomic_load: +if (!isa(CB)) { + llvm::errs() << "MSAN -- cannot instrument invoke of libatomic load." guiand wrote: > euge

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3573 + case LibFunc_atomic_load: +if (!isa(CB)) { + llvm::errs() << "MSAN -- cannot instrument invoke of libatomic load." eugenis wrote: > Prob

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM with 1 comment Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3573 + case LibFunc_atomic_load: +if (!isa(CB)) { + llvm::errs

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 285572. guiand added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://reviews.llvm.org/D85559 Files: compiler-rt/test/msan/libatomic.c compiler-rt/test/msan/lib

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-13 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3513 +assert(InsPoint); +if (!InsPoint) { + return; guiand wrote: > TODO: Remove this redudant call you've already checked it with assert(isa) - which

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked 2 inline comments as done. guiand added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3513 +assert(InsPoint); +if (!InsPoint) { + return; TODO: Remove this redudant call Repository: rG LLVM Git

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284102. guiand removed a reviewer: rsmith. guiand added a comment. Separated out the frontend change. Addressed other comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://reviews.llvm.org/D

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/lib/CodeGen/CGAtomic.cpp:315 + llvm::FunctionCallee fn = + CGF.CGM.CreateRuntimeFunction(fnTy, fnName, fnAttrs); auto callee = CGCallee::forDirect(fn); This needs a clang test, and better move it to a sepa

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284080. guiand added a comment. Rebased on master (again) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://reviews.llvm.org/D85559 Files: clang/lib/CodeGen/CGAtomic.cpp compiler-rt/test/msan

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284079. guiand added a comment. Rebased on master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://reviews.llvm.org/D85559 Files: clang/lib/CodeGen/CGAtomic.cpp compiler-rt/test/msan/libatom

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284076. guiand edited the summary of this revision. guiand added a reviewer: rsmith. guiand added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Simplified by returning to the old implementation, but having libatomic calls ma