[PATCH] D145883: [Flang][RISCV] Emit target features for RISC-V

2023-03-12 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:112-114 + case llvm::Triple::riscv64: +getTargetFeatures(D, Triple, Args, CmdArgs, /*ForAs*/ false); +break; identical code, could just do a fallthrough Repository: rG

[PATCH] D145883: [Flang][RISCV] Emit target features for RISC-V

2023-03-12 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added a comment. There is an existing test `flang/test/Driver/target-cpu-features.f90` added in D137995 Would it be better to add RISCV to that file? or perhaps rename the tests to have target specific files? Repository: rG LLVM Github Monorepo

[PATCH] D142420: [Flang] Add support to use LTO specific pipelines

2023-03-10 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added a comment. In D142420#4184825 , @tblah wrote: > In D142420#4080619 , @mnadeem wrote: > >> We have tried full LTO on Aarch64 (without this patch) and have seen a few >> 3-8% improvements in SPEC and

[PATCH] D142420: [Flang] Add support to use LTO specific pipelines

2023-03-09 Thread Usman Nadeem 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 rG0fdfb65e2624: [Flang] Add support to use LTO specific pipelines (authored by mnadeem). Herald added a project: clang. Herald added a subscriber:

[PATCH] D138675: [flang] Add -ffast-math and -Ofast

2023-01-27 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Herald added a subscriber: sunshaoce. Comment at: flang/test/Driver/fast_math.f90:59-62 +! Check that -ffast-math causes us to link to crtfastmath.o +! UNSUPPORTED: system-windows +! RUN: %flang -ffast-math -### %s -o %t 2>&1 \ +! RUN: |

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-12-02 Thread Usman Nadeem via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3951a73490df: [Flang][Driver] Handle target CPU and features (authored by mnadeem). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137995/new/

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-12-01 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 479474. mnadeem marked 4 inline comments as done. mnadeem added a comment. - Address comments. - Add fc1 tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137995/new/ https://reviews.llvm.org/D137995 Files:

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-11-29 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:99 + default: +// Untested for other targets but should work generally. +break; mnadeem wrote: > kiranchandramohan wrote: > > I get a segfault in ` > >

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-11-29 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:99 + default: +// Untested for other targets but should work generally. +break; kiranchandramohan wrote: > I get a segfault in `

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-11-29 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added a comment. In D137995#3931005 , @kiranchandramohan wrote: > We might need `-fc1` tests as well. What kind of tests do you think would be appropriate here? Can you point me to any examples, maybe from clang? CHANGES SINCE LAST ACTION

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-11-29 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added a comment. In D137995#3944145 , @awarzynski wrote: > Thanks for implementing this! > >> Processes target cpu and features in the flang driver. Right now features >> are only added for AArch64 because I only did basic testing on AArch64

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-11-29 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 478766. mnadeem marked 4 inline comments as done. mnadeem edited the summary of this revision. Herald added a subscriber: pengfei. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137995/new/ https://reviews.llvm.org/D137995 Files:

[PATCH] D137995: [Flang][Driver] Handle target CPU and features

