History log of /llvm-project/llvm/lib/Transforms/Utils/Local.cpp (Results 476 – 500 of 910)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d1317017 08-Dec-2017 Adrian Prantl <aprantl@apple.com>

Generalize llvm::replaceDbgDeclare and actually support the use-case that
is mentioned in the documentation (inserting a deref before the plus_uconst).

llvm-svn: 320203


Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2
# c06f55e1 28-Nov-2017 Rafael Espindola <rafael.espindola@gmail.com>

This reverts commit r319096 and r319097.

Revert "[SROA] Propagate !range metadata when moving loads."
Revert "[Mem2Reg] Clang-format unformatted parts of this file. NFCI."

Davide says they broke a

This reverts commit r319096 and r319097.

Revert "[SROA] Propagate !range metadata when moving loads."
Revert "[Mem2Reg] Clang-format unformatted parts of this file. NFCI."

Davide says they broke a bot.

llvm-svn: 319131

show more ...


# b5d59e73 27-Nov-2017 Davide Italiano <davide@freebsd.org>

[SROA] Propagate !range metadata when moving loads.

This tries to propagate !range metadata to a pre-existing load
when a load is optimized out. This is done instead of adding an
assume because conv

[SROA] Propagate !range metadata when moving loads.

This tries to propagate !range metadata to a pre-existing load
when a load is optimized out. This is done instead of adding an
assume because converting loads to and from assumes creates a
lot of IR.

Patch by Ariel Ben-Yehuda.

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

llvm-svn: 319096

show more ...


# 29a5c03c 14-Nov-2017 Reid Kleckner <rnk@google.com>

Make salvageDebugInfo of casts work for dbg.declare and dbg.addr

Summary:
Instcombine (and probably other passes) sometimes want to change the
type of an alloca. To do this, they generally create a

Make salvageDebugInfo of casts work for dbg.declare and dbg.addr

Summary:
Instcombine (and probably other passes) sometimes want to change the
type of an alloca. To do this, they generally create a new alloca with
the desired type, create a bitcast to make the new pointer type match
the old pointer type, replace all uses with the cast, and then simplify
the casts. We already knew how to salvage dbg.value instructions when
removing casts, but we can extend it to cover dbg.addr and dbg.declare.

Fixes a debug info quality issue uncovered in Chromium in
http://crbug.com/784609

Reviewers: aprantl, vsk

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 318203

show more ...


# 182f9fea 06-Nov-2017 Adrian Prantl <aprantl@apple.com>

InstCombine: salvage the debug info of DCE'ed add instructions.

rdar://problem/31209283

llvm-svn: 317522


# 261ac8b2 03-Nov-2017 Adrian Prantl <aprantl@apple.com>

Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()

This preserves the debug info for the cast operation in the original location.

rdar://problem/33460652

Reapplied r317340 with the test move

Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()

This preserves the debug info for the cast operation in the original location.

rdar://problem/33460652

Reapplied r317340 with the test moved into an ARM-specific directory.

llvm-svn: 317375

show more ...


# 8fe9fb0a 03-Nov-2017 Adrian Prantl <aprantl@apple.com>

Revert "Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()"

This reverts commit 317342 while investigating bot breakage.

llvm-svn: 317345


# 58e9a0bb 03-Nov-2017 Adrian Prantl <aprantl@apple.com>

Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()

This preserves the debug info for the cast operation in the original location.

rdar://problem/33460652

llvm-svn: 317340


Revision tags: llvmorg-5.0.1-rc1
# 9ee942f4 26-Oct-2017 Balaram Makam <bmakam@codeaurora.org>

Reapply r316582 [Local] Fix a bug in the domtree update logic for MergeBasicBlockIntoOnlyPred.

Summary: This reverts r316612 to reapply r316582. The buildbot failure was unrelated to this commit.

R

Reapply r316582 [Local] Fix a bug in the domtree update logic for MergeBasicBlockIntoOnlyPred.

Summary: This reverts r316612 to reapply r316582. The buildbot failure was unrelated to this commit.

Reviewers:

Subscribers:

llvm-svn: 316669

show more ...


# 52252fe2 25-Oct-2017 Balaram Makam <bmakam@codeaurora.org>

Revert r316582 [Local] Fix a bug in the domtree update logic for MergeBasicBlockIntoOnlyPred.

Summary: This reverts commit r316582. It looks like this commit broke tests on one buildbot:
http://lab.

Revert r316582 [Local] Fix a bug in the domtree update logic for MergeBasicBlockIntoOnlyPred.

Summary: This reverts commit r316582. It looks like this commit broke tests on one buildbot:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/5719

. . .
Failing Tests (1):
LLVM :: Transforms/CalledValuePropagation/simple-arguments.ll

Reviewers:

Subscribers:

llvm-svn: 316612

show more ...


# 925ddf1a 25-Oct-2017 Balaram Makam <bmakam@codeaurora.org>

[Local] Fix a bug in the domtree update logic for MergeBasicBlockIntoOnlyPred.

Summary: For some irreducible CFG the domtree nodes might be dead, do not update domtree for dead nodes.

