<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/llvm/test/Transforms/Inline, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2019-12-24T23:57:33+00:00</updated>
<entry>
<title>Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351</title>
<updated>2019-12-24T23:57:33+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2019-12-24T23:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=502a77f125f43ffde57af34d3fd1b900248a91cd'/>
<id>urn:sha1:502a77f125f43ffde57af34d3fd1b900248a91cd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[InlineCost] Fix infinite loop in indirect call evaluation</title>
<updated>2019-11-28T06:27:50+00:00</updated>
<author>
<name>Ehud Katz</name>
<email>ehudkatz@gmail.com</email>
</author>
<published>2019-11-28T06:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=825debe847d15a5670eff54745a6691145ddfae1'/>
<id>urn:sha1:825debe847d15a5670eff54745a6691145ddfae1</id>
<content type='text'>
Currently every time we encounter an indirect call of a known function,
we try to evaluate the inline cost of that function. In case of a
recursion, that evaluation never stops.

The solution I propose is to evaluate only the indirect call of the
function, while any further indirect calls (of a known function) will be
treated just as direct function calls, which, actually, never tries to
evaluate the call.

Fixes PR35469.

Differential Revision: https://reviews.llvm.org/D69349
</content>
</entry>
<entry>
<title>Revert "[InlineCost] Fix infinite loop in indirect call evaluation"</title>
<updated>2019-11-23T18:16:08+00:00</updated>
<author>
<name>Ehud Katz</name>
<email>ehudkatz@gmail.com</email>
</author>
<published>2019-11-23T18:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=986d8bf6fb5026a459d1c4980a2b02b554e9eb39'/>
<id>urn:sha1:986d8bf6fb5026a459d1c4980a2b02b554e9eb39</id>
<content type='text'>
This reverts commit 854e956219e78cb8d7ef3b021d7be6b5d6b6af04.
It broke tests:
Transforms/Inline/redundant-loads.ll
Transforms/SampleProfile/inline-callee-update.ll
</content>
</entry>
<entry>
<title>[InlineCost] Fix infinite loop in indirect call evaluation</title>
<updated>2019-11-23T17:02:59+00:00</updated>
<author>
<name>Ehud Katz</name>
<email>ehudkatz@gmail.com</email>
</author>
<published>2019-11-05T07:45:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=854e956219e78cb8d7ef3b021d7be6b5d6b6af04'/>
<id>urn:sha1:854e956219e78cb8d7ef3b021d7be6b5d6b6af04</id>
<content type='text'>
Currently every time we encounter an indirect call of a known function,
we try to evaluate the inline cost of that function. In case of a
recursion, that evaluation never stops.

The solution presented is to evaluate only the indirect call of the
function, while any further indirect calls (of a known function) will be
treated just as direct function calls, which, actually, never tries to
evaluate the call.

Fixes PR35469.

Differential Revision: https://reviews.llvm.org/D69349
</content>
</entry>
<entry>
<title>Recommit "[CodeView] Add option to disable inline line tables."</title>
<updated>2019-11-04T17:15:26+00:00</updated>
<author>
<name>Amy Huang</name>
<email>akhuang@google.com</email>
</author>
<published>2019-10-31T16:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=ab76cfdd200d35177df2042a1c0c7e86868d01bc'/>
<id>urn:sha1:ab76cfdd200d35177df2042a1c0c7e86868d01bc</id>
<content type='text'>
This reverts commit 004ed2b0d1b86d424643ffc88fce20ad8bab6804.
Original commit hash 6d03890384517919a3ba7fe4c35535425f278f89

Summary:
This adds a clang option to disable inline line tables. When it is used,
the inliner uses the call site as the location of the inlined function instead of
marking it as an inline location with the function location.

https://reviews.llvm.org/D67723
</content>
</entry>
<entry>
<title>Revert "[CodeView] Add option to disable inline line tables."</title>
<updated>2019-10-31T00:31:12+00:00</updated>
<author>
<name>Amy Huang</name>
<email>akhuang@google.com</email>
</author>
<published>2019-10-31T00:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=004ed2b0d1b86d424643ffc88fce20ad8bab6804'/>
<id>urn:sha1:004ed2b0d1b86d424643ffc88fce20ad8bab6804</id>
<content type='text'>
because it breaks compiler-rt tests.

This reverts commit 6d03890384517919a3ba7fe4c35535425f278f89.
</content>
</entry>
<entry>
<title>[CodeView] Add option to disable inline line tables.</title>
<updated>2019-10-30T23:52:39+00:00</updated>
<author>
<name>Amy Huang</name>
<email>akhuang@google.com</email>
</author>
<published>2019-09-16T22:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=6d03890384517919a3ba7fe4c35535425f278f89'/>
<id>urn:sha1:6d03890384517919a3ba7fe4c35535425f278f89</id>
<content type='text'>
Summary:
This adds a clang option to disable inline line tables. When it is used,
the inliner uses the call site as the location of the inlined function instead of
marking it as an inline location with the function location.

See https://bugs.llvm.org/show_bug.cgi?id=42344

Reviewers: rnk

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D67723
</content>
</entry>
<entry>
<title>[utils] InlineFunction: fix for debug info affecting optimizations</title>
<updated>2019-10-28T17:19:07+00:00</updated>
<author>
<name>Bjorn Pettersson</name>
<email>bjorn.a.pettersson@ericsson.com</email>
</author>
<published>2019-10-28T16:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=80cb2cecc65753aa1de09a09f3750408913f6450'/>
<id>urn:sha1:80cb2cecc65753aa1de09a09f3750408913f6450</id>
<content type='text'>
Summary:
Debug info affects output from "opt -inline", InlineFunction could
not handle the llvm.dbg.value when it exist between alloca
instructions.

Problem was that the first alloca in a sequence of allocas was
handled differently from the subsequence alloca instructions. Now
all static alloca instructions are treated the same (being removed
if the have no uses). So it does not matter if there are dbg
instructions (or any other instructions) in between.

Fix the issue: https://bugs.llvm.org/show_bug.cgi?id=43291k

Patch by: yechunliang (Chris Ye)

Reviewers: bjope, jmorse, vsk, probinson, jdoerfert, mtrofin, aprantl, fhahn

Reviewed By: bjope

Subscribers: uabelho, ormris, aprantl, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68633
</content>
</entry>
<entry>
<title>[Inliner] Remove incorrect early exit during switch cost computation</title>
<updated>2019-09-20T23:29:17+00:00</updated>
<author>
<name>Teresa Johnson</name>
<email>tejohnson@google.com</email>
</author>
<published>2019-09-20T23:29:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=2f32e5d84d3483a0d6170fc61d2cceb49fc930a3'/>
<id>urn:sha1:2f32e5d84d3483a0d6170fc61d2cceb49fc930a3</id>
<content type='text'>
Summary:
The CallAnalyzer::visitSwitchInst has an early exit when the estimated
lower bound of the switch cost will put the overall cost of the inline
above the threshold. However, this code is not correctly estimating the
lower bound for switches that can be transformed into bit tests, leading
to unnecessary lost inlines, and also differing behavior with
optimization remarks enabled.

First, the early exit is controlled by whether ComputeFullInlineCost is
enabled or not, and that in turn is disabled by default but enabled when
enabling -pass-remarks=missed. This by itself wouldn't lead to a
problem, except that as described below, the lower bound can be above
the real lower bound, so we can sometimes get different inline decisions
with inline remarks enabled, which is problematic.

The early exit was added in along with a new switch cost model in D31085.
The reason why this early exit was added is due to a concern one reviewer
raised about compile time for large switches:
https://reviews.llvm.org/D31085?id=94559#inline-276200

However, the code just below there calls
getEstimatedNumberOfCaseClusters, which in turn immediately calls
BasicTTIImpl getEstimatedNumberOfCaseClusters, which in the worst case
does a linear scan of the cases to get the high and low values. The
bit test handling in particular is guarded by whether the number of
cases fits into the max bit width. There is no suggestion that anyone
measured a compile time issue, it appears to be theoretical.

The problem is that the reviewer's comment about the lower bound
calculation is incorrect, specifically in the case of a switch that can
be lowered to a bit test. This isn't followed up on the comment
thread, but the author does add a FIXME to that effect above the early
exit added when they subsequently revised the patch.

As a result, we were incorrectly early exiting and not inlining
functions with switch statements that would be lowered to bit tests in
cases where we were nearing the threshold. Combined with the fact that
this early exit was skipped with opt remarks enabled, this caused
different inlining decisions to be made when -pass-remarks=missed is
enabled to debug the missing inline.

Remove the early exit for the above reasons.

I also copied over an existing AArch64 inlining test to X86, and
adjusted the threshold so that the bit test inline only occurs with the
fix in this patch.

Reviewers: davidxl

Subscribers: eraman, kristof.beyls, haicheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67716

llvm-svn: 372440
</content>
</entry>
<entry>
<title>[Inliner][NFC] Make test less brittle.</title>
<updated>2019-09-09T13:08:16+00:00</updated>
<author>
<name>Clement Courbet</name>
<email>courbet@google.com</email>
</author>
<published>2019-09-09T13:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=388b9794b619141d4a3bba7d82b803a499d11540'/>
<id>urn:sha1:388b9794b619141d4a3bba7d82b803a499d11540</id>
<content type='text'>
Summary:
This tests inlining size thresholds, but relies on the output of running
the full O2 pipeline, making it brittle against changes in unrelated
passes.

Only run the inlining pass and set thresholds on the test RUN line
instead.

Found while investigating D60318.

Reviewers: RKSimon, qcolombet

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67349

llvm-svn: 371397
</content>
</entry>
</feed>
