<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/AsmParser/Parser.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[LLVM][IR] Add location tracking to LLVM IR parser (#155797)</title>
<updated>2025-10-22T14:46:12+00:00</updated>
<author>
<name>Bertik23</name>
<email>39457484+Bertik23@users.noreply.github.com</email>
</author>
<published>2025-10-22T14:46:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=18d4ba593db9d6949300fbd97e900bfb86d651b2'/>
<id>18d4ba593db9d6949300fbd97e900bfb86d651b2</id>
<content type='text'>
This PR is part of the LLVM IR LSP server project
([RFC](https://discourse.llvm.org/t/rfc-ir-visualization-with-vs-code-extension-using-an-lsp-server/87773))

To be able to make a LSP server, it's crucial to have location
information about the LLVM objects (Functions, BasicBlocks and
Instructions).

This PR adds:
 * Position tracking to the Lexer
 * A new AsmParserContext class, to hold the new position info
 * Tests to check if the location is correct

The AsmParserContext can be passed as an optional parameter into the
parser. Which populates it and it can be then used by other tools, such
as the LSP server.

The AsmParserContext idea was borrowed from MLIR. As we didn't want to
store data no one else uses inside the objects themselves. But the
implementation is different, this class holds several maps of Functions,
BasicBlocks and Instructions, to map them to their location.

And some utility methods were added to get the positions of the
processed tokens.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR is part of the LLVM IR LSP server project
([RFC](https://discourse.llvm.org/t/rfc-ir-visualization-with-vs-code-extension-using-an-lsp-server/87773))

To be able to make a LSP server, it's crucial to have location
information about the LLVM objects (Functions, BasicBlocks and
Instructions).

This PR adds:
 * Position tracking to the Lexer
 * A new AsmParserContext class, to hold the new position info
 * Tests to check if the location is correct

The AsmParserContext can be passed as an optional parameter into the
parser. Which populates it and it can be then used by other tools, such
as the LSP server.

The AsmParserContext idea was borrowed from MLIR. As we didn't want to
store data no one else uses inside the objects themselves. But the
implementation is different, this class holds several maps of Functions,
BasicBlocks and Instructions, to map them to their location.

And some utility methods were added to get the positions of the
processed tokens.</pre>
</div>
</content>
</entry>
<entry>
<title>[MIR] Replace bespoke DIExpression parser</title>
<updated>2024-07-10T19:26:13+00:00</updated>
<author>
<name>Scott Linder</name>
<email>Scott.Linder@amd.com</email>
</author>
<published>2024-06-26T21:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9f5756abefc622de543833584e4a25ffa3e9ff02'/>
<id>9f5756abefc622de543833584e4a25ffa3e9ff02</id>
<content type='text'>
Resolve FIXME by using the LLParser implementation of parseDIExpression
from the MIParser.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolve FIXME by using the LLParser implementation of parseDIExpression
from the MIParser.
</pre>
</div>
</content>
</entry>
<entry>
<title>[AsmParser] Avoid instantiating LLVMContext if not needed. Try 2.</title>
<updated>2023-03-23T09:57:46+00:00</updated>
<author>
<name>Yevgeny Rouban</name>
<email>yrouban@azul.com</email>
</author>
<published>2023-03-23T09:19:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=26d954bd4004dd01771308a5061a865073993130'/>
<id>26d954bd4004dd01771308a5061a865073993130</id>
<content type='text'>
The deleted copy constructor LLVMContext(LLVMContext &amp;) got its
parameter changed to const to allow the latest clang compiler to
instantiatiate template std::optional&lt;LLVMContext&gt;.

Differential Revision: https://reviews.llvm.org/D142699
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The deleted copy constructor LLVMContext(LLVMContext &amp;) got its
parameter changed to const to allow the latest clang compiler to
instantiatiate template std::optional&lt;LLVMContext&gt;.

Differential Revision: https://reviews.llvm.org/D142699
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[AsmParser] Avoid instantiating LLVMContext if not needed. NFC"</title>
<updated>2023-03-20T08:07:33+00:00</updated>
<author>
<name>Yevgeny Rouban</name>
<email>yrouban@azul.com</email>
</author>
<published>2023-03-20T08:04:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e7356206122626bcfc878a24bf5aabd1e54e0729'/>
<id>e7356206122626bcfc878a24bf5aabd1e54e0729</id>
<content type='text'>
This reverts commit c1888a370ada6e76d51cdb9c6eeefa2588a475eb
because of massive buildbolt failures.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit c1888a370ada6e76d51cdb9c6eeefa2588a475eb
because of massive buildbolt failures.
</pre>
</div>
</content>
</entry>
<entry>
<title>[AsmParser] Avoid instantiating LLVMContext if not needed. NFC</title>
<updated>2023-03-20T07:56:57+00:00</updated>
<author>
<name>Yevgeny Rouban</name>
<email>yrouban@azul.com</email>
</author>
<published>2023-03-20T07:54:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c1888a370ada6e76d51cdb9c6eeefa2588a475eb'/>
<id>c1888a370ada6e76d51cdb9c6eeefa2588a475eb</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D142699
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D142699
</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Support importing modules with invalid data layouts.</title>
<updated>2023-01-12T09:10:45+00:00</updated>
<author>
<name>Jannik Silvanus</name>
<email>jannik.silvanus@amd.com</email>
</author>
<published>2023-01-04T10:52:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=df1a74ac3c6407d0658c46c859c4a07974af3293'/>
<id>df1a74ac3c6407d0658c46c859c4a07974af3293</id>
<content type='text'>
Use the existing mechanism to change the data layout using callbacks.

Before this patch, we had a callback type DataLayoutCallbackTy that receives
a single StringRef specifying the target triple, and optionally returns
the data layout string to be used. Module loaders (both IR and BC) then
apply the callback to potentially override the module's data layout,
after first having imported and parsed the data layout from the file.

We can't do the same to fix invalid data layouts, because the import will already
fail, before the callback has a chance to fix it.
Instead, module loaders now tentatively parse the data layout into a string,
wait until the target triple has been parsed, apply the override callback
to the imported string and only then parse the tentative string as a data layout.

Moreover, add the old data layout string S as second argument to the callback,
in addition to the already existing target triple argument.
S is either the default data layout string in case none is specified, or the data
layout string specified in the module, possibly after auto-upgrades (for the BitcodeReader).
This allows callbacks to inspect the old data layout string,
and fix it instead of setting a fixed data layout.

Also allow to pass data layout override callbacks to lazy bitcode module
loader functions.

Differential Revision: https://reviews.llvm.org/D140985
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the existing mechanism to change the data layout using callbacks.

Before this patch, we had a callback type DataLayoutCallbackTy that receives
a single StringRef specifying the target triple, and optionally returns
the data layout string to be used. Module loaders (both IR and BC) then
apply the callback to potentially override the module's data layout,
after first having imported and parsed the data layout from the file.

We can't do the same to fix invalid data layouts, because the import will already
fail, before the callback has a chance to fix it.
Instead, module loaders now tentatively parse the data layout into a string,
wait until the target triple has been parsed, apply the override callback
to the imported string and only then parse the tentative string as a data layout.

Moreover, add the old data layout string S as second argument to the callback,
in addition to the already existing target triple argument.
S is either the default data layout string in case none is specified, or the data
layout string specified in the module, possibly after auto-upgrades (for the BitcodeReader).
This allows callbacks to inspect the old data layout string,
and fix it instead of setting a fixed data layout.

Also allow to pass data layout override callbacks to lazy bitcode module
loader functions.

Differential Revision: https://reviews.llvm.org/D140985
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use std::nullopt instead of None (NFC)</title>
<updated>2022-12-03T05:11:44+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2022-12-03T05:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aadaaface2ec96ee30d92bf46faa41dd9e68b64d'/>
<id>aadaaface2ec96ee30d92bf46faa41dd9e68b64d</id>
<content type='text'>
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore "[MemProf] ThinLTO summary support" with more fixes</title>
<updated>2022-11-16T17:42:41+00:00</updated>
<author>
<name>Teresa Johnson</name>
<email>tejohnson@google.com</email>
</author>
<published>2022-11-16T15:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9eacbba290d87ba23796e3ba6a57138d99aca9e5'/>
<id>9eacbba290d87ba23796e3ba6a57138d99aca9e5</id>
<content type='text'>
This restores commit 98ed423361de2f9dc0113a31be2aa04524489ca9 and
follow on fix 00c22351ba697dbddb4b5bf0ad94e4bcea4b316b, which were
reverted in 5d938eb6f79b16f55266dd23d5df831f552ea082 due to an
MSVC bot failure. I've included a fix for that failure.

Differential Revision: https://reviews.llvm.org/D135714
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This restores commit 98ed423361de2f9dc0113a31be2aa04524489ca9 and
follow on fix 00c22351ba697dbddb4b5bf0ad94e4bcea4b316b, which were
reverted in 5d938eb6f79b16f55266dd23d5df831f552ea082 due to an
MSVC bot failure. I've included a fix for that failure.

Differential Revision: https://reviews.llvm.org/D135714
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Restore "[MemProf] ThinLTO summary support" with fixes"</title>
<updated>2022-11-16T11:21:02+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2022-11-16T10:24:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d938eb6f79b16f55266dd23d5df831f552ea082'/>
<id>5d938eb6f79b16f55266dd23d5df831f552ea082</id>
<content type='text'>
This reverts commit 00c22351ba697dbddb4b5bf0ad94e4bcea4b316b.
This reverts commit 98ed423361de2f9dc0113a31be2aa04524489ca9.

Seemingly MSVC has some kind of issue with this patch, in terms of linking:

  https://lab.llvm.org/buildbot/#/builders/123/builds/14137

I'll post more detail on D135714 momentarily.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 00c22351ba697dbddb4b5bf0ad94e4bcea4b316b.
This reverts commit 98ed423361de2f9dc0113a31be2aa04524489ca9.

Seemingly MSVC has some kind of issue with this patch, in terms of linking:

  https://lab.llvm.org/buildbot/#/builders/123/builds/14137

I'll post more detail on D135714 momentarily.
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore "[MemProf] ThinLTO summary support" with fixes</title>
<updated>2022-11-15T16:55:17+00:00</updated>
<author>
<name>Teresa Johnson</name>
<email>tejohnson@google.com</email>
</author>
<published>2022-11-15T15:59:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=98ed423361de2f9dc0113a31be2aa04524489ca9'/>
<id>98ed423361de2f9dc0113a31be2aa04524489ca9</id>
<content type='text'>
This restores 47459455009db4790ffc3765a2ec0f8b4934c2a4, which was
reverted in commit 452a14efc84edf808d1e2953dad2c694972b312f, along with
fixes for a couple of bot failures.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This restores 47459455009db4790ffc3765a2ec0f8b4934c2a4, which was
reverted in commit 452a14efc84edf808d1e2953dad2c694972b312f, along with
fixes for a couple of bot failures.
</pre>
</div>
</content>
</entry>
</feed>