Reviewers: ku

[Local] Fix a bug in the domtree update logic for MergeBasicBlockIntoOnlyPred.

Summary: For some irreducible CFG the domtree nodes might be dead, do not update domtree for dead nodes.

Reviewers: kuhar, dberlin, hfinkel

Reviewed By: kuhar

Subscribers: llvm-commits, mcrosier

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

llvm-svn: 316582

show more ...


# d20442d3 24-Oct-2017 Adrian Prantl <aprantl@apple.com>

Delete unused instantiations of DIBuilder. NFC

llvm-svn: 316494


# 6cadde7f 17-Oct-2017 Eugene Zelenko <eugene.zelenko@gmail.com>

[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 316034


# 0a51ec29 30-Sep-2017 Daniel Jasper <djasper@google.com>

Revert r314435: "[JumpThreading] Preserve DT and LVI across the pass"

Causes a segfault on a builtbot (and in our internal bootstrapping of
Clang). See Eli's response on the commit thread.

llvm-svn

Revert r314435: "[JumpThreading] Preserve DT and LVI across the pass"

Causes a segfault on a builtbot (and in our internal bootstrapping of
Clang). See Eli's response on the commit thread.

llvm-svn: 314589

show more ...


# 3701df55 28-Sep-2017 Evandro Menezes <e.menezes@samsung.com>

[JumpThreading] Preserve DT and LVI across the pass

JumpThreading now preserves dominance and lazy value information across the
entire pass. The pass manager is also informed of this preservation w

[JumpThreading] Preserve DT and LVI across the pass

JumpThreading now preserves dominance and lazy value information across the
entire pass. The pass manager is also informed of this preservation with
the goal of DT and LVI being recalculated fewer times overall during
compilation.

This change prepares JumpThreading for enhanced opportunities; particularly
those across loop boundaries.

Patch by: Brian Rzycki <b.rzycki@samsung.com>,
Sebastian Pop <s.pop@samsung.com>

Differential revision: https://reviews.llvm.org/D37528

llvm-svn: 314435

show more ...


# 0fe506bc 21-Sep-2017 Reid Kleckner <rnk@google.com>

Re-land r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"

The fix is to avoid invalidating our insertion point in
replaceDbgDeclare:
Builder.insertDeclare(NewAd

Re-land r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"

The fix is to avoid invalidating our insertion point in
replaceDbgDeclare:
Builder.insertDeclare(NewAddress, DIVar, DIExpr, Loc, InsertBefore);
+ if (DII == InsertBefore)
+ InsertBefore = &*std::next(InsertBefore->getIterator());
DII->eraseFromParent();

I had to write a unit tests for this instead of a lit test because the
use list order matters in order to trigger the bug.

The reduced C test case for this was:
void useit(int*);
static inline void inlineme() {
int x[2];
useit(x);
}
void f() {
inlineme();
inlineme();
}

llvm-svn: 313905

show more ...


# 7d2f38d6 21-Sep-2017 Daniel Jasper <djasper@google.com>

Revert r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"

.. as well as the two subsequent changes r313826 and r313875.

This leads to segfaults in combination with A

Revert r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare"

.. as well as the two subsequent changes r313826 and r313875.

This leads to segfaults in combination with ASAN. Will forward repro
instructions to the original author (rnk).

llvm-svn: 313876

show more ...


# 3f547e87 20-Sep-2017 Reid Kleckner <rnk@google.com>

[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare

Summary:
This implements the design discussed on llvm-dev for better tracking of
variables that live in memory through optimiz

[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare

Summary:
This implements the design discussed on llvm-dev for better tracking of
variables that live in memory through optimizations:
http://lists.llvm.org/pipermail/llvm-dev/2017-September/117222.html

This is tracked as PR34136

llvm.dbg.addr is intended to be produced and used in almost precisely
the same way as llvm.dbg.declare is today, with the exception that it is
control-dependent. That means that dbg.addr should always have a
position in the instruction stream, and it will allow passes that
optimize memory operations on local variables to insert llvm.dbg.value
calls to reflect deleted stores. See SourceLevelDebugging.rst for more
details.

The main drawback to generating DBG_VALUE machine instrs is that they
usually cause LLVM to emit a location list for DW_AT_location. The next
step will be to teach DwarfDebug.cpp how to recognize more DBG_VALUE
ranges as not needing a location list, and possibly start setting
DW_AT_start_offset for variables whose lifetimes begin mid-scope.

Reviewers: aprantl, dblaikie, probinson

Subscribers: eraman, hiraditya, llvm-commits

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

llvm-svn: 313825

show more ...


Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2
# abe04759 28-Jul-2017 Adrian Prantl <aprantl@apple.com>

Remove the obsolete offset parameter from @llvm.dbg.value

There is no situation where this rarely-used argument cannot be
substituted with a DIExpression and removing it allows us to simplify
the DW

Remove the obsolete offset parameter from @llvm.dbg.value

There is no situation where this rarely-used argument cannot be
substituted with a DIExpression and removing it allows us to simplify
the DWARF backend. Note that this patch does not yet remove any of
the newly dead code.

rdar://problem/33580047
Differential Revision: https://reviews.llvm.org/D35951

llvm-svn: 309426

show more ...


# 2574d7cb 27-Jul-2017 Daniel Neilson <dneilson@azul.com>

All libcalls should be considered to be GC-leaf functions.

Summary:
It is possible for some passes to materialize a call to a libcall (ex: ldexp, exp2, etc),
but these passes will not mark the call

All libcalls should be considered to be GC-leaf functions.

Summary:
It is possible for some passes to materialize a call to a libcall (ex: ldexp, exp2, etc),
but these passes will not mark the call as a gc-leaf-function. All libcalls are
actually gc-leaf-functions, so we change llvm::callsGCLeafFunction() to tell us that
available libcalls are equivalent to gc-leaf-function calls.

Reviewers: sanjoy, anna, reames

Reviewed By: anna

Subscribers: llvm-commits

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

llvm-svn: 309291

show more ...


Revision tags: llvmorg-5.0.0-rc1
# 93abd7d9 10-Jul-2017 Leo Li <aoli@google.com>

[ConstantHoisting] Remove dupliate logic in constant hoisting

Summary:
As metioned in https://reviews.llvm.org/D34576, checkings in
`collectConstantCandidates` can be replaced by using
`llvm::canRep

[ConstantHoisting] Remove dupliate logic in constant hoisting

Summary:
As metioned in https://reviews.llvm.org/D34576, checkings in
`collectConstantCandidates` can be replaced by using
`llvm::canReplaceOperandWithVariable`.

The only special case is that `collectConstantCandidates` return false for
all `IntrinsicInst` but it is safe for us to collect constant candidates from
`IntrinsicInst`.

Reviewers: pirama, efriedma, srhines

Reviewed By: efriedma

Subscribers: llvm-commits, javed.absar

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

llvm-svn: 307587

show more ...


# 4eb210bd 07-Jul-2017 Davide Italiano <davide@freebsd.org>

[Local] Update the comment for removeUnreachableBlocks.

It referenced a wrong function name, and didn't mention what the
second argument did. This should be slightly more accurate now.

llvm-svn: 30

[Local] Update the comment for removeUnreachableBlocks.

It referenced a wrong function name, and didn't mention what the
second argument did. This should be slightly more accurate now.

llvm-svn: 307425

show more ...


# 5499b1b8 06-Jul-2017 Leo Li <aoli@google.com>

Modify constraints in `llvm::canReplaceOperandWithVariable`

Summary:
`Instruction::Switch`: only first operand can be set to a non-constant value.
`Instruction::InsertValue` both the first and the s

Modify constraints in `llvm::canReplaceOperandWithVariable`

Summary:
`Instruction::Switch`: only first operand can be set to a non-constant value.
`Instruction::InsertValue` both the first and the second operand can be set to a non-constant value.
`Instruction::Alloca` return true for non-static allocation.

Reviewers: efriedma

Reviewed By: efriedma

Subscribers: srhines, pirama, llvm-commits

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

llvm-svn: 307294

show more ...


# 2abb65ae 26-Jun-2017 Chandler Carruth <chandlerc@gmail.com>

[InstCombine] Factor the logic for propagating !nonnull and !range
metadata out of InstCombine and into helpers.

NFC, this just exposes the logic used by InstCombine when propagating
metadata from o

[InstCombine] Factor the logic for propagating !nonnull and !range
metadata out of InstCombine and into helpers.

NFC, this just exposes the logic used by InstCombine when propagating
metadata from one load instruction to another. The plan is to use this
in SROA to address PR32902.

If anyone has better ideas about how to factor this or name variables,
I'm all ears, but this seemed like a pretty good start and lets us make
progress on the PR.

This is based on a patch by Ariel Ben-Yehuda (D34285).

llvm-svn: 306267

show more ...


Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3
# 6bda14b3 06-Jun-2017 Chandler Carruth <chandlerc@gmail.com>

Sort the remaining #include lines in include/... and lib/....

I did this a long time ago with a janky python script, but now
clang-format has built-in support for this. I fed clang-format every
line

Sort the remaining #include lines in include/... and lib/....

I did this a long time ago with a janky python script, but now
clang-format has built-in support for this. I fed clang-format every
line with a #include and let it re-sort things according to the precise
LLVM rules for include ordering baked into clang-format these days.

I've reverted a number of files where the results of sorting includes
isn't healthy. Either places where we have legacy code relying on
particular include ordering (where possible, I'll fix these separately)
or where we have particular formatting around #include lines that
I didn't want to disturb in this patch.

This patch is *entirely* mechanical. If you get merge conflicts or
anything, just ignore the changes in this patch and run clang-format
over your #include lines in the files.

Sorry for any noise here, but it is important to keep these things
stable. I was seeing an increasing number of patches with irrelevant
re-ordering of #include lines because clang-format was used. This patch
at least isolates that churn, makes it easy to skip when resolving
conflicts, and gets us to a clean baseline (again).

llvm-svn: 304787

show more ...


1...<<11121314151617181920>>...37