<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Scalar/LoopFlatten.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>[LAA] Support assumptions in evaluatePtrAddRecAtMaxBTCWillNotWrap (#147047)</title>
<updated>2025-08-01T13:18:07+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-08-01T13:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2ae996cbbe92f006d711eeeb8f29e0946fc1c1e8'/>
<id>2ae996cbbe92f006d711eeeb8f29e0946fc1c1e8</id>
<content type='text'>
This patch extends the logic added in
https://github.com/llvm/llvm-project/pull/128061 to support
dereferenceability information from assumptions as well.

Unfortunately both assumption cache and the dominator tree need to be
threaded through multiple layers to make them available where needed.

PR: https://github.com/llvm/llvm-project/pull/147047</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch extends the logic added in
https://github.com/llvm/llvm-project/pull/128061 to support
dereferenceability information from assumptions as well.

Unfortunately both assumption cache and the dominator tree need to be
threaded through multiple layers to make them available where needed.

PR: https://github.com/llvm/llvm-project/pull/147047</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM] Make more use of IRBuilder::CreateIntrinsic. NFC. (#112706)</title>
<updated>2024-10-17T15:20:43+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2024-10-17T15:20:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=85c17e40926132575d1b98ca1a36b8394fe511cd'/>
<id>85c17e40926132575d1b98ca1a36b8394fe511cd</id>
<content type='text'>
Convert many instances of:
  Fn = Intrinsic::getOrInsertDeclaration(...);
  CreateCall(Fn, ...)
to the equivalent CreateIntrinsic call.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert many instances of:
  Fn = Intrinsic::getOrInsertDeclaration(...);
  CreateCall(Fn, ...)
to the equivalent CreateIntrinsic call.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)</title>
<updated>2024-10-11T12:26:03+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2024-10-11T12:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fa789dffb1e12c2aece0187aeacc48dfb1768340'/>
<id>fa789dffb1e12c2aece0187aeacc48dfb1768340</id>
<content type='text'>
Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is also in preparation of
adding a new `Intrinsic::getDeclaration` that will have behavior similar
to `Module::getFunction` (i.e, just lookup, no creation).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is also in preparation of
adding a new `Intrinsic::getDeclaration` that will have behavior similar
to `Module::getFunction` (i.e, just lookup, no creation).</pre>
</div>
</content>
</entry>
<entry>
<title>[DebugInfo][LoopFlatten] Fix missing debug location update for new br instruction (#97085)</title>
<updated>2024-07-04T13:06:44+00:00</updated>
<author>
<name>Shan Huang</name>
<email>52285902006@stu.ecnu.edu.cn</email>
</author>
<published>2024-07-04T13:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e0f4d27a50c6b524d6cf24c347038a18112ce517'/>
<id>e0f4d27a50c6b524d6cf24c347038a18112ce517</id>
<content type='text'>
Fix #97084 .</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix #97084 .</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>[Transforms] Preserve inbounds attribute of transformed GEPs when flattening loops (#86961)</title>
<updated>2024-05-15T01:26:23+00:00</updated>
<author>
<name>AtariDreams</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2024-05-15T01:26:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4d1ecf192313b612090d60181937eff03c1a966b'/>
<id>4d1ecf192313b612090d60181937eff03c1a966b</id>
<content type='text'>
When flattening the loop, if the GEP was inbound, it should stay
inbound, because the only thing that changed is how the pointers are
calculated, not the elements being accessed.

Proof: https://alive2.llvm.org/ce/z/dApMpQ</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When flattening the loop, if the GEP was inbound, it should stay
inbound, because the only thing that changed is how the pointers are
calculated, not the elements being accessed.

Proof: https://alive2.llvm.org/ce/z/dApMpQ</pre>
</div>
</content>
</entry>
<entry>
<title>[LAA] Support backward dependences with non-constant distance. (#91525)</title>
<updated>2024-05-10T10:47:13+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2024-05-10T10:47:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28767afd53353d9333b0adf6f0fafa1592092532'/>
<id>28767afd53353d9333b0adf6f0fafa1592092532</id>
<content type='text'>
Following up to 933f49248, also update the code reasoning about
backwards dependences to support non-constant distances.

Update the code to use the signed minimum distance instead of a constant
distance

This means e checked the lower bound of the dependence distance and the
distance may be larger at runtime (and safe for vectorization). Whether
to classify it as Unknown or Backwards depends on the vector width and
LAA was updated to take TTI to get the maximum vector register width.

If the minimum dependence distance is larger than the max vector width,
we consider it as backwards-vectorizable. Otherwise we classify them as
Unknown, so we re-try with runtime checks.

PR: https://github.com/llvm/llvm-project/pull/91525</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following up to 933f49248, also update the code reasoning about
backwards dependences to support non-constant distances.

Update the code to use the signed minimum distance instead of a constant
distance

This means e checked the lower bound of the dependence distance and the
distance may be larger at runtime (and safe for vectorization). Whether
to classify it as Unknown or Backwards depends on the vector width and
LAA was updated to take TTI to get the maximum vector register width.

If the minimum dependence distance is larger than the max vector width,
we consider it as backwards-vectorizable. Otherwise we classify them as
Unknown, so we re-try with runtime checks.

PR: https://github.com/llvm/llvm-project/pull/91525</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][RemoveDIs] Insert instruction using iterators in Transforms/</title>
<updated>2024-03-05T15:12:22+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2024-03-04T14:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2fe81edef6f0b35abffbbc59b649b30ea9c15a62'/>
<id>2fe81edef6f0b35abffbbc59b649b30ea9c15a62</id>
<content type='text'>
As part of the RemoveDIs project we need LLVM to insert instructions using
iterators wherever possible, so that the iterators can carry a bit of
debug-info. This commit implements some of that by updating the contents of
llvm/lib/Transforms/Utils to always use iterator-versions of instruction
constructors.

There are two general flavours of update:
 * Almost all call-sites just call getIterator on an instruction
 * Several make use of an existing iterator (scenarios where the code is
   actually significant for debug-info)
The underlying logic is that any call to getFirstInsertionPt or similar
APIs that identify the start of a block need to have that iterator passed
directly to the insertion function, without being converted to a bare
Instruction pointer along the way.

Noteworthy changes:
 * FindInsertedValue now takes an optional iterator rather than an
   instruction pointer, as we need to always insert with iterators,
 * I've added a few iterator-taking versions of some value-tracking and
   DomTree methods -- they just unwrap the iterator. These are purely
   convenience methods to avoid extra syntax in some passes.
 * A few calls to getNextNode become std::next instead (to keep in the
   theme of using iterators for positions),
 * SeparateConstOffsetFromGEP has it's insertion-position field changed.
   Noteworthy because it's not a purely localised spelling change.

All this should be NFC.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of the RemoveDIs project we need LLVM to insert instructions using
iterators wherever possible, so that the iterators can carry a bit of
debug-info. This commit implements some of that by updating the contents of
llvm/lib/Transforms/Utils to always use iterator-versions of instruction
constructors.

There are two general flavours of update:
 * Almost all call-sites just call getIterator on an instruction
 * Several make use of an existing iterator (scenarios where the code is
   actually significant for debug-info)
The underlying logic is that any call to getFirstInsertionPt or similar
APIs that identify the start of a block need to have that iterator passed
directly to the insertion function, without being converted to a bare
Instruction pointer along the way.

Noteworthy changes:
 * FindInsertedValue now takes an optional iterator rather than an
   instruction pointer, as we need to always insert with iterators,
 * I've added a few iterator-taking versions of some value-tracking and
   DomTree methods -- they just unwrap the iterator. These are purely
   convenience methods to avoid extra syntax in some passes.
 * A few calls to getNextNode become std::next instead (to keep in the
   theme of using iterators for positions),
 * SeparateConstOffsetFromGEP has it's insertion-position field changed.
   Noteworthy because it's not a purely localised spelling change.

All this should be NFC.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopFlatten] Use loop versioning when overflow can't be disproven (#78576)</title>
<updated>2024-01-25T13:57:19+00:00</updated>
<author>
<name>John Brawn</name>
<email>john.brawn@arm.com</email>
</author>
<published>2024-01-25T13:57:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a04d4a03f7737202b5cd05687e08ed8748ef7352'/>
<id>a04d4a03f7737202b5cd05687e08ed8748ef7352</id>
<content type='text'>
Implement the TODO in loop flattening to version the loop when we can't
prove that the trip count calculation won't overflow.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement the TODO in loop flattening to version the loop when we can't
prove that the trip count calculation won't overflow.</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopFlatten] Recognise gep+gep (#72515)</title>
<updated>2024-01-10T14:32:59+00:00</updated>
<author>
<name>John Brawn</name>
<email>john.brawn@arm.com</email>
</author>
<published>2024-01-10T14:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ae978baaf6cc5566036b89ceaadcabb47361ba2f'/>
<id>ae978baaf6cc5566036b89ceaadcabb47361ba2f</id>
<content type='text'>
Now that InstCombine canonicalises add+gep to gep+gep, LoopFlatten needs
to recognise (gep (gep ptr (i*M)), j) as being something it can
optimise.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that InstCombine canonicalises add+gep to gep+gep, LoopFlatten needs
to recognise (gep (gep ptr (i*M)), j) as being something it can
optimise.</pre>
</div>
</content>
</entry>
</feed>
