[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-03-02 Thread Vitaly Buka via Phabricator via cfe-commits
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

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-21 Thread Vitaly Buka via Phabricator via cfe-commits
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

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-21 Thread Matt Morehouse via Phabricator via cfe-commits
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

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-21 Thread Eli Friedman via Phabricator via cfe-commits
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

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-20 Thread Kostya Serebryany via Phabricator via cfe-commits
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

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-16 Thread Davide Italiano via Phabricator via cfe-commits
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

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-16 Thread Vitaly Buka via Phabricator via cfe-commits
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/

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-16 Thread Matt Morehouse via Phabricator via cfe-commits
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