diff options
author | Juneyoung Lee <aqjune@gmail.com> | 2021-11-06 15:34:49 +0900 |
---|---|---|
committer | Juneyoung Lee <aqjune@gmail.com> | 2021-11-06 15:36:42 +0900 |
commit | 7584ef766a7219b6ee5a400637206d26e0fa98ac (patch) | |
tree | b7bf3b5b2205448833c25a3b511f6695d4627c0a /clang/lib/CodeGen/CGCall.cpp | |
parent | 1ab9a2906e19cca87cafac25cc31231a36de4843 (diff) | |
download | llvm-7584ef766a7219b6ee5a400637206d26e0fa98ac.zip llvm-7584ef766a7219b6ee5a400637206d26e0fa98ac.tar.gz llvm-7584ef766a7219b6ee5a400637206d26e0fa98ac.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 |