[llvm] f2ab8f4 - [llvm-reduce] Reduce global value linkage

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 10:08:24 PDT 2023


Sorry about that, fixed in 962a6fe5f05b8b9969a9ecf071ad87c5adcde801

On Thu, Jul 20, 2023 at 6:25 AM Florian Hahn <florian_hahn at apple.com> wrote:

>
>
>
> On Jul 18, 2023, at 00:47, Arthur Eubanks via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Arthur Eubanks
> Date: 2023-07-17T15:46:38-07:00
> New Revision: f2ab8f43800ff14051213bff40d35406691f29b0
>
> URL:
> https://github.com/llvm/llvm-project/commit/f2ab8f43800ff14051213bff40d35406691f29b0
> DIFF:
> https://github.com/llvm/llvm-project/commit/f2ab8f43800ff14051213bff40d35406691f29b0.diff
>
> LOG: [llvm-reduce] Reduce global value linkage
>
> Added:
>    llvm/test/tools/llvm-reduce/reduce-linkage.ll
>
> Modified:
>    llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/test/tools/llvm-reduce/reduce-linkage.ll
> b/llvm/test/tools/llvm-reduce/reduce-linkage.ll
> new file mode 100644
> index 00000000000000..e7f35245194c41
> --- /dev/null
> +++ b/llvm/test/tools/llvm-reduce/reduce-linkage.ll
> @@ -0,0 +1,22 @@
> +; Test that llvm-reduce can remove function linkage.
> +;
> +; RUN: llvm-reduce --abort-on-invalid-reduction
> --delta-passes=global-values --test FileCheck --test-arg
> --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg
> --input-file %s -o %t
> +; RUN: FileCheck --check-prefix=CHECK-FINAL --implicit-check-not=internal
> %s < %t
> +
> +; CHECK-INTERESTINGNESS: define
> +; CHECK-INTERESTINGNESS-SAME: void @f
> +
> +; CHECK-FINAL: define void @f()
> +
> +define void @f() {
> +  ret void
> +}
> +
> +; CHECK-INTERESTINGNESS: define
> +; CHECK-INTERESTINGNESS-SAME: void @g
> +
> +; CHECK-FINAL: define void @g()
> +
> +define internal void @g() {
> +  ret void
> +}
>
>
>
>
>
> Unfortunately the added test will fail if the path to llvm-project contains
> any directory that contains internal.
>
> IIUC --implicit-check-not could just be dropped, as you explicitly check
> the define void @g()?
>
>
> Cheers,
>
> Florian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/d593e15c/attachment.html>


More information about the llvm-commits mailing list