vitalybuka requested changes to this revision.
vitalybuka added a comment.
This revision now requires changes to proceed.
I assume this is going to be abandoned in favor of
https://reviews.llvm.org/D44057
https://reviews.llvm.org/D43423
___
cfe-com
vitalybuka added inline comments.
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6056
SmallPtrSetImpl *LoopHeaders) {
+ const Function *Fn = BB->getParent();
+ if (Fn && Fn->getMetadata("no_simplify_cfg"))
So maybe Attribute::Sani
morehouse added a comment.
In https://reviews.llvm.org/D43423#1011170, @davide wrote:
> Some high level comments:
>
> 1. This is something that GCC does relatively frequently (adding frontend
> options to control optimization passes), but LLVM tends to not expose these
> details. FWIW, I'd very
efriedma added a comment.
> FWIW, I'd very much prefer the details of the optimizer wouldn't be exposed
> as frontend flags.
Yes, definitely this. Frontend flags to control the optimizer should state an
expected result, not just turn off some completely arbitrary set of transforms.
Otherwise
kcc added a comment.
We use function attributes in similar situations for asan/tsan/msan.
Similar, but not equivalent, so I don't know if we must follow the same pattern
here.
The difference here is that we should keep the ability to turn optimization on
and off from command line, regardless o
davide added subscribers: chandlerc, davide.
davide added a comment.
Some high level comments:
1. This is something that GCC does relatively frequently (adding frontend
options to control optimization passes), but LLVM tends to not expose these
details.
FWIW, I'd very much prefer the details o
vitalybuka added inline comments.
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:109
static cl::opt MergeCondStores(
"simplifycfg-merge-cond-stores", cl::Hidden, cl::init(true),
why metadata instead of cl:opt like these?
https://reviews.llvm.org/
morehouse created this revision.
morehouse added a reviewer: kcc.
Herald added a subscriber: hiraditya.
When building with libFuzzer, simplifyCFG reduces the coverage signal
available to libFuzzer when trying to find new inputs. This patch
provides a way to disable simplifyCFG when building with