[PATCH] D91762: Remove deadcode from DFSanFunction::get*TLS*()
stephan.yichao.zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 21:29:06 PST 2020
stephan.yichao.zhao created this revision.
stephan.yichao.zhao added a reviewer: morehouse.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
stephan.yichao.zhao requested review of this revision.
clean more deadcode after D84704 <https://reviews.llvm.org/D84704>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91762
Files:
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Index: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -1060,22 +1060,15 @@
Value *DFSanFunction::getArgTLSPtr() {
if (ArgTLSPtr)
return ArgTLSPtr;
- if (DFS.ArgTLS)
- return ArgTLSPtr = DFS.ArgTLS;
-
- IRBuilder<> IRB(&F->getEntryBlock().front());
- return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLSTy, DFS.GetArgTLS, {});
+ assert(DFS.ArgTLS);
+ return ArgTLSPtr = DFS.ArgTLS;
}
Value *DFSanFunction::getRetvalTLS() {
if (RetvalTLSPtr)
return RetvalTLSPtr;
- if (DFS.RetvalTLS)
- return RetvalTLSPtr = DFS.RetvalTLS;
-
- IRBuilder<> IRB(&F->getEntryBlock().front());
- return RetvalTLSPtr =
- IRB.CreateCall(DFS.GetRetvalTLSTy, DFS.GetRetvalTLS, {});
+ assert(DFS.RetvalTLS);
+ return RetvalTLSPtr = DFS.RetvalTLS;
}
Value *DFSanFunction::getArgTLS(unsigned Idx, Instruction *Pos) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91762.306300.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201119/ead5f82d/attachment.bin>
More information about the llvm-commits
mailing list