Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2016-01-25 Thread Bruno Cardoso Lopes via cfe-commits
Ping! On Wed, Jan 20, 2016 at 11:22 AM, Bruno Cardoso Lopes wrote: > bruno updated this revision to Diff 45421. > bruno added a comment. > > Update patch after Richard comments > > > http://reviews.llvm.org/D15173 > > Files: > include/clang/Lex/Preprocessor.h > lib/Lex/PPCaching.cpp > lib/P

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2016-01-28 Thread Bruno Cardoso Lopes via cfe-commits
bruno updated this revision to Diff 46332. bruno added a comment. Update the patch to use ArrayRef and remove a misleading assertion. Richard, any more comments regarding this approach? Thanks, http://reviews.llvm.org/D15173 Files: include/clang/Lex/Preprocessor.h lib/Lex/PPCaching.cpp l

r259311 - [Parser] Update CachedTokens while parsing ObjectiveC template argument list

2016-01-30 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Sat Jan 30 18:47:51 2016 New Revision: 259311 URL: http://llvm.org/viewvc/llvm-project?rev=259311&view=rev Log: [Parser] Update CachedTokens while parsing ObjectiveC template argument list Consider the following ObjC++ snippet: -- @protocol PA; @protocol PB; @class NSArray;

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2016-01-30 Thread Bruno Cardoso Lopes via cfe-commits
bruno accepted this revision. bruno added a reviewer: bruno. bruno added a comment. Thanks, Committed r259311! http://reviews.llvm.org/D15173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-13 Thread Bruno Cardoso Lopes via cfe-commits
Hi Eric, This is very nice! After the addition of this feature, LNT started crashing on x86_64h: FAIL: SingleSource/UnitTests/Vector/SSE/sse_expandfft.compile_time (3 of 2244) FAIL: SingleSource/UnitTests/Vector/SSE/sse_isamax.compile_time (4 of 2244) FAIL: SingleSource/UnitTests/Vector/SSE/sse_

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-16 Thread Bruno Cardoso Lopes via cfe-commits
Hi Eric, On Fri, Nov 13, 2015 at 8:55 PM, Eric Christopher wrote: > This all sounds a little weird as _mm_mul_ps only requires sse. Can you give > me a testcase and command line that you're using to trigger this? clang -O3 -flto -arch x86_64h -fomit-frame-pointer -c test-suite/SingleSource/UnitT

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-16 Thread Bruno Cardoso Lopes via cfe-commits
Thanks Eric!! On Mon, Nov 16, 2015 at 10:32 AM, Eric Christopher wrote: > Fixed thusly: > > dzur:~/sources/llvm/tools/clang> git svn dcommit > Committing to https://llvm.org/svn/llvm-project/cfe/trunk ... > A test/CodeGen/target-features-no-error.c > M lib/CodeGen/CodeGenFunction.cpp > Committed

Re: [libcxx] r253257 - More tests for LWG#2156

2015-11-16 Thread Bruno Cardoso Lopes via cfe-commits
Hi Marshall, reserve.pass.cpp is failing on green dragon bot: /Users/buildslave/jenkins/sharedspace/clang-stage1-cmake-RA_workspace@2/llvm/projects/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp:45:14: error: type 'std::unordered_multimap' does not provide a subscript operator

