diff options
author | Juneyoung Lee <aqjune@gmail.com> | 2021-10-15 19:26:07 +0900 |
---|---|---|
committer | hyeongyu kim <gusrb406@snu.ac.kr> | 2021-10-16 12:01:37 +0900 |
commit | 80dba72a669b5416e97a42fd2c2a7bc5a6d3f44a (patch) | |
tree | 2b9703495995327678800dc1e7ec1749c6ba8a77 /clang/lib/CodeGen/CGCall.cpp | |
parent | da2e1f622db4c0c6e0575cf7c2c8b9423d061b51 (diff) | |
download | llvm-80dba72a669b5416e97a42fd2c2a7bc5a6d3f44a.zip llvm-80dba72a669b5416e97a42fd2c2a7bc5a6d3f44a.tar.gz llvm-80dba72a669b5416e97a42fd2c2a7bc5a6d3f44a.tar.bz2 |
[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default
Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions.
I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default.
Test updates are made as a separate patch: D108453
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D105169
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index daea09b..c3b8739 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2255,7 +2255,7 @@ void CodeGenModule::ConstructAttributeList( getLangOpts().Sanitize.has(SanitizerKind::Return); // Determine if the return type could be partially undef - if (CodeGenOpts.EnableNoundefAttrs && HasStrictReturn) { + if (!CodeGenOpts.DisableNoundefAttrs && HasStrictReturn) { if (!RetTy->isVoidType() && RetAI.getKind() != ABIArgInfo::Indirect && DetermineNoUndef(RetTy, getTypes(), DL, RetAI)) RetAttrs.addAttribute(llvm::Attribute::NoUndef); @@ -2390,7 +2390,7 @@ void CodeGenModule::ConstructAttributeList( // Decide whether the argument we're handling could be partially undef bool ArgNoUndef = DetermineNoUndef(ParamType, getTypes(), DL, AI); - if (CodeGenOpts.EnableNoundefAttrs && ArgNoUndef) + if (!CodeGenOpts.DisableNoundefAttrs && ArgNoUndef) Attrs.addAttribute(llvm::Attribute::NoUndef); // 'restrict' -> 'noalias' is done in EmitFunctionProlog when we |