| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
As discussed, LoopUtils.h is a better name.
llvm-svn: 182314
|
|
|
|
|
|
|
|
|
|
|
| |
Other passes, PPC counter-loop formation for example, also need to add loop
preheaders outside of the regular loop simplification pass. This makes
InsertPreheaderForLoop a global function so that it can be used by other
passes.
No functionality change intended.
llvm-svn: 182299
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.
There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.
The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.
I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).
I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.
llvm-svn: 171366
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.
Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]
llvm-svn: 169131
|
|
|
|
|
|
|
|
|
|
| |
This is currently true, but may change when DA grows more aggressive caching.
Without this setting it's impossible to use DA from a LoopPass because DA is a
function pass and cannot be properly scheduled in between LoopPasses. The
LoopManager reacts to this with an infinite loop which made this really annoying
to debug.
llvm-svn: 166788
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LoopSimplify bug is pretty harmless because the loop goes from unanalyzable
to analyzable but the LCSSA bug is very nasty. It only comes into play with a
specific order of the LoopPassManager worklist and can cause actual
miscompilations, when a SCEV refers to a value that has been replaced with PHI
node. SCEVExpander may then insert code into the wrong place, either violating
domination or randomly miscompiling stuff.
Comes with an extensive test case reduced from the test-suite with
bugpoint+SCEVValidator.
llvm-svn: 166787
|
|
|
|
|
|
|
|
| |
Do not call SplitBlockPredecessors on a loop preheader when one of the
predecessors is an indirectbr. Otherwise, you will hit this assert:
!isa<IndirectBrInst>(Preds[i]->getTerminator()) && "Cannot split an edge from an IndirectBrInst"
llvm-svn: 153134
|
|
|
|
| |
llvm-svn: 153133
|
|
|
|
|
|
| |
header is a landing pad correctly (by splitting the landingpad out of the loop header). Make some adjustments to the rest of LoopSimplify to make it clear that the rest of LoopSimplify isn't making bad assumptions about the presence of landing pads. PR11575.
llvm-svn: 146621
|
|
|
|
| |
llvm-svn: 146277
|
|
|
|
|
|
|
| |
InstructionSimplify.cpp. Other fixups as needed.
Part of rdar://10500969
llvm-svn: 145559
|
|
|
|
|
|
|
|
|
|
| |
We have to be careful when splitting the landing pad block, because the
landingpad instruction is required to remain as the first non-PHI of an invoke's
unwind edge. To retain this, we split the block into two blocks, moving the
predecessors within the loop to one block and the remaining predecessors to the
other. The landingpad instruction is cloned into the new blocks.
llvm-svn: 138015
|
|
|
|
|
|
| |
aren't from an indirect branch need to be dominated by the loop header.
llvm-svn: 137981
|
|
|
|
|
|
|
|
| |
One way to exit the loop is through an unwind edge. However, that may involve
splitting the critical edge of the landing pad, which is non-trivial. Prevent
the transformation from rewriting the landing pad exit loop block.
llvm-svn: 137871
|
|
|
|
|
|
| |
when building with assertions disabled.
llvm-svn: 137460
|
|
|
|
|
|
| |
to notify SCEV of a change. Add forgetLoop in a couple of those places.
llvm-svn: 136797
|
|
|
|
| |
llvm-svn: 136795
|
|
|
|
| |
llvm-svn: 133298
|
|
|
|
|
|
| |
Luis Felipe Strano Moraes!
llvm-svn: 129558
|
|
|
|
|
|
| |
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
|
|
|
|
| |
llvm-svn: 125317
|
|
|
|
|
|
| |
dominance and post-dominance frontiers.
llvm-svn: 123725
|
|
|
|
| |
llvm-svn: 123247
|
|
|
|
|
|
| |
so that Dominators.h is *just* domtree. Also prune #includes a bit.
llvm-svn: 122714
|
|
|
|
|
|
|
|
|
|
| |
described
in the PR, the pass could break LCSSA form when inserting preheaders. It probably
would be easy enough to fix this, but since currently we always go into LCSSA form
after running this pass, doing so is not urgent.
llvm-svn: 122695
|
|
|
|
|
|
|
|
| |
preserves LCSSA form out of ScalarEvolution and into the LoopInfo
class. Use it to check that SimplifyInstruction simplifications
are not breaking LCSSA form. Fixes PR8622.
llvm-svn: 119727
|
|
|
|
|
|
| |
rather than calling hasConstantValue. No intended functionality change.
llvm-svn: 119352
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
into an inner loop, as the new loop iteration may differ substantially.
This fixes PR8078.
llvm-svn: 113057
|
|
|
|
|
|
| |
passes over to the new registration API.
llvm-svn: 111815
|
|
|
|
|
|
| |
actually use ScalarEvolution.
llvm-svn: 111124
|
|
|
|
| |
llvm-svn: 111061
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier
pass in StandardPasses.h to ensure that it gets scheduled at the right
time.
Declare that loop unrolling preserves ScalarEvolution, and shuffle some
getAnalysisUsages.
This eliminates one LoopSimplify and one LCCSA run in the standard
compile opts sequence.
llvm-svn: 109413
|
|
|
|
| |
llvm-svn: 109122
|
|
|
|
|
|
| |
a redundant loopsimplify run from the default -O2 sequence.
llvm-svn: 108539
|
|
|
|
| |
llvm-svn: 107983
|
|
|
|
| |
llvm-svn: 107965
|
|
|
|
| |
llvm-svn: 106542
|
|
|
|
| |
llvm-svn: 98581
|
|
|
|
| |
llvm-svn: 98122
|
|
|
|
| |
llvm-svn: 97458
|
|
|
|
|
|
|
|
|
|
|
|
| |
which branch on undef to branch on a boolean constant for the edge
exiting the loop. This helps ScalarEvolution compute trip counts for
loops.
Teach ScalarEvolution to recognize single-value PHIs, when safe, and
ForgetSymbolicName to forget such single-value PHI nodes as apprpriate
in ForgetSymbolicName.
llvm-svn: 97126
|
|
|
|
|
|
| |
malloc caller in a profile.
llvm-svn: 95407
|
|
|
|
| |
llvm-svn: 93560
|
|
|
|
|
|
| |
the underlying PHI node insertion issue in SSAUpdate is fixed.
llvm-svn: 91821
|