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] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

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

[clang] [CIR] Add cir-translate and cir-lsp-server tools (PR #131181)

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

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

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

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Bruno Cardoso Lopes via cfe-commits
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return cir::BoolAttr::get(getContext(), getBoolTy(), state); } + /// Create a for operation. + cir::ForOp createFor( + mlir::Location loc, + llvm::function_ref condBuilder,

[clang] [CIR] Fix unary op folding (PR #132269)

2025-03-20 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, the only difference from incubator is the misleading comment, thanks Andy! Will update comment over there as well. https://github.com/llvm/llvm-project/pull/132269 ___ cfe-commits mail

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

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

[clang] [CIR] Add binary operators (PR #132420)

2025-03-24 Thread Bruno Cardoso Lopes via cfe-commits
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind, + const llvm::APInt &rhs) { +return create(

[clang] [CIR] Add binary operators (PR #132420)

2025-03-24 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/132420 ___ 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 unary op (PR #131369)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > The git history says the FIXME about "Pure" was added when @cmarcelo > introduced `UnaryOp` in the incubator, but there is no PR associated with the > commit so I don't know what discussions may have taken place. We floated the idea of implementing operators as part of `

[clang] [CIR] Upstream initial for-loop support (PR #132266)

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

[clang] [CIR] Add binary operators (PR #132420)

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

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
@@ -293,7 +294,8 @@ void CIRGenFunction::startFunction(GlobalDecl gd, QualType returnType, mlir::Value addrVal = emitAlloca(cast(paramVar)->getName(), - convertType(paramVar->getType()), paramLoc, alignment); + convertType(param

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

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

[clang] [CIR] Upstream initial for-loop support (PR #132266)

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

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: I have only minor inline comments, good direction. The PR is a bit big but I can see this requires touching everywhere in CIRGen and also LLVM lowering support, which is good end-to-end testing. If there are things there are not needed right now, it'

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Bruno Cardoso Lopes via cfe-commits
@@ -32,6 +32,16 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + cir::ConstantOp getConstantInt(mlir::Location loc, mlir::Type ty, + int64_t value) { +return create(loc, ty, cir::IntAt

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

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

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Bruno Cardoso Lopes via cfe-commits
@@ -229,6 +236,40 @@ def CastOp : CIR_Op<"cast", let hasFolder = 1; } + +//===--===// +// PtrStrideOp +//===--===// + +def PtrStrideOp : CI

[clang] [CIR][NFC] Organize emit functions in CIRGenFunction.h (PR #133017)

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

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) { +assert(mlir::isa(t) && "expected cir.ptr"); +return getConstPtrAttr(t, 0); + } + + mlir::Typ

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1117,6 +1118,122 @@ mlir::LogicalResult CIRToLLVMBinOpLowering::matchAndRewrite( return mlir::LogicalResult::success(); } +mlir::LogicalResult CIRToLLVMBinOpOverflowOpLowering::matchAndRewrite( +cir::BinOpOverflowOp op, OpAdaptor adaptor, +mlir::ConversionPatter

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Overall looks fine! https://github.com/llvm/llvm-project/pull/133100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

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

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

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

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Looks straight-forward to me, one minor nit! https://github.com/llvm/llvm-project/pull/133157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -759,6 +761,84 @@ def BrCondOp : CIR_Op<"brcond", }]; } +//===--===// +// While & DoWhileOp +//===--===// + +class WhileOpBase : CIR_Op

<    1   2   3   4   5   6   7   8   9   10   >