[PATCH] D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use

2020-08-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:275 + if (DriverArgs.getLastArgValue(options::OPT_fcxx_abi_EQ) == "Fuchsia") +CC1Args.push_back("-fexperimental-relative-c++-abi-vtables"); } phosek wrote: > mcgrathr

[PATCH] D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use

2020-08-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, rjmccall, rsmith, pcc, hansec. leonardchan added a project: clang. Herald added subscribers: dang, dschuff. leonardchan requested review of this revision. Herald added a subscriber: aheejin. This implements the flag

[PATCH] D85576: [clang][Fuchsia] Add relative-vtables multilib

2020-08-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 284573. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85576/new/ https://reviews.llvm.org/D85576 Files: clang/cmake/caches/Fuchsia-stage2.cmake clang/lib/Driver/ToolChains/Fuchsia.cpp

[PATCH] D85312: [ADT] Move FixedPoint.h from Clang to LLVM.

2020-08-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. The patch seems straightforward. Other than moving code and trimming `llvm::` from types, not sure if there's anything else I should expect. LGTM. Repository: rG LLVM Github

[PATCH] D85576: [clang][Fuchsia] Add relative-vtables multilib

2020-08-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. Herald added a subscriber: mgorny. leonardchan requested review of this revision. This adds a multilib for Fuchsia that is built with the relative vtables ABI. This

[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] 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

[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] 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

