[PATCH] D147209: [clang][lit] Make LIT aware of env CLANG_CRASH_DIAGNOSTICS_DIR.

2023-04-05 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D147209#4246622 , @leonardchan wrote: > In D147209#4245229 , @fpetrogalli > wrote: > >> In D147209#4244615 , @leonardchan >> wrote: >> >

[PATCH] D147209: [clang][lit] Make LIT aware of env CLANG_CRASH_DIAGNOSTICS_DIR.

2023-04-05 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D147209#4244615 , @leonardchan wrote: > Hi. I think this led to some test failures on our builder at > https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8784708268307261009/overview: Hi @l

[PATCH] D147209: [clang][lit] Make LIT aware of env CLANG_CRASH_DIAGNOSTICS_DIR.

2023-04-04 Thread Francesco Petrogalli via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG029212617ca8: [clang][lit] Make LIT aware of env CLANG_CRASH_DIAGNOSTICS_DIR. (authored by fpetrogalli). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147209

[PATCH] D147209: [clang][lit] Make LIT aware of env CLANG_CRASH_DIAGNOSTICS_DIR.

2023-03-30 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. fpetrogalli added a reviewer: mizvekov. Herald added a project: All. fpetrogalli requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is useful for retriving crash reports of LIT runs when the temporary fo

[PATCH] D142976: [clang][CGCall] Remove header file not used. [NFCI]

2023-01-31 Thread Francesco Petrogalli via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG20f3ebd25885: [clang][CGCall] Remove header file not used. [NFCI] (authored by fpetrogalli). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D142976: [clang][CGCall] Remove header file not used. [NFCI]

2023-01-31 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli accepted this revision. fpetrogalli added a comment. This revision is now accepted and ready to land. Self approving a non-controversial trivial change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142976/new/ https://reviews.llvm.org/

[PATCH] D142976: [clang][CGCall] Remove header file not used. [NFCI]

2023-01-31 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. Herald added a project: All. fpetrogalli requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D142976 Files: clang/lib/CodeGen/CGCall.cpp Ind

[PATCH] D142403: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D142403#4075215 , @tstellar wrote: > LGTM. I tested and this fixes the build. @tstellar , I wonder how your build (and mine too, in fact) didn't complain about the typo... luckily the bots cover this functionality! Anywa

[PATCH] D142403: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D142403#4075215 , @tstellar wrote: > LGTM. I tested and this fixes the build. Thank you @tstellar, I landed it. I am going offline for until tomorrow morning - feel free to revert it if the world of bots collapses :) @m

[PATCH] D142403: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5d02e38f56df: [build] Fix stand-alone builds of clang. (authored by fpetrogalli). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142403: [build] Force building LLVMTargetParser before other non-LLVM components.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 491506. fpetrogalli added a comment. Herald added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, sstefan1. Herald added a project: LLVM. Address code review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D142403: [build] Force building LLVMTargetParser before other non-LLVM components.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D142403#4074885 , @tstellar wrote: > This is still the wrong change IMO. I don't know, maybe I'm not being clear, > but I don't 'think you ever actually tried my suggestion in D141581 >

[PATCH] D142403: [build] Force building LLVMTargetParser before other non-LLVM components.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. fpetrogalli added reviewers: mgorny, tstellar. Herald added subscribers: luismarques, s.egerton, kadircet, PkmX, simoncook, arichardson. Herald added a project: All. fpetrogalli requested review of this revision. Herald added subscribers: cfe-commits, pcwang-thea

[PATCH] D141581: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Reverted in https://reviews.llvm.org/rG20ffb9aaf982 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141581/new/ https://reviews.llvm.org/D141581 ___ cfe-commits mailing list cf

[PATCH] D141581: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Ah - there you go. Without a proper chained dependency of LLVMTargetParser -> clangBasic we end up with failures if clangBasic is compiled before LLVMTargetParser is (even on non stand-alone builds). https://lab.llvm.org/buildbot/#/builders/193/builds/25362 : cca

[PATCH] D141581: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG52bcdac3b842: [build] Fix stand-alone builds of clang. (authored by fpetrogalli). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141581: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4074312 , @tstellar wrote: > I tested this patch and it works, so I'll give it an LGTM. However, I think > the LLVMConfig.cmake.in changes are now unnecessary since the > RISCVTargetParserTableGen has been dropp

