This is a child diff of D92261. This diff adds APIs that return shadow type/value/zero from origin objects. For the time being these APIs simply returns primitive shadow type/value/zero. The following diff will be implementing the conversion. As D92261 explains, some cases still use primitive shadow during the incremential changes. The cases include 1) alloca/load/store 2) custom function IO 3) vectors At the cases this diff does not use the new APIs, but uses primitive shadow objects explicitly.
Details
- Reviewers
morehouse pcc - Commits
- rGa28db8b27a23: [dfsan] Add empty APIs for field-level shadow
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | ||
---|---|---|
425 | This function looks unused by anything except the other getZeroShadow. Can we remove it? | |
431 | Maybe we don't need this function either? | |
1678 | Is this equivalent to getShadowTy(S)? If so, we can save a line of code by doing that instead. | |
1951–1953 | Let's make use of the overloaded getShadowTy to do getShadowTy(PN) instead. |
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | ||
---|---|---|
425 | This is a problem of the incremental diffs. In the next diff, this function is used. I removed it from this diff, and will be adding it back in the next one. | |
431 | This one is the same. The next diff will be using it. We could remove it from this diff. But some APIs, like getArgTLS, already use it. The version with Value* argument is like a help function to reduce "V->getType()". | |
1678 | S is a shadow value. it could be DFSF.DFS.getShadowTy(RI.getReturnValue()). |
This function looks unused by anything except the other getZeroShadow. Can we remove it?