Skip to content

[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes #66295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

aeubanks
Copy link
Contributor

@aeubanks aeubanks commented Sep 13, 2023

This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.

This matches other nearby enums.

For downstream users, this should be a fairly straightforward replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::

This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.

This matches other enums in the CodeGenOpt namespace.

For downstream users, this should be a fairly straightforward replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOpt::Level::Aggressive
or s/CodeGenOpt::CGFT_Null/CodeGenOpt::FileType::Null
piotrAMD added a commit to GPUOpen-Drivers/llpc that referenced this pull request Sep 19, 2023
There is a flag-day change around CodeGen enums in llvm/llvm-project#66295.

Update the code to use both old and new schemes depending on the LLVM version used.

Change enum to uint32_t in some places to reduce the number of include guards.
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Sep 22, 2023
Summary: llvm/llvm-project#66295 modified some internal LLVM APIs, update these places with the changes under LLVM version guard

Test Plan: CI

Differential Revision: D49340871

Pull Request resolved: #109408
Approved by: https://github.com/Skylion007
dstutt added a commit to dstutt/llpc that referenced this pull request Sep 27, 2023
There is a flag-day change around CodeGen enums in llvm/llvm-project#66295.

Changes were made in GPUOpen-Drivers#2770 but some
unit tests were missed.
dstutt added a commit to GPUOpen-Drivers/llpc that referenced this pull request Sep 28, 2023
There is a flag-day change around CodeGen enums in llvm/llvm-project#66295.

Changes were made in #2707 but some
unit tests were missed.
jeffdaily pushed a commit to ROCm/pytorch that referenced this pull request Oct 4, 2023
Summary: llvm/llvm-project#66295 modified some internal LLVM APIs, update these places with the changes under LLVM version guard

Test Plan: CI

Differential Revision: D49340871

Pull Request resolved: pytorch#109408
Approved by: https://github.com/Skylion007
jeffdaily pushed a commit to ROCm/pytorch that referenced this pull request Oct 4, 2023
Summary: llvm/llvm-project#66295 modified some internal LLVM APIs, update these places with the changes under LLVM version guard

Test Plan: CI

Differential Revision: D49340871

Pull Request resolved: pytorch#109408
Approved by: https://github.com/Skylion007
pruthvistony pushed a commit to ROCm/pytorch that referenced this pull request Oct 6, 2023
Summary: llvm/llvm-project#66295 modified some internal LLVM APIs, update these places with the changes under LLVM version guard

Test Plan: CI

Differential Revision: D49340871

Pull Request resolved: pytorch#109408
Approved by: https://github.com/Skylion007
quic-sanirudh added a commit to quic-sanirudh/tvm that referenced this pull request Oct 12, 2023
This patch fixes the errors caused due to recent API change from LLVM
for CodeGenOpt made in [this PR](llvm/llvm-project#66295)
Hzfengsy pushed a commit to apache/tvm that referenced this pull request Oct 13, 2023
This patch fixes the errors caused due to recent API change from LLVM
for CodeGenOpt made in [this PR](llvm/llvm-project#66295)
jeffdaily pushed a commit to ROCm/pytorch that referenced this pull request Nov 17, 2023
Summary: llvm/llvm-project#66295 modified some internal LLVM APIs, update these places with the changes under LLVM version guard

Test Plan: CI

Differential Revision: D49340871

Pull Request resolved: pytorch#109408
Approved by: https://github.com/Skylion007
jeffdaily pushed a commit to ROCm/pytorch that referenced this pull request Jan 5, 2024
Summary: llvm/llvm-project#66295 modified some internal LLVM APIs, update these places with the changes under LLVM version guard

Test Plan: CI

Differential Revision: D49340871

Pull Request resolved: pytorch#109408
Approved by: https://github.com/Skylion007
Zentrik added a commit to Zentrik/julia that referenced this pull request Apr 21, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Apr 21, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request May 3, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request May 3, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request May 4, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request May 4, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jun 18, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jun 18, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jun 20, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jun 20, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jun 21, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jun 21, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jul 21, 2024
Zentrik added a commit to Zentrik/julia that referenced this pull request Jul 21, 2024
hubot pushed a commit to google/swiftshader that referenced this pull request Apr 28, 2025
Relevant LLVM API changes:
llvm/llvm-project#66295
llvm/llvm-project#71029
llvm/llvm-project#74261

Change-Id: Id5af421c1415cf231dcb6673fa3c3b6f5b106841
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/73168
Reviewed-by: Geoff Lang <geofflang@google.com>
Tested-by: Shahbaz Youssefi <syoussefi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 backend:AMDGPU backend:ARM backend:DirectX backend:loongarch backend:m68k backend:MSP430 backend:RISC-V backend:Sparc backend:WebAssembly backend:X86 clang:codegen IR generation bugs: mangling, exceptions, etc. clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category debuginfo flang:driver flang:openmp flang Flang issues not falling into any other category libc++abi libc++abi C++ Runtime Library. Not libc++. lld:COFF lld:ELF lld:MachO lld:wasm lld lldb llvm:globalisel llvm:SelectionDAG SelectionDAGISel as well LTO Link time optimization (regular/full LTO or ThinLTO) mlir:core MLIR Core Infrastructure mlir:execution-engine mlir:gpu mlir:llvm mlir platform:windows tools:llvm-exegesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants