[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: So not sure if there is an easy fix for the regression. We should probably have some logic that scales all BFI values when inlining to better accomodate the new range of frequencies so we loose less precision by accident. Though that won't help with the regression at hand as that

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: I think I traced the clang regression down to `InlineCostCallAnalyzer::isColdCallSite` returning `true` in more instances. It previously did not do that because of what feels more like an accidental loss of precision: The example I analyzed starts out as a single-block function

[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)

2023-10-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/70366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)

2023-10-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/70366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)

2023-10-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/70366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)

2023-10-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nick Desaulniers (nickdesaulniers) Changes Fixes a bug introduced by commit b54294e2c959 ("[clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first") In the added test case, the QualType is a LValueRef

[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)

2023-10-26 Thread Nick Desaulniers via cfe-commits
@@ -1358,6 +1359,8 @@ class ConstExprEmitter : } llvm::Constant *VisitStringLiteral(StringLiteral *E, QualType T) { +if (!isa(T.getDesugaredType(CGM.getContext( nickdesaulniers wrote: Alternatively this could be: `if (isa)` any preference/though

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: Also note that this 2% cold-code threshold is only applied in situation where no PGO data is available. So maybe we should just ignore this, given that without PGO data it just is often impossible for the compiler to make good inlining decisions... https://github.com/llvm/llvm-p

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Duncan P . N . Exon Smith via cfe-commits
dexonsmith wrote: Seems awkward to pessimize as "cold" when there's no real data (no PGO, no other marking). What happens if you change the cold call threshold to 0% when there's no PGO data? (I.e., never assume a call is cold without actual evidence) https://github.com/llvm/llvm-project/pull/

[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)

2023-10-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/70366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread David Li via cfe-commits
david-xl wrote: The old code of not marking them as cold works also just by accident though. https://github.com/llvm/llvm-project/pull/66285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] Bfi precision (PR #66285)

2023-10-26 Thread Duncan P . N . Exon Smith via cfe-commits
dexonsmith wrote: Not entirely accidental. When BPI/BFI first landed it was heavily profiled to be sure it didn't pessimize non-PGO code. I don't see why we'd suddenly be okay with pessimizing it. Under 2% isn't hard to hit for hot path code. Lots of functions will have strings of early exit

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Duncan P . N . Exon Smith via cfe-commits
dexonsmith wrote: Not entirely accidental. When BPI/BFI first landed it was heavily profiled to be sure it didn't pessimize non-PGO code. I don't see why we'd suddenly be okay with pessimizing it. Under 2% isn't hard to hit for hot path code. Lots of functions will have strings of early exit

[clang] Bfi precision (PR #66285)

2023-10-26 Thread David Li via cfe-commits
david-xl wrote: Agree that deciding coldness based on local entry frequency (2%) is a bad idea though. https://github.com/llvm/llvm-project/pull/66285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread David Li via cfe-commits
david-xl wrote: Agree that deciding coldness based on local entry frequency (2%) is a bad idea though. https://github.com/llvm/llvm-project/pull/66285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: Seems this got introduced in https://reviews.llvm.org/D34312 with the rough idea that we shouldn't inline into parts of the code that `_builtin_expect(...)` deems unlikely. Which makes sense when you say it express it like this, but I guess numeric thresholds can go wrong... htt

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: Seems this got introduced in https://reviews.llvm.org/D34312 with the rough idea that we shouldn't inline into parts of the code that `_builtin_expect(...)` deems unlikely. Which makes sense when you say it express it like this, but I guess numeric thresholds can go wrong... htt

[clang-tools-extra] c02b2ab - [clang-tidy] Add StrictMode to cppcoreguidelines-pro-type-static-cast-downcast (#69529)

2023-10-26 Thread via cfe-commits
Author: Piotr Zegar Date: 2023-10-26T21:06:19+02:00 New Revision: c02b2ab8ab794864858fbda173de10f3701e3723 URL: https://github.com/llvm/llvm-project/commit/c02b2ab8ab794864858fbda173de10f3701e3723 DIFF: https://github.com/llvm/llvm-project/commit/c02b2ab8ab794864858fbda173de10f3701e3723.diff L

[clang-tools-extra] [clang-tidy] Add StrictMode to cppcoreguidelines-pro-type-static-cast-downcast (PR #69529)

2023-10-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bfi precision (PR #66285)

2023-10-26 Thread Duncan P . N . Exon Smith via cfe-commits
dexonsmith wrote: > Seems this got introduced in https://reviews.llvm.org/D34312 with the rough > idea that we shouldn't inline into parts of the code that > `_builtin_expect(...)` deems unlikely. Which makes sense when you express it > like this, but I guess numeric thresholds can go wrong...

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/70369 Currently std::is_invocable does not work for CUDA/HIP since its implementation requires checking whether a function is invocable in the context of a synthesized host function. In general, to make work with C

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes Currently std::is_invocable does not work for CUDA/HIP since its implementation requires checking whether a function is invocable in the context of a synthesized host function. In general, to make

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/70369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,31 @@ +/*=== type_traits - CUDA wrapper for -=== + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without

[clang] 56183cf - [RISCV] Disable lax vector conversions between RVVBuiltin types and RVVFixedLengthDataVector.

2023-10-26 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-10-26T12:20:01-07:00 New Revision: 56183cf608f308ff441b69dcc3ef626acbb014d4 URL: https://github.com/llvm/llvm-project/commit/56183cf608f308ff441b69dcc3ef626acbb014d4 DIFF: https://github.com/llvm/llvm-project/commit/56183cf608f308ff441b69dcc3ef626acbb014d4.diff

[clang] Bfi precision (PR #66285)

2023-10-26 Thread David Li via cfe-commits
david-xl wrote: Contracting my past self (one of the reviewers of the patch), I think coldness check should be based on a global threshold, which exists when synthetic entry count propagation is enabled (without PGO). https://github.com/llvm/llvm-project/pull/66285

[clang] [clang] Language to String function (PR #69487)

2023-10-26 Thread Aaron Ballman via cfe-commits
@@ -10,9 +10,49 @@ #include "clang/Config/config.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FormatVariadic.h" #include "llvm/TargetParser/Triple.h" using namespace clang; +const char *clang::languageToString(Languag

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-26 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I'm in favor of these changes. The current formatting makes some pretty bad decisions in places, but I think it's a hard problem to solve -- some attributes are longer and may want to be on their own line, other attributes are shorter and maybe are reasonable to inline, but

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-10-26 Thread Aaron Ballman via cfe-commits
@@ -217,21 +221,21 @@ void i(); // CHECK-NEXT:"id": "0x{{.*}}", // CHECK-NEXT:"kind": "FunctionTemplateDecl", // CHECK-NEXT:"loc": { -// CHECK-NEXT: "offset": {{[0-9]+}}, +// CHECK-NEXT: "offset": 142, AaronBallman wrote: I think we just fo

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-10-26 Thread Aaron Ballman via cfe-commits
@@ -377,6 +377,8 @@ Miscellaneous Clang Crashes Fixed `Issue 64065 `_ - Fixed a crash when check array access on zero-length element. `Issue 64564 `_ +- Fixed a crash when

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-10-26 Thread Aaron Ballman via cfe-commits
@@ -819,6 +819,10 @@ void JSONNodeDumper::VisitNamedDecl(const NamedDecl *ND) { if (VD && VD->hasLocalStorage()) return; +// Do not mangle template deduction guides. +if (const auto DG = dyn_cast(ND)) AaronBallman wrote: ```suggestion if

[clang] [Profile] Refactor profile correlation. (PR #69656)

2023-10-26 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 6ddc03d97c0de96691ed27f05c9b30869051ce06 39cb3204ad4eea8c8b91ad1225e8dd681156237a --

[clang] [clang] Language to String function (PR #69487)

2023-10-26 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/69487 >From 7214e2ad580724c6b747ce5da126f4e8dbdc825c Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Wed, 18 Oct 2023 13:20:58 -0400 Subject: [PATCH 1/3] add language to string function --- clang/include/clang/Basic/

[clang] [clang] Language to String function (PR #69487)

2023-10-26 Thread Yusra Syeda via cfe-commits
@@ -10,9 +10,49 @@ #include "clang/Config/config.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FormatVariadic.h" #include "llvm/TargetParser/Triple.h" using namespace clang; +const char *clang::languageToString(Languag

[clang] 52315f9 - [clang][OpenMP] Fix target data if/logical expression assert fail (#70268)

2023-10-26 Thread via cfe-commits
Author: David Pagan Date: 2023-10-26T13:19:37-07:00 New Revision: 52315f9b75f1bd02367fbf38096a58d10d3c67d8 URL: https://github.com/llvm/llvm-project/commit/52315f9b75f1bd02367fbf38096a58d10d3c67d8 DIFF: https://github.com/llvm/llvm-project/commit/52315f9b75f1bd02367fbf38096a58d10d3c67d8.diff L

[clang] [clang][OpenMP] Fix target data if/logical expression assert fail (PR #70268)

2023-10-26 Thread David Pagan via cfe-commits
https://github.com/ddpagan closed https://github.com/llvm/llvm-project/pull/70268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Looks reasonable, the same approach we've always done for these things. https://github.com/llvm/llvm-project/pull/70369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] e3ecdf7 - [clang-format][NFC] Remove some extraneous newlines at end of test cases

2023-10-26 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-26T13:37:23-07:00 New Revision: e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2 URL: https://github.com/llvm/llvm-project/commit/e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2 DIFF: https://github.com/llvm/llvm-project/commit/e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2.diff LOG:

[clang-tools-extra] 543f9e7 - [clang-tidy] Improve bugprone-unused-return-value check (#66573)

2023-10-26 Thread via cfe-commits
Author: Piotr Zegar Date: 2023-10-26T22:58:20+02:00 New Revision: 543f9e781032f086afa7438065b9ce7a9c07ca2b URL: https://github.com/llvm/llvm-project/commit/543f9e781032f086afa7438065b9ce7a9c07ca2b DIFF: https://github.com/llvm/llvm-project/commit/543f9e781032f086afa7438065b9ce7a9c07ca2b.diff L

[clang-tools-extra] [clang-tidy] Improve bugprone-unused-return-value check (PR #66573)

2023-10-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/66573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] SwiftCallingConv: Fix the splitVectorEntry function (PR #69953)

2023-10-26 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Oops. LGTM. https://github.com/llvm/llvm-project/pull/69953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-10-26 Thread via cfe-commits
https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/70381 Previous representation used an enumeration combined to a switch to dispatch to the appropriate lexer. Use function pointer so that the dispatching is just an indirect call, which is actually better b

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-10-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (serge-sans-paille) Changes Previous representation used an enumeration combined to a switch to dispatch to the appropriate lexer. Use function pointer so that the dispatching is just an indirect call, which is actually better becau

[clang] a8a6b66 - [clang] Document -Wglobal-constructors behavior (#68084)

2023-10-26 Thread via cfe-commits
Author: serge-sans-paille Date: 2023-10-26T21:09:31Z New Revision: a8a6b66a266e8917caa4e9fb1371c24bd54c32b3 URL: https://github.com/llvm/llvm-project/commit/a8a6b66a266e8917caa4e9fb1371c24bd54c32b3 DIFF: https://github.com/llvm/llvm-project/commit/a8a6b66a266e8917caa4e9fb1371c24bd54c32b3.diff

[clang] [clang] Document -Wglobal-constructors behavior (PR #68084)

2023-10-26 Thread via cfe-commits
https://github.com/serge-sans-paille closed https://github.com/llvm/llvm-project/pull/68084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7e42545 - [Driver] Reject unsupported -mcmodel= (#70262)

2023-10-26 Thread via cfe-commits
Author: Fangrui Song Date: 2023-10-26T14:15:36-07:00 New Revision: 7e4254552481dbc4089b91941273ff8c42a7113c URL: https://github.com/llvm/llvm-project/commit/7e4254552481dbc4089b91941273ff8c42a7113c DIFF: https://github.com/llvm/llvm-project/commit/7e4254552481dbc4089b91941273ff8c42a7113c.diff

[clang] [Driver] Reject unsupported -mcmodel= (PR #70262)

2023-10-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/70262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Change representation of CurLexerKind (PR #70381)

2023-10-26 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 543f9e781032f086afa7438065b9ce7a9c07ca2b 2631a5163de552a8e482f5cbc51525fb8bb5082f --

[clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2023-10-26 Thread James E T Smith via cfe-commits
jamesETsmith wrote: @philnik777, I've added tests for `ranges::iota` to several of the `ranges_robust_against_*` tests where I thought it was appropriate. Below is a breakdown (mostly for my own tracking) of what I've done and what I'm still sorting through (`ranges_robust_against_proxy_iterat

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-26 Thread Sang Ik Lee via cfe-commits
https://github.com/silee2 updated https://github.com/llvm/llvm-project/pull/69949 >From 1a4319cff8d95d5a6a6598f94162be28e56d68a8 Mon Sep 17 00:00:00 2001 From: "Lee, Sang Ik" Date: Mon, 23 Oct 2023 17:23:54 + Subject: [PATCH 1/3] [MLIR] SPIRV Target Attribute Create SPIRV Target Attribute

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-26 Thread Sang Ik Lee via cfe-commits
silee2 wrote: check-flang failed on Windows with two unresolved tests. Does not look related to this PR. Merging main again to run CI again. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-10-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/70224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a crash when using ast-dump=json (PR #70224)

2023-10-26 Thread Chris B via cfe-commits
@@ -217,21 +221,21 @@ void i(); // CHECK-NEXT:"id": "0x{{.*}}", // CHECK-NEXT:"kind": "FunctionTemplateDecl", // CHECK-NEXT:"loc": { -// CHECK-NEXT: "offset": {{[0-9]+}}, +// CHECK-NEXT: "offset": 142, llvm-beanz wrote: To add a bit of cont

[clang] ab34d71 - [OpenMP][NFC] Remove untested code emitting no-op call

2023-10-26 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-10-26T14:38:24-07:00 New Revision: ab34d71087a85a9d024657207683ea0eb775d326 URL: https://github.com/llvm/llvm-project/commit/ab34d71087a85a9d024657207683ea0eb775d326 DIFF: https://github.com/llvm/llvm-project/commit/ab34d71087a85a9d024657207683ea0eb775d326.d

[clang] 57cebc7 - [OpenMP][NFC] Fix test (remove wrong autogen header)

2023-10-26 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-10-26T14:38:24-07:00 New Revision: 57cebc709df0ce839807b852432eccf345d8a63e URL: https://github.com/llvm/llvm-project/commit/57cebc709df0ce839807b852432eccf345d8a63e DIFF: https://github.com/llvm/llvm-project/commit/57cebc709df0ce839807b852432eccf345d8a63e.d

[clang] [OpenMP] Pass min/max thread and team count to the OMPIRBuilder (PR #70247)

2023-10-26 Thread Johannes Doerfert via cfe-commits
@@ -607,8 +608,13 @@ void CodeGenModule::handleAMDGPUFlatWorkGroupSizeAttr( if (Min != 0) { assert(Min <= Max && "Min must be less than or equal Max"); +if (MinThreadsVal) + *MinThreadsVal = Min; +if (MaxThreadsVal) + *MaxThreadsVal = Max; std::str

[clang] [OpenMP] Pass min/max thread and team count to the OMPIRBuilder (PR #70247)

2023-10-26 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert closed https://github.com/llvm/llvm-project/pull/70247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-10-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This change has introduced a false positive for anonymous union members: struct A { int m; union { int n = 0; }; }; A a = A{.m = 0}; now produces a false positive warning saying that the anonymous union member in `A` is uninitialized. Repository:

[clang] [OpenMP] Associate the KernelEnvironment with the GenericKernelTy (PR #70383)

2023-10-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Johannes Doerfert (jdoerfert) Changes By associating the kernel environment with the generic kernel we can access middle-end information easily, including the launch bounds ranges that are acceptable. By constraining the

[clang] 3911810 - Revert "[OpenMP] Patch for Support to loop bind clause : Checking Parent Region"

2023-10-26 Thread Chi Chun Chen via cfe-commits
Author: Chi Chun Chen Date: 2023-10-26T16:57:36-05:00 New Revision: 391181062f8d1b9277a9068a7edf41be721ca5cf URL: https://github.com/llvm/llvm-project/commit/391181062f8d1b9277a9068a7edf41be721ca5cf DIFF: https://github.com/llvm/llvm-project/commit/391181062f8d1b9277a9068a7edf41be721ca5cf.diff

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Artem Belevich via cfe-commits
@@ -283,12 +283,18 @@ set(cuda_wrapper_files cuda_wrappers/cmath cuda_wrappers/complex cuda_wrappers/new + cuda_wrappers/type_traits ) set(cuda_wrapper_bits_files cuda_wrappers/bits/shared_ptr_base.h cuda_wrappers/bits/basic_string.h cuda_wrappers/bits/basic

[clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2023-10-26 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith updated https://github.com/llvm/llvm-project/pull/68494 >From c4a3ccfbad090ad8314aa8ad53092edc8d5432bc Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 28 Sep 2023 10:11:15 -0400 Subject: [PATCH 01/10] [libc++] Implement ranges::iota and ranges::out_value_r

[clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2023-10-26 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith edited https://github.com/llvm/llvm-project/pull/68494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Implement ranges::iota (PR #68494)

2023-10-26 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith updated https://github.com/llvm/llvm-project/pull/68494 >From c4a3ccfbad090ad8314aa8ad53092edc8d5432bc Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 28 Sep 2023 10:11:15 -0400 Subject: [PATCH 01/10] [libc++] Implement ranges::iota and ranges::out_value_r

[clang] [libc++] Implement ranges::iota (PR #68494)

2023-10-26 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith edited https://github.com/llvm/llvm-project/pull/68494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-26 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg approved this pull request. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-26 Thread Owen Pan via cfe-commits
owenca wrote: This would change the default for every other predefined style, which might be ok if there's no mention of breaking after C++11 attributes in those styles. https://github.com/llvm/llvm-project/pull/70360 ___ cfe-commits mailing list cfe-

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-10-26 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148474/new/ https://reviews.llvm.org/D148474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Yaxun Liu via cfe-commits
@@ -283,12 +283,18 @@ set(cuda_wrapper_files cuda_wrappers/cmath cuda_wrappers/complex cuda_wrappers/new + cuda_wrappers/type_traits ) set(cuda_wrapper_bits_files cuda_wrappers/bits/shared_ptr_base.h cuda_wrappers/bits/basic_string.h cuda_wrappers/bits/basic

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/70369 >From 8199b47f5b84c6bdac9ab373a4e138ad9246d033 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 26 Oct 2023 15:09:49 -0400 Subject: [PATCH 1/2] [CUDA][HIP] Fix std::is_invocable Currently std::is_inv

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/70369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][NFC] Make use of auto (PR #70400)

2023-10-26 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/70400 None >From d0429f2f1e9cacaa5c9d9997b9cb1f60aed6bd8b Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 26 Oct 2023 19:50:37 -0400 Subject: [PATCH] [Driver][NFC] Make use of auto --- clang/lib/Driver/ToolChains/

[clang] [AArch64] Stack probing for function prologues (PR #66524)

2023-10-26 Thread Oskar Wirga via cfe-commits
@@ -9460,6 +9461,94 @@ bool AArch64InstrInfo::isReallyTriviallyReMaterializable( return TargetInstrInfo::isReallyTriviallyReMaterializable(MI); } +MachineBasicBlock::iterator +AArch64InstrInfo::insertStackProbingLoop(MachineBasicBlock::iterator MBBI, +

[clang-tools-extra] [clangd] Support `-specs` arguments when querying the driver. (PR #70285)

2023-10-26 Thread Chris Carlon via cfe-commits
https://github.com/cjc25 updated https://github.com/llvm/llvm-project/pull/70285 >From f171053854f3926641ecc450e35a625b5850a4be Mon Sep 17 00:00:00 2001 From: Chris Carlon Date: Tue, 24 Oct 2023 22:21:59 -0400 Subject: [PATCH 1/2] [clangd] Support `-specs` arguments when querying the driver. S

[clang] [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument (PR #70401)

2023-10-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: Johannes Doerfert (jdoerfert) Changes [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument The KernelEnvironment is for compile time information about a kernel. It allows the compiler to feed informa

[clang] [OpenMP] Unify the min/max thread/teams pathways (PR #70273)

2023-10-26 Thread Shilei Tian via cfe-commits
@@ -1,68 +1,20 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=CHECK1 -// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerp

[clang] Bfi precision (PR #66285)

2023-10-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: FYI @ldionne This patch causing test_vector2.pass.cpp trigger memory leak https://lab.llvm.org/buildbot/#/builders/168/builds/16422 Not sure if this was leaking but lsan didn't see, it's possible. Or some regression in lsan. https://github.com/llvm/llvm-project/pull/66285 _

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-26 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @benlangmuir ping~ https://github.com/llvm/llvm-project/pull/69551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][NFC] Make use of auto (PR #70400)

2023-10-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/70400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Link Flang runtime on FreeBSD, NetBSD, OpenBSD, DragonFly and Haiku (PR #69817)

2023-10-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM, but [banach-space](https://github.com/banach-space) should check as well. https://github.com/llvm/llvm-project/pull/69817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [RISCV] Add processor definition for XiangShan-NanHu (PR #70294)

2023-10-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/70294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Add processor definition for XiangShan-NanHu (PR #70294)

2023-10-26 Thread Fangrui Song via cfe-commits
@@ -20,6 +20,17 @@ // MCPU-SYNTACORE-SCR1-MAX: "-target-feature" "+zicsr" "-target-feature" "+zifencei" // MCPU-SYNTACORE-SCR1-MAX: "-target-abi" "ilp32" +// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=xiangshan-nanhu | FileCheck -check-prefix=MCPU-XIANGSHAN-NANHU %s

[clang] [RISCV] Add processor definition for XiangShan-NanHu (PR #70294)

2023-10-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/70294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3ea0022 - [Driver][NFC] Make use of auto (#70400)

2023-10-26 Thread via cfe-commits
Author: Brad Smith Date: 2023-10-26T22:30:14-04:00 New Revision: 3ea0022bef046d60b0caf477c6a460a5650e325e URL: https://github.com/llvm/llvm-project/commit/3ea0022bef046d60b0caf477c6a460a5650e325e DIFF: https://github.com/llvm/llvm-project/commit/3ea0022bef046d60b0caf477c6a460a5650e325e.diff LO

[clang] [Driver][NFC] Make use of auto (PR #70400)

2023-10-26 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/70400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][Solaris][NFC] A little bit of clean up (PR #69867)

2023-10-26 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/69867 >From 813cdfc23027f3b5494115653b458bc1df3ee2f2 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 22 Oct 2023 00:55:07 -0400 Subject: [PATCH] [Driver][Solaris][NFC] A little bit of clean up --- clang/lib/Driver/

[clang] [CUDA][HIP] Fix std::is_invocable (PR #70369)

2023-10-26 Thread Yaxun Liu via cfe-commits
@@ -283,12 +283,18 @@ set(cuda_wrapper_files cuda_wrappers/cmath cuda_wrappers/complex cuda_wrappers/new + cuda_wrappers/type_traits ) set(cuda_wrapper_bits_files cuda_wrappers/bits/shared_ptr_base.h cuda_wrappers/bits/basic_string.h cuda_wrappers/bits/basic

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson edited https://github.com/llvm/llvm-project/pull/69640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson commented: Thanks for sending the patch! I took an initial look through and have some comments/questions. @snehasish may also be interested in taking a look. https://github.com/llvm/llvm-project/pull/69640 ___ cfe-co

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -279,13 +286,54 @@ struct Allocator { Print(Value->mib, Key, bool(Arg)); } + using SegmentEntry = ::llvm::memprof::SegmentEntry; void FinishAndWrite() { if (print_text && common_flags()->print_module_map) DumpProcessMap(); allocator.ForceLock();

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -43,6 +43,7 @@ enum class align_val_t : size_t {}; ReportOutOfMemory(size, &stack); \ return res; +#if !SANITIZER_APPLE teresajohnson wrote: How do operator new and delete get intercepted on Apple? Also, ar

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -63,6 +57,23 @@ struct AP64 { // Allocator64 parameters. Deliberately using a short name. template using PrimaryAllocatorASVT = SizeClassAllocator64>; using PrimaryAllocator = PrimaryAllocatorASVT; +#endif teresajohnson wrote: Combine these 2 lines into a

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,83 @@ +// UNSUPPORTED: ios + +// RUN: %clangxx_memprof -O0 %s -o %t +// RUN: %env_memprof_opts=print_binary_refs=true:print_text=true:log_path=stdout:verbosity=2 %run %t &> %t.log +// RUN: llvm-nm %t &> %t2.log +// RUN: cat %t2.log %t.log | FileCheck %s + +#include +

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -279,13 +286,54 @@ struct Allocator { Print(Value->mib, Key, bool(Arg)); } + using SegmentEntry = ::llvm::memprof::SegmentEntry; void FinishAndWrite() { if (print_text && common_flags()->print_module_map) DumpProcessMap(); allocator.ForceLock();

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -747,8 +749,10 @@ endif() if (OS_NAME MATCHES "Linux|FreeBSD|Windows|NetBSD|SunOS") set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE) + set(COMPILER_RT_MEMPROF_HAS_STATIC_RUNTIME TRUE) else() set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE) + set(COMPILER_RT_MEMPROF_HAS_S

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,83 @@ +// UNSUPPORTED: ios + +// RUN: %clangxx_memprof -O0 %s -o %t +// RUN: %env_memprof_opts=print_binary_refs=true:print_text=true:log_path=stdout:verbosity=2 %run %t &> %t.log +// RUN: llvm-nm %t &> %t2.log +// RUN: cat %t2.log %t.log | FileCheck %s + +#include +

[clang] Support MemProf on darwin (PR #69640)

2023-10-26 Thread Teresa Johnson via cfe-commits
@@ -78,7 +78,11 @@ static int GetCpuId(void) { // will seg fault as the address of __vdso_getcpu will be null. if (!memprof_inited) return -1; +#if SANITIZER_APPLE + return 0; teresajohnson wrote: If there is a way to do this on Apple then add a FIXME

[clang] [Clang][RISCV] Add vcreate intrinsics for RVV non-tuple types (PR #70355)

2023-10-26 Thread Wang Pengcheng via cfe-commits
@@ -345,6 +345,54 @@ class VString { !eq(nf, 8): !if(signed, "", "UvUvUvUvUvUvUvUv")); } + +class FixedVString { + string V = "(LFixedLog2LMUL:" # fixed_lmul # ")" # !if(signed, "v", "Uv"); + string S = !cond(!eq(num, 1): V, + !eq

[clang] [Clang][RISCV] Add vcreate intrinsics for RVV non-tuple types (PR #70355)

2023-10-26 Thread Wang Pengcheng via cfe-commits
@@ -345,6 +345,54 @@ class VString { !eq(nf, 8): !if(signed, "", "UvUvUvUvUvUvUvUv")); } + +class FixedVString { + string V = "(LFixedLog2LMUL:" # fixed_lmul # ")" # !if(signed, "v", "Uv"); + string S = !cond(!eq(num, 1): V, + !eq

[clang] [Driver][Solaris][NFC] A little bit of clean up (PR #69867)

2023-10-26 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/69867 >From 9530591f803a41e7d582c897477ec98fb39411e8 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 22 Oct 2023 00:55:07 -0400 Subject: [PATCH] [Driver][Solaris][NFC] A little bit of clean up --- clang/lib/Driver/

<    1   2   3   4   5   >