[PATCH] D62888: [NewPM] Port Sancov

2019-07-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 207698. leonardchan marked 5 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/

[PATCH] D62888: [NewPM] Port Sancov

2019-07-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:750 Constant::getNullValue(ArrayTy), "__sancov_gen_"); + appendToCompilerUsed(*CurModule, {Array}); chandlerc wrote: > There is a `GlobalsToAppendTo

[PATCH] D62888: [NewPM] Port Sancov

2019-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* @chandlerc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63638#1560991 , @craig.topper wrote: > In D63638#1560846 , @spatel wrote: > > > I skimmed D63174 but haven't applied > > either of these patches t

[PATCH] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63638#1574373 , @craig.topper wrote: > There's some inliner running because the intrinsics are implemented as > always_inline functions and they are clearly being inlined in -O0. In a > previous post, Chandler said the n

[PATCH] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63638#1574927 , @craig.topper wrote: > What if we just only check the output from the new pass manager. I don't > think I care about the differences between the two. +1 CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-07-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Is it ok to proceed with only checking the new PM output for these tests? If so I could just edit my previous patch to remove the legacy PM run lines since they already include the bitcasts from the new PM. CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-05-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D51329#1498193 , @miyuki wrote: > This caused https://bugs.llvm.org/show_bug.cgi?id=41835 > Could you please look into it? Sorry for the delay. I submitted r360448 as a fix for this. Repository: rC Clang CHANGES SINC

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-05-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D51329#1499307 , @mstorsjo wrote: > This caused a regression when including mingw-w64 headers (in a case where > they happen to include redundant/duplicate attribute specifications), > triggering asserts. See https://bugs.

[PATCH] D61709: [NewPM] Port HWASan and Kernel HWASan

2019-05-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:179 - bool runOnFunction(Function &F) override; - bool doInitialization(Module &M) override; + bool instrumentFunction(Function &F); + void initializeWithModule(Module

[PATCH] D61709: [NewPM] Port HWASan and Kernel HWASan

2019-05-14 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. leonardchan marked 2 inline comments as done. Closed by commit rC360707: [NewPM] Port HWASan and Kernel HWASan (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D61709?vs=198889&i

[PATCH] D58321: Support for relative vtables

2019-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 199696. leonardchan marked 5 inline comments as done. leonardchan added a reviewer: rjmccall. leonardchan removed a subscriber: rjmccall. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58321/new/ https://revie

[PATCH] D58321: Support for relative vtables

2019-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:531 +/// \brief Whether the class uses the relative C++ vtable ABI. +unsigned IsRelativeCXXABI : 1; + pcc wrote: > rjmccall wrote: > > Should we proactively generalize this a

[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille. leonardchan added a project: clang. Herald added subscribers: kristof.beyls, javed.absar. This is a patch that should go on top of D58375 which address

[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 4 inline comments as done. leonardchan added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1104-1105 // which is just that always inlining occurs. - MPM.addPass(AlwaysInlinerPass()); + // We always pass false here since accordi

[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 200860. leonardchan marked an inline comment as done. leonardchan edited the summary of this revision. Herald added subscribers: llvm-commits, dexonsmith, steven_wu, kbarton, hiraditya, eraman, nemanjai, mehdi_amini. Herald added a project: LLVM. Reposito

[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 201089. leonardchan edited the summary of this revision. Herald added a subscriber: aprantl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62225/new/ https://reviews.llvm.org/D62225 Files: clang/lib/CodeGe

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D53738#1326071 , @rjmccall wrote: > I'm fine with making this change under the assumption that we've gotten the > language rule right. Even if that weren't abstractly reasonable for general > language work — and I do thin

[PATCH] D55844: [Fixed Point Arithmetic] Fixed Point Subtraction

2018-12-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: ebevhan, bjope, rjmccall. leonardchan added a project: clang. This patch covers subtraction between fixed point types and other fixed point types or integers, using the conversion rules described in 4.1.4 of N1169. Repository: rC

[PATCH] D55868: [Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation

2018-12-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: ebevhan, bjope, rjmccall. leonardchan added a project: clang. leonardchan added a parent revision: D53738: [Fixed Point Arithmetic] Fixed Point Addition. This patch includes logic for constant expression evaluation of fixed point ad

[PATCH] D55844: [Fixed Point Arithmetic] Fixed Point Subtraction

2019-01-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 180920. leonardchan marked an inline comment as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55844/new/ https://reviews.llvm.org/D55844 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/Frontend/fixed_point_s

[PATCH] D67971: [WIP] Add warning when zero-initializing a union if its first member is not is largest

2019-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This may result in the entire union not being initialized. For example: union U { uint32_t x; uint64_t y; }; void func() { U u = {}; ... } Some might assume that `

[PATCH] D67992: [Sema] Add FunctionTypeUnwrapper

2019-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a reviewer: rsmith. leonardchan added a project: clang. Herald added a subscriber: kristof.beyls. This is a fix for PR43315. An assertion error is hit for this minimal example: //clang -cc1 -triple x86_64-- -S tstVMStructRC-min.cpp #define

[PATCH] D67992: [Sema] Add MacroQualified case for FunctionTypeUnwrapper

2019-09-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* @rsmith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67992/new/ https://reviews.llvm.org/D67992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D20561: Warn when taking address of packed member

2019-10-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. I think I found a false negative with this where if the member is accessed from a packed struct type returned from a function, the warning does not appear: typedef struct { uint8_t a; ui

[PATCH] D46084: Addition of the Fixed Point _Accum type

2018-04-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. This diff includes changes for supporting the following types. // Primary fixed point types signed short _Accum s_short_accum; signed _Accum s_accum; signed long _Accum s_

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-06-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich, rsmith, ebevhan, rjmccall. leonardchan added a project: clang. This patch proposes an abstract type that represents fixed point numbers, similar to APInt or APSInt that was discussed in https://revie

[PATCH] D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag

2018-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, jakehehrlich, rjmccall, ebevhan, rsmith. leonardchan added a project: clang. - Rename the `-fsame-fbits` flag to `-fpadding-on-unsigned-fixed-point` - Move the flag from a driver option to a cc1 option - Rename the

[PATCH] D46915: [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals

2018-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/TargetInfo.h:90 + // by default. + bool SameFBits; + rjmccall wrote: > Sorry for the extremely late review, but this really needs to be renamed. > Please remember that other compiler maintaine

[PATCH] D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag

2018-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 153335. leonardchan added a comment. Formatting and forgot to get rid of `Group` and `Flags` Repository: rC Clang https://reviews.llvm.org/D48727 Files: include/clang/Basic/LangOptions.def include/clang/Basic/TargetInfo.h include/clang/Driver/C

[PATCH] D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag

2018-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Oh, having the same number of fractional bits is what leads to unsigned types having one bit of padding, and vice versa. If this flag is set to false, then the integral and fractional parts of the unsigned types take up the whole bit width of the underlying scaled i

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/FixedPoint.h:23 + +class FixedPointNumber { + public: rjmccall wrote: > ebevhan wrote: > > rjmccall wrote: > > > The established naming convention here — as seen in `APInt`, `APFloat`, > > > `APV

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 153426. leonardchan marked 8 inline comments as done. leonardchan added a comment. Herald added a subscriber: mgorny. - Renamed to APFixedPoint - Added `FixedPointSemantics` to represent saturation and whether or not padding is involved. Similar to `APFlo

[PATCH] D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag

2018-06-29 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC335993: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag (authored by leonardchan, committed by ). Repository: rC Clang https://reviews.llvm.org/D48727 Files: include/clang/Basic/LangOptions.def

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 153821. leonardchan marked 10 inline comments as done. leonardchan edited the summary of this revision. leonardchan added a comment. - Added tests - Moved all conversion logic into `convert` - Saturation is checked by checking the bits above the sign bit i

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: include/clang/Basic/FixedPoint.h:31 + SatNoPadding, +}; + ebevhan wrote: > rjmccall wrote: > > I figured you'd want this to be a struct which include the scale, width, > > signed-ness, and saturating-ness; and then

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 153924. leonardchan marked 7 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basi

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Basic/FixedPoint.cpp:40 + if (DstWidth > Val.getBitWidth()) +Val = Val.extend(DstWidth); + if (Upscaling) ebevhan wrote: > It should be possible to replace this with `extOrTrunc` and move it below the > sa

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 154020. leonardchan marked 2 inline comments as done. leonardchan added a comment. - Renamed `fixedPointSemantics` to `FixedPointSemantics` and hid the members behind getters Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clan

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/Basic/FixedPoint.cpp:40 + if (DstWidth > Val.getBitWidth()) +Val = Val.extend(DstWidth); + if (Upscaling) ebevhan wrote: > leonardchan wrote: > > ebevhan wrote: > > > It should be possible to replace this w

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 154465. leonardchan marked 4 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basi

[PATCH] D46915: [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals

2018-07-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D46915#1162038, @erichkeane wrote: > See this bug here: https://bugs.llvm.org/show_bug.cgi?id=38161 > > This patch doesn't seem to properly consider integers, and ignores octals, > which I suspect shouldn't be the case. I just requested

[PATCH] D49327: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals

2018-07-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: erichkeane, ebevhan, rjmccall, rsmith, jakehehrlich, mcgrathr, phosek. leonardchan added a project: clang. This addresses a bug brought up in https://bugs.llvm.org/show_bug.cgi?id=38161 where integer literals could be treated as fix

[PATCH] D46915: [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point Literals

2018-07-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @erichkeane I created a patch at https://reviews.llvm.org/D49327 with the fix for this and added you as a reviewer. Repository: rC Clang https://reviews.llvm.org/D46915 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @ebevhan Any followup on the patch/my previous comments? Repository: rC Clang https://reviews.llvm.org/D48661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D49327: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals

2018-07-17 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337289: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as… (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D49327?vs=155519&id=1

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. This patch adds the `noderef` attribute in clang and checks for dereferences of types that have this attribute. This attribute is currently used by sparse and would like to be po

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 156167. leonardchan added a comment. - Added checks for expressions in statements other than declarations or expression statements Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 156174. leonardchan marked 3 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D48661 Files: include/clang/AST/ASTContext.h include/clang/Basic/FixedPoint.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basi

[PATCH] D68832: [tsan,msan] Insert module constructors in a module pass

2019-10-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. Thanks for finding the root cause of this! Comment at: llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp:143 + +static void insertModuleCtor(Module &M) { + g

[PATCH] D66712: [Driver] Enable ShadowCallStack, not SafeStack, by default on AArch64 Fuchsia

2019-10-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan closed this revision. leonardchan added a comment. Manually closed since `git push` didn't seem to automatically close this. Committed under https://github.com/llvm/llvm-project/commit/85b718f53a3575bca2f1b7fdb1b3aaa6df7c10e3. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D80412: Summary: [Lexer] Fix invalid suffix diagnostic for fixed-point literals

2020-05-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM. Thanks for fixing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80412/new/ https://reviews.llvm.org/D80412

[PATCH] D80412: Summary: [Lexer] Fix invalid suffix diagnostic for fixed-point literals

2020-05-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D80412#2056353 , @nagart wrote: > I don't have commit access. Could any one please help to commit this patch. > Thanks in advance. No problem. Committed in ef37444058550b0f49441b994c9e9368d8e42da8

[PATCH] D80412: Summary: [Lexer] Fix invalid suffix diagnostic for fixed-point literals

2020-05-27 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGef3744405855: [Lexer] Fix invalid suffix diagnostic for fixed-point literals (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80412/n

[PATCH] D80692: Run Coverage pass before other *San passes under new pass manager, round 2

2020-05-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: llvm/include/llvm/Passes/PassBuilder.h:597-598 /// /// This extension point allows adding optimizations at the very end of the /// function optimization pipeline. A key difference between this and the /// legacy PassManag

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-05-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77836/new/ https://reviews.llvm.org/D77836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D80692: Run Coverage pass before other *San passes under new pass manager, round 2

2020-05-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. Would be worthwhile to write a small test that asserts Sancov runs before the other sanitizers under the new PM? Aside from this, LGTM. Comment at: llvm/include/l

[PATCH] D80692: Run Coverage pass before other *San passes under new pass manager, round 2

2020-05-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. In D80692#2061739 , @aeubanks wrote: > I foolishly submitted without running check-all, and it turns out this broke > a test under check-clang. > Looks like https://reviews.llvm.org/D62888

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-06-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 267684. leonardchan added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77836/new/ https://reviews.llvm.org/D77836 Files: clang/include/clang/Sema/Initialization.h clang/lib/Sema/Sem

[PATCH] D77592: [clang] Frontend components for the relative vtables ABI

2020-06-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. @rjmccall Would it be fine to submit this since you gave LGTM on D72959 ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77592/new/ https://reviews.llvm.org/D77592 ___

[PATCH] D81031: [OpenMP] Add Additional Function Attribute Information to OMPKinds.def

2020-07-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D81031#2159646 , @sstefan1 wrote: > Just in case you haven't seen already, > `clang/test/OpenMP/barrier_codegen.cpp` needs to be updated as well. Also chiming in to say we're seeing these failures on our bots (https://lo

[PATCH] D84202: [clang][noderef] Enable -Wnoderef warning for CXX C-style casts

2020-07-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: aaron.ballman, rsmith. leonardchan added a project: clang. We find it more valuable to warn on all instances we're removing the `noderef` attribute from a pointer. This patch removes the type holes where we initially didn't warn on

[PATCH] D83812: [clang][RelativeVTablesABI] Do not emit stubs for architectures that support a PLT relocation

2020-07-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 279354. leonardchan marked an inline comment as done. leonardchan added a comment. Add a method to `TargetCodeGenInfo` the returns if the target supports PC relative PLT relocations, Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D84202: [clang][noderef] Enable -Wnoderef warning for CXX C-style casts

2020-07-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D84202#2179618 , @aaron.ballman wrote: >> users can still disable the warning on line granularity with pragmas. > > This makes me a bit uncomfortable because those pragmas extremely ugly (and > not easily portable). Also,

[PATCH] D66490: [NewPM] Enable the New Pass Manager by Default in Clang

2020-04-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D66490#1958747 , @aeubanks wrote: > In D66490#1638708 , @hfinkel wrote: > > > In D66490#1638162 , @rupprecht > > wrote: > > > > > We already

[PATCH] D77249: [MSan] Pass command line options to MSan with new pass manager

2020-04-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: compiler-rt/test/msan/chained_origin_empty_stack_npm.cpp:4 +// this test. +// RUN: %clangxx_msan -fsanitize-memory-track-origins=2 \ +// RUN: -fexperimental-new-pass-manager -O3 %s -o %t && \ nemanjai wrote: > ne

[PATCH] D66490: [NewPM] Enable the New Pass Manager by Default in Clang

2020-04-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > It seems that we can go ahead with this patch if there's no other objections. > I reran a `ninja check-clang` with this patch and all tests seem to pass (at > least when running on x64-linux). Actually disregard this. It seems that there are some compiler-rt tests

[PATCH] D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches

2020-04-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 255474. leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76389/new/ https://reviews.llvm.org/D76389 Files: llvm/include/llvm/Transforms/Scalar/SpeculativeExecu

[PATCH] D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches

2020-04-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:435 if (Level.getSpeedupLevel() > 1) { -FPM.addPass(SpeculativeExecutionPass()); +FPM.addPass(SpeculativeExecutionIfHasBranchDivergencePass());

[PATCH] D77592: [NFC}[CodeGen] Make VTable initialization a method of CGCXXABI

2020-04-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: pcc, rjmccall, rsmith. leonardchan added a project: clang. This patch moves the following instances of this snippet: ConstantInitBuilder builder(CGM); auto components = builder.beginStruct(); CGVT.createVTableInitializer(compon

[PATCH] D57226: [Fixed Point] [AST] Add an AST serialization code for fixed-point literals.

2020-04-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D57226#1969227 , @vabridgers wrote: > https://reviews.llvm.org/D77721 depends on this serialization change for > fixed point literals. You could probably take over and land the patch if @ebevhan doesn't respond back soon

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rsmith, aaron.ballman. leonardchan added a project: clang. `noderef` was failing to trigger warnings in some cases related to c++ style casting. This patch addresses them. Repository: rG LLVM Github Monorepo https://reviews.llvm

[PATCH] D77592: [NFC}[CodeGen] Make VTable initialization a method of CGCXXABI

2020-04-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D77592#1975629 , @rjmccall wrote: > This is a weird point to allow further ABI customization of. I understand > why you want to customize this, but I wonder if it's actually worthwhile to > make a `virtual` function for i

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 3 inline comments as done. leonardchan added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:264 + CheckNoderef(*this, E->getType(), TInfo->getType(), OpLoc); + rsmith wrote: > Warning on this seems reasonable for `static_cast` and

[PATCH] D77592: [NFC}[CodeGen] Make VTable initialization a method of CGCXXABI

2020-04-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D77592#1979030 , @rjmccall wrote: > This is a global switch, right, not something that's mix-and-match between > hierarchies or even between classes? I think I would prefer that the ABI > object just tell us the expected

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:8182-8184 +// Do not check static casts here because they are checked earlier +// in Sema::ActOnCXXNamedCast() +if (!Kind.isStaticCast()) { leonardchan

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 257153. leonardchan marked an inline comment as done. leonardchan added a comment. Updated to address comments and added an RAII class for easier checking before exiting functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 257419. leonardchan added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77836/new/ https://reviews.llvm.org/D77836 Files: clang/include/clang/Sema/Initialization.h clang/lib/Sema/Sem

[PATCH] D77592: [NFC][CodeGen] Add enum for selecting the layout of components in the vtable

2020-04-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 257786. leonardchan retitled this revision from "[NFC}[CodeGen] Make VTable initialization a method of CGCXXABI" to "[NFC][CodeGen] Add enum for selecting the layout of components in the vtable". leonardchan edited the summary of this revision. leonardcha

[PATCH] D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches

2020-04-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 257800. leonardchan marked an inline comment as done. leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76389/new/ https://reviews.llvm.org/D76389 Files: llvm/l

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-06-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Lemme know if there's any more feedback. Will aim for committing this sometime at the end of the day. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77836/new/ https://reviews.llvm.org/D77836

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-06-10 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2f6bb2a69215: [clang][Attribute] Fix noderef attribute false-negatives (authored by leonardchan). Changed prior to commit: https://reviews.llvm.org/D77836?vs=267684&id=269951#toc Repository: rG LLVM

[PATCH] D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches

2020-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan abandoned this revision. leonardchan added a comment. In D76389#2120868 , @arsenm wrote: > This seems like it covers a different case than D82735 > ? I haven't rebased in a while, but D82735

[PATCH] D83294: [Fixed Point] Add codegen for fixed-point shifts.

2020-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3603-3604 auto ResultFixedSema = Ctx.getFixedPointSemantics(ResultTy); - auto CommonFixedSema = LHSFixedSema.getCommonSemantics(RHSFixedSema, true); + auto CommonFixedSema = LHSFixedSema.getCom

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D82663#2130355 , @ebevhan wrote: > Well, it's not so much as adding the bit, but adding the information that the > bit exists. That means either new intrinsics for all of the operations, or > adding flags to the existing o

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-07-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > It wouldn't just be restricted to fixed-point intrinsics, though. It would > have to be added to intrinsics like uadd.sat and usub.sat as well, which > aren't really tied to fixed-point at all. Oh wait, sorry. I think I'm starting to understand now. You're saying

[PATCH] D83294: [Fixed Point] Add codegen for fixed-point shifts.

2020-07-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3857 + + // TODO: This misses out on the sanitizer check below. + if (Ops.isFixedPointOp()) I don't suppose you could file a bug for this and CC me on it so we can remember to do

[PATCH] D83812: [clang][RelativeVTablesABI] Do not emit stubs for architectures that support a PLT relocation

2020-07-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rjmccall, pcc, phosek, mcgrathr, rsmith. leonardchan added a project: clang. Herald added subscribers: s.egerton, simoncook, kristof.beyls. Herald added a reviewer: jdoerfert. Now that LLVM and LLD support the `R_AARCH64_PLT32` reloca

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-06-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73186/new/ https://reviews.llvm.org/D73186 _

[PATCH] D82662: [CodeGen] Use the common semantic for fixed-point codegen, not the result semantic.

2020-06-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM. Thanks for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82662/new/ https://reviews.llvm.org/D82662

[PATCH] D82802: [clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp

2020-06-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a reviewer: phosek. leonardchan added a project: clang. After c7bcd431d9c4bfeb631a3599f1d628603e6351d6 , this test started failing when running with the new pass manager. One

[PATCH] D82802: [clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast.cpp

2020-06-29 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGde172dd17f03: [clang][RelativeVTablesABI] Update CodeGenCXX/RelativeVTablesABI/dynamic-cast. (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D78294: [Fixed Point] Move the compassign LHS type correction a bit further down. NFCI.

2020-04-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78294/new/ https://reviews.llvm.org/D78294 _

[PATCH] D77592: [NFC][CodeGen] Add enum for selecting the layout of components in the vtable

2020-04-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added a comment. In D77592#1985740 , @rjmccall wrote: > I'm not sure if the AST-level v-table layout abstraction really cares about > these differences. I don't think it vends byte offsets into th

[PATCH] D77592: [NFC][CodeGen] Add enum for selecting the layout of components in the vtable

2020-04-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > Okay, sure, if there are already offsets in bytes already in the AST-level > layout, I agree that we should be able to compute all of the byte offsets at > that level. > > How are you planning to handle alignments here? Currently alignment doesn't > affect the l

[PATCH] D77592: [NFC][CodeGen] Add enum for selecting the layout of components in the vtable

2020-04-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 259602. leonardchan added a comment. Updated to reflect the changes in D72959 which make the vtable 4-byte aligned under the `Relative` layout. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D77592: [NFC][CodeGen] Add enum for selecting the layout of components in the vtable

2020-04-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D77592#2002148 , @rjmccall wrote: > Okay. The plan sounds good to me. So you want to roll out this enum in this > patch, but not really use it for much until the follow-up? That was the plan, but I can also add include

[PATCH] D72959: Relative VTables ABI on Fuchsia

2020-04-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGVTables.cpp:623 +llvm::Constant *C, llvm::GlobalVariable *VTable, unsigned vtableIdx, +unsigned lastAddrPoint) const { + // No need to get the offset of a nul

[PATCH] D72959: Relative VTables ABI on Fuchsia

2020-04-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGVTables.cpp:623 +llvm::Constant *C, llvm::GlobalVariable *VTable, unsigned vtableIdx, +unsigned lastAddrPoint) const { + // No need to get the offset of a nul

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-05-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:2557-2558 return; +CheckNoDeref(Self, SrcExpr.get()->getType(), ResultType, + OpRange.getBegin()); } rsmith wrote: > Should we be checking thi

<    1   2   3   4   5   6   7   8   9   >