| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 121678
|
|
|
|
| |
llvm-svn: 121676
|
|
|
|
| |
llvm-svn: 121675
|
|
|
|
|
|
| |
bootstrap buildbot tripped over.
llvm-svn: 121674
|
|
|
|
| |
llvm-svn: 121673
|
|
|
|
| |
llvm-svn: 121672
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
or'd conditions. Previously we'd compile something like this:
int crud (unsigned char c) {
return c == 62 || c == 34 || c == 92;
}
into:
switch i8 %c, label %lor.rhs [
i8 62, label %lor.end
i8 34, label %lor.end
]
lor.rhs: ; preds = %entry
%cmp8 = icmp eq i8 %c, 92
br label %lor.end
lor.end: ; preds = %entry, %entry, %lor.rhs
%0 = phi i1 [ true, %entry ], [ %cmp8, %lor.rhs ], [ true, %entry ]
%lor.ext = zext i1 %0 to i32
ret i32 %lor.ext
which failed to merge the compare-with-92 into the switch. With this patch
we simplify this all the way to:
switch i8 %c, label %lor.rhs [
i8 62, label %lor.end
i8 34, label %lor.end
i8 92, label %lor.end
]
lor.rhs: ; preds = %entry
br label %lor.end
lor.end: ; preds = %entry, %entry, %entry, %lor.rhs
%0 = phi i1 [ true, %entry ], [ false, %lor.rhs ], [ true, %entry ], [ true, %entry ]
%lor.ext = zext i1 %0 to i32
ret i32 %lor.ext
which is much better for codegen's switch lowering stuff. This kicks in 33 times
on 176.gcc (for example) cutting 103 instructions off the generated code.
llvm-svn: 121671
|
|
|
|
| |
llvm-svn: 121669
|
|
|
|
|
|
|
|
|
|
|
| |
location in simplifycfg. In the old days, SimplifyCFG was never run on
the entry block, so we had to scan over all preds of the BB passed into
simplifycfg to do this xform, now we can just check blocks ending with
a condbranch. This avoids a scan over all preds of every simplified
block, which should be a significant compile-time perf win on functions
with lots of edges. No functionality change.
llvm-svn: 121668
|
|
|
|
| |
llvm-svn: 121667
|
|
|
|
| |
llvm-svn: 121664
|
|
|
|
| |
llvm-svn: 120994
|
|
|
|
|
|
|
|
|
| |
(indirectbr (select cond, blockaddress(@fn, BlockA),
blockaddress(@fn, BlockB)))
into
(br cond, BlockA, BlockB).
llvm-svn: 120943
|
|
|
|
|
|
|
| |
is trivially dead, since these have side effects. This makes the
(misnamed) MemoryUseIntrinsic class dead, so remove it.
llvm-svn: 120382
|
|
|
|
|
|
|
| |
in two places that are really interested in simplified instructions, not
constants.
llvm-svn: 120044
|
|
|
|
|
|
| |
is never used. Patch by Cameron Zwarich.
llvm-svn: 119963
|
|
|
|
| |
llvm-svn: 119908
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
hasConstantValue. I was leery of using SimplifyInstruction
while the IR was still in a half-baked state, which is the
reason for delaying the simplification until the IR is fully
cooked.
llvm-svn: 119494
|
|
|
|
|
|
| |
rather than hasConstantValue.
llvm-svn: 119457
|
|
|
|
|
|
| |
rather than calling hasConstantValue. No intended functionality change.
llvm-svn: 119352
|
|
|
|
|
|
| |
basic logic, added initial platform support.
llvm-svn: 117667
|
|
|
|
|
|
|
|
|
| |
it isn't unreachable and should not be zapped. The check for the entry block
was missing in one case: a block containing a unwind instruction. While there,
do some small cleanups: "M" is not a great name for a Function* (it would be
more appropriate for a Module*), change it to "Fn"; use Fn in more places.
llvm-svn: 117224
|
|
|
|
|
|
| |
until other LLVM projects using these are cleaned up.
llvm-svn: 117200
|
|
|
|
|
|
|
| |
they do not also require them. This allows us to reduce inter-pass linkage
dependencies.
llvm-svn: 116854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Patch by Alexander Herz!
llvm-svn: 116733
|
|
|
|
| |
llvm-svn: 116390
|
|
|
|
| |
llvm-svn: 116387
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
initialization functions that initialize the set of passes implemented in
that library. Add C bindings for these functions as well.
llvm-svn: 115927
|
|
|
|
|
|
|
| |
a header declaring them all. This is also where we will declare per-library pass-set
initializer functions down the road.
llvm-svn: 115900
|
|
|
|
| |
llvm-svn: 114999
|
|
|
|
| |
llvm-svn: 114750
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r113632
Conflicts:
cmake/modules/AddLLVM.cmake
llvm-svn: 113819
|
|
|
|
| |
llvm-svn: 113766
|
|
|
|
| |
llvm-svn: 113647
|
|
|
|
| |
llvm-svn: 113632
|
|
|
|
|
|
|
| |
into an inner loop, as the new loop iteration may differ substantially.
This fixes PR8078.
llvm-svn: 113057
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 112409
|
|
|
|
|
|
|
| |
I'm aware of, aren't maintained, and LVI will be replacing their value.
nlewycky approved this on irc.
llvm-svn: 112355
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix: add a flag to MapValue and friends which indicates whether
any module-level mappings are being made. In the common case of
inlining, no module-level mappings are needed, so MapValue doesn't
need to examine non-function-local metadata, which can be very
expensive in the case of a large module with really deep metadata
(e.g. a large C++ program compiled with -g).
This flag is a little awkward; perhaps eventually it can be moved
into the ClonedCodeInfo class.
llvm-svn: 112190
|
|
|
|
|
|
|
| |
except ...", it is causing *massive* performance regressions when building Clang
with itself (-O3 -g).
llvm-svn: 112158
|
|
|
|
|
|
| |
individual ...", which depends on r111922, which I am reverting.
llvm-svn: 112157
|
|
|
|
|
|
| |
instructions, not when remapping modules.
llvm-svn: 112091
|
|
|
|
|
|
|
|
| |
which does the same thing. This eliminates redundant code and
handles MDNodes better. MDNode linking still doesn't fully
work yet though.
llvm-svn: 111941
|