SLTozer wrote:
With the prior patches having landed, this is now in a state where it could
land; I've rebased it onto main, meaning all of the code diff in this PR is now
relevant.
https://github.com/llvm/llvm-project/pull/118026
___
cfe-commits mail
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/118026
>From beb5e1955f9b0aa106512bb10d4543232e4d4cfa Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Thu, 28 Nov 2024 13:53:20 +
Subject: [PATCH] Enable -fextend-lifetimes at -Og
---
clang/docs/CommandGuide/c
@@ -412,6 +412,20 @@ New Compiler Flags
only for thread-local variables, and none (which corresponds to the
existing ``-fno-c++-static-destructors`` flag) skips all static
destructors registration.
+- The ``-fextend-variable-liveness`` flag has been added to allow for imp
https://github.com/jmorse commented:
This looks good, but I'd like to reword some of it
https://github.com/llvm/llvm-project/pull/118026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -412,6 +412,20 @@ New Compiler Flags
only for thread-local variables, and none (which corresponds to the
existing ``-fno-c++-static-destructors`` flag) skips all static
destructors registration.
+- The ``-fextend-variable-liveness`` flag has been added to allow for imp
https://github.com/jmorse edited
https://github.com/llvm/llvm-project/pull/118026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4298,6 +4298,26 @@ def stack_usage_file : Separate<["-"],
"stack-usage-file">,
Visibility<[CC1Option]>,
HelpText<"Filename (or -) to write stack usage output to">,
MarshallingInfoString>;
+def fextend_variable_liveness_EQ : Joined<["-"], "fextend-variable-liveness=">
@@ -412,6 +412,20 @@ New Compiler Flags
only for thread-local variables, and none (which corresponds to the
existing ``-fno-c++-static-destructors`` flag) skips all static
destructors registration.
+- The ``-fextend-variable-liveness`` flag has been added to allow for imp
SLTozer wrote:
I've updated this patch, and made it dependent on a [previous
PR](https://github.com/llvm/llvm-project/pull/11) - the logic for enabling
the flag is coupled with code from the earlier PR, and also we now slightly
extend the test added in that PR instead of creating a new one
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.setInlining(CodeGenOptions::NormalInlining);
}
+ // If we have specified -Og and have not explicitly set
-fno-extend-lifetimes,
+ // then default to -fextend-li
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/118026
>From efd7f58e421b0afdc886688128f72170e0c4a970 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Wed, 25 Sep 2024 15:08:39 +0100
Subject: [PATCH 1/2] [Clang] Add "extend lifetime" flags and release note
Follow
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.setInlining(CodeGenOptions::NormalInlining);
}
+ // If we have specified -Og and have not explicitly set
-fno-extend-lifetimes,
+ // then default to -fextend-li
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.setInlining(CodeGenOptions::NormalInlining);
}
+ // If we have specified -Og and have not explicitly set
-fno-extend-lifetimes,
+ // then default to -fextend-li
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.setInlining(CodeGenOptions::NormalInlining);
}
+ // If we have specified -Og and have not explicitly set
-fno-extend-lifetimes,
+ // then default to -fextend-li
@@ -0,0 +1,30 @@
+/// Check that we generate fake uses only when -fextend-lifetimes is set and we
+/// are not setting optnone, or when we have optimizations set to -Og and we
have
+/// not passed -fno-extend-lifetimes.
+// RUN: %clang_cc1 -emit-llvm -disable-llvm-passes -O0 -fex
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.setInlining(CodeGenOptions::NormalInlining);
}
+ // If we have specified -Og and have not explicitly set
-fno-extend-lifetimes,
+ // then default to -fextend-li
https://github.com/SLTozer updated
https://github.com/llvm/llvm-project/pull/118026
>From 7e42a82d73e3be98aab8e523b16a2e43d31b0552 Mon Sep 17 00:00:00 2001
From: Stephen Tozer
Date: Thu, 28 Nov 2024 13:53:20 +
Subject: [PATCH 1/2] Enable -fextend-lifetimes at -Og
---
clang/docs/CommandGui
https://github.com/SLTozer edited
https://github.com/llvm/llvm-project/pull/118026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,30 @@
+/// Check that we generate fake uses only when -fextend-lifetimes is set and we
+/// are not setting optnone, or when we have optimizations set to -Og and we
have
+/// not passed -fno-extend-lifetimes.
+// RUN: %clang_cc1 -emit-llvm -disable-llvm-passes -O0 -fex
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.setInlining(CodeGenOptions::NormalInlining);
}
+ // If we have specified -Og and have not set any explicit -fextend-lifetimes
+ // value, then default to -fexten
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions
&Opts, ArgList &Args,
Opts.setInlining(CodeGenOptions::NormalInlining);
}
+ // If we have specified -Og and have not set any explicit -fextend-lifetimes
+ // value, then default to -fexten
https://github.com/jmorse edited
https://github.com/llvm/llvm-project/pull/118026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -441,6 +441,10 @@ Modified Compiler Flags
``memset`` and similar functions for which it is a documented undefined
behavior. It is implied by ``-Wnontrivial-memaccess``
+- The ``-Og`` optimization flag now sets ``-fextend-lifetimes``, a new compiler
+ flag, resulting in
@@ -0,0 +1,30 @@
+/// Check that we generate fake uses only when -fextend-lifetimes is set and we
+/// are not setting optnone, or when we have optimizations set to -Og and we
have
+/// not passed -fno-extend-lifetimes.
+// RUN: %clang_cc1 -emit-llvm -disable-llvm-passes -O0 -fex
https://github.com/jmorse commented:
Some minor test comments, otherwise looking good,
https://github.com/llvm/llvm-project/pull/118026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Stephen Tozer (SLTozer)
Changes
This patch follows two other ongoing reviews,
https://github.com/llvm/llvm-project/pull/11 and
https://github.com/llvm/llvm-project/pull/110102, which add a new feature to
Clang - `-fextend-lif
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Stephen Tozer (SLTozer)
Changes
This patch follows two other ongoing reviews,
https://github.com/llvm/llvm-project/pull/11 and
https://github.com/llvm/llvm-project/pull/110102, which add a new feature to
Clang - `-fextend-lifetimes`,
https://github.com/SLTozer created
https://github.com/llvm/llvm-project/pull/118026
This patch follows two other ongoing reviews,
https://github.com/llvm/llvm-project/pull/11 and
https://github.com/llvm/llvm-project/pull/110102, which add a new feature to
Clang - `-fextend-lifetimes`, whi
28 matches
Mail list logo