[PATCH] D141581: [build] Fix stand-alone builds of clang.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: clang/lib/Basic/CMakeLists.txt:113 omp_gen - RISCVTargetParserTableGen ) tstellar wrote: > Doesn't this break the monorepo (non-standalone) build? If the monorepo > build still works with this, then you don

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-23 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 491320. fpetrogalli added a comment. Herald added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, sstefan1. Herald added a project: LLVM. @mgorny, I have updated the patch according to the suggestions from @tstellar in https://reviews.llvm.

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4069123 , @tstellar wrote: > I don't think this is the correct way to specify dependencies if it's just an > issue of the header being included before a generated file it needs has been > generated. Are there oth

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4069078 , @tstellar wrote: > So, what's the actual dependency here? Do libBasic and libDriver just need > the header to be generated or does it actually need to link to the library? Just the header. Repository:

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4069053 , @tstellar wrote: > [...] > It's still not clear to me why LLVM_LINK_COMPONENTS does not work. Is > LLVMTargetParser a library? Yes, `LLVMTargetParser` is a library built located in `llvm/lib/TargetParse

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-17 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Hi -has anybody any more concern on this change? I'd like to submit it as soon as possible to unlock @mgorny . Francesco Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141581/new/ https://reviews.llvm.org/D141581

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4056825 , @barannikov88 wrote: > clangBasic and clangDriver already have a dependency on TargetParser (see > LLVM_LINK_COMPONENTS at the beginning of corresponding files). Is that not > enough? > Will it build if

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. @barannikov88 - Imam stuck with an incomplete explanation: The issue raised by @mgorny is about stand-alone builds. In this build configuration, clang is built separately from LLVM, which is first build

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4056612 , @barannikov88 wrote: > In D141581#4056503 , @fpetrogalli > wrote: > >> This is because the sources of clangBasic and clangDriver might be compiled >> before LLV

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4056492 , @tschuett wrote: > I though Clang Basic is a leaf library and must not depend on anything. I wasn't aware of this requirement. As of https://reviews.llvm.org/D137517 it depends on some auto-generated ta

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D141581#4056464 , @lebedev.ri wrote: > Why is it not sufficient to link to `RISCVTargetParserTableGen`, but is > sufficient to link to `LLVMTargetParser`? This is because the sources of clangBasic and clangDriver might

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. @jrtc27, @thakis, @craig.topper - gentle ping, it would be great if I could unlock @mgorny with this patch for the issue they are seeing at https://reviews.llvm.org/rGac1ffd3caca12c254e0b8c847aa8ce8e51b6cfbf Francesco Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a subscriber: mgorny. fpetrogalli added a comment. FWIW, the change in this patch solves the issue with standalone build of `clang` reported in https://reviews.llvm.org/rGac1ffd3caca12c254e0b8c847aa8ce8e51b6cfbf. (FYI, @mgorny ) Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-12 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/include/llvm/TargetParser/CMakeLists.txt:3 +tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/) +add_public_tablegen_target(RISCVT

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-12 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a subscriber: craig.topper. fpetrogalli added a comment. @jrtc27, @thakis, @craig.topper - is this a better solution to the issue raised in https://reviews.llvm.org/D137517? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141581/ne

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-12 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. fpetrogalli added a reviewer: jrtc27. Herald added subscribers: luismarques, s.egerton, kadircet, PkmX, arphaman, simoncook, arichardson. Herald added a project: All. fpetrogalli requested review of this revision. Herald added subscribers: cfe-commits, pcwang-the

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D137517#4045337 , @jrtc27 wrote: > In D137517#4045315 , @fpetrogalli > wrote: > >> In D137517#4045299 , @jrtc27 wrote: >> >>> In D137517#4

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added a comment. In D137517#4045299 , @jrtc27 wrote: > In D137517#4042875 , @fpetrogalli > wrote: > >> In D137517#4042758

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/include/llvm/TargetParser/CMakeLists.txt:3 +tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/) +add_public_tablegen_target(RISCVT

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D137517#4042758 , @fpetrogalli wrote: > After submitting this, I had to revert it > > because of failures like > https://lab.llvm.or

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. After submitting this, I had to revert it because of failures like https://lab.llvm.org/buildbot/#/builders/225/builds/12367/steps/5/logs/stdio Repository: rG LLVM Github Mono

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcf7a8305a2b4: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen. (authored by fpetrogalli). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-10 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 487962. fpetrogalli added a comment. Formatting changes in RISCV.td (NFC). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 Files: clang/lib/Basic/Targets/RISCV.

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-09 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Gentle ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-04 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 486223. fpetrogalli added a comment. [NFC] Restore empty line before end of namespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 Files: clang/lib/Basic/Ta

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-04 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 486222. fpetrogalli added a comment. I have addressed last round of review from @craig.topper and @pcwang-thead: 1. Renamed the RISCV-specific classes for the ProcessorModel. 2. Swapped `tunef` with `f` in `RISCVTuneProcessorModel`. 3. Fixed comment. 4. A

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-03 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. @craig.topper @lenary @barannikov88 @pcwang-thead - New Year's gentle ping :) Thank you, Francesco Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 __

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-02 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 485858. fpetrogalli added a comment. Fix pre-merge check at https://buildkite.com/llvm-project/premerge-checks/builds/128468#0185724f-5ade-4603-99ce-f417efb546e8 (missing header inclusion): C:\ws\w3\llvm-project\premerge-checks\llvm\include\llvm/Targ

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-02 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 485852. fpetrogalli added a comment. NFC - just an update on top of current `main`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 Files: clang/lib/Basic/Targe

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-22 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D137517#4012449 , @pcwang-thead wrote: > In D137517#4012307 , @craig.topper > wrote: > >> In D137517#4012298 , @pcwang-thead >> wrote: >

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-22 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484795. fpetrogalli added a comment. I added some fixes to make it work when building with modules (`-DLLVM_ENABLE_MODULES=On`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.ll

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:52 + for (auto &Def : Map) { +const auto &Record = Def.second; +if (Record->isSubClassOf("RISCVProcessorModelTUNE_PROC")) barannikov88 wrote: > fpetrogalli wrote

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484664. fpetrogalli marked an inline comment as done. fpetrogalli added a comment. Remove all `auto` types in the emitter. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D137517#4009328 , @jrtc27 wrote: > Hm, this means that llvm/lib/Target/$TARGET/$TARGET.td needs to remain > working (or at least mostly working, things like ISel patterns can fail to > type check) in order for Clang to bu

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484658. fpetrogalli marked an inline comment as done. fpetrogalli added a comment. Remove `RISCVTargetParser.def` from the module map. Follow the guidelines on using namespace llvm

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484655. fpetrogalli added a comment. Restore the following... -const auto *Record = Def.second; +const auto &Record = Def.second; ... to prevent this error: /<...>/llvm-project/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:38:17: error: v

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484654. fpetrogalli marked an inline comment as done. fpetrogalli added a comment. ops - this was wrong: /Users/fpetrogalli/projects/cpu-defs/upstream/llvm-project/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:38:17: error: variable 'Record' with type

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:52 + for (auto &Def : Map) { +const auto &Record = Def.second; +if (Record->isSubClassOf("RISCVProcessorModelTUNE_PROC")) --

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/lib/TargetParser/CMakeLists.txt:29 +# LLVMTargetParser. See https://stackoverflow.com/a/25681179 +target_include_directories(LLVMTargetParser PUBLIC $) barannikov88

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:15 +#include "llvm/TableGen/Record.h" +#include +namespace llvm { barannikov88 wrote: > [[ > https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden |

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484649. fpetrogalli marked 5 inline comments as done. fpetrogalli added a comment. I submitted some of the cleanup suggested by @barannikov88 - thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517

[PATCH] D137838: [Support] Move TargetParsers to new component

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D137838#4010987 , @dblaikie wrote: > This has introduced a circular dependency due to the forwarding header > (forwarding header depends on new lib, new lib depends on support, where the > forwarding header is). Generally

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484564. fpetrogalli added a comment. Same NFC - restore an empty line change... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 Files: clang/lib/Basic/Targets/R

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484563. fpetrogalli added a comment. NFC - I just restored an empty line to prevent modifying a file that is not being touched by the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https:

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484561. fpetrogalli added a comment. There is no need to use `target_include_directories(LLVMRISCVDesc PRIVATE ${LLVM_LIBRARY_DIR}/TargetParser/)` for components that are not related to the RISC-V target. Thank you @lenary for the suggestion! Repositor

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a subscriber: aprantl. fpetrogalli added inline comments. Comment at: llvm/include/llvm/module.modulemap:420 textual header "Support/CSKYTargetParser.def" -textual header "Support/RISCVTargetParser.def" textual header "Support/TargetOpcodes.def" --

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt:19 +target_include_directories(LLVMAArch64AsmParser PRIVATE ${LLVM_LIBRARY_DIR}/TargetParser/) lenary wrote: > fpetrog

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484391. fpetrogalli added a comment. @pcwang-thead, I addressed some of your comments. The value of `EnumFeatures` is now computed dynamicaly from the `Features` field of the `Processor` class. As for generating `MArch` out of the `Features` field, @crai

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484380. fpetrogalli marked 8 inline comments as done. fpetrogalli added a comment. 1. I have split the RISCV bits of the target parser out of TargetParser.cpp so that none of the non-RISCV components need to include the folder with the autogenerated .inc

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt:19 +target_include_directories(LLVMAArch64AsmParser PRIVATE ${LLVM_LIBRARY_DIR}/TargetParser/) craig.topper wrote: > fpetrogalli wrote: > > lenary wrote: > > > crai

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Hi - gentle ping on reviewing this Comment at: llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt:19 +target_include_directories(LLVMAArch64AsmParser PRIVATE ${LLVM_LIBRARY_DIR}/TargetParser/) lenary wrote: > craig.topper wrote: >

[PATCH] D137516: [TargetSupport] Move TargetParser API in a separate LLVM component.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli abandoned this revision. fpetrogalli added a comment. Replaced by D137838 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137516/new/ https://reviews.llvm.org/D137516 ___

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 484283. fpetrogalli added a comment. Herald added a subscriber: pengfei. This update is not based anymore on D137516 , but uses the refactoring of `TargetParser` as part of `LLVMSupport` into the new component `LLVMTarge

[PATCH] D137838: [Support] Move TargetParsers to new component

2022-12-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli accepted this revision. fpetrogalli added a comment. In D137838#4000959 , @lenary wrote: > [...] I think this is ready to land on Monday? SGTM - thank you again! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D137838: [RFC][Support] Move TargetParsers to new component

2022-11-28 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli accepted this revision. fpetrogalli added a comment. This revision is now accepted and ready to land. Thank you for working on this @lenary - LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137838/new/ https://reviews.llvm.org/D137

[PATCH] D137836: [Support] Move getHostNumPhysicalCores to Threading.h

2022-11-25 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli accepted this revision. fpetrogalli added a comment. LGTM. Thank you @lenary Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137836/new/ https://reviews.llvm.org/D137836 ___ cfe-commits mailing

[PATCH] D137836: [Support] Move getHostNumPhysicalCores to Threading.h

2022-11-25 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: llvm/unittests/Support/Host.cpp:33 -class HostTest : public testing::Test { - Triple Host; - -protected: - bool isSupportedArchAndOS() { -// Initially this is only testing detection of the number of -// physical cores, wh

[PATCH] D137836: [Support] Move getHostNumPhysicalCores to Threading.h

2022-11-22 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: llvm/unittests/Support/Host.cpp:33 -class HostTest : public testing::Test { - Triple Host; - -protected: - bool isSupportedArchAndOS() { -// Initially this is only testing detection of the number of -// physical cores, wh

[PATCH] D137838: [RFC][Support] Move TargetParsers to new component

2022-11-16 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. @lenary - thank you for the update! I have added a bunch of miso comments, a bit repetitive... by the time I realised they were repetitive it was faster to get to the bottom of it than removing them! In D137838#3931295 , @l

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. I intend to base this patch on D137838 once it goes through the major refactoring of bridging the header files. For the sake of simplicity, for now I'll keep it on top of D137516 . Repository:

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 474817. fpetrogalli added a comment. I have applied the chaged suggested by @jrtc27: 1. The classes `RISCVProcessorModelPROC` and `RISCVProcessorModelTUNE_PROC` now are derived from `ProcessorModel`; 2. The `Enum` field is removed from both classes. What

[PATCH] D137838: [RFC][Support] Move TargetParsers to new component

2022-11-11 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Hi @lenary - thank you for working on this! The patch is reasonable to me. I agree on the suggestion of using forwarding headers or the first iteration of the change, it will make it easier to review. I'll adapt the auto-get patch at D137517

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-07 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: llvm/lib/TargetSupport/CMakeLists.txt:2 + +set(LLVM_TARGET_DEFINITIONS ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/RISCV.td) + tmatheson wrote: > Here `RISCVTargetSupportTableGen` depends on files in `lib/Target/RISCV`, >

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-07 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 473738. fpetrogalli added a comment. When looping through the records in tablegen, I have added an extra (necessary) condition to make sure that the records we are processing are also derived from the class `ProcessorModel`. Repository: rG LLVM Gith

[PATCH] D137516: [TargetSupport] Move TargetParser API in a separate LLVM component.

2022-11-07 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D137516#3912842 , @lenary wrote: > In D137516#3912751 , @fpetrogalli > wrote: > >> @arsenm @frasercrmck @lenary - thank you for the feedback >> >> 1. The library could host anythin

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-07 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:509 -def : ProcessorModel<"generic-rv32", NoSchedModel, [Feature32Bit]>; -def : ProcessorModel<"generic-rv64", NoSchedModel, [Feature64Bit]>; +class RISCVProcessorModelPROC { + string Enum = enum; --

[PATCH] D137516: [TargetSupport] Move TargetParser API in a separate LLVM component.

2022-11-07 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. @arsenm @frasercrmck @lenary - thank you for the feedback 1. The library could host anything that needs to be auto-generated with tablegen. If we add `MVT`s, the name `TargetSupport` becomes obsolete. 2. Therefore we could use a name like `AutoGenSupport` (or similar

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 473545. fpetrogalli added a comment. I have made the dependency on `RISCVTargetSupportTableGen` explicit in the `RISCVCodeGen` target. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://revi

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. RFC at RFC at https://discourse.llvm.org/t/targetparser-auto-generation-of-riscv-cpu-definitions/66419 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 ___

[PATCH] D137516: [TargetSupport] Move TargetParser API in a separate LLVM component.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. RFC at https://discourse.llvm.org/t/targetparser-auto-generation-of-riscv-cpu-definitions/66419 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137516/new/ https://reviews.llvm.org/D137516 __

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 473532. fpetrogalli added a comment. I updated the text of the header of the file `RISCVTargetDefEmitter.cpp`. NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517

[PATCH] D137517: [TargetSupport] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. Herald added subscribers: kosarev, sunshaoce, VincentWu, foad, vkmr, frasercrmck, evandro, kerbowa, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiv

[PATCH] D137516: [TargetSupport] Move TargetParser API in a separate LLVM component.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. Herald added subscribers: kosarev, foad, frasercrmck, kerbowa, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, a

[PATCH] D137515: [TargetSupport] Move TargetParser API in a separate LLVM component.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli abandoned this revision. fpetrogalli added a comment. Abandoning because I accidentally squashed the two commits together when using Arcanist. I'll follow up with two new revisions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137515/n

[PATCH] D137515: [TargetSupport] Move TargetParser API in a separate LLVM component.

2022-11-06 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. Herald added subscribers: kosarev, foad, frasercrmck, kerbowa, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, a

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-27 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 308078. fpetrogalli added a comment. Reverted `getFragmentSizeInBits` to return an integral type and not `TypeSize`, because scalable variables cannot be part of structs/arrays - hence they cannot be pointed by fragments. Repository: rG LLVM Github M

[PATCH] D90956: [clang][SVE] Activate macro `__ARM_FEATURE_SVE_VECTOR_OPERATORS`.

2020-11-25 Thread Francesco Petrogalli via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe592dde6889b: [clang][SVE] Activate macro `__ARM_FEATURE_SVE_VECTOR_OPERATORS`. (authored by fpetrogalli). Repository: rG LLVM Github Monorepo CH

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-24 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. Hi @sdesmalen I have extracted D92020 to implement only the change of interface for `AllocaInst::getAllocationSizeInBits`. I wanted to extract also the interface change in `DbgVariableIntrinsic::getFragmentSizeInBits()` but such ch

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-24 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 307329. fpetrogalli added a comment. Add comment to `DbgVariableIntrinsic::getFragmentSizeInBits()`. NFC Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91806/new/ https://reviews.llvm.org/D91806 Files: ll

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-24 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 307306. fpetrogalli added a comment. Rebase on top of D92020 . NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91806/new/ https://reviews.llvm.org/D91806 Files: llvm/i

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added inline comments. Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:589 sort(FrameData.Allocas, [&](const auto &Iter1, const auto &Iter2) { -return GetAllocaSize(Iter1) > GetAllocaSize(Iter2); +retur

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 306715. fpetrogalli edited the summary of this revision. fpetrogalli added a comment. I have added assertions around before `TypeSize` comparisons where it made sense to do so, but not in the lambda used in the `sort` invocation. Repository: rG LLVM G

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli marked an inline comment as done. fpetrogalli added a comment. Thank you for the review @sdesmalen 1. I have replied to the comment about `auto` with my reason for removing it. 2. I removed the C test, as the LL file is enough. 3. The third comment requires more investigation, I'll ge

  1   2   3   >