Re: [clang-tools-extra] r253401 - [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index

2015-11-17 Thread Bruno Cardoso Lopes via cfe-commits
Hi Matthias, This is failing on the green dragon bot: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/13184/ http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/13184/consoleFull#54616856949ba4694-19c4-4d7e-bec5-911270d8a58c Thanks, On Tue, Nov 17, 2015 at 3:43

Re: r253473 - Adding AST matchers for VarDecl storage durations. Can now determine whether a VarDecl has automatic, static, or thread storage duration. This also updates the documentation for matchers

2015-11-18 Thread Bruno Cardoso Lopes via cfe-commits
Hi Aaron, This commit is failing tests due to assertions in the tests: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/13216 Example: Note: Google Test filter = ParserTest.CompletionNamedValues [==] Running 1 test from 1 test case. [--] Global test environment

Re: r253473 - Adding AST matchers for VarDecl storage durations. Can now determine whether a VarDecl has automatic, static, or thread storage duration. This also updates the documentation for matchers

2015-11-18 Thread Bruno Cardoso Lopes via cfe-commits
Thanks! On Wed, Nov 18, 2015 at 9:46 AM, Aaron Ballman wrote: > On Wed, Nov 18, 2015 at 12:44 PM, Bruno Cardoso Lopes > wrote: >> Hi Aaron, >> >> This commit is failing tests due to assertions in the tests: >> http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/13216 > > This was

Re: r253481 - Re-committing r253473 after hopefully fixing the bot breakage. There was a copy-pasta issue that my local testing did not catch.

2015-11-18 Thread Bruno Cardoso Lopes via cfe-commits
Hi Aaron, There's one test failing now: https://smooshbase.apple.com/ci/job/apple-clang-stage1-configure-R_master_check/7042/ FAIL: Clang-Unit :: ASTMatchers/Release+Asserts/ASTMatchersTests/Matcher.VarDecl_StorageDuration (8227 of 24324) TEST 'Clang-Unit :: ASTMatchers/Relea

Re: r253481 - Re-committing r253473 after hopefully fixing the bot breakage. There was a copy-pasta issue that my local testing did not catch.

2015-11-18 Thread Bruno Cardoso Lopes via cfe-commits
Ops, missed you follow up r253486 again. Thanks, On Wed, Nov 18, 2015 at 11:07 AM, Bruno Cardoso Lopes wrote: > Hi Aaron, > > There's one test failing now: > https://smooshbase.apple.com/ci/job/apple-clang-stage1-configure-R_master_check/7042/ > > FAIL: Clang-Unit :: > ASTMatchers/Release+Assert

[PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2015-12-02 Thread Bruno Cardoso Lopes via cfe-commits
bruno created this revision. bruno added reviewers: doug.gregor, akyrtzi. bruno added subscribers: cfe-commits, dexonsmith. Consider the following ObjC++ snippet: @protocol PA; @protocol PB; @class NSArray; typedef int some_t; id FA(NSArray> *h, some_t group); This would hit an asser

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2015-12-07 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Ping! http://reviews.llvm.org/D15173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2015-12-07 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Hi Argyrios, Thanks for the suggestions, will apply them. The assertion seems important to catch subtle bugs, are you sure it should be placed inside a "#ifndef NDEBUG”? http://reviews.llvm.org/D15173 ___ cfe-commits mailing

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2015-12-12 Thread Bruno Cardoso Lopes via cfe-commits
bruno updated this revision to Diff 42649. bruno added a comment. Thanks Duncan and Argyrios, updated a patch with the suggestions! http://reviews.llvm.org/D15173 Files: lib/Lex/PPCaching.cpp test/Parser/objcxx11-protocol-in-template.mm Index: test/Parser/objcxx11-protocol-in-template.mm =

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2015-12-15 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Ping! http://reviews.llvm.org/D15173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-08-28 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Seems like all issues have been addressed? Anything remaining @AaronBallman ? Thanks everyone for all the reviews! https://github.com/llvm/llvm-project/pull/91007 ___ cfe-commits mailing lis

[clang] cirgenmodule buildtopleveldecl husk (PR #90831)

2024-05-02 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/90831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cirgenmodule buildtopleveldecl husk (PR #90831)

2024-05-02 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,62 @@ +//=== CIRGenAction.h - CIR Code Generation Frontend Action -*- C++ -*--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] cirgenmodule buildtopleveldecl husk (PR #90831)

2024-05-02 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,42 @@ +//===--- CIRGenModule.h - Per-Module state for CIR gen --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] cirgenmodule buildtopleveldecl husk (PR #90831)

2024-05-02 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,62 @@ +//=== CIRGenAction.h - CIR Code Generation Frontend Action -*- C++ -*--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] cirgenmodule buildtopleveldecl husk (PR #90831)

2024-05-02 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,28 @@ +//===--- CIRGenTypeCache.h - Commonly used LLVM types and info -*- C++ --*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] cirgenmodule buildtopleveldecl husk (PR #90831)

2024-05-02 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Perhaps add a `-emit-cir` testcase that doesn't test anything but just proves the wiring works. More comments inline. https://github.com/llvm/llvm-project/pull/90831 ___ cfe-commits mailing list cfe-commits@

[clang] [CIR] Add CIRGenerator and plug it via CIRGenAction (PR #90831)

2024-05-02 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/90831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add CIRGenerator and plug it via CIRGenAction (PR #90831)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,28 @@ +//===--- CIRGenTypeCache.h - Commonly used LLVM types and info -*- C++ --*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Add CIRGenerator and plug it via CIRGenAction (PR #90831)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/90831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add CIRGenerator and plug it via CIRGenAction (PR #90831)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes requested changes to this pull request. https://github.com/llvm/llvm-project/pull/90831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add CIRGenerator and plug it via CIRGenAction (PR #90831)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s | FileCheck %s + +// CHECK: CIRGenModule::buildTopLevelDecl + +void foo() {} bcardosolopes wrote: Oh, I see what you are doing. I was thinking even more simple, no code,

[clang] [CIR] Add CIRGenerator and plug it via CIRGenAction (PR #90831)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2900,7 +2900,7 @@ defm clangir : BoolFOption<"clangir", PosFlag, NegFlag LLVM pipeline to compile">, BothFlags<[], [ClangOption, CC1Option], "">>; -def emit_cir : Flag<["-"], "emit-cir">, Visibility<[CC1Option]>, +def emit_cir : Flag<["-"], "emit-cir">, Visibility<[C

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s bcardosolopes wrote: We don't have any IR to test just yet. @lanza you could use `FileCheck` with `--allow-empty` here for now. You could also rename this test `emit-cir.

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance &CI) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; bcardosolopes wrote: Should this be the case for actual lib/CIR/CodeGen too? MLIR uses

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,61 @@ +//===--- CIRGenModule.h - Per-Module state for CIR gen --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/91007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,61 @@ +//=== CIRGenAction.h - CIR Code Generation Frontend Action -*- C++ -*--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,88 @@ +//===--- CIRGenAction.cpp - LLVM Code generation Frontend Action -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,61 @@ +//===--- CIRGenModule.h - Per-Module state for CIR gen --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -42,6 +47,14 @@ CreateFrontendBaseAction(CompilerInstance &CI) { StringRef Action("unknown"); (void)Action; + auto UseCIR = CI.getFrontendOpts().UseClangIRPipeline; bcardosolopes wrote: Right, it's a different discussion than naming. @joker-eph: what'

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-13 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Thanks for everyone's input so far. Let me try to summarize two discussions in this PR so we can set on an approach and give advice to our CIR community (and encode on our webpage) on how to move forward in upcoming patches. Useful resources: - [LLVM Coding Standard](http

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-20 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > What is obvious in the MLIR space is not necessarily what's obvious in Clang; Sure. > I have no idea whether that returns a `SourceLocation`, a `PresumedLoc`, a > `FullSourceLoc`, etc, so I don't think that is a use of `auto` I would want > to have to reason about as a

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-20 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: I encoded the discussion in our clangir.org page, with some speculation on Aaron's pending replies, happy to change and fix anything. In the future we'll upstream that too, but for the time being it's here: https://llvm.github.io/clangir/GettingStarted/coding-guideline.htm

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-05-21 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Thanks @AaronBallman > But again, the important thing is to at least be self-consistent. e.g., It's a good point to reinforce, updated. > I just don't think it benefits anyone to do so other than to make it easier > to land the initial patches, which doesn't seem like a

[clang] 819e0d1 - [CGAtomic] Lift strong requirement for remaining compare_exchange combinations

2021-05-06 Thread Bruno Cardoso Lopes via cfe-commits
Author: Bruno Cardoso Lopes Date: 2021-05-06T21:05:20-07:00 New Revision: 819e0d105e84c6081cfcfa0e38fd257b6124553a URL: https://github.com/llvm/llvm-project/commit/819e0d105e84c6081cfcfa0e38fd257b6124553a DIFF: https://github.com/llvm/llvm-project/commit/819e0d105e84c6081cfcfa0e38fd257b6124553a

[clang] 431e313 - [CGAtomic] Lift stronger requirements on cmpxch and support acquire failure mode

2021-03-23 Thread Bruno Cardoso Lopes via cfe-commits
Author: Bruno Cardoso Lopes Date: 2021-03-23T16:45:37-07:00 New Revision: 431e3138a1f3fd2bb7b25e1f4766d935058136f8 URL: https://github.com/llvm/llvm-project/commit/431e3138a1f3fd2bb7b25e1f4766d935058136f8 DIFF: https://github.com/llvm/llvm-project/commit/431e3138a1f3fd2bb7b25e1f4766d935058136f8

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Bruno Cardoso Lopes via cfe-commits
@@ -52,10 +62,33 @@ class CIRGenModule : public CIRGenTypeCache { /// A "module" matches a c/cpp source file: containing a list of functions. mlir::ModuleOp theModule; + clang::DiagnosticsEngine &diags; + const clang::TargetInfo ⌖ public: + mlir::ModuleOp getModule

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > Again though, a `FIXME: at one point we should capture macro expansions here > so we can diagnose expansions more thoroughly` is perhaps not a bad addition > here. +1 https://github.com/llvm/llvm-project/pull/113483 ___ cfe-co

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Thanks David! https://github.com/llvm/llvm-project/pull/113483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CIR] Fix missing dependency of MLIRCIR (PR #116221)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/116221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/116090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,39 @@ +//===--- TargetDefines.h - Target define helpers *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/116090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. This makes total sense to me. You should probably wait for more stamps here, but LGTM https://github.com/llvm/llvm-project/pull/116090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > @lanza @bcardosolopes Do you want to look this over before I commit it? This > change introduces some restructuring that I'll want to incorporate in the > incubator, where it will have a somewhat bigger impact, so I'd like to get > your buy-in or objections now before I

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-05 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,52 @@ +//===- TypeConverter.h - Convert builtin to LLVM dialect types --*- C++ -*-===// bcardosolopes wrote: TypeConverter.h -> CIRAttrVisitor.h https://github.com/llvm/llvm-project/pull/125619 ___ cfe-comm

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM once the remaining comments are addressed! https://github.com/llvm/llvm-project/pull/125260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/125260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Bruno Cardoso Lopes via cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM with some minor nits https://github.com/llvm/llvm-project/pull/120484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -63,13 +153,71 @@ mlir::Type CIRGenTypes::convertType(QualType type) { cir::IntType::get(&getMLIRContext(), astContext.getTypeSize(ty), /*isSigned=*/false); break; + +// Floating-point types +case BuiltinType::Float16: +

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/120484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -133,6 +143,276 @@ IntType::verify(llvm::function_ref emitError, return mlir::success(); } +//===--===// +// Floating-point type definitions +//===

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -18,6 +21,87 @@ mlir::MLIRContext &CIRGenTypes::getMLIRContext() const { return *builder.getContext(); } +/// Return true if the specified type in a function parameter or result position +/// can be converted to a CIR type at this point. This boils down to being +/// whe

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: @keryell > How to up-stream some changes which are cross-project like > https://github.com/llvm/clangir/pull/1203 which introduces a new MLIR > parser/pretty-printer feature like: My bad here, we usually don't accept such changes and I missed that during review time. Cl

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-20 Thread Bruno Cardoso Lopes via cfe-commits
@@ -18,6 +21,87 @@ mlir::MLIRContext &CIRGenTypes::getMLIRContext() const { return *builder.getContext(); } +/// Return true if the specified type in a function parameter or result position +/// can be converted to a CIR type at this point. This boils down to being +/// whe

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > @bcardosolopes I can work on the phase 2 of the change I had in mind and > remove also the `!void` from function type textual IR to avoid adding a new > feature in the MLIR parsing infrastructure. Neat, if you can do that I won't need to revert and make it easier for ev

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-27 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Seems like there are some CI failures (format related?) but LGTM once those are fixed https://github.com/llvm/llvm-project/pull/124650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -55,6 +55,9 @@ class CIRGenerator : public clang::ASTConsumer { void Initialize(clang::ASTContext &astContext) override; bool HandleTopLevelDecl(clang::DeclGroupRef group) override; mlir::ModuleOp getModule() const; + std::unique_ptr takeContext() { b

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,41 @@ +//- LowerToLLVM.cpp - Lowering from CIR to LLVMIR -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -44,7 +44,7 @@ class CIRGenerator : public clang::ASTConsumer { const clang::CodeGenOptions &codeGenOpts; protected: - std::unique_ptr mlirContext; + std::shared_ptr mlirContext; bcardosolopes wrote: We run passes post CIRGen (LLVM lowering is one exam

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-02-21 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2958,8 +2958,13 @@ defm clangir : BoolFOption<"clangir", BothFlags<[], [ClangOption, CC1Option], "">>; def emit_cir : Flag<["-"], "emit-cir">, Visibility<[ClangOption, CC1Option]>, Group, HelpText<"Build ASTs and then lower to ClangIR">; -def emit_core_mlir : Flag<["-"]

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Thanks for the update @dkolsen-pgi, reviewing the incubator change today https://github.com/llvm/llvm-project/pull/128089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
@@ -273,29 +273,36 @@ def CIR_PointerType : CIR_Type<"Pointer", "ptr", def CIR_FuncType : CIR_Type<"Func", "func"> { let summary = "CIR function type"; let description = [{ -The `!cir.func` is a function type. It consists of a single return type, a -list of paramete

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2958,8 +2958,13 @@ defm clangir : BoolFOption<"clangir", BothFlags<[], [ClangOption, CC1Option], "">>; def emit_cir : Flag<["-"], "emit-cir">, Visibility<[ClangOption, CC1Option]>, Group, HelpText<"Build ASTs and then lower to ClangIR">; -def emit_core_mlir : Flag<["-"]

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM once remaining comments from others are addressed. https://github.com/llvm/llvm-project/pull/127835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-02-20 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2958,6 +2958,8 @@ defm clangir : BoolFOption<"clangir", BothFlags<[], [ClangOption, CC1Option], "">>; def emit_cir : Flag<["-"], "emit-cir">, Visibility<[ClangOption, CC1Option]>, Group, HelpText<"Build ASTs and then lower to ClangIR">; +def emit_cir_mlir : Flag<["-"],

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [CIR] Function type return type improvements (PR #128787)

2025-02-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after applying @erichkeane reviews and @xlauko tablegen suggestion https://github.com/llvm/llvm-project/pull/128787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -115,6 +115,149 @@ def ConstantOp : CIR_Op<"const", let hasFolder = 1; } +//===--===// +// AllocaOp +//===--===// + +class AllocaTypesMa

[clang] [CIR] Upstream type `bool` (PR #128601)

2025-02-25 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -57,3 +57,15 @@ bool boolfunc() { return true; } // CHECK: %0 = cir.const #true // CHECK: cir.return %0 : !cir.bool // CHECK: } + +float floatfunc() { return 42.42f; } +// CHECK: cir.func @floatfunc() -> !cir.float { +// CHECK: %0 = cir.const #cir.fp<4.242000e+01> : !c

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/129304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-03-02 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after any extra feedback on format https://github.com/llvm/llvm-project/pull/129304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM if Erich has no further comments https://github.com/llvm/llvm-project/pull/128792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,119 @@ +//===- CIROpsEnumsDialect.h - MLIR Dialect for CIR --*- C++ bcardosolopes wrote: TIL https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits@list

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Great to see this PR Morris! You should also add CIR <-> CIR tests for the linkage types, incubator has some of them. https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,11 @@ +// Linkage types of global variables +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s + +int ; bcardosolopes wrote: This new tests uses_this_convention and while the existing-uses-t

[clang] [CIR] Disable gcc partially overloaded virtual warning (PR #130322)

2025-03-07 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, same observation as Erich regarding CMAKE stuff tho https://github.com/llvm/llvm-project/pull/130322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-10 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/130648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-10 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-10 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,114 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

<    1   2   3   4   5   6   7   >