Skip to content

[KeyInstr][Clang] Add Clang option -g[no-]key-instructions #134627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025

Conversation

OCHyams
Copy link
Contributor

@OCHyams OCHyams commented Apr 7, 2025

This needs to be driver level to pass an -mllvm flag to LLVM.

Keep the flag help-hidden as the feature is under development.


This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

The Key Instructions project is introduced, including a "quick summary" section
at the top which adds context for this PR, here:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.

The Clang-side work is demoed here:
#130943

Copy link
Contributor Author

OCHyams commented Apr 7, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@OCHyams OCHyams marked this pull request as ready for review April 7, 2025 13:38
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Apr 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 7, 2025

@llvm/pr-subscribers-clang

Author: Orlando Cazalet-Hyams (OCHyams)

Changes

This needs to be driver level to pass an -mllvm flag to LLVM.

Keep the flag help-hidden as the feature is under development.


This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

The Key Instructions project is introduced, including a "quick summary" section
at the top which adds context for this PR, here:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.

The Clang-side work is demoed here:
#130943


Full diff: https://github.com/llvm/llvm-project/pull/134627.diff

7 Files Affected:

  • (modified) clang/include/clang/Basic/DebugOptions.def (+3)
  • (modified) clang/include/clang/Driver/Options.td (+6)
  • (modified) clang/lib/Driver/ToolChains/Clang.cpp (+7)
  • (modified) clang/test/CMakeLists.txt (+1)
  • (added) clang/test/KeyInstructions/flag.cpp (+15)
  • (added) clang/test/KeyInstructions/lit.local.cfg (+2)
  • (modified) clang/test/lit.site.cfg.py.in (+1)
diff --git a/clang/include/clang/Basic/DebugOptions.def b/clang/include/clang/Basic/DebugOptions.def
index bc96d5dfdf890..7a9d2e838c1ca 100644
--- a/clang/include/clang/Basic/DebugOptions.def
+++ b/clang/include/clang/Basic/DebugOptions.def
@@ -75,6 +75,9 @@ DEBUGOPT(DebugOmitUnreferencedMethods, 1, 0) ///< Omit unreferenced member
 BENIGN_ENUM_DEBUGOPT(AssignmentTrackingMode, AssignmentTrackingOpts, 2,
                      AssignmentTrackingOpts::Disabled)
 
+/// Whether or not to use Key Instructions to determine breakpoint locations.
+BENIGN_DEBUGOPT(DebugKeyInstructions, 1, 0)
+
 DEBUGOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information
                                 ///< in debug info.
 
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 3af072242d039..68d70af15ca02 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -4588,6 +4588,12 @@ def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>,
 def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
     Flags<[NoXarchOption]>,
     HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">;
+defm key_instructions : BoolGOption<"key-instructions",
+    CodeGenOpts<"DebugKeyInstructions">, DefaultFalse,
+    NegFlag<SetFalse>, PosFlag<SetTrue, [], [],
+        "Enable Key Instructions, which reduces the jumpiness of optimized code stepping (DWARF only)."
+        " Requires LLVM built with LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS.">,
+    BothFlags<[HelpHidden], [ClangOption, CLOption, CC1Option]>>;
 def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
 def help : Flag<["-", "--"], "help">,
     Visibility<[ClangOption, CC1Option, CC1AsOption,
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 26fa234dd4e9b..0778db857172c 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -4767,6 +4767,13 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
       CmdArgs.push_back("-gembed-source");
   }
 
