@@ -204,6 +205,10 @@ static cl::opt
EnableLoopInterchange("enable-loopinterchange", cl::init(false),
cl::Hidden,
cl::desc("Enable the LoopInterchange Pass"));
+static cl::opt EnableLoopFusion("enable-loopfusion", cl::init(false),
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From be9eb6a39906fac945ea206eec80f4cc18bd4896 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/9] add -floop-fuse to clang and flang
---
clang/include/c
@@ -52,6 +52,15 @@
// CHECK-INTERCHANGE-LOOPS: "-floop-interchange"
// CHECK-NO-INTERCHANGE-LOOPS: "-fno-loop-interchange"
+// RUN: %clang -### -S -fexperimental-loop-fusion %s 2>&1 | FileCheck
-check-prefix=CHECK-FUSE-LOOPS %s
madhur13490 wrote:
I don't thi
@@ -43,6 +43,7 @@ CODEGENOPT(StackArrays, 1, 0) ///< -fstack-arrays (enable the
stack-arrays pass)
CODEGENOPT(VectorizeLoop, 1, 0) ///< Enable loop vectorization.
CODEGENOPT(VectorizeSLP, 1, 0) ///< Enable SLP vectorization.
CODEGENOPT(InterchangeLoops, 1, 0) ///< Enable loop
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From be9eb6a39906fac945ea206eec80f4cc18bd4896 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/8] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From be9eb6a39906fac945ea206eec80f4cc18bd4896 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/7] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6870,6 +6870,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
options::OPT_fno_unroll_loops);
Args.AddLastArg(CmdArgs, options::OPT_floop_interchange,
options::OPT_fno_loop_interchange);
+ Args.AddLastArg(CmdArgs, op
madhur13490 wrote:
> You need to click "Re-request review" from folks who have requested changes.
Thanks for that! But I am following the below from "[Contributing to
LLVM](https://llvm.org/docs/Contributing.html#how-to-submit-a-patch)"
_If you have received no comments on your patch for a wee
@@ -6870,6 +6870,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
options::OPT_fno_unroll_loops);
Args.AddLastArg(CmdArgs, options::OPT_floop_interchange,
options::OPT_fno_loop_interchange);
+ Args.AddLastArg(CmdArgs, op
@@ -4268,6 +4268,10 @@ def floop_interchange : Flag<["-"],
"floop-interchange">, Group,
HelpText<"Enable the loop interchange pass">, Visibility<[ClangOption,
CC1Option, FlangOption, FC1Option]>;
def fno_loop_interchange: Flag<["-"], "fno-loop-interchange">, Group,
HelpTe
madhur13490 wrote:
Ping!
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
madhur13490 wrote:
Gentle ping!
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
madhur13490 wrote:
gg
> Just in case: it's not "just after LoopInterchange", it's "before
> LoopDeletion". If you want to run it just after LoopInterchange, please add
> LoopFuse after adding `LPM` to `OptimizePM`. It might be better adding some
> test to check the position.
>
Yes, realized
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From be9eb6a39906fac945ea206eec80f4cc18bd4896 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/5] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From be9eb6a39906fac945ea206eec80f4cc18bd4896 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/5] add -floop-fuse to clang and flang
---
clang/include/c
@@ -1671,6 +1671,11 @@ void CompilerInvocationBase::GenerateCodeGenArgs(const
CodeGenOptions &Opts,
else
GenerateArg(Consumer, OPT_fno_loop_interchange);
+ if (Opts.FuseLoops)
+GenerateArg(Consumer, OPT_fexperimental_loop_fusion);
+ else
madhur134
@@ -4268,6 +4268,10 @@ def floop_interchange : Flag<["-"],
"floop-interchange">, Group,
HelpText<"Enable the loop interchange pass">, Visibility<[ClangOption,
CC1Option, FlangOption, FC1Option]>;
def fno_loop_interchange: Flag<["-"], "fno-loop-interchange">, Group,
HelpTe
madhur13490 wrote:
> > In that case. it may be better to move it to
> > `buildModuleOptimizationPipeline`. This is undoubtedly an optimization, and
> > a non-trivial one at that. There are still open questions about the exact
> > placement of the pass within the optimization pipeline, but movi
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From be9eb6a39906fac945ea206eec80f4cc18bd4896 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/4] add -floop-fuse to clang and flang
---
clang/include/c
madhur13490 wrote:
Gentle ping @tarunprabhu @kasuga-fj
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -204,6 +205,10 @@ static cl::opt
EnableLoopInterchange("enable-loopinterchange", cl::init(false),
cl::Hidden,
cl::desc("Enable the LoopInterchange Pass"));
+static cl::opt EnableLoopFusion("enable-loopfusion", cl::init(false),
+
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From 27552bc04f6545c5be314fea757f8961c6854737 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/3] add -floop-fuse to clang and flang
---
clang/include/c
madhur13490 wrote:
> > What do you think is the right place in pass pipeline?
>
> I don't know, but just a gut feeling, somewhere in
> `buildModuleOptimizationPipeline` looks reasonable to me rather than
> `buildFunctionSimplificationPipeline`. However, again, it should be
> determined by wha
@@ -204,6 +205,10 @@ static cl::opt
EnableLoopInterchange("enable-loopinterchange", cl::init(false),
cl::Hidden,
cl::desc("Enable the LoopInterchange Pass"));
+static cl::opt EnableLoopFusion("enable-loopfusion", cl::init(false),
madhur13490 wrote:
@tarunprabhu Sure, I can take that suggestion. I have done the changes.
@kasuga-fj I fixed the rebase issue in `flang/docs`.
> I don't think this implies that the pass should be part of the function
> simplification pipeline. Its position should be determined by what the pas
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From 3b71a3ca82ed5bfdad8836f317c9476af964e432 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/2] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From 3b71a3ca82ed5bfdad8836f317c9476af964e432 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/2] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From 3b71a3ca82ed5bfdad8836f317c9476af964e432 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/2] add -floop-fuse to clang and flang
---
clang/include/c
madhur13490 wrote:
> You probably made a mistake with the rebase...
Thanks. I think I fixed it. Can you please have a look again?
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From 3b71a3ca82ed5bfdad8836f317c9476af964e432 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/2] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From 3b71a3ca82ed5bfdad8836f317c9476af964e432 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/2] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From 3b71a3ca82ed5bfdad8836f317c9476af964e432 Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/2] add -floop-fuse to clang and flang
---
clang/include/c
@@ -2112,7 +2124,6 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel
Level,
LPM.addPass(LoopFlattenPass());
LPM.addPass(IndVarSimplifyPass());
LPM.addPass(LoopDeletionPass());
- // FIXME: Add loop interchange.
madhur13490 wrote:
Done
https:/
@@ -518,6 +524,9 @@
PassBuilder::buildO1FunctionSimplificationPipeline(OptimizationLevel Level,
invokeLoopOptimizerEndEPCallbacks(LPM2, Level);
+ if (PTO.LoopFuse)
+FPM.addPass(LoopFusePass());
+
madhur13490 wrote:
I have moved it to the function sim
@@ -3157,7 +3157,7 @@ void tools::handleVectorizeSLPArgs(const ArgList &Args,
void tools::handleInterchangeLoopsArgs(const ArgList &Args,
ArgStringList &CmdArgs) {
- // FIXME: instead of relying on shouldEnableVectorizerAtOLevel, we may
madhur13490 wrote:
I am taking over this change. Trying to address review comments.
https://github.com/llvm/llvm-project/pull/142686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 updated
https://github.com/llvm/llvm-project/pull/142686
>From e1bd099f2efca124dfb2f598d7b47d723080516d Mon Sep 17 00:00:00 2001
From: Sebastian Pop
Date: Thu, 22 May 2025 13:50:38 +
Subject: [PATCH 1/2] add -floop-fuse to clang and flang
---
clang/include/c
https://github.com/madhur13490 closed
https://github.com/llvm/llvm-project/pull/147014
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
madhur13490 wrote:
I see. I can drop this, but I couldn't find a link from the User Manual to the
[Clang command line argument
reference](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-floop-interchange).
Is there one?
https://github.com/llvm/llvm-project/pull/1470
https://github.com/madhur13490 created
https://github.com/llvm/llvm-project/pull/147014
None
>From e19caa08f790159fbda9ce5f4b22089b36add661 Mon Sep 17 00:00:00 2001
From: Madhur Amilkanthwar
Date: Thu, 3 Jul 2025 21:54:29 -0700
Subject: [PATCH] [UserManual] Document clang option for loop inter
@@ -34,6 +34,7 @@ page](https://llvm.org/releases/).
* -floop-interchange is now recognized by flang.
* -floop-interchange is enabled by default at -O2 and above.
+* -fexperimental-fuse-loops is now recognized by flang.
madhur13490 wrote:
We should make a sim
https://github.com/madhur13490 closed
https://github.com/llvm/llvm-project/pull/139763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/139763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 created
https://github.com/llvm/llvm-project/pull/139763
llvm-profgen cannot accept the perf profiles collected without `-b` and errors
out with a message `"Invalid perf script input!"`.
This can also be validated from the code in function `checkPerfScriptType()`
madhur13490 wrote:
Thanks all. Abandoning this change, will find an appropriate solution for
downstream.
https://github.com/llvm/llvm-project/pull/134338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/madhur13490 closed
https://github.com/llvm/llvm-project/pull/134338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
madhur13490 wrote:
> The other tests should be strengthened to always use -NEXT. The exact set of
> macros should be tested; don't want others hiding in the gaps
Thanks, @arsenm. However, the strict checks are creating problems in our
downstream compiler and rebasing. Our downstream compiler e
https://github.com/madhur13490 created
https://github.com/llvm/llvm-project/pull/134338
The checks in init-aarch64.c expect macros to be back-to-back which seems very
strict. This change aims to relax this and use just AARCH64 instead of
AARCH64-NEXT. This way, we maintain the order of the mac
@@ -7380,12 +7380,27 @@ bool
AArch64DAGToDAGISel::SelectAddrModeIndexedSVE(SDNode *Root, SDValue N,
return false;
SDValue VScale = N.getOperand(1);
- if (VScale.getOpcode() != ISD::VSCALE)
+ int64_t MulImm = std::numeric_limits::max();
+ if (VScale.getOpcode() == ISD
madhur13490 wrote:
> > The fix is NOT correct. You need to enclose in quotes as @tstellar mentions
> > in #126876
>
> ` llvm_canonicalize_cmake_booleans` converts the string to an integer so you
> don't need the quotes now that this function is called with the correct
> variable. This is what
madhur13490 wrote:
Please merge this soon. This has broken our CI miserably and has blocked all
our testing. Thanks!
https://github.com/llvm/llvm-project/pull/127967
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/125830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/125830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
madhur13490 wrote:
Here are CMAKE variables we use downstream.
```
-DLLVM_ENABLE_PROJECTS=bolt;clang;openmp;lld
madhur13490 wrote:
This commit is breaking LTO-PGO-BOLT build while optimizing clang with BOLT.
```
[3064/3065] Merging BOLT fdata
Using legacy profile format.
Profile from 2 files merged.
[3064/3065] Optimizing Clang with BOLT
BOLT-INFO: shared object or position-independent executable detecte
madhur13490 wrote:
@mizvekov Is it possible to revert this until you work on the solution? SPEC is
failing since this patch is landed.
https://github.com/llvm/llvm-project/pull/100692
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/97749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/madhur13490 edited
https://github.com/llvm/llvm-project/pull/97749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -445,4 +445,21 @@ void aarch64::getAArch64TargetFeatures(const Driver &D,
if (Args.getLastArg(options::OPT_mno_bti_at_return_twice))
Features.push_back("+no-bti-at-return-twice");
+
+ // Parse AArch64 CPU Features
+ const Arg *CPUArg = Args.getLastArg(options::OPT_m
madhur13490 wrote:
Thanks for fixing this after our discord chats!
https://github.com/llvm/llvm-project/pull/89803
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -24,3 +24,9 @@
// RUN: -L. -fconvergent-functions %s 2>&1 | FileCheck -check-prefix=MCPU %s
// LTO: clang{{.*}} "-flto=full"{{.*}}"-fconvergent-functions"
// MCPU: ld.lld{{.*}}"-L."{{.*}}"-plugin-opt=mcpu=gfx906"
+
+// We do not suppor the BFD linker, but we should be able
65 matches
Mail list logo