2022-11-14 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem created this revision. mnadeem added reviewers: vzakhari, awarzynski, kiranchandramohan. mnadeem added a project: Flang. Herald added subscribers: ctetreau, jdoerfert, s.egerton, simoncook, fedor.sergeev, kristof.beyls, dschuff. Herald added a reviewer: sscalpone. Herald added a project:

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-22 Thread Usman Nadeem via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGef5ede52efbf: [Flang][Driver] Add support for PIC (authored by mnadeem). Changed prior to commit: https://reviews.llvm.org/D131533?vs=453472=454574#toc Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-22 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem marked 3 inline comments as done. mnadeem added inline comments. Comment at: clang/include/clang/Driver/Options.td:6320-6325 +def pic_level : Separate<["-"], "pic-level">, + HelpText<"Value for __PIC__">, + MarshallingInfoInt>; +def pic_is_pie : Flag<["-"],

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-17 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem marked 9 inline comments as done. mnadeem added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:151 +static llvm::Reloc::Model getRelocationFromName(llvm::StringRef model) { + if (model.equals("static")) +return llvm::Reloc::Static;

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-17 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 453472. mnadeem edited the summary of this revision. mnadeem added a subscriber: chrisj. mnadeem added a comment. - Moved mrelocation_model in Option.td to be near Codegen Options and put it in a `let` block. - Moved all the options from FrontendOptions to

[PATCH] D131806: Update hwasan test to fix failure on older Android API versions.

2022-08-12 Thread Usman Nadeem 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 rG405ad847931f: Update hwasan test to fix failure on older Android API versions. (authored by mnadeem). Repository: rG LLVM Github Monorepo

[PATCH] D131806: Update hwasan test to fix failure on older Android API versions.

2022-08-12 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 452326. mnadeem edited the summary of this revision. mnadeem added a comment. Herald added a subscriber: kristof.beyls. Update to use the same triple as MEMTAG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131806/new/

[PATCH] D131806: Update hwasan test to fix failure on older Android API versions.

2022-08-12 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem created this revision. mnadeem added reviewers: hctim, vitalybuka, kstoimenov. Herald added a subscriber: danielkiss. Herald added a project: All. mnadeem requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In Android API < 30 there is

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-11 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Comment at: flang/test/Driver/pic-flags.f90:3 -! RUN: %flang -### %s --target=aarch64-linux-gnu 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE -! RUN: %flang -### %s --target=aarch64-linux-gnu -fno-pie 2>&1 | FileCheck %s

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-09 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem created this revision. mnadeem added a project: Flang. Herald added a subscriber: jdoerfert. Herald added a reviewer: sscalpone. Herald added a reviewer: awarzynski. Herald added a project: All. mnadeem requested review of this revision. Herald added subscribers: cfe-commits, MaskRay.

[PATCH] D109118: [AArch64][SVE][InstCombine] Canonicalize aarch64_sve_dup_x intrinsic to IR splat operation

2021-09-10 Thread Usman Nadeem 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 rG98c37247d81d: [AArch64][SVE][InstCombine] Canonicalize aarch64_sve_dup_x intrinsic to IR… (authored by mnadeem). Herald added a project: clang.

[PATCH] D108881: [clang][driver] Honor the last -flto(=.*)? argument

2021-09-08 Thread Usman Nadeem 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 rG0a9d740c232e: [clang][Driver] Update/cleanup LTO logic to ensure that the last lto argument… (authored by mnadeem). Repository: rG LLVM Github

[PATCH] D108881: [clang][driver] Honor the last -flto(=.*)? argument

2021-09-07 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 371245. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108881/new/ https://reviews.llvm.org/D108881 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D108881: [clang][driver] Honor the last -flto(=.*)? argument

2021-09-07 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Comment at: clang/lib/Driver/Driver.cpp:596-598 - (!Args.hasFlag(options::OPT_flto_EQ_auto, options::OPT_fno_lto, false) && -!Args.hasFlag(options::OPT_flto_EQ_jobserver, options::OPT_fno_lto, - false

[PATCH] D108881: [clang][driver] Honor the last -flto(=.*)? argument

2021-09-07 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 371241. mnadeem added a comment. - - Make flto an alias of flto=full. - - Make foffload-lto an alias of foffload-lto=full. - - Make flto_EQ_jobserver, flto_EQ_auto aliases of flto=full, since they are being treated as full lto right now. - - Clean up the

[PATCH] D108881: [clang][driver] Honor the last -flto(=.*)? argument

2021-09-07 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added a comment. In D108881#2973735 , @steven_wu wrote: > In D108881#2973719 , @mnadeem wrote: > >> In D108881#2973516 , @steven_wu >> wrote: >> >>> I will do a

[PATCH] D108881: [clang][driver] Honor the last -flto(=.*)? argument

2021-08-30 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added a comment. In D108881#2973516 , @steven_wu wrote: > I will do a cleanup of `parseLTOMode` function since we don't need a `OptPos` > parameter anymore. There are few minor places references `OPT_flto` or > `OPT_foffload_lto` can be cleaned

[PATCH] D108881: [clang][driver] Honor the last -flto(=.*)? argument

2021-08-30 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 369558. mnadeem retitled this revision from "[clang][driver] Honor the last -flto= flag even if an earlier -flto is present" to "[clang][driver] Honor the last -flto(=.*)? argument". mnadeem edited the summary of this revision. mnadeem added a comment.

[PATCH] D108881: [clang][driver] Honor the last -flto= flag even if an earlier -flto is present

2021-08-30 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added a comment. Combined with the code in `else if (Triple.isAMDGPU())` since the code is identical. Removed the code to add `-flto` in favour of `-flto=full` since both are equivalent: https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-flto CHANGES SINCE LAST ACTION

[PATCH] D108881: [clang][driver] Honor the last -flto= flag even if an earlier -flto is present

2021-08-30 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem updated this revision to Diff 369498. mnadeem marked 3 inline comments as done. mnadeem edited the summary of this revision. mnadeem added a subscriber: apazos. mnadeem added a comment. Herald added subscribers: kerbowa, nhaehnle, jvesely. Address comments. CHANGES SINCE LAST ACTION

[PATCH] D108881: [clang][driver] Honor the last -flto= flag even if an earlier -flto is present

2021-08-28 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4495-4497 +Arg *A = Args.getLastArg(options::OPT_flto, options::OPT_flto_EQ); +if (A && A->getOption().matches(options::OPT_flto)) CmdArgs.push_back("-flto");

[PATCH] D108881: [clang][driver] Honor the last -flto= flag even if an earlier -flto is present

2021-08-28 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem created this revision. mnadeem added a project: clang. Herald added subscribers: ormris, steven_wu, hiraditya, inglorion. mnadeem requested review of this revision. Herald added a subscriber: cfe-commits. After D102479 `-flto=` options the end of the