+  if (Args.hasFlag(options::OPT_gkey_instructions,
+                   options::OPT_gno_key_instructions, false)) {
+    CmdArgs.push_back("-gkey-instructions");
+    CmdArgs.push_back("-mllvm");
+    CmdArgs.push_back("-dwarf-use-key-instructions");
+  }
+
   if (EmitCodeView) {
     CmdArgs.push_back("-gcodeview");
 
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index af3bc3853edfc..0bdce62a8716c 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -23,6 +23,7 @@ llvm_canonicalize_cmake_booleans(
   PPC_LINUX_DEFAULT_IEEELONGDOUBLE
   LLVM_TOOL_LLVM_DRIVER_BUILD
   LLVM_INCLUDE_SPIRV_TOOLS_TESTS
+  LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS
   )
 
 configure_lit_site_cfg(
diff --git a/clang/test/KeyInstructions/flag.cpp b/clang/test/KeyInstructions/flag.cpp
new file mode 100644
index 0000000000000..93503dd4bdb4c
--- /dev/null
+++ b/clang/test/KeyInstructions/flag.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang -### -target x86_64 -c -gdwarf -gkey-instructions %s 2>&1 | FileCheck %s --check-prefixes=KEY-INSTRUCTIONS
+// RUN: %clang -### -target x86_64 -c -gdwarf -gno-key-instructions %s 2>&1 | FileCheck %s --check-prefixes=NO-KEY-INSTRUCTIONS
+//// Default: Off.
+// RUN: %clang -### -target x86_64 -c -gdwarf %s 2>&1 | FileCheck %s --check-prefixes=NO-KEY-INSTRUCTIONS
+
+//// Help hidden.
+// RUN %clang --help | FileCheck %s --check-prefix=HELP
+// HELP-NOT: key-instructions
+
+// KEY-INSTRUCTIONS: "-gkey-instructions"
+// KEY-INSTRUCTIONS: "-mllvm" "-dwarf-use-key-instructions"
+
+// NO-KEY-INSTRUCTIONS-NOT: key-instructions
+
+//// TODO: Add smoke test once some functionality has been added.
diff --git a/clang/test/KeyInstructions/lit.local.cfg b/clang/test/KeyInstructions/lit.local.cfg
new file mode 100644
index 0000000000000..482bd5c8ac251
--- /dev/null
+++ b/clang/test/KeyInstructions/lit.local.cfg
@@ -0,0 +1,2 @@
+if not config.has_key_instructions:
+    config.unsupported = True
diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in
index 80cded2625df4..19fb217c6355f 100644
--- a/clang/test/lit.site.cfg.py.in
+++ b/clang/test/lit.site.cfg.py.in
@@ -45,6 +45,7 @@ config.ppc_linux_default_ieeelongdouble = @PPC_LINUX_DEFAULT_IEEELONGDOUBLE@
 config.have_llvm_driver = @LLVM_TOOL_LLVM_DRIVER_BUILD@
 config.spirv_tools_tests = @LLVM_INCLUDE_SPIRV_TOOLS_TESTS@
 config.substitutions.append(("%llvm-version-major", "@LLVM_VERSION_MAJOR@"))
+config.has_key_instructions = @LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS@
 
 import lit.llvm
 lit.llvm.initialize(lit_config, config)

@llvmbot
Copy link
Member

llvmbot commented Apr 7, 2025

@llvm/pr-subscribers-clang-driver

Author: Orlando Cazalet-Hyams (OCHyams)

Changes

This needs to be driver level to pass an -mllvm flag to LLVM.

Keep the flag help-hidden as the feature is under development.


This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

The Key Instructions project is introduced, including a "quick summary" section
at the top which adds context for this PR, here:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.

The Clang-side work is demoed here:
#130943


Full diff: https://github.com/llvm/llvm-project/pull/134627.diff

7 Files Affected:

  • (modified) clang/include/clang/Basic/DebugOptions.def (+3)
  • (modified) clang/include/clang/Driver/Options.td (+6)
  • (modified) clang/lib/Driver/ToolChains/Clang.cpp (+7)
  • (modified) clang/test/CMakeLists.txt (+1)
  • (added) clang/test/KeyInstructions/flag.cpp (+15)
  • (added) clang/test/KeyInstructions/lit.local.cfg (+2)
  • (modified) clang/test/lit.site.cfg.py.in (+1)
diff --git a/clang/include/clang/Basic/DebugOptions.def b/clang/include/clang/Basic/DebugOptions.def
index bc96d5dfdf890..7a9d2e838c1ca 100644
--- a/clang/include/clang/Basic/DebugOptions.def
+++ b/clang/include/clang/Basic/DebugOptions.def
@@ -75,6 +75,9 @@ DEBUGOPT(DebugOmitUnreferencedMethods, 1, 0) ///< Omit unreferenced member
 BENIGN_ENUM_DEBUGOPT(AssignmentTrackingMode, AssignmentTrackingOpts, 2,
                      AssignmentTrackingOpts::Disabled)
 
+/// Whether or not to use Key Instructions to determine breakpoint locations.
+BENIGN_DEBUGOPT(DebugKeyInstructions, 1, 0)
+
 DEBUGOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information
                                 ///< in debug info.
 
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 3af072242d039..68d70af15ca02 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -4588,6 +4588,12 @@ def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>,
 def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
     Flags<[NoXarchOption]>,
     HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">;
+defm key_instructions : BoolGOption<"key-instructions",
+    CodeGenOpts<"DebugKeyInstructions">, DefaultFalse,
+    NegFlag<SetFalse>, PosFlag<SetTrue, [], [],
+        "Enable Key Instructions, which reduces the jumpiness of optimized code stepping (DWARF only)."
+        " Requires LLVM built with LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS.">,
+    BothFlags<[HelpHidden], [ClangOption, CLOption, CC1Option]>>;
 def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
 def help : Flag<["-", "--"], "help">,
     Visibility<[ClangOption, CC1Option, CC1AsOption,
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 26fa234dd4e9b..0778db857172c 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -4767,6 +4767,13 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
       CmdArgs.push_back("-gembed-source");
   }
 
+  if (Args.hasFlag(options::OPT_gkey_instructions,
+                   options::OPT_gno_key_instructions, false)) {
+    CmdArgs.push_back("-gkey-instructions");
+    CmdArgs.push_back("-mllvm");
+    CmdArgs.push_back("-dwarf-use-key-instructions");
+  }
+
   if (EmitCodeView) {
     CmdArgs.push_back("-gcodeview");
 
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index af3bc3853edfc..0bdce62a8716c 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -23,6 +23,7 @@ llvm_canonicalize_cmake_booleans(
   PPC_LINUX_DEFAULT_IEEELONGDOUBLE
   LLVM_TOOL_LLVM_DRIVER_BUILD
   LLVM_INCLUDE_SPIRV_TOOLS_TESTS
+  LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS
   )
 
 configure_lit_site_cfg(
diff --git a/clang/test/KeyInstructions/flag.cpp b/clang/test/KeyInstructions/flag.cpp
new file mode 100644
index 0000000000000..93503dd4bdb4c
--- /dev/null
+++ b/clang/test/KeyInstructions/flag.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang -### -target x86_64 -c -gdwarf -gkey-instructions %s 2>&1 | FileCheck %s --check-prefixes=KEY-INSTRUCTIONS
+// RUN: %clang -### -target x86_64 -c -gdwarf -gno-key-instructions %s 2>&1 | FileCheck %s --check-prefixes=NO-KEY-INSTRUCTIONS
+//// Default: Off.
+// RUN: %clang -### -target x86_64 -c -gdwarf %s 2>&1 | FileCheck %s --check-prefixes=NO-KEY-INSTRUCTIONS
+
+//// Help hidden.
+// RUN %clang --help | FileCheck %s --check-prefix=HELP
+// HELP-NOT: key-instructions
+
+// KEY-INSTRUCTIONS: "-gkey-instructions"
+// KEY-INSTRUCTIONS: "-mllvm" "-dwarf-use-key-instructions"
+
+// NO-KEY-INSTRUCTIONS-NOT: key-instructions
+
+//// TODO: Add smoke test once some functionality has been added.
diff --git a/clang/test/KeyInstructions/lit.local.cfg b/clang/test/KeyInstructions/lit.local.cfg
new file mode 100644
index 0000000000000..482bd5c8ac251
--- /dev/null
+++ b/clang/test/KeyInstructions/lit.local.cfg
@@ -0,0 +1,2 @@
+if not config.has_key_instructions:
+    config.unsupported = True
diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in
index 80cded2625df4..19fb217c6355f 100644
--- a/clang/test/lit.site.cfg.py.in
+++ b/clang/test/lit.site.cfg.py.in
@@ -45,6 +45,7 @@ config.ppc_linux_default_ieeelongdouble = @PPC_LINUX_DEFAULT_IEEELONGDOUBLE@
 config.have_llvm_driver = @LLVM_TOOL_LLVM_DRIVER_BUILD@
 config.spirv_tools_tests = @LLVM_INCLUDE_SPIRV_TOOLS_TESTS@
 config.substitutions.append(("%llvm-version-major", "@LLVM_VERSION_MAJOR@"))
+config.has_key_instructions = @LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS@
 
 import lit.llvm
 lit.llvm.initialize(lit_config, config)

Copy link
Member

@jmorse jmorse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; I understand we have to support driver flags forever because they get baked into peoples build systems. Would we be able to get away with a cc1 flag instead?

I suppose this strays into the topic of "how are we going to deploy this", which as everything is behind a compile time flag, we probably don't need to immediately answer. IMO we don't have to support driver flags forever that were in turn behind their own experimental compile-time flag.

@@ -4767,6 +4767,13 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
CmdArgs.push_back("-gembed-source");
}

if (Args.hasFlag(options::OPT_gkey_instructions,
options::OPT_gno_key_instructions, false)) {
CmdArgs.push_back("-gkey-instructions");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there precedent for passing this down to cc1? If there end up being two options to control things (gkey-instructions in frontend, dwarf-use-key-instructions in backend) one imagines we're setting ourselves up for accidentally turning it off. (On the other hand having one global option might be too complicated?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say "we avoid setting mllvm flags in the Driver" because LLVM option parsing handles duplicate options as an error conflict, rather than "last one wins silently", but I found lots of prior art contradicting that position, so I think you're in the clear:

$ git grep mllvm ../clang/lib/Driver/ | wc -l
100

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not something we encourage. -mllvm flags have significant problems: they're global variables, they go through a separate parser from the regular flag parser, and they usually interact badly with LTO. But in practice, a lot of code does it this way because the "correct" way of adding a flag requires more boilerplate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can ditch the -mllvm soon as it was mostly a convenience for development. I don't have a pull request yet that implements the necessary changes but plan to soon (such changes will necessary for bitcode handling, so that's not a nebulous soon).

It would be preferable to me if we can keep it temporarily (land this as is), if that's not a problem.

Comment on lines 1 to 2
if not config.has_key_instructions:
config.unsupported = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anywhere deeper in the clang/test directory we can squirrel this -- most of the existing subdirectories are quite substantive pieces of the compiler, which of course debug-info is too, but possibly not key instructions by itself.

(RIP your future tree conflicts).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(RIP your future tree conflicts).

Yeah... 😢

I went looking for clang/test/DebugInfo, but that did not exist. Our existing debug info IRgen tests are split by language into CodeGen/CodeGenCXX/CodeGenObj, which is not great organization.

I think clang/test/DebugInfo/KeyInstrs would be a good final home for these tests, and organizing the existing tests can be future (never?) work.

@OCHyams OCHyams force-pushed the users/OCHyams/ki-llvm-dwarf-emission branch from 0b206ae to 0b5166a Compare May 8, 2025 12:48
Base automatically changed from users/OCHyams/ki-llvm-dwarf-emission to main May 13, 2025 16:26
OCHyams added 2 commits May 14, 2025 17:05
This needs to be driver level to pass an -mllvm flag to LLVM.

Keep the flag help-hidden as the feature is under development.

---

This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

The Key Instructions project is introduced, including a "quick summary" section
at the top which adds context for this PR, here:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.

The Clang-side work is demoed here:
#130943
@OCHyams OCHyams force-pushed the users/OCHyams/ki-clang-flag branch from 7132dd3 to 5c9d5e0 Compare May 14, 2025 16:58
@OCHyams
Copy link
Contributor Author

OCHyams commented May 19, 2025

Thanks for the reviews.

Looks good; I understand we have to support driver flags forever because they get baked into peoples build systems. Would we be able to get away with a cc1 flag instead?

I suppose this strays into the topic of "how are we going to deploy this", which as everything is behind a compile time flag, we probably don't need to immediately answer. IMO we don't have to support driver flags forever that were in turn behind their own experimental compile-time flag.

@jmorse Does the in-line conversation change your stance on this? If not, it would be easier to make this cc1 after I've uploaded bitcode handling patches, if it's alright to have it in this state temporarily to keep things moving - as all the front end patches are blocked on this one.

Copy link
Member

@jmorse jmorse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM then, in practice we always get bitten by commandlines + LTO sooner or later, so I'm confident we'll end up doing-the-right-thing anyway after breaking our internal CI a few times.

@OCHyams OCHyams merged commit 8f03e1a into main May 20, 2025
11 checks passed
@OCHyams OCHyams deleted the users/OCHyams/ki-clang-flag branch May 20, 2025 10:22
@llvm-ci
Copy link
Collaborator

llvm-ci commented May 20, 2025

LLVM Buildbot has detected a new failure on builder fuchsia-x86_64-linux running on fuchsia-debian-64-us-central1-b-1 while building clang at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/15511

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
  Passed           : 46015 (97.92%)
  Expectedly Failed:    27 (0.06%)
[1368/1370] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
[1369/1370] Running the LLVM regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/wasm-ld
-- Testing: 59213 tests, 60 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80..
FAIL: LLVM :: tools/dsymutil/X86/op-convert-offset.test (52232 of 59213)
******************** TEST 'LLVM :: tools/dsymutil/X86/op-convert-offset.test' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
warning: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o: timestamp mismatch between object file (2025-05-19 17:22:56.276800899) and debug map (2022-07-12 20:49:30.000000000)
warning: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o: timestamp mismatch between object file (2025-05-19 17:22:56.276800899) and debug map (2022-07-12 20:49:30.000000000)
warning: cann't read address attribute value.
note: while processing op-convert-offset1.c

--
Command Output (stderr):
--
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 # RUN: at line 23
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o 2>&1 | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ # RUN: at line 24
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM # RUN: at line 25
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil --linker parallel -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs   /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset   -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 # RUN: at line 27
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil --linker parallel -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump    /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o 2>&1    | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ # RUN: at line 30
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM # RUN: at line 33
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test:53:7: error: DSYM: expected string not found in input
DSYM: DW_AT_location (DW_OP_breg2 RCX+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_convert (0x00000084) "DW_ATE_unsigned_1", DW_OP_convert (0x00000088) "DW_ATE_unsigned_8", DW_OP_stack_value)
      ^
<stdin>:64:36: note: scanning from here
0x00000061: DW_TAG_formal_parameter
                                   ^
<stdin>:65:2: note: possible intended match here
 DW_AT_location (DW_OP_breg2 RCX+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_convert (0x0000004a) "DW_ATE_unsigned_1", DW_OP_convert (0x0000004e) "DW_ATE_unsigned_8", DW_OP_stack_value)
 ^
Step 7 (check) failure: check (failure)
...
  Passed           : 46015 (97.92%)
  Expectedly Failed:    27 (0.06%)
[1368/1370] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
[1369/1370] Running the LLVM regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/wasm-ld
-- Testing: 59213 tests, 60 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80..
FAIL: LLVM :: tools/dsymutil/X86/op-convert-offset.test (52232 of 59213)
******************** TEST 'LLVM :: tools/dsymutil/X86/op-convert-offset.test' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
warning: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o: timestamp mismatch between object file (2025-05-19 17:22:56.276800899) and debug map (2022-07-12 20:49:30.000000000)
warning: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o: timestamp mismatch between object file (2025-05-19 17:22:56.276800899) and debug map (2022-07-12 20:49:30.000000000)
warning: cann't read address attribute value.
note: while processing op-convert-offset1.c

--
Command Output (stderr):
--
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 # RUN: at line 23
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o 2>&1 | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ # RUN: at line 24
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM # RUN: at line 25
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil --linker parallel -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs   /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset   -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 # RUN: at line 27
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/dsymutil --linker parallel -oso-prepend-path /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset -o /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump    /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o 2>&1    | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ # RUN: at line 30
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/../Inputs/private/tmp/op-convert-offset/op-convert-offset.o
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix OBJ
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM 2>&1 | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM # RUN: at line 33
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/llvm-dwarfdump /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/test/tools/dsymutil/X86/Output/op-convert-offset.test.tmp.dSYM
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-3i9o13c4/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test --check-prefix DSYM
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/tools/dsymutil/X86/op-convert-offset.test:53:7: error: DSYM: expected string not found in input
DSYM: DW_AT_location (DW_OP_breg2 RCX+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_convert (0x00000084) "DW_ATE_unsigned_1", DW_OP_convert (0x00000088) "DW_ATE_unsigned_8", DW_OP_stack_value)
      ^
<stdin>:64:36: note: scanning from here
0x00000061: DW_TAG_formal_parameter
                                   ^
<stdin>:65:2: note: possible intended match here
 DW_AT_location (DW_OP_breg2 RCX+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_convert (0x0000004a) "DW_ATE_unsigned_1", DW_OP_convert (0x0000004e) "DW_ATE_unsigned_8", DW_OP_stack_value)
 ^

@llvm-ci
Copy link
Collaborator

llvm-ci commented May 20, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/3698

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: timeout-hang.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 13
not env -u FILECHECK_OPTS "/home/llvm/llvm-external-buildbots/workers/env/bin/python3.11" /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt  --timeout=1 --param external=0 | "/home/llvm/llvm-external-buildbots/workers/env/bin/python3.11" /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/utils/lit/tests/timeout-hang.py 1
# executed command: not env -u FILECHECK_OPTS /home/llvm/llvm-external-buildbots/workers/env/bin/python3.11 /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt --timeout=1 --param external=0
# .---command stderr------------
# | lit.py: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 1 seconds was requested on the command line. Forcing timeout to be 1 seconds.
# `-----------------------------
# executed command: /home/llvm/llvm-external-buildbots/workers/env/bin/python3.11 /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/utils/lit/tests/timeout-hang.py 1
# .---command stdout------------
# | Testing took as long or longer than timeout
# `-----------------------------
# error: command failed with exit status: 1

--

********************


OCHyams added a commit to OCHyams/llvm-project that referenced this pull request May 23, 2025
This needs to be driver level to pass an -mllvm flag to LLVM, though this may
change soon as the -mllvm flag will soon not be necessary.

Keep the flag help-hidden as the feature is under development.

This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.
OCHyams added a commit to OCHyams/llvm-project that referenced this pull request May 23, 2025
This needs to be driver level to pass an -mllvm flag to LLVM, though this may
change soon as the -mllvm flag will soon not be necessary.

Keep the flag help-hidden as the feature is under development.

This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants