[all-commits] [llvm/llvm-project] 3951a7: [Flang][Driver] Handle target CPU and features
Usman Nadeem via All-commits
all-commits at lists.llvm.org
Fri Dec 2 09:40:22 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3951a73490df0f3dd307e8ea6aa52d2776259a4c
https://github.com/llvm/llvm-project/commit/3951a73490df0f3dd307e8ea6aa52d2776259a4c
Author: Usman Nadeem <mnadeem at quicinc.com>
Date: 2022-12-02 (Fri, 02 Dec 2022)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/CommonArgs.cpp
M clang/lib/Driver/ToolChains/CommonArgs.h
M clang/lib/Driver/ToolChains/Flang.cpp
M clang/lib/Driver/ToolChains/Flang.h
M flang/include/flang/Frontend/TargetOptions.h
M flang/lib/Frontend/CompilerInvocation.cpp
M flang/lib/Frontend/FrontendActions.cpp
M flang/test/Driver/driver-help.f90
A flang/test/Driver/target-cpu-features.f90
Log Message:
-----------
[Flang][Driver] Handle target CPU and features
This patch:
- Adds target-feature and target-cpu to FC1Options.
- Moves getTargetFeatures() from Clang.cpp to CommonArgs.cpp.
- Processes target cpu and features in the flang driver. Right now
features are only added for AArch64/x86 because I only did basic
testing on them but it should generally work for others as well.
Option handling is similar to clang.
- Adds appropriate structures in TargetOptions and passes them to
the target machine.
What's missing:
- Adding the CPU info and the features as attributes in the LLVM IR
module.
- Processing target specific flags, e.g. SVE vector bits for AArch64,
ABI etc.
Differential Revision: https://reviews.llvm.org/D137995
Change-Id: Ib081a74ea98617674845518a5d2754edba596418
More information about the All-commits
mailing list