[PATCH] D91234: Add a flag to control whether to propagate labels from condition values to results
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 07:23:43 PST 2020
morehouse added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:191
+static cl::opt<bool>
+ ClTrackControlFlow("dfsan-track-control-flow",
+ cl::desc("Propagate labels from condition values."),
----------------
It only applies to selects, so maybe we should name it something like `dfsan-track-select-control-flow`. and update the description/comment.
================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:193
+ cl::desc("Propagate labels from condition values."),
+ cl::Hidden, cl::init(false));
+
----------------
This changes the default behavior. Does it cause any existing tests to fail?
Maybe we should default it to true.
================
Comment at: llvm/test/Instrumentation/DataFlowSanitizer/select.ll:50
+
+define <4 x i8> @select8v(i1 %c, <4 x i8> %t, <4 x i8> %f) {
+ ; TRACK_CONTROL_FLOW: %1 = load i16, i16* getelementptr inbounds ([64 x i16], [64 x i16]* @__dfsan_arg_tls, i64 0, i64 2)
----------------
I think this tests the same case as `select8`. If we want to test the vector one, we need `%c` to be a vector.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91234/new/
https://reviews.llvm.org/D91234
More information about the llvm-commits
mailing list