[all-commits] [llvm/llvm-project] fc6ad3: [AsmParser] Track value references and function ar...

Bertik23 via All-commits all-commits at lists.llvm.org
Mon Feb 2 03:22:08 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fc6ad39044f89a6e472c4c58dede1a55d8421162
      https://github.com/llvm/llvm-project/commit/fc6ad39044f89a6e472c4c58dede1a55d8421162
  Author: Bertik23 <39457484+Bertik23 at users.noreply.github.com>
  Date:   2026-02-02 (Mon, 02 Feb 2026)

  Changed paths:
    M llvm/include/llvm/AsmParser/AsmParserContext.h
    M llvm/include/llvm/AsmParser/LLParser.h
    M llvm/lib/AsmParser/AsmParserContext.cpp
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/unittests/AsmParser/AsmParserTest.cpp

  Log Message:
  -----------
  [AsmParser] Track value references and function arguments (#174566)

This PR is part of the LLVM IR LSP server project:
https://discourse.llvm.org/t/rfc-ir-visualization-with-vs-code-extension-using-an-lsp-server/87773

To be able to implement goto definition in LSP. One must first have to
know what values are referenced on what positions.
This PR implements a Location -> Value* map that allows looking up
values referenced on queried locations.

For example
```llvm
%inst = add i32 1, %arg
```
Querying on 0:20 (the location of %arg) would return the Value* of the
`%arg`.

`getInstuctionLocation(%arg)` would still return the definition of that
value

Tracking for function arguments was also added in the same fashion a
function/instruction/basic block location tracking.

The tests were also updated to test the new features a bit.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list