[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`

[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

[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] 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

[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 =

[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] 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

[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.

[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] 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] 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=269951#toc Repository: rG LLVM

[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] 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] 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

[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] 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:

[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

[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

[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

[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-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] D72959: Relative VTables ABI on Fuchsia

2020-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGVTables.cpp:646 + +// Take offset from stub to the vtable component. +llvm::Function *HiddenFunc = M.getFunction(StubName); rjmccall wrote: > That's not what this block is doing. > > I

[PATCH] D79974: [Fuchsia] Do not enable the Z3 solver for a fuchsia toolchain

2020-05-14 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG592303a53e6b: [Fuchsia] Do not enable the Z3 solver for a fuchsia toolchain (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D79974: [Fuchsia] Do not enable the Z3 solver for a fuchsia toolchain

2020-05-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a reviewer: phosek. leonardchan added a project: clang. Herald added subscribers: dexonsmith, mikhail.ramalho, mgorny. phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM, don't forget to

[PATCH] D79698: Run Coverage pass before other *San passes under new pass manager

2020-05-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D79698#2037425 , @aeubanks wrote: > In D79698#2037305 , @leonardchan > wrote: > > > Just to followup on this: We believe the root cause of the error we're > > running into is that

[PATCH] D79698: Run Coverage pass before other *San passes under new pass manager

2020-05-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Just to followup on this: We believe the root cause of the error we're running into is that some sancov guards in one comdat are being referenced by symbols in another comdat, so due to linking order, the other comdat in question is referencing a sancov guard that

[PATCH] D79698: Run Coverage pass before other *San passes under new pass manager

2020-05-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. This patch seems to lead to the undefined symbol error we're seeing when building fuchsia: ld.lld: error: relocation refers to a discarded section: __sancov_guards >>> defined in user-x64-sancov.shlib/obj/third_party/ulib/scudo/scudo.string_utils.cc.o >>>

[PATCH] D79698: Run Coverage pass before other *San passes under new pass manager

2020-05-11 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/D79698/new/ https://reviews.llvm.org/D79698

[PATCH] D79445: [MSan] Pass MSan command line options under new pass manager

2020-05-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D79445#2021502 , @aeubanks wrote: > In D79445#2021311 , @leonardchan > wrote: > > > In `addSanitizersAtO0`, could you make something similar to the `ASanPass` > > lambda for the

[PATCH] D79445: [MSan] Pass MSan command line options under new pass manager

2020-05-05 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. In `addSanitizersAtO0`, could you make something similar to the `ASanPass` lambda for the MSan passes and also apply it when adding kernel MSan? Repository: rG LLVM Github

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

2020-05-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 261519. leonardchan marked 6 inline comments as done. 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

[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

[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

[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

[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] 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

[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

[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

[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] 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:

[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.

[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

[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

[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] 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 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#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

[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

[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

[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();

[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] 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:

[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

[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: >

[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] D76389: [NewPM] Run the Speculative Execution Pass only if the target has divergent branches

2020-03-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D76389#1951135 , @arsenm wrote: > Commit message should say only if? Updated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76389/new/ https://reviews.llvm.org/D76389

[PATCH] D74324: Tools emit the bug report URL on crash

2020-03-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi. This patch seems to cause the undefined symbol error we're seeing when linking clang: FAILED: bin/clang-11 : && /b/s/w/ir/k/cipd/bin/clang++ --sysroot=/b/s/w/ir/k/cipd/linux-amd64 -I/b/s/w/ir/k/recipe_cleanup/clangzmv99P/zlib_install/include -fPIC

[PATCH] D76856: Fix TBAA for unsigned fixed-point types

2020-03-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/D76856/new/ https://reviews.llvm.org/D76856

[PATCH] D74619: [ARM] Enabling range checks on Neon intrinsics' lane arguments

2020-03-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D74619#1936336 , @pratlucas wrote: > Hi @leonardchan , > > I've double-checked the Neon intrinsics reference and it indeed confirms that > the only allowed value for the lane argument for `vdupq_lane_f64` is `0`: > >

[PATCH] D74619: [ARM] Enabling range checks on Neon intrinsics' lane arguments

2020-03-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Actually this may not need a reproducer since the error seems straightforward with just calling a builtin function. The main issue is that before this patch, something like #include float64x2_t func(int8x8_t x) { return __builtin_neon_splatq_lane_v(x, 1,

[PATCH] D74619: [ARM] Enabling range checks on Neon intrinsics' lane arguments

2020-03-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi, a bisect seems to show https://reviews.llvm.org/rGf56550cf7f12b581a237b48a7f4d8b6682d45a09 is causing us to see the following error: error: argument value 1 is outside the valid range [0, 0] v2 = vdupq_lane_f64(vget_high_f64(a.v), 1); ^

[PATCH] D76416: [WIP][ASan] Apply -ffile-prefix-map mappings to ASan instrumentation

2020-03-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a subscriber: mcgrathr. leonardchan added a comment. Putting this on hold for now. Although this implementation works for ASan, it would be have to be repeated for other tools like SourceBasedCoverage or other sanitizers. After discussing with @phosek and @mcgrathr, a more

[PATCH] D76416: [ASan] Apply -ffile-prefix-map mappings to ASan instrumentation

2020-03-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 251421. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76416/new/ https://reviews.llvm.org/D76416 Files: clang/include/clang/Basic/CodeGenOptions.h clang/lib/CodeGen/ModuleBuilder.cpp

[PATCH] D76416: [ASan] Apply -ffile-prefix-map mappings to ASan instrumentation

2020-03-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 251289. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76416/new/ https://reviews.llvm.org/D76416 Files: clang/include/clang/Basic/CodeGenOptions.h clang/lib/CodeGen/ModuleBuilder.cpp

[PATCH] D76416: [ASan] Apply -ffile-prefix-map mappings to ASan instrumentation

2020-03-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, rnk, MaskRay, Lekensteyn, rsmith, echristo. leonardchan added a project: LLVM. Herald added subscribers: cfe-commits, ormris, hiraditya. Herald added a project: clang. leonardchan updated this revision to Diff 251289. Some

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

2020-03-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, arsenm, nhaehnle. leonardchan added a project: LLVM. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya, wdng. Herald added a project: clang. The `SpeculativeExecutionPass` was running under the new PM

[PATCH] D75890: [libunwind] Remove __FILE__ and __LINE__ from error reporting

2020-03-10 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1c70dec18c7e: [libunwind] Remove __FILE__ and __LINE__ from error reporting (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75890: [libunwind] Remove __FILE__ and __LINE__ from error reporting

2020-03-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D75890#1915493 , @thakis wrote: > `__FILE__` only expands to an absolute path if you pass an absolute path to > clang (ctrl-f "__FILE__" on > http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html). > >

[PATCH] D75890: [libunwind] Remove __FILE__ and __LINE__ from error reporting

2020-03-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 249468. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75890/new/ https://reviews.llvm.org/D75890 Files: libunwind/src/config.h Index: libunwind/src/config.h

[PATCH] D75890: [libunwind] Add flag to disable logging

2020-03-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a reviewer: phosek. Herald added subscribers: libcxx-commits, cfe-commits, mgorny. Herald added projects: clang, libc++. We were seeing non-deterministic binary size differences depending on which toolchain was used to build fuchsia. This is

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Submitted fixes in d2cbaf1755ffa90300365c0d71400a5ee4ada3bd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74704/new/

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Unsure if my reply was sent over email so copying it here. Yup, adding `// REQUIRES: platform-linker` to both `*-extra.c` files seems to fix it. Thanks. Will you be sending out the fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi again, I think e058667a2e017d3225a9bb067dbac7f2159576f7 might've broken our toolchain again: FAIL: Clang :: Driver/riscv32-toolchain-extra.c (5723 of 17018) TEST

[PATCH] D69876: Support output constraints on "asm goto"

2020-02-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Woops, sorry. Didn't see you sent out https://reviews.llvm.org/rGe11f9fb4508534d31b09d2ba6cd22428ccc75f65. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69876/new/ https://reviews.llvm.org/D69876

[PATCH] D69876: Support output constraints on "asm goto"

2020-02-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *Bump* We're also seeing the same test fail on our aarch64 bots: https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-arm64/b8887516314819686496?blamelist=1#blamelist-tab FAIL: Clang :: Analysis/uninit-asm-goto.cpp (837 of 17008)

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

2020-02-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Basic/FixedPoint.cpp:242 + } else +Overflowed = Result < Min || Result > Max; + ebevhan wrote: > rjmccall wrote: > > ebevhan wrote: > > > rjmccall wrote: > > > > leonardchan wrote: > > > > > ebevhan

[PATCH] D74704: Support -fuse-ld=lld for riscv

2020-02-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D74704#1881012 , @vvereschaka wrote: > Hello @serge-sans-paille, > > looks like these changes broke the ARM builders: > http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/4749 >

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

2020-01-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Basic/FixedPoint.cpp:242 + } else +Overflowed = Result < Min || Result > Max; + ebevhan wrote: > rjmccall wrote: > > ebevhan wrote: > > > ebevhan wrote: > > > > rjmccall wrote: > > > > > If the

[PATCH] D73188: [AST] Improve overflow diagnostics for fixed-point constant evaluation.

2020-01-22 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. Could you also add a few test lines showing this warning doesn't appear for operations where the result is a saturated type? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D70919: [Hexagon] Avoid passing unsupported options to lld when -fuse-ld=lld is used

2019-12-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi! This seems to be causing some test failures on our bots: https://ci.chromium.org/p/fuchsia/builders/ci/clang-linux-x64/b8893521019883752048 : 'RUN: at line 553'; /b/s/w/ir/k/recipe_cleanup/clangciZYdn/llvm_build_dir/bin/clang -### -target

[PATCH] D70575: [Clang] Define Fuchsia C++ABI

2019-11-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Could you add a test to show that with a fuchsia target we end up returning `this` from constructors + destructors and ensure that this ABI is used? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70575/new/

[PATCH] D70576: [Clang] Always set -z now linker option on Fuchsia

2019-11-21 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. But just to confirm, did you test this on CQ/bots by adding `["now", "-z"]` as linker flags to the `config("compiler")` in Fuchsia + Zircon? Repository: rG LLVM Github

[PATCH] D70274: [clang][IFS] Driver pipeline change for clang-ifs: generate interface stubs after standard pipeline.

2019-11-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi! I think this patch might be causing some test failures on our mac bots: FAIL: Clang :: InterfaceStubs/merge-conflict-test.c (6268 of 16220) TEST 'Clang :: InterfaceStubs/merge-conflict-test.c' FAILED Script: --

[PATCH] D68407: [WIP][RISCV] Use compiler-rt if no GCC installation detected

2019-11-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi. I think this patch is causing some test failures for us: FAIL: Clang :: Driver/riscv64-toolchain.c (5479 of 16161) TEST 'Clang :: Driver/riscv64-toolchain.c' FAILED Script: -- : 'RUN: at line 3';

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

2019-11-12 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe278c138a937: [Sema] Add MacroQualified case for FunctionTypeUnwrapper (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67992/new/

[PATCH] D69664: [Diagnostics] Teach -Wnull-dereference about address_space attribute

2019-11-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Yup, a bisect shows it was this patch that caused it. I filed a bug for tracking at https://bugs.llvm.org/show_bug.cgi?id=43950 and attached a reproducer. Could you look into this? Thanks. Comment at: clang/lib/Sema/SemaExpr.cpp:487 +const

[PATCH] D69664: [Diagnostics] Teach -Wnull-dereference about address_space attribute

2019-11-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi. I have a suspicion this patch is causing a segfault for us when building zircon: https://ci.chromium.org/p/fuchsia/builders/ci/fuchsia-x64-debug-clang/b8897388724384628544 I'm almost done with a bisect and will provide a reproducer if this is the case. Just

[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

[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 ) { +

[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;

[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

<    1   2   3   4   5   6   7   8   9   >