<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/polly, branch users/boomanaiden154/main.lit-remove-python-27-code-paths-in-builtin-diff</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>[polly][CMake] Replace `elseif ()` with `else ()`</title>
<updated>2025-08-31T21:53:01+00:00</updated>
<author>
<name>Owen Pan</name>
<email>owenpiano@gmail.com</email>
</author>
<published>2025-08-31T21:41:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5109361d4aeeb0227e86a7f016eb773d28dd9957'/>
<id>5109361d4aeeb0227e86a7f016eb773d28dd9957</id>
<content type='text'>
The no-argument elseif resulted in the warning below:

CMake Warning (dev) at polly/lib/External/CMakeLists.txt:30 (elseif):
  ELSEIF called with no arguments, it will be skipped.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The no-argument elseif resulted in the warning below:

CMake Warning (dev) at polly/lib/External/CMakeLists.txt:30 (elseif):
  ELSEIF called with no arguments, it will be skipped.
</pre>
</div>
</content>
</entry>
<entry>
<title>[polly] Replace SmallSet with SmallPtrSet (NFC) (#154367)</title>
<updated>2025-08-19T16:09:11+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-08-19T16:09:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=67ca5dad16e9271e62987f7c563b109a07dc8788'/>
<id>67ca5dad16e9271e62987f7c563b109a07dc8788</id>
<content type='text'>
This patch replaces SmallSet&lt;T *, N&gt; with SmallPtrSet&lt;T *, N&gt;.  Note
that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer
element types:

  template &lt;typename PointeeType, unsigned N&gt;
class SmallSet&lt;PointeeType*, N&gt; : public SmallPtrSet&lt;PointeeType*, N&gt;
{};

We only have 10 instances that rely on this "redirection". Since the
redirection doesn't improve readability, this patch replaces SmallSet
with SmallPtrSet for pointer element types.

I'm planning to remove the redirection eventually.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces SmallSet&lt;T *, N&gt; with SmallPtrSet&lt;T *, N&gt;.  Note
that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer
element types:

  template &lt;typename PointeeType, unsigned N&gt;
class SmallSet&lt;PointeeType*, N&gt; : public SmallPtrSet&lt;PointeeType*, N&gt;
{};

We only have 10 instances that rely on this "redirection". Since the
redirection doesn't improve readability, this patch replaces SmallSet
with SmallPtrSet for pointer element types.

I'm planning to remove the redirection eventually.</pre>
</div>
</content>
</entry>
<entry>
<title>Slightly improve the getenv("bar") linking problem</title>
<updated>2025-07-23T11:14:51+00:00</updated>
<author>
<name>Luke Drummond</name>
<email>luke.drummond@codeplay.com</email>
</author>
<published>2022-10-13T15:57:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f992ae4fd16357116b341a1c8291b970787dc462'/>
<id>f992ae4fd16357116b341a1c8291b970787dc462</id>
<content type='text'>
There's been a variation of the following in the code since 2005:

    if (unoptimizable_true)
      return;
    use_this_symbol_to_force_linking(); // unreachable but never removed

Way back in 00d5508496c it was the win32 call `GetCurrentProcess`
but switched to `getenv("bar")` fairly soon after in 63e504ff43. While
that pulled in fewer dependencies and made the code portable, it's a
bit of a weird construct. The environment variable used for the `getenv`
call is "bar", which is particularly weird to see fly past when you run
`ltrace` on a binary linked against LLVM.

In this patch I don't try to replace this construct wholesale - it's
still required for architectural reasons I'm not able to tackle right
now, but I did try and make it slightly less weird and opaque:

- It gives the construct a name
- The environment variable hints where this comes from and that its
  value is ignored

Combined, this should be a bit of improvement for the next person who
wonders what LLVM is up to when they trace their process or see
smatterings of `getenv("bar")` dotted around the source.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's been a variation of the following in the code since 2005:

    if (unoptimizable_true)
      return;
    use_this_symbol_to_force_linking(); // unreachable but never removed

Way back in 00d5508496c it was the win32 call `GetCurrentProcess`
but switched to `getenv("bar")` fairly soon after in 63e504ff43. While
that pulled in fewer dependencies and made the code portable, it's a
bit of a weird construct. The environment variable used for the `getenv`
call is "bar", which is particularly weird to see fly past when you run
`ltrace` on a binary linked against LLVM.

In this patch I don't try to replace this construct wholesale - it's
still required for architectural reasons I'm not able to tackle right
now, but I did try and make it slightly less weird and opaque:

- It gives the construct a name
- The environment variable hints where this comes from and that its
  value is ignored

Combined, this should be a bit of improvement for the next person who
wonders what LLVM is up to when they trace their process or see
smatterings of `getenv("bar")` dotted around the source.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Polly] Remove Accidental Test Comment in CMakeLists.txt</title>
<updated>2025-07-22T21:27:56+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>aidengrossman@google.com</email>
</author>
<published>2025-07-22T21:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0df537e5a3d3985e771776d0a3ace758cc096437'/>
<id>0df537e5a3d3985e771776d0a3ace758cc096437</id>
<content type='text'>
This was accidentally introduced in 921287e126465d6850954855ded640f0f78d72fd
because I forgot to remove it before merging the patch...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was accidentally introduced in 921287e126465d6850954855ded640f0f78d72fd
because I forgot to remove it before merging the patch...
</pre>
</div>
</content>
</entry>
<entry>
<title>[CI] Enable sccache GCS on Linux premerge (#149923)</title>
<updated>2025-07-22T20:31:25+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>aidengrossman@google.com</email>
</author>
<published>2025-07-22T20:31:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=921287e126465d6850954855ded640f0f78d72fd'/>
<id>921287e126465d6850954855ded640f0f78d72fd</id>
<content type='text'>
This patch enables sccache using GCS for Linux premerge.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables sccache using GCS for Linux premerge.</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Only allow lifetime.start/end on allocas (#149310)</title>
<updated>2025-07-21T13:04:50+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-07-21T13:04:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=92c55a315eab455d5fed2625fe0f61f88cb25499'/>
<id>92c55a315eab455d5fed2625fe0f61f88cb25499</id>
<content type='text'>
lifetime.start and lifetime.end are primarily intended for use on
allocas, to enable stack coloring and other liveness optimizations. This
is necessary because all (static) allocas are hoisted into the entry
block, so lifetime markers are the only way to convey the actual
lifetimes.

However, lifetime.start and lifetime.end are currently *allowed* to be
used on non-alloca pointers. We don't actually do this in practice, but
just the mere fact that this is possible breaks the core purpose of the
lifetime markers, which is stack coloring of allocas. Stack coloring can
only work correctly if all lifetime markers for an alloca are
analyzable.

* If a lifetime marker may operate on multiple allocas via a select/phi,
we don't know which lifetime actually starts/ends and handle it
incorrectly (https://github.com/llvm/llvm-project/issues/104776).
* Stack coloring operates on the assumption that all lifetime markers
are visible, and not, for example, hidden behind a function call or
escaped pointer. It's not possible to change this, as part of the
purpose of lifetime markers is that they work even in the presence of
escaped pointers, where simple use analysis is insufficient.

I don't think there is any way to have coherent semantics for lifetime
markers on allocas, while also permitting them on arbitrary pointer
values.

This PR restricts lifetimes to operate on allocas only. As a followup, I
will also drop the size argument, which is superfluous if we always
operate on an alloca. (This change also renders various code handling
lifetime markers on non-alloca dead. I plan to clean up that kind of
code after dropping the size argument as well.)

In practice, I've only found a few places that currently produce
lifetimes on non-allocas:

* CoroEarly replaces the promise alloca with the result of an intrinsic,
which will later be replaced back with an alloca. I think this is the
only place where there is some legitimate loss of functionality, but I
don't think this is particularly important (I don't think we'd expect
the promise in a coroutine to admit useful lifetime optimization.)
* SafeStack moves unsafe allocas onto a separate frame. We can safely
drop lifetimes here, as SafeStack performs its own stack coloring.
* Similar for AddressSanitizer, it also moves allocas into separate
memory.
* LSR sometimes replaces the lifetime argument with a GEP chain of the
alloca (where the offsets ultimately cancel out). This is just
unnecessary. (Fixed separately in
https://github.com/llvm/llvm-project/pull/149492.)
* InferAddrSpaces sometimes makes lifetimes operate on an addrspacecast
of an alloca. I don't think this is necessary.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lifetime.start and lifetime.end are primarily intended for use on
allocas, to enable stack coloring and other liveness optimizations. This
is necessary because all (static) allocas are hoisted into the entry
block, so lifetime markers are the only way to convey the actual
lifetimes.

However, lifetime.start and lifetime.end are currently *allowed* to be
used on non-alloca pointers. We don't actually do this in practice, but
just the mere fact that this is possible breaks the core purpose of the
lifetime markers, which is stack coloring of allocas. Stack coloring can
only work correctly if all lifetime markers for an alloca are
analyzable.

* If a lifetime marker may operate on multiple allocas via a select/phi,
we don't know which lifetime actually starts/ends and handle it
incorrectly (https://github.com/llvm/llvm-project/issues/104776).
* Stack coloring operates on the assumption that all lifetime markers
are visible, and not, for example, hidden behind a function call or
escaped pointer. It's not possible to change this, as part of the
purpose of lifetime markers is that they work even in the presence of
escaped pointers, where simple use analysis is insufficient.

I don't think there is any way to have coherent semantics for lifetime
markers on allocas, while also permitting them on arbitrary pointer
values.

This PR restricts lifetimes to operate on allocas only. As a followup, I
will also drop the size argument, which is superfluous if we always
operate on an alloca. (This change also renders various code handling
lifetime markers on non-alloca dead. I plan to clean up that kind of
code after dropping the size argument as well.)

In practice, I've only found a few places that currently produce
lifetimes on non-allocas:

* CoroEarly replaces the promise alloca with the result of an intrinsic,
which will later be replaced back with an alloca. I think this is the
only place where there is some legitimate loss of functionality, but I
don't think this is particularly important (I don't think we'd expect
the promise in a coroutine to admit useful lifetime optimization.)
* SafeStack moves unsafe allocas onto a separate frame. We can safely
drop lifetimes here, as SafeStack performs its own stack coloring.
* Similar for AddressSanitizer, it also moves allocas into separate
memory.
* LSR sometimes replaces the lifetime argument with a GEP chain of the
alloca (where the offsets ultimately cancel out). This is just
unnecessary. (Fixed separately in
https://github.com/llvm/llvm-project/pull/149492.)
* InferAddrSpaces sometimes makes lifetimes operate on an addrspacecast
of an alloca. I don't think this is necessary.</pre>
</div>
</content>
</entry>
<entry>
<title>[polly] Remove an unused local variable (NFC) (#144012)</title>
<updated>2025-06-13T05:45:23+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-13T05:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=054f4a50bb2ec1e535111d779bc5fdc93314c55a'/>
<id>054f4a50bb2ec1e535111d779bc5fdc93314c55a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Remarks] Remove an upcast footgun. NFC (#142191)</title>
<updated>2025-05-31T18:07:54+00:00</updated>
<author>
<name>Jon Roelofs</name>
<email>jonathan_roelofs@apple.com</email>
</author>
<published>2025-05-31T18:07:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=798058fca51ab4ba9d364c0ef022a15485e5ed5d'/>
<id>798058fca51ab4ba9d364c0ef022a15485e5ed5d</id>
<content type='text'>
CodeRegion's were previously passed as Value*, but then immediately
upcast to BasicBlock. Let's keep the type information around until the
use cases for non-BasicBlock code regions actually materialize.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CodeRegion's were previously passed as Value*, but then immediately
upcast to BasicBlock. Let's keep the type information around until the
use cases for non-BasicBlock code regions actually materialize.</pre>
</div>
</content>
</entry>
<entry>
<title>[CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS in standalone builds (#138587)</title>
<updated>2025-05-22T05:14:13+00:00</updated>
<author>
<name>jeremyd2019</name>
<email>github@jdrake.com</email>
</author>
<published>2025-05-22T05:14:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ba4bd3f46e97b5637b16a0fa74b064fb3e6db8ff'/>
<id>ba4bd3f46e97b5637b16a0fa74b064fb3e6db8ff</id>
<content type='text'>
In #138329, _GNU_SOURCE was added for Cygwin, but when building Clang
standalone against an installed LLVM this definition was not picked up,
resulting in undefined strnlen. Follow the documentation in
https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project and add
the LLVM_DEFINITIONS in standalone projects' cmakes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In #138329, _GNU_SOURCE was added for Cygwin, but when building Clang
standalone against an installed LLVM this definition was not picked up,
resulting in undefined strnlen. Follow the documentation in
https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project and add
the LLVM_DEFINITIONS in standalone projects' cmakes.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix regression tests with bad FileCheck checks (#140373)</title>
<updated>2025-05-22T04:59:57+00:00</updated>
<author>
<name>Mohammad Bashir</name>
<email>157402336+youngbash88@users.noreply.github.com</email>
</author>
<published>2025-05-22T04:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bcdce987c08bc90f30a44903a4f7d801099020f1'/>
<id>bcdce987c08bc90f30a44903a4f7d801099020f1</id>
<content type='text'>
Fixes https://github.com/llvm/llvm-project/issues/140149</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes https://github.com/llvm/llvm-project/issues/140149</pre>
</div>
</content>
</entry>
</feed>
