History log of /llvm-project/llvm/lib/Transforms/Utils/InlineFunction.cpp (Results 176 – 200 of 636)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# cb8faaac 29-Jun-2020 Sergey Dmitriev <serguei.n.dmitriev@intel.com>

[CallGraph] Add support for callback call sites

Summary:
This patch changes call graph analysis to recognize callback call sites
and add an artificial 'reference' call record from the broker functio

[CallGraph] Add support for callback call sites

Summary:
This patch changes call graph analysis to recognize callback call sites
and add an artificial 'reference' call record from the broker function
caller to the callback function in the call graph. A presence of such
reference enforces bottom-up traversal order for callback functions in
CG SCC pass manager because callback function logically becomes a callee
of the broker function caller.

Reviewers: jdoerfert, hfinkel, sstefan1, baziotis

Reviewed By: jdoerfert

Subscribers: hiraditya, kuter, sstefan1, llvm-commits

Tags: #llvm

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

show more ...


# 08e2386d 15-May-2020 Mircea Trofin <mtrofin@google.com>

Revert "Revert "[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs""

This reverts commit 454de99a6fec705e76ed7743bf538f7a77296f59.

The problem was that one of the ctor arguments of

Revert "Revert "[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs""

This reverts commit 454de99a6fec705e76ed7743bf538f7a77296f59.

The problem was that one of the ctor arguments of CallAnalyzer was left
to be const std::function<>&. A function_ref was passed for it, and then
the ctor stored the value in a function_ref field. So a std::function<>
would be created as a temporary, and not survive past the ctor
invocation, while the field would.

Tested locally by following https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

Original Differential Revision: https://reviews.llvm.org/D79917

show more ...


# 454de99a 15-May-2020 Mircea Trofin <mtrofin@google.com>

Revert "[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs"

This reverts commit 767db5be67cab5aa04d81227725765cad9620611.


# 767db5be 14-May-2020 Mircea Trofin <mtrofin@google.com>

[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs

Summary:
Replacing uses of std::function pointers or refs, or Optional, to
function_ref, since the usage pattern allows that. If th

[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs

Summary:
Replacing uses of std::function pointers or refs, or Optional, to
function_ref, since the usage pattern allows that. If the function is
optional, using a default parameter value (nullptr). This led to a few
parameter reshufles, to push all optionals to the end of the parameter
list.

Reviewers: davidxl, dblaikie

Subscribers: arsenm, jvesely, nhaehnle, eraman, hiraditya, haicheng, kerbowa, llvm-commits

Tags: #llvm

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

show more ...


# b74c6d2c 25-Mar-2020 Nikita Popov <nikita.ppv@gmail.com>

[InlineFunction] Disable emission of alignment assumptions by default

In D74183 clang started emitting alignment for sret parameters
unconditionally. This caused a 1.5% compile-time regression on
tr

[InlineFunction] Disable emission of alignment assumptions by default

In D74183 clang started emitting alignment for sret parameters
unconditionally. This caused a 1.5% compile-time regression on
tramp3d-v4. The reason is that we now generate many instance of IR like

%ptrint = ptrtoint %class.GuardLayers* %guards_m to i64
%maskedptr = and i64 %ptrint, 3
%maskcond = icmp eq i64 %maskedptr, 0
tail call void @llvm.assume(i1 %maskcond)

to preserve the alignment information during inlining. Based on IR
analysis, these assumptions also regress optimization. The attached
phase ordering test case illustrates two issues: One are instruction
count based optimization heuristics, which are affected by the four
additional instructions of the assumption. The other is blocking of
SROA due to ptrtoint casts (PR45763).

We already encountered the same problem in Rust, where we (unlike
Clang) generally prefer to emit alignment information absolutely
everywhere it is available. We were only able to do this after
hardcoding -preserve-alignment-assumptions-during-inlining=false,
because we were seeing significant optimization and compile-time
regressions otherwise.

This patch disables -preserve-alignment-assumptions-during-inlining
by default, because we should not be punishing people for adding
more alignment annotations.

Once the assume bundle work shakes out and we can represent (and use)
alignment assumptions using assume bundles, it should be possible to
re-enable this with reduced overhead.

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

show more ...


# a90948fd 30-Apr-2020 Arthur Eubanks <aeubanks@google.com>

[NFC] Rename *ByValOrInalloca* to *PassPointeeByValue*

Summary: In preparation for preallocated.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

[NFC] Rename *ByValOrInalloca* to *PassPointeeByValue*

Summary: In preparation for preallocated.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

show more ...


# a58b62b4 28-Apr-2020 Craig Topper <craig.topper@gmail.com>

[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().

This method has been commented as deprecated for a while. Remove
it and replace all uses with the equivalent getCalledOpe

[IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().

This method has been commented as deprecated for a while. Remove
it and replace all uses with the equivalent getCalledOperand().

I also made a few cleanups in here. For example, to removes use
of getElementType on a pointer when we could just use getFunctionType
from the call.

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

show more ...


# cb56e9b9 27-Apr-2020 Mircea Trofin <mtrofin@google.com>

[llvm][NFC] Use CallBase instead of Instruction in ProfileSummaryInfo

Summary:
getProfileCount requires the parameter be a valid CallBase, and its uses
reflect that.

Reviewers: dblaikie, craig.topp

[llvm][NFC] Use CallBase instead of Instruction in ProfileSummaryInfo

Summary:
getProfileCount requires the parameter be a valid CallBase, and its uses
reflect that.

Reviewers: dblaikie, craig.topper, wmi

Subscribers: eraman, hiraditya, llvm-commits

Tags: #llvm

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

show more ...


# 68b2e507 21-Apr-2020 Craig Topper <craig.topper@gmail.com>

[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign.

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


# fcc9d702 20-Apr-2020 Craig Topper <craig.topper@intel.com>

Revert "[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign."

This is breaking the clang build.

This reverts commit 897409fb56f4525639b0e47e88960f24cd91c924.


# 897409fb 20-Apr-2020 Craig Topper <craig.topper@gmail.com>

[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign.

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


# fd5e069d 17-Apr-2020 Anna Thomas <anna@azul.com>

Fix buildbot failure due to obsolete CallSite usage

Fix buildbot failures due to ef49b1d97e1ac75bff8ff7dec3097b43bcd07e73
(which was a revert of a previous change).


# ef49b1d9 17-Apr-2020 Anna Thomas <anna@azul.com>

Revert "[InlineFunction] Update metadata on loads that are return values"

This reverts commit 1d0f757904919d19f1cf5dcd307874bceb1e9efb because of
https://bugs.llvm.org/show_bug.cgi?id=45590. Needs i

Revert "[InlineFunction] Update metadata on loads that are return values"

This reverts commit 1d0f757904919d19f1cf5dcd307874bceb1e9efb because of
https://bugs.llvm.org/show_bug.cgi?id=45590. Needs investigation.

show more ...


# 4aae4e3f 13-Apr-2020 Mircea Trofin <mtrofin@mtrofin-macbookpro3.roam.corp.google.com>

[llvm][NFC] CallSite removal from inliner-related files

Summary: This removes CallSite from inliner files. Some dependencies where thus affected.

Reviewers: dblaikie, davidxl, craig.topper

Subscri

[llvm][NFC] CallSite removal from inliner-related files

Summary: This removes CallSite from inliner files. Some dependencies where thus affected.

Reviewers: dblaikie, davidxl, craig.topper

Subscribers: arsenm, jvesely, nhaehnle, eraman, hiraditya, aheejin, kerbowa, llvm-commits

Tags: #llvm

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

show more ...


# 813f438b 13-Apr-2020 Tyker <tyker1@outlook.com>

[AssumeBundles] adapt Assumption cache to assume bundles

Summary: change assumption cache to store an assume along with an index to the operand bundle containing the knowledge.

Reviewers: jdoerfert

[AssumeBundles] adapt Assumption cache to assume bundles

Summary: change assumption cache to store an assume along with an index to the operand bundle containing the knowledge.

Reviewers: jdoerfert, hfinkel

Reviewed By: jdoerfert

Subscribers: hiraditya, mgrang, llvm-commits

Tags: #llvm

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

show more ...


# d2f1cd5d 12-Apr-2020 Mircea Trofin <mtrofin@google.com>

[llvm][NFC] Refactor uses of CallSite to CallBase - call promotion

Summary:
Updated CallPromotionUtils and impacted sites. Parameters that are
expected to be non-null, and return values that are gur

[llvm][NFC] Refactor uses of CallSite to CallBase - call promotion

Summary:
Updated CallPromotionUtils and impacted sites. Parameters that are
expected to be non-null, and return values that are guranteed non-null,
were replaced with CallBase references rather than pointers.

Left FIXME in places where more changes are facilitated by CallBase, but
aren't CallSites: Instruction* parameters or return values, for example,
where the contract that they are actually CallBase values.

Reviewers: davidxl, dblaikie, wmi

Reviewed By: dblaikie

Subscribers: arsenm, jvesely, nhaehnle, eraman, hiraditya, kerbowa, llvm-commits

Tags: #llvm

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

show more ...


# 1d0f7579 02-Apr-2020 Anna Thomas <anna@azul.com>

[InlineFunction] Update metadata on loads that are return values

This patch builds upon D76140 by updating metadata on pointer typed
loads in inlined functions, when the load is the return value, an

[InlineFunction] Update metadata on loads that are return values

This patch builds upon D76140 by updating metadata on pointer typed
loads in inlined functions, when the load is the return value, and the
callsite contains return attributes which can be updated as metadata on
the load.
Added test cases show this for nonnull, dereferenceable,
dereferenceable_or_null

Reviewed-By: jdoerfert

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

show more ...


# bf7a16a7 01-Apr-2020 Anna Thomas <anna@azul.com>

[InlineFunction] Update valid return attributes at callsite within callee body

Consider a callee function that has a call (C) within it which feeds
into the return. When we inline that callee into a

[InlineFunction] Update valid return attributes at callsite within callee body

Consider a callee function that has a call (C) within it which feeds
into the return. When we inline that callee into a callsite that has
return attributes, we can backward propagate valid attributes to the
call (C) within that inlined callee body.

This is safe to do so only if we can guarantee transfer of execution to
successor in the window of instructions between return value (i.e. the
call C) and the return instruction.

Also, this is valid only for attributes which are a property of a
callsite and not those that are not dependent on the ABI, or a property
of the call itself.

Reviewed-By: reames, jdoerfert

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

show more ...


# c00cb762 02-Apr-2020 Tyker <tyker1@outlook.com>

[NFC] Split Knowledge retention and place it more appropriatly

Summary:
Splitting Knowledge retention into Queries in Analysis and Builder into Transform/Utils
allows Queries and Transform/Utils to

[NFC] Split Knowledge retention and place it more appropriatly

Summary:
Splitting Knowledge retention into Queries in Analysis and Builder into Transform/Utils
allows Queries and Transform/Utils to use Analysis.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

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

show more ...


# 58a05675 31-Mar-2020 Anna Thomas <anna@azul.com>

Revert "[InlineFunction] Handle return attributes on call within inlined body"

This reverts commit 28518d9ae39ff5c6044e230d58b6ae28b0252cae.
There is a failure in MsgPackReader.cpp when built with c

Revert "[InlineFunction] Handle return attributes on call within inlined body"

This reverts commit 28518d9ae39ff5c6044e230d58b6ae28b0252cae.
There is a failure in MsgPackReader.cpp when built with clang. It
complains about "signext and zeroext" are incompatible. Investigating
offline if it is infact a UB in the MsgPackReader code.

show more ...


# 28518d9a 22-Mar-2020 Anna Thomas <anna@azul.com>

[InlineFunction] Handle return attributes on call within inlined body

Consider a callee function that has a call (C) within it which feeds
into the return. When we inline that callee into a callsit

[InlineFunction] Handle return attributes on call within inlined body

Consider a callee function that has a call (C) within it which feeds
into the return. When we inline that callee into a callsite that has
return attributes, we can backward propagate those attributes to the
call (C) within that inlined callee body.

This is safe to do so only if we can guarantee transfer of execution to
successor in the window of instructions between return value (i.e. the
call C) and the return instruction.

See added test cases.

Reviewed-By: reames, jdoerfert

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

show more ...


# d72c586a 25-Mar-2020 Tyker <tyker1@outlook.com>

[NFC] Rename function to match Coding Convention and fix typo in KnowledgeRetention


# 69375fd0 13-Mar-2020 Tyker <tyker1@outlook.com>

[AssumeBundles] Preserve Information in the inliner

Summary:
during inling Create and insert an llvm.assume with attributes to preserve them.
to prevent any changes for now generation of llvm.assume

[AssumeBundles] Preserve Information in the inliner

Summary:
during inling Create and insert an llvm.assume with attributes to preserve them.
to prevent any changes for now generation of llvm.assume is under a flag disabled by default.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

show more ...


# 8e77b33b 10-Feb-2020 Vedant Kumar <vsk@apple.com>

[Local] Do not move around dbg.declares during replaceDbgDeclare

replaceDbgDeclare is used to update the descriptions of stack variables
when they are moved (e.g. by ASan or SafeStack). A side effec

[Local] Do not move around dbg.declares during replaceDbgDeclare

replaceDbgDeclare is used to update the descriptions of stack variables
when they are moved (e.g. by ASan or SafeStack). A side effect of
replaceDbgDeclare is that it moves dbg.declares around in the
instruction stream (typically by hoisting them into the entry block).
This behavior was introduced in llvm/r227544 to fix an assertion failure
(llvm.org/PR22386), but no longer appears to be necessary.

Hoisting a dbg.declare generally does not create problems. Usually,
dbg.declare either describes an argument or an alloca in the entry
block, and backends have special handling to emit locations for these.
In optimized builds, LowerDbgDeclare places dbg.values in the right
spots regardless of where the dbg.declare is. And no one uses
replaceDbgDeclare to handle things like VLAs.

However, there doesn't seem to be a positive case for moving
dbg.declares around anymore, and this reordering can get in the way of
understanding other bugs. I propose getting rid of it.

Testing: stage2 RelWithDebInfo sanitized build, check-llvm

rdar://59397340

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

show more ...


# 342357c5 28-Jan-2020 Johannes Doerfert <johannes@jdoerfert.de>

[Inliner][NoAlias] Use call site attributes too

If we had `noalias` on an argument the inliner created alias scope
metadata already. However, the call site `noalias` annotation was not
considered. S

[Inliner][NoAlias] Use call site attributes too

If we had `noalias` on an argument the inliner created alias scope
metadata already. However, the call site `noalias` annotation was not
considered. Since the Attributor can derive such call site `noalias`
annotation we should treat them the same as argument annotations.

Reviewed By: hfinkel

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

show more ...


12345678910>>...26