[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. > Does sinking and hoisting remove the debug source location? I assumed that it > wouldn't, but now after all the smooth stepping work, maybe it does. Yes, both sinking and hoisting in simplifycfg remove the debug source location by `Instruction::applyMergedLocation`

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 260780. zequanwu added a comment. Add test case for preventing hoisting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBitCodes.h

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-24 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 259938. Herald added subscribers: dexonsmith, steven_wu. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D78659#1997528 , @lebedev.ri wrote: > 1. Tests missing > 2. Why isn't `noinline` sufficient, why a whole new attribue? 1. Test added. 2. We want to avoid merging multiple call sites of same function, but `noinline` cannot

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 259455. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/attr-nomerge.c

[PATCH] D79121: Add nomerge function attribute to clang

2020-04-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261292. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/attr-nomerge.c

[PATCH] D79121: Add nomerge function attribute to clang

2020-04-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked 2 inline comments as done. zequanwu added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1799 + let Spellings = [Clang<"nomerge">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [NoMergeDocs]; rnk wrote: >

[PATCH] D79121: Add nomerge function attribute to clang

2020-04-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261406. zequanwu added a comment. change `nomerge` to statement attribute CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td

[PATCH] D79121: Add nomerge function attribute to clang

2020-04-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: rnk. zequanwu added a project: clang. Herald added a subscriber: cfe-commits. Related to D78659 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D79121 Files:

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-29 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261059. zequanwu marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBitCodes.h

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261698. zequanwu marked 4 inline comments as done. zequanwu added a comment. Add Sema test. Check if nomerge attribute has no arguments and statement contains call expressions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:611 void CodeGenFunction::EmitAttributedStmt(const AttributedStmt ) { + for (const auto *A: S.getAttrs()) +if (A->getKind() == attr::NoMerge) { rnk wrote: > Can we use S.hasAttr, or

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-04 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 261973. zequanwu marked 10 inline comments as done. zequanwu added a comment. To keep it simple, `nomerge` attribute should not be applied to decl statement. Since label statement calls `ProcessDeclAttributeList` to handle attributes, label statement

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 260529. zequanwu added a comment. Split the the original differential to 2 smaller ones. This one add nomerge function attribute in IR level. Another one will add the attribute to let frontend recognize it. CHANGES SINCE LAST ACTION

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-24 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 260039. zequanwu added a comment. Add check in LICM to prevent sink or hoist on `nomerge` call CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: clang/include/clang/Basic/Attr.td

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-24 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 260038. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/attr-nomerge.c

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: asbirlea, rnk. zequanwu added projects: LLVM, clang. Herald added subscribers: cfe-commits, hiraditya. We want to add a way to avoid tail calls to noreturn function from being merged. This patch add nomerge to disable the optimization in

[PATCH] D79895: Fix warning about using uninitialized variable as function const reference parameter

2020-05-13 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rsmith, rnk. zequanwu added a project: clang. Herald added a subscriber: cfe-commits. bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45624 Uninitialized variable as function const reference parameter should be use. Repository:

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-05 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:178 +return true; + return llvm::any_of(S->children(), hasCallExpr); +} rsmith wrote: > This will recurse into too much (eg, the bodies of

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264300. zequanwu added a comment. Since the new warning is controlled by `-Wuninitialized`, I disabled it in existing test case and added a separate test case for `-Wuninitialized-const-reference`. CHANGES SINCE LAST ACTION

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: CaseyCarter, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. Bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45213 To resolve it, we could mangle the `LambdaContextDecl` if it is top level decl.

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1518 UsesMap uses; + UsesMap constRefUses; rnk wrote: > If possible, it would be nice to avoid having a second map. I use second map to let the new warning be orthogonal

[PATCH] D79895: Fix warning about using uninitialized variable as function const reference parameter

2020-05-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264076. zequanwu added a comment. Add new warning as subgroup of `Uninitialized`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79895/new/ https://reviews.llvm.org/D79895 Files: clang/include/clang/Analysis/Analyses/UninitializedValues.h

[PATCH] D79895: Fix warning about using uninitialized variable as function const reference parameter

2020-05-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264129. zequanwu added a comment. Use another mapvector `constRefUses` to store uninitialized const reference uses so that the new warning can be easily disable by `-Wno-initialized-const-reference` CHANGES SINCE LAST ACTION

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-05-12 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1305 +if (const auto *CB1 = dyn_cast(I1)) + if (CB1->cannotMerge()) +return Changed; rnk wrote: > It seems

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262933. zequanwu marked an inline comment as done. zequanwu added a comment. update comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: llvm/docs/LangRef.rst

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262922. zequanwu added a comment. use `ConstStmtVisitor` to do recursive lookup for call expression. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files: clang/include/clang/Basic/Attr.td

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262971. zequanwu marked an inline comment as done. zequanwu added a comment. use `ConstEvaluatedExprVisitor` to recursively looking up for call expr CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 Files:

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-05-08 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 262977. zequanwu added a comment. add `nomerge` case in `CodeExtractor.cpp` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78659/new/ https://reviews.llvm.org/D78659 Files: llvm/docs/LangRef.rst llvm/include/llvm/Bitcode/LLVMBitCodes.h

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:950-952 // If the context of a closure type is an initializer for a class - // member (static or nonstatic), it is encoded in a qualified

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added a comment. In D79895#2042992 , @xbolva00 wrote: > Can you provide some compile time data with warning enabled/disabled? I compiled the test case with warning enabled and disabled. Since it is

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:950-952 // If the context of a closure type is an initializer for a class - // member (static or nonstatic), it is encoded in a qualified

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 264976. zequanwu marked 3 inline comments as done. zequanwu added a comment. Fix typo. Diagnose self-init warning if the self-init variable is used as const reference later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79895/new/

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked an inline comment as done. zequanwu added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1518 UsesMap uses; + UsesMap constRefUses; rsmith wrote: > zequanwu wrote: > > rnk wrote: > > > If possible, it would be nice to

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 265046. zequanwu added a comment. Update test cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80153/new/ https://reviews.llvm.org/D80153 Files: clang/lib/AST/MicrosoftMangle.cpp clang/test/CodeGenCXX/mangle-ms-cxx11.cpp

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 265031. zequanwu added a comment. Remove check for context of `LambdaContextDecl`. Update test cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80153/new/ https://reviews.llvm.org/D80153 Files: clang/lib/AST/MicrosoftMangle.cpp Index:

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-20 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 265388. zequanwu edited the summary of this revision. zequanwu added a comment. Check `LambdaContextDecl` is not `ParamVarDecl`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80153/new/ https://reviews.llvm.org/D80153 Files:

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 265605. zequanwu marked 2 inline comments as done. zequanwu added a comment. rename parameter `uses` to `um` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79895/new/ https://reviews.llvm.org/D79895 Files:

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1590-1600 +// flush all const reference uses diags +for (const auto : constRefUses) { + const VarDecl *vd = P.first; + const MappedType = P.second; + + UsesVec *vec =

[PATCH] D80409: [MS ABI] Add mangled type for template integer argument

2020-05-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: thakis. zequanwu added a project: clang. Herald added a subscriber: cfe-commits. To differentiate different types of template integer arguments, as MSVC does. Bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45969 which is caused by

[PATCH] D79121: Add nomerge statement attribute to clang

2020-05-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 265648. zequanwu retitled this revision from "Add nomerge function attribute to clang" to "Add nomerge statement attribute to clang". zequanwu edited the summary of this revision. zequanwu added a comment. update test case. CHANGES SINCE LAST ACTION

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289802. zequanwu added a comment. address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289769. zequanwu marked an inline comment as done. zequanwu added a comment. address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files:

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:897 + DiagnosticOptions::MSVC; +if (isMSVC || !DestPointee->isVoidType()) + Self.Diag(OpRange.getBegin(), hans wrote: > I don't think the if-statement is necessary.

[PATCH] D85778: More accurately compute the ranges of possible values for +, -, *, &, %.

2020-09-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D85778#2251173 , @rsmith wrote: > In D85778#2251160 , @zequanwu wrote: > >> Hi, this change seems like hits a false positive case in chromium build: >>

[PATCH] D85778: More accurately compute the ranges of possible values for +, -, *, &, %.

2020-09-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Hi, this change hits a false positive case in chromium build: https://bugs.chromium.org/p/chromium/issues/detail?id=1124085 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85778/new/ https://reviews.llvm.org/D85778

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-31 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Friendly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-31 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289047. zequanwu added a comment. update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 Files: clang/include/clang/Lex/Lexer.h

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-07 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3e782bf8090c: [Sema][MSVC] warn at dynamic_cast when /GR- is given (authored by zequanwu). Changed prior to commit:

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291118. zequanwu added a comment. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. - Address comment. - Add cl::opt to disable emitting skipped regions for empty lines and comments (used on test case only), and update test cases

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 29. zequanwu marked 2 inline comments as done. zequanwu retitled this revision from "[MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral " to "[MS ABI] Add mangled type for auto template parameter whose argument kind

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291331. zequanwu added a comment. Add check for MSVC version 19.14 (removed `AutoParmTemplate auto_bool` as its mangled name conflicts with `AutoParmTemplate<0> auto_int` in V19.14). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Thanks for reviewing. One last thing I need to resolve is to handle the coverage test case as skipped regions are emitted for empty lines, and haven't thought a good way other than adding checks for those new skipped regions. Repository: rG LLVM Github Monorepo

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rsmith, hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Bug: https://bugs.llvm.org/show_bug.cgi?id=47467 Repository: rG LLVM Github Monorepo

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 290846. zequanwu added a comment. Remove unused field. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87425/new/ https://reviews.llvm.org/D87425 Files:

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. zequanwu marked an inline comment as done. Closed by commit rGf975ae4867d1: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time (authored by

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 292017. zequanwu added a comment. reopen the diff and update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291988. zequanwu added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87425/new/ https://reviews.llvm.org/D87425 Files: clang/include/clang/AST/ExprCXX.h

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu marked 4 inline comments as done. zequanwu added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx2a.cpp:312 // expected-note@+1 {{typeid applied to object 'extern_b2' whose dynamic type is not constant}} - static_assert((extern_b2) == (B2));

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D87425#2265523 , @hans wrote: > I'm not sure that changing isPotentiallyEvaluated() is the right thing to do. > The meaning of that corresponds to text in the standard: > https://eel.is/c++draft/expr.typeid#3 so changing it

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291630. zequanwu added a comment. Rename option EmptyLineCoverage to EmptyLineCommentCoverage and mark it cl::Hidden. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291619. zequanwu added a comment. If the operand of CXXTypeidExpr is already most derived object, no need to look up vtable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87425/new/

[PATCH] D87648: [Coverage][NFC] Remove skipped region after added into MappingRegions

2020-09-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: vsk. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. There is no need to scan through all SkippedRegions when some of them are already added into MappingRegions.

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289617. zequanwu added a comment. address comment. emit second segment when first segment is skipped and activeregions is not empty. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289603. zequanwu added a comment. warn at dynamic_cast like MSVC in clang-cl, but not in clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files:

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:597 const auto = Segments[I]; - if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col < R.Col)) { + if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col <= R.Col)) {

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 289582. zequanwu added a comment. Emit second segment as wrapped segment only when first segment is RegionEntry Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 Files:

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:895 + if (!Self.getLangOpts().RTTIData) { +bool isMSVC = Self.getDiagnostics().getDiagnosticOptions().getFormat() == + DiagnosticOptions::MSVC; hans wrote: > zequanwu

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-02 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:483 bool GapRegion = CR.value().Kind == CounterMappingRegion::GapRegion; if (CR.index() + 1 == Regions.size() || vsk wrote: > zequanwu wrote: > > vsk

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-31 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:895 + if (!Self.getLangOpts().RTTIData) { +bool isMSVC = Self.getDiagnostics().getDiagnosticOptions().getFormat() == + DiagnosticOptions::MSVC; hans wrote: > zequanwu

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu closed this revision. zequanwu added a comment. committed here https://reviews.llvm.org/rG83286a1a8f059d1664b64341854676a36a85cecd. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80409/new/ https://reviews.llvm.org/D80409

[PATCH] D80409: [MS ABI] Add mangled type for auto template parameter whose argument kind is Integeral

2020-09-11 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 291355. zequanwu added a comment. update comment. add a test case for template function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80409/new/ https://reviews.llvm.org/D80409 Files:

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-26 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 287835. zequanwu added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286167. zequanwu added a comment. Update test. The bug is when start or end location skipped regions has the same spelling line number as PrevTokLoc or NextTokLoc but in different files. In the test case, end location of skipped regions is in line 6 and

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286123. zequanwu marked 3 inline comments as done. zequanwu edited the summary of this revision. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:326 +if (PrevTokLoc.isValid()) { + unsigned PrevTokLine = SM.getSpellingLineNumber(PrevTokLoc); + if (SR.LineStart == PrevTokLine) { vsk wrote: > It looks like

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:580 const auto = Segments[I]; - if (!(L.Line < R.Line) && !(L.Line == R.Line && L.Col < R.Col)) { + if (!(L.Line <= R.Line) && !(L.Line == R.Line && L.Col <= R.Col)) {

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: vsk, hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Fix a bug if {Prev, Next}TokLoc is in different file from skipped regions' {start, end}Loc Repository: rG

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286387. zequanwu added a comment. Minor fix on test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86116/new/ https://reviews.llvm.org/D86116 Files: clang/lib/CodeGen/CoverageMappingGen.cpp

[PATCH] D86116: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-18 Thread Zequan Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG84fffa672831: [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same fileā€¦ (authored by zequanwu). Repository: rG LLVM Github

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-26 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 288062. zequanwu marked 3 inline comments as done. zequanwu added a comment. Address cmments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files:

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-26 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/SemaCXX/ms_no_dynamic_cast.cpp:1 +// RUN: %clang_cl %s /GR- -fsyntax-only 2>&1 | FileCheck %s + hans wrote: > When using %clang_cl, the source file should always come after a "--", > otherwise if for

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:895 + if (!Self.getLangOpts().RTTIData) { +bool isMSVC = Self.getDiagnostics().getDiagnosticOptions().getFormat() == + DiagnosticOptions::MSVC; hans wrote: > zequanwu

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added a reviewer: hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D86369 Files:

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/SemaCXX/ms_dynamic_cast.cpp:16 +B *b = new D1(); +auto d = dynamic_cast(b); // expected-warning{{should not use dynamic_cast with /GR-}} +} lebedev.ri wrote: > I'm not sure it makes sense to talk

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:483 bool GapRegion = CR.value().Kind == CounterMappingRegion::GapRegion; if (CR.index() + 1 == Regions.size() || vsk wrote: > zequanwu wrote: > > vsk

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286622. zequanwu added a comment. Add a wrapped segment at location of zero-length segment with last pushed region count. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-19 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 286688. zequanwu added a comment. minor fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 Files: clang/include/clang/Lex/Lexer.h

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-26 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu reopened this revision. zequanwu added a comment. This revision is now accepted and ready to land. Here is a repro of crash caused by this change. int k, l; #define m(e) e##e void p() { int kk,ll; if (k) m(k); else l = m(l); } `SM.getExpansLoc(AfterLoc)`

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 288380. zequanwu marked an inline comment as done. zequanwu added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86369/new/ https://reviews.llvm.org/D86369 Files:

[PATCH] D86369: [Sema][MSVC] warn at dynamic_cast when /GR- is given

2020-08-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:895 + if (!Self.getLangOpts().RTTIData) { +bool isMSVC = Self.getDiagnostics().getDiagnosticOptions().getFormat() == + DiagnosticOptions::MSVC; hans wrote: > I'm not

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D85176#2241257 , @phosek wrote: > We started seeing assertion failure after rolling a toolchain that contains > this change and `git bisect` identified this change. I have filed a bug with > a reproducer as PR47324. It has

[PATCH] D84988: WIP [Coverage] Add empty line regions to SkippedRegions

2020-08-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 285811. zequanwu added a comment. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. - Rebase. - Merging adjcent skipped regions, if the regions are in the same file, could reduce binary size. - The new empty lines regions break

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-08-17 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D84988#2221805 , @vsk wrote: > Hi @zequanwu, are you looking for review for this patch? I wasn't sure > because of the WIP label. Yes, I removed the label. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-21 Thread Zequan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9caa3fbe03f4: [Coverage] Add empty line regions to SkippedRegions (authored by zequanwu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D84988#2282849 , @vsk wrote: > @zequanwu FTR, I don't have any outstanding concerns (I understand you might > be asking for a second reviewer to chime in though). Thanks for reviewing. Then, I think it might be ready to

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Friendly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84988/new/ https://reviews.llvm.org/D84988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D87648: [Coverage][NFC] Remove skipped region after added into MappingRegions

2020-09-28 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu abandoned this revision. zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:353 +SkippedRanges.erase( +std::remove_if( +SkippedRanges.begin(), SkippedRanges.end(), vsk wrote: > In the worst case,

[PATCH] D79121: Add nomerge statement attribute to clang

2020-05-25 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu closed this revision. zequanwu added a comment. landed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79121/new/ https://reviews.llvm.org/D79121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

  1   2   3   4   5   >