diff options
| author | Matt Morehouse <mascasa@google.com> | 2018-03-22 17:07:51 +0000 |
|---|---|---|
| committer | Matt Morehouse <mascasa@google.com> | 2018-03-22 17:07:51 +0000 |
| commit | 236cdaf84c684a985fa501721bf99b93ce2614da (patch) | |
| tree | fe5f6bf678a35bd33afc33628d5ad860195240a9 /llvm/lib/Transforms/IPO | |
| parent | 4c86af7579156d3d07fb4cb6148786e56b03b9ca (diff) | |
| download | bcm5719-llvm-236cdaf84c684a985fa501721bf99b93ce2614da.tar.gz bcm5719-llvm-236cdaf84c684a985fa501721bf99b93ce2614da.zip | |
[SimplifyCFG] Create attribute for fuzzing-specific optimizations.
Summary:
When building with libFuzzer, converting control flow to selects or
obscuring the original operands of CMPs reduces the effectiveness of
libFuzzer's heuristics.
This patch provides an attribute to disable or modify certain optimizations
for optimal fuzzing signal.
Provides a less aggressive alternative to https://reviews.llvm.org/D44057.
Reviewers: vitalybuka, davide, arsenm, hfinkel
Reviewed By: vitalybuka
Subscribers: junbuml, mehdi_amini, wdng, javed.absar, hiraditya, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D44232
llvm-svn: 328214
Diffstat (limited to 'llvm/lib/Transforms/IPO')
| -rw-r--r-- | llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp b/llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp index d10b4f4aaeb..f7cdd416fd8 100644 --- a/llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp @@ -45,6 +45,7 @@ static Attribute::AttrKind parseAttrKind(StringRef Kind) { .Case("nocf_check", Attribute::NoCfCheck) .Case("norecurse", Attribute::NoRecurse) .Case("nounwind", Attribute::NoUnwind) + .Case("optforfuzzing", Attribute::OptForFuzzing) .Case("optnone", Attribute::OptimizeNone) .Case("optsize", Attribute::OptimizeForSize) .Case("readnone", Attribute::ReadNone) |

