<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/Analysis.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>[GlobalISel] Return byte offsets from computeValueLLTs (NFC) (#166747)</title>
<updated>2025-11-15T00:23:26+00:00</updated>
<author>
<name>Sergei Barannikov</name>
<email>barannikov88@gmail.com</email>
</author>
<published>2025-11-15T00:23:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4eea1573019275071364b25ac6ee4f8e45b1ef95'/>
<id>4eea1573019275071364b25ac6ee4f8e45b1ef95</id>
<content type='text'>
To avoid scaling offsets back and forth. This is also what SelectionDAG
equivalent (ComputeValueVTs) does, and will allow to reuse
ComputeValueTypes with less effort.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid scaling offsets back and forth. This is also what SelectionDAG
equivalent (ComputeValueVTs) does, and will allow to reuse
ComputeValueTypes with less effort.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Make OrigTy in CC lowering the non-aggregate type (#153414)</title>
<updated>2025-08-13T16:42:26+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-08-13T16:42:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=498ef361fed953bf19f0e9196f3d2e15e012ae17'/>
<id>498ef361fed953bf19f0e9196f3d2e15e012ae17</id>
<content type='text'>
https://github.com/llvm/llvm-project/pull/152709 exposed the original IR
argument type to the CC lowering logic. However, in SDAG, this used the
raw type, prior to aggregate splitting. This PR changes it to use the
non-aggregate type instead. (This matches what happened in the
GlobalISel case already.)

I've also added some more detailed documentation on the
InputArg/OutputArg fields, to explain how they differ. In most cases
ArgVT is going to be the EVT of OrigTy, so they encode very similar
information (OrigTy just preserves some additional information lost in
EVTs, like pointer types). One case where they do differ is in
post-legalization lowering of libcalls, where ArgVT is going to be a
legalized type, while OrigTy is going to be the original non-legalized
type.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/llvm/llvm-project/pull/152709 exposed the original IR
argument type to the CC lowering logic. However, in SDAG, this used the
raw type, prior to aggregate splitting. This PR changes it to use the
non-aggregate type instead. (This matches what happened in the
GlobalISel case already.)

I've also added some more detailed documentation on the
InputArg/OutputArg fields, to explain how they differ. In most cases
ArgVT is going to be the EVT of OrigTy, so they encode very similar
information (OrigTy just preserves some additional information lost in
EVTs, like pointer types). One case where they do differ is in
post-legalization lowering of libcalls, where ArgVT is going to be a
legalized type, while OrigTy is going to be the original non-legalized
type.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Attribute NoFPClass should not prevent tail call optimization. (#116741)</title>
<updated>2024-11-23T01:28:45+00:00</updated>
<author>
<name>Félix-Antoine Constantin</name>
<email>60141446+felix642@users.noreply.github.com</email>
</author>
<published>2024-11-23T01:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7a56dc724594691efce13d771902478544696182'/>
<id>7a56dc724594691efce13d771902478544696182</id>
<content type='text'>
Fixes #111950</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #111950</pre>
</div>
</content>
</entry>
<entry>
<title>[ExtendLifetimes] Implement llvm.fake.use to extend variable lifetimes (#86149)</title>
<updated>2024-08-29T16:53:32+00:00</updated>
<author>
<name>Stephen Tozer</name>
<email>stephen.tozer@sony.com</email>
</author>
<published>2024-08-29T16:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3d08ade7bd32f0296e0ca3a13640cc95fa89229a'/>
<id>3d08ade7bd32f0296e0ca3a13640cc95fa89229a</id>
<content type='text'>
This patch is part of a set of patches that add an `-fextend-lifetimes`
flag to clang, which extends the lifetimes of local variables and
parameters for improved debuggability. In addition to that flag, the
patch series adds a pragma to selectively disable `-fextend-lifetimes`,
and an `-fextend-this-ptr` flag which functions as `-fextend-lifetimes`
for this pointers only. All changes and tests in these patches were
written by Wolfgang Pieb (@wolfy1961), while Stephen Tozer (@SLTozer)
has handled review and merging. The extend lifetimes flag is intended to
eventually be set on by `-Og`, as discussed in the RFC
here:

https://discourse.llvm.org/t/rfc-redefine-og-o1-and-add-a-new-level-of-og/72850

This patch implements a new intrinsic instruction in LLVM,
`llvm.fake.use` in IR and `FAKE_USE` in MIR, that takes a single operand
and has no effect other than "using" its operand, to ensure that its
operand remains live until after the fake use. This patch does not emit
fake uses anywhere; the next patch in this sequence causes them to be
emitted from the clang frontend, such that for each variable (or this) a
fake.use operand is inserted at the end of that variable's scope, using
that variable's value. This patch covers everything post-frontend, which
is largely just the basic plumbing for a new intrinsic/instruction,
along with a few steps to preserve the fake uses through optimizations
(such as moving them ahead of a tail call or translating them through
SROA).

Co-authored-by: Stephen Tozer &lt;stephen.tozer@sony.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is part of a set of patches that add an `-fextend-lifetimes`
flag to clang, which extends the lifetimes of local variables and
parameters for improved debuggability. In addition to that flag, the
patch series adds a pragma to selectively disable `-fextend-lifetimes`,
and an `-fextend-this-ptr` flag which functions as `-fextend-lifetimes`
for this pointers only. All changes and tests in these patches were
written by Wolfgang Pieb (@wolfy1961), while Stephen Tozer (@SLTozer)
has handled review and merging. The extend lifetimes flag is intended to
eventually be set on by `-Og`, as discussed in the RFC
here:

https://discourse.llvm.org/t/rfc-redefine-og-o1-and-add-a-new-level-of-og/72850

This patch implements a new intrinsic instruction in LLVM,
`llvm.fake.use` in IR and `FAKE_USE` in MIR, that takes a single operand
and has no effect other than "using" its operand, to ensure that its
operand remains live until after the fake use. This patch does not emit
fake uses anywhere; the next patch in this sequence causes them to be
emitted from the clang frontend, such that for each variable (or this) a
fake.use operand is inserted at the end of that variable's scope, using
that variable's value. This patch covers everything post-frontend, which
is largely just the basic plumbing for a new intrinsic/instruction,
along with a few steps to preserve the fake uses through optimizations
(such as moving them ahead of a tail call or translating them through
SROA).

Co-authored-by: Stephen Tozer &lt;stephen.tozer@sony.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[AArch64] Don't tail call memset if it would convert to a bzero. (#98969)</title>
<updated>2024-07-17T08:31:52+00:00</updated>
<author>
<name>Amara Emerson</name>
<email>amara@apple.com</email>
</author>
<published>2024-07-17T08:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f270a4dd6667759d7305797a077ae09648318ac7'/>
<id>f270a4dd6667759d7305797a077ae09648318ac7</id>
<content type='text'>
Well, not quite that simple. We can tc memset since it returns the first
argument but bzero doesn't do that and therefore we can end up
miscompiling.

This patch also refactors the logic out of isInTailCallPosition() into the callers.
As a result memcpy and memmove are also modified to do the same thing
for consistency.

rdar://131419786</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Well, not quite that simple. We can tc memset since it returns the first
argument but bzero doesn't do that and therefore we can end up
miscompiling.

This patch also refactors the logic out of isInTailCallPosition() into the callers.
As a result memcpy and memmove are also modified to do the same thing
for consistency.

rdar://131419786</pre>
</div>
</content>
</entry>
<entry>
<title>[IR] Add getDataLayout() helpers to Function and GlobalValue (#96919)</title>
<updated>2024-06-28T06:36:49+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-06-28T06:36:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9df71d7673b5c98e1032d01be83724a45b42fafc'/>
<id>9df71d7673b5c98e1032d01be83724a45b42fafc</id>
<content type='text'>
Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, replacing the
current `getParent()-&gt;getDataLayout()` pattern.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, replacing the
current `getParent()-&gt;getDataLayout()` pattern.</pre>
</div>
</content>
</entry>
<entry>
<title>[Analysis] Attribute Range should not prevent tail call optimization (#91122)</title>
<updated>2024-05-08T02:02:10+00:00</updated>
<author>
<name>Jinsong Ji</name>
<email>jinsong.ji@intel.com</email>
</author>
<published>2024-05-08T02:02:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2dade0041a62b192e9bde24ae6bbe6208f027523'/>
<id>2dade0041a62b192e9bde24ae6bbe6208f027523</id>
<content type='text'>
- Remove Range attr when comparing for tailcall
- Add test for testcall with range</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove Range attr when comparing for tailcall
- Add test for testcall with range</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM][SelectionDAG] Reduce number of ComputeValueVTs variants. (#75614)</title>
<updated>2024-02-21T13:03:24+00:00</updated>
<author>
<name>Paul Walker</name>
<email>paul.walker@arm.com</email>
</author>
<published>2024-02-21T13:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28fb2b33c2f43f6a8057e398eb899eb61e6652e9'/>
<id>28fb2b33c2f43f6a8057e398eb899eb61e6652e9</id>
<content type='text'>
This is another step in the direction of fixing the `Fixed(0) !=
Scalable(0)` bugbear, although whilst weird I don't believe it's causing
us any real issues.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is another step in the direction of fixing the `Fixed(0) !=
Scalable(0)` bugbear, although whilst weird I don't believe it's causing
us any real issues.</pre>
</div>
</content>
</entry>
<entry>
<title>[SelectionDAG][RISCV][SVE] Harden fixed offset version of ComputeValueVTs against scalable offsets.</title>
<updated>2023-08-21T17:36:17+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2023-08-21T17:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e620eac75e470f94928a17d215a3be947712028b'/>
<id>e620eac75e470f94928a17d215a3be947712028b</id>
<content type='text'>
Use getFixedValue instead of getKnownMinValue to convert TypeSize
to uint64_t. I believe this would have caught the bug fixed by
D157872.

To prevent false failures, I had to treat a scalable 0 as if it
is fixed value.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D158115
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use getFixedValue instead of getKnownMinValue to convert TypeSize
to uint64_t. I believe this would have caught the bug fixed by
D157872.

To prevent false failures, I had to treat a scalable 0 as if it
is fixed value.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D158115
</pre>
</div>
</content>
</entry>
<entry>
<title>[1/11][IR] Permit load/store/alloca for struct of the same scalable vector type</title>
<updated>2023-05-19T16:39:36+00:00</updated>
<author>
<name>eopXD</name>
<email>yueh.ting.chen@gmail.com</email>
</author>
<published>2023-03-23T08:51:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c8eb535aed0368c20b25fe05bca563ab38dd91e9'/>
<id>c8eb535aed0368c20b25fe05bca563ab38dd91e9</id>
<content type='text'>
This patch-set aims to simplify the existing RVV segment load/store
intrinsics to use a type that represents a tuple of vectors instead.

To achieve this, first we need to relax the current limitation for an
aggregate type to be a target of load/store/alloca when the aggregate
type contains homogeneous scalable vector types. Then to adjust the
prolog of an LLVM function during lowering to clang. Finally we
re-define the RVV segment load/store intrinsics to use the tuple types.

The pull request under the RVV intrinsic specification is
riscv-non-isa/rvv-intrinsic-doc#198

---

This is the 1st patch of the patch-set. This patch is originated from
D98169.

This patch allows aggregate type (StructType) that contains homogeneous
scalable vector types to be a target of load/store/alloca. The RFC of
this patch was posted in LLVM Discourse.

https://discourse.llvm.org/t/rfc-ir-permit-load-store-alloca-for-struct-of-the-same-scalable-vector-type/69527

The main changes in this patch are:

Extend `StructLayout::StructSize` from `uint64_t` to `TypeSize` to
accommodate an expression of scalable size.

Allow `StructType:isSized` to also return true for homogeneous
scalable vector types.

Let `Type::isScalableTy` return true when `Type` is `StructType`
and contains scalable vectors

Extra description is added in the LLVM Language Reference Manual on the
relaxation of this patch.

Authored-by: Hsiangkai Wang &lt;kai.wang@sifive.com&gt;
Co-Authored-by: eop Chen &lt;eop.chen@sifive.com&gt;

Reviewed By: craig.topper, nikic

Differential Revision: https://reviews.llvm.org/D146872
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch-set aims to simplify the existing RVV segment load/store
intrinsics to use a type that represents a tuple of vectors instead.

To achieve this, first we need to relax the current limitation for an
aggregate type to be a target of load/store/alloca when the aggregate
type contains homogeneous scalable vector types. Then to adjust the
prolog of an LLVM function during lowering to clang. Finally we
re-define the RVV segment load/store intrinsics to use the tuple types.

The pull request under the RVV intrinsic specification is
riscv-non-isa/rvv-intrinsic-doc#198

---

This is the 1st patch of the patch-set. This patch is originated from
D98169.

This patch allows aggregate type (StructType) that contains homogeneous
scalable vector types to be a target of load/store/alloca. The RFC of
this patch was posted in LLVM Discourse.

https://discourse.llvm.org/t/rfc-ir-permit-load-store-alloca-for-struct-of-the-same-scalable-vector-type/69527

The main changes in this patch are:

Extend `StructLayout::StructSize` from `uint64_t` to `TypeSize` to
accommodate an expression of scalable size.

Allow `StructType:isSized` to also return true for homogeneous
scalable vector types.

Let `Type::isScalableTy` return true when `Type` is `StructType`
and contains scalable vectors

Extra description is added in the LLVM Language Reference Manual on the
relaxation of this patch.

Authored-by: Hsiangkai Wang &lt;kai.wang@sifive.com&gt;
Co-Authored-by: eop Chen &lt;eop.chen@sifive.com&gt;

Reviewed By: craig.topper, nikic

Differential Revision: https://reviews.llvm.org/D146872
</pre>
</div>
</content>
</entry>
</feed>
