| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
repeatedly undo each other. The solution is to perform more aggressive constant folding to make one of the edges just folded away rather than trying to thread it.
Fixes <rdar://problem/9284786>.
Discovered with CSmith.
llvm-svn: 129538
|
|
|
|
|
|
| |
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
|
|
|
|
| |
llvm-svn: 128535
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
taken (and used!). This prevents merging the blocks (invalidating
the block addresses) in a case like this:
#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
void foo() {
printf("%p\n", _THIS_IP_);
printf("%p\n", _THIS_IP_);
printf("%p\n", _THIS_IP_);
}
which fixes PR4151.
llvm-svn: 125829
|
|
|
|
|
|
|
|
| |
could falsely produce a MultipleDestSentinel value if the first predecessor ended with an 'indirectbr'. If that happened, it caused an unnecessary FindMostPopularDest() call.
This wasn't a correctness problem, but it broke the fast path for single-predecessor blocks.
llvm-svn: 121966
|
|
|
|
|
|
|
|
| |
a terminator depends on it.
When it sees a promising select it now tries to figure out whether the condition of the select is known in any of the predecessors and if so it maps the operands appropriately.
llvm-svn: 121859
|
|
|
|
| |
llvm-svn: 121670
|
|
|
|
|
|
| |
The last uses of these functions were removed in r113852 when LazyValueInfo was permanently enabled and removed the need for them.
llvm-svn: 121133
|
|
|
|
|
|
| |
looking for ConstantInt*s or BlockAddress*s.
llvm-svn: 121066
|
|
|
|
|
|
|
| |
Should have no functional change other than the order of two transformations that are mutually-exclusive and the exact formatting of debug output.
Internally, it now stores the ConstantInt*s as Constant*s, and actual undef values instead of nulls.
llvm-svn: 120946
|
|
|
|
| |
llvm-svn: 120945
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exposes an initializeMyPassFunction(), which
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
|
|
|
|
|
|
|
|
|
| |
perform initialization without static constructors AND without explicit initialization
by the client. For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve. I hope to be able to relax
the latter requirement in the future.
llvm-svn: 116334
|
|
|
|
| |
llvm-svn: 115996
|
|
|
|
|
|
|
|
|
|
| |
still having predecessor, if it is part of a self-loop.
Because of this, we cannot use the Simplify* APIs, as they can assert-fail on unreachable code. Since it's not easy to determine
if a given threading will cause a block to become unreachable, simply defer simplifying simplification to later InstCombine and/or
DCE passes.
llvm-svn: 115082
|
|
|
|
|
|
| |
on by default and has received significant testing.
llvm-svn: 113852
|
|
|
|
| |
llvm-svn: 113114
|
|
|
|
| |
llvm-svn: 113113
|
|
|
|
|
|
|
|
|
| |
I'm sure it is harmless. Original commit message:
If PrototypeValue is erased in the middle of using the SSAUpdator
then the SSAUpdator may access freed memory. Instead, simply pass
in the type and name explicitly, which is all that was used anyway.
llvm-svn: 112810
|
|
|
|
|
|
| |
if we schedule another LVI-using pass afterwards.
llvm-svn: 112722
|
|
|
|
|
|
| |
self host errors on clang-x86-64.
llvm-svn: 112719
|
|
|
|
|
|
|
| |
then the SSAUpdator may access freed memory. Instead, simply pass
in the type and name explicitly, which is all that was used anyway.
llvm-svn: 112699
|
|
|
|
|
|
| |
duplicated code into a helper function.
llvm-svn: 112634
|
|
|
|
| |
llvm-svn: 112628
|
|
|
|
|
|
| |
first failure.
llvm-svn: 112620
|
|
|
|
|
|
|
|
|
| |
constant-fold undef, and be more careful with its return value.
This actually exposed an infinite recursion bug in ComputeValueKnownInPredecessors which theoretically already existed (in JumpThreading's
handling of and/or of i1's), but never manifested before. This patch adds a tracking set to prevent this case.
llvm-svn: 112589
|
|
|
|
|
|
|
|
| |
constant folding methods. Additionally,
use the ConstantExpr::get*() methods to simplify some constant folding.
llvm-svn: 112550
|
|
|
|
| |
llvm-svn: 112543
|
|
|
|
|
|
|
|
| |
results from ComputeValueKnownInPredecessors
(indicating undef), and re-use existing constant folding APIs.
llvm-svn: 112539
|
|
|
|
| |
llvm-svn: 112286
|
|
|
|
|
|
|
|
| |
condition previously. Update tests for this change.
This fixes PR5652.
llvm-svn: 112270
|
|
|
|
|
|
| |
compiled with clang++.
llvm-svn: 112198
|
|
|
|
| |
llvm-svn: 111923
|
|
|
|
| |
llvm-svn: 111834
|
|
|
|
| |
llvm-svn: 111816
|
|
|
|
| |
llvm-svn: 111551
|
|
|
|
| |
llvm-svn: 111543
|
|
|
|
|
|
| |
issues.
llvm-svn: 111382
|
|
|
|
|
|
|
|
|
| |
from the LHS should disable reconsidering that pred on the
RHS. However, knowing something about the pred on the RHS
shouldn't disable subsequent additions on the RHS from
happening.
llvm-svn: 111349
|
|
|
|
| |
llvm-svn: 110460
|
|
|
|
| |
llvm-svn: 110410
|
|
|
|
|
|
|
|
| |
address of the static
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
|
|
|
|
|
|
| |
default.
llvm-svn: 110384
|
|
|
|
|
|
| |
Disabled for now.
llvm-svn: 109424
|
|
|
|
| |
llvm-svn: 109045
|
|
|
|
| |
llvm-svn: 108142
|
|
|
|
|
|
|
|
| |
the LHS and RHS of an and/or instruction, don't multiply add
known predecessor values. This fixes the crash on testcase
from PR7498
llvm-svn: 108114
|
|
|
|
|
|
| |
fixes PR7356.
llvm-svn: 105950
|
|
|
|
|
|
|
| |
lib/Transforms/Utils and into lib/Analysis so that Analysis passes
can use them.
llvm-svn: 104949
|
|
|
|
|
|
| |
in some cases.
llvm-svn: 100937
|