<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Frontend/CompilerInvocation.cpp, branch users/fmayer/spr/wip-smartpointers</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>[Clang] Move AllocToken frontend options to LangOptions (#163635)</title>
<updated>2025-10-22T12:58:06+00:00</updated>
<author>
<name>Marco Elver</name>
<email>elver@google.com</email>
</author>
<published>2025-10-22T12:58:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f7fb52aea0b90a2fa76f162e8cbd481c5e1bd91b'/>
<id>f7fb52aea0b90a2fa76f162e8cbd481c5e1bd91b</id>
<content type='text'>
Move the `AllocTokenMax` from `CodeGenOptions` and introduces a new
`AllocTokenMode` to `LangOptions`. Note, `-falloc-token-mode=`
deliberately remains an internal experimental option.

This refactoring is necessary because these options influence frontend
behavior, specifically constexpr evaluation of `__builtin_infer_alloc_token`.
Placing them in `LangOptions` makes them accessible during semantic analysis,
which occurs before codegen.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the `AllocTokenMax` from `CodeGenOptions` and introduces a new
`AllocTokenMode` to `LangOptions`. Note, `-falloc-token-mode=`
deliberately remains an internal experimental option.

This refactoring is necessary because these options influence frontend
behavior, specifically constexpr evaluation of `__builtin_infer_alloc_token`.
Placing them in `LangOptions` makes them accessible during semantic analysis,
which occurs before codegen.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Basic] Add helper APIs to get language version codes from LangOptions (#163348)</title>
<updated>2025-10-15T14:18:25+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-10-15T14:18:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=be93399e619848c96b101172e68c29336fa589fe'/>
<id>be93399e619848c96b101172e68c29336fa589fe</id>
<content type='text'>
Motivated by this discussion:
https://github.com/llvm/llvm-project/pull/163208#discussion_r2426842999

We will soon want to emit language version codes into debug-info.
Instead of replicating the `LangOptions -&gt; version code` mapping we
thought we'd try to share some of the logic with the Clang frontend.

This patch teaches `LangStandard` about language versions (currently just C++ and C).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Motivated by this discussion:
https://github.com/llvm/llvm-project/pull/163208#discussion_r2426842999

We will soon want to emit language version codes into debug-info.
Instead of replicating the `LangOptions -&gt; version code` mapping we
thought we'd try to share some of the logic with the Clang frontend.

This patch teaches `LangStandard` about language versions (currently just C++ and C).</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Wire up -fsanitize=alloc-token (#156839)</title>
<updated>2025-10-08T18:59:24+00:00</updated>
<author>
<name>Marco Elver</name>
<email>elver@google.com</email>
</author>
<published>2025-10-08T18:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=774ffe5cce7392e6b4e29c83e725337727c2c994'/>
<id>774ffe5cce7392e6b4e29c83e725337727c2c994</id>
<content type='text'>
Wire up the `-fsanitize=alloc-token` command-line option, hooking up
the `AllocToken` pass -- it provides allocation tokens to compatible
runtime allocators, enabling different heap organization strategies,
e.g. hardening schemes based on heap partitioning.

The instrumentation rewrites standard allocation calls into variants
that accept an additional `size_t token_id` argument. For example,
calls to `malloc(size)` become `__alloc_token_malloc(size, token_id)`,
and a C++ `new MyType` expression will call
`__alloc_token__Znwm(size, token_id)`.

Currently untyped allocation calls do not yet have `!alloc_token`
metadata, and therefore receive the fallback token only. This will be
fixed in subsequent changes through best-effort type-inference.

One benefit of the instrumentation approach is that it can be applied
transparently to large codebases, and scales in deployment as other
sanitizers.

Similarly to other sanitizers, instrumentation can selectively be
controlled using `__attribute__((no_sanitize("alloc-token")))`. Support
for sanitizer ignorelists to disable instrumentation for specific
functions or source files is implemented.

See clang/docs/AllocToken.rst for more usage instructions.

Link:
https://discourse.llvm.org/t/rfc-a-framework-for-allocator-partitioning-hints/87434

---

This change is part of the following series:
  1. https://github.com/llvm/llvm-project/pull/160131
  2. https://github.com/llvm/llvm-project/pull/156838
  3. https://github.com/llvm/llvm-project/pull/162098
  4. https://github.com/llvm/llvm-project/pull/162099
  5. https://github.com/llvm/llvm-project/pull/156839
  6. https://github.com/llvm/llvm-project/pull/156840
  7. https://github.com/llvm/llvm-project/pull/156841
  8. https://github.com/llvm/llvm-project/pull/156842</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wire up the `-fsanitize=alloc-token` command-line option, hooking up
the `AllocToken` pass -- it provides allocation tokens to compatible
runtime allocators, enabling different heap organization strategies,
e.g. hardening schemes based on heap partitioning.

The instrumentation rewrites standard allocation calls into variants
that accept an additional `size_t token_id` argument. For example,
calls to `malloc(size)` become `__alloc_token_malloc(size, token_id)`,
and a C++ `new MyType` expression will call
`__alloc_token__Znwm(size, token_id)`.

Currently untyped allocation calls do not yet have `!alloc_token`
metadata, and therefore receive the fallback token only. This will be
fixed in subsequent changes through best-effort type-inference.

One benefit of the instrumentation approach is that it can be applied
transparently to large codebases, and scales in deployment as other
sanitizers.

Similarly to other sanitizers, instrumentation can selectively be
controlled using `__attribute__((no_sanitize("alloc-token")))`. Support
for sanitizer ignorelists to disable instrumentation for specific
functions or source files is implemented.

See clang/docs/AllocToken.rst for more usage instructions.

Link:
https://discourse.llvm.org/t/rfc-a-framework-for-allocator-partitioning-hints/87434

---

This change is part of the following series:
  1. https://github.com/llvm/llvm-project/pull/160131
  2. https://github.com/llvm/llvm-project/pull/156838
  3. https://github.com/llvm/llvm-project/pull/162098
  4. https://github.com/llvm/llvm-project/pull/162099
  5. https://github.com/llvm/llvm-project/pull/156839
  6. https://github.com/llvm/llvm-project/pull/156840
  7. https://github.com/llvm/llvm-project/pull/156841
  8. https://github.com/llvm/llvm-project/pull/156842</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Add subcommand support for OptTable (#155026)</title>
<updated>2025-10-06T19:11:00+00:00</updated>
<author>
<name>Prabhu Rajasekaran</name>
<email>prabhukr@google.com</email>
</author>
<published>2025-10-06T19:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fdbd17d1fb0d532e54773626cc0e65eed94440cb'/>
<id>fdbd17d1fb0d532e54773626cc0e65eed94440cb</id>
<content type='text'>
Implement support for `subcommands` in OptTable to attain feature parity
with `cl`.

Design overview:
https://discourse.llvm.org/t/subcommand-feature-support-in-llvm-opttable/88098

Issue: https://github.com/llvm/llvm-project/issues/108307</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement support for `subcommands` in OptTable to attain feature parity
with `cl`.

Design overview:
https://discourse.llvm.org/t/subcommand-feature-support-in-llvm-opttable/88098

Issue: https://github.com/llvm/llvm-project/issues/108307</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Move `-fprofile-instrument-use-path=` check to driver (#159667)</title>
<updated>2025-10-06T17:41:46+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-10-06T17:41:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=839b91c2294b4aeb5598309f90afa241ace5acef'/>
<id>839b91c2294b4aeb5598309f90afa241ace5acef</id>
<content type='text'>
The frontend currently opens the path provided via
`-fprofile-instrument-use-path=` to learn the kind of the
instrumentation data and set the `CodeGenOptions::ProfileUse` value.
This happens during command-line parsing, where we don't have a
correctly configured VFS yet, so the behavior is quite different from
all other frontend inputs. We need to move this logic out of the
frontend command line parsing logic somewhere where we do have the
configured VFS.

The complication is that the `ProfileUse` flag is being used to set
preprocessor macros, and there isn't a great place between command line
parsing and preprocessor initialization to perform this logic.

This PR solves the issue by deducing the kind of instrumentation data
right in the driver and then passing it via a new flag to the frontend.
This shouldn't change observable behavior of Clang on the driver level,
and only affects the frontend command line interface, which is an
implementation detail anyway.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The frontend currently opens the path provided via
`-fprofile-instrument-use-path=` to learn the kind of the
instrumentation data and set the `CodeGenOptions::ProfileUse` value.
This happens during command-line parsing, where we don't have a
correctly configured VFS yet, so the behavior is quite different from
all other frontend inputs. We need to move this logic out of the
frontend command line parsing logic somewhere where we do have the
configured VFS.

The complication is that the `ProfileUse` flag is being used to set
preprocessor macros, and there isn't a great place between command line
parsing and preprocessor initialization to perform this logic.

This PR solves the issue by deducing the kind of instrumentation data
right in the driver and then passing it via a new flag to the frontend.
This shouldn't change observable behavior of Clang on the driver level,
and only affects the frontend command line interface, which is an
implementation detail anyway.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "Introduce -fexperimental-loop-fusion to clang and flang (#158844)</title>
<updated>2025-09-16T11:13:37+00:00</updated>
<author>
<name>Madhur Amilkanthwar</name>
<email>madhura@nvidia.com</email>
</author>
<published>2025-09-16T11:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a134b0621798d0c07a6c5ea23d8e8388b04c26ad'/>
<id>a134b0621798d0c07a6c5ea23d8e8388b04c26ad</id>
<content type='text'>
This PR is a reapplication of
https://github.com/llvm/llvm-project/pull/142686</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR is a reapplication of
https://github.com/llvm/llvm-project/pull/142686</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Introduce -fexperimental-loop-fuse to clang and flang (#142686)" (#158764)</title>
<updated>2025-09-16T02:30:18+00:00</updated>
<author>
<name>Vitaly Buka</name>
<email>vitalybuka@google.com</email>
</author>
<published>2025-09-16T02:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cedceeb8002c112b33ff0974f04082849e6e202d'/>
<id>cedceeb8002c112b33ff0974f04082849e6e202d</id>
<content type='text'>
This reverts commit 895cda70a95529fd22aac05eee7c34f7624996af.
And fix attempt: 06f671e57a574ba1c5127038eff8e8773273790e.

Performance regressions and broken sanitizers, see #142686.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 895cda70a95529fd22aac05eee7c34f7624996af.
And fix attempt: 06f671e57a574ba1c5127038eff8e8773273790e.

Performance regressions and broken sanitizers, see #142686.</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce -fexperimental-loop-fuse to clang and flang (#142686)</title>
<updated>2025-09-15T13:18:32+00:00</updated>
<author>
<name>Sebastian Pop</name>
<email>spop@nvidia.com</email>
</author>
<published>2025-09-15T13:18:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=895cda70a95529fd22aac05eee7c34f7624996af'/>
<id>895cda70a95529fd22aac05eee7c34f7624996af</id>
<content type='text'>
This patch adds the flag -fexperimental-loop-fuse to the clang and flang
drivers. This is primarily useful for experiments as we envision to
enable the pass one day.

The options are based on the same principles and reason on which we have
`floop-interchange`.

---------

Co-authored-by: Madhur Amilkanthwar &lt;madhura@nvidia.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the flag -fexperimental-loop-fuse to the clang and flang
drivers. This is primarily useful for experiments as we envision to
enable the pass one day.

The options are based on the same principles and reason on which we have
`floop-interchange`.

---------

Co-authored-by: Madhur Amilkanthwar &lt;madhura@nvidia.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Enabled debug entry support by default (#157703)</title>
<updated>2025-09-12T08:49:33+00:00</updated>
<author>
<name>Georgiy Samoylov</name>
<email>g.samoylov@syntacore.com</email>
</author>
<published>2025-09-12T08:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fae68b6c77058dd10d7c6780181ff312e46f0689'/>
<id>fae68b6c77058dd10d7c6780181ff312e46f0689</id>
<content type='text'>
This patch enables support for debug entry values. This improves quality
of debug info for RISC-V</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables support for debug entry values. This improves quality
of debug info for RISC-V</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[clang] Delay normalization of `-fmodules-cache-path` (#150123)"</title>
<updated>2025-09-10T22:56:04+00:00</updated>
<author>
<name>Jan Svoboda</name>
<email>jan_svoboda@apple.com</email>
</author>
<published>2025-09-10T22:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=55bef46146f05e1911fcb98715716d914efd518c'/>
<id>55bef46146f05e1911fcb98715716d914efd518c</id>
<content type='text'>
This reverts commit 613caa909c78f707e88960723c6a98364656a926, essentially
reapplying 4a4bddec3571d78c8073fa45b57bbabc8796d13d after moving
`normalizeModuleCachePath` from clangFrontend to clangLex.

This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays normalization of the module cache path until
`CompilerInstance` is asked for the cache path in the current
compilation context.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 613caa909c78f707e88960723c6a98364656a926, essentially
reapplying 4a4bddec3571d78c8073fa45b57bbabc8796d13d after moving
`normalizeModuleCachePath` from clangFrontend to clangLex.

This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays normalization of the module cache path until
`CompilerInstance` is asked for the cache path in the current
compilation context.
</pre>
</div>
</content>
</entry>
</feed>
