| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 144050
|
|
|
|
|
|
| |
with another instruction. (Specifically, don't insert an arbitrary instruction before a PHI.) Fixes PR11275.
llvm-svn: 143437
|
|
|
|
|
|
| |
the input and output vectors have different sizes. Patch by Xiaoyi Guo.
llvm-svn: 142671
|
|
|
|
|
|
|
|
| |
combining of the landingpad instruction. The ObjC personality function acts
almost identically to the C++ personality function. In particular, it uses
"null" as a "catch-all" value.
llvm-svn: 142256
|
|
|
|
|
|
|
|
|
|
|
|
| |
profile metadata at the same time. Use it to preserve metadata attached
to a branch when re-writing it in InstCombine.
Add metadata to the canonicalize_branch InstCombine test, and check that
it is tranformed correctly.
Reviewed by Nick Lewycky!
llvm-svn: 142168
|
|
|
|
| |
llvm-svn: 141628
|
|
|
|
| |
llvm-svn: 141209
|
|
|
|
|
|
|
|
|
|
|
|
| |
When updating the worklist for InstCombine, the Add/AddUsersToWorklist
functions may access the instruction(s) being added, for debug output for
example. If the instructions aren't yet added to the basic block, this
can result in a crash. Finish the instruction transformation before
adjusting the worklist instead.
rdar://10238555
llvm-svn: 141203
|
|
|
|
|
|
| |
r140966.
llvm-svn: 140969
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InstCombine was incorrectly considering the conversion of the constant
zero to be unsafe.
We want to transform:
define float @bar(float %x) nounwind readnone optsize ssp {
%conv = fpext float %x to double
%cmp = fcmp olt double %conv, 0.000000e+00
%conv1 = zext i1 %cmp to i32
%conv2 = sitofp i32 %conv1 to float
ret float %conv2
}
Into:
define float @bar(float %x) nounwind readnone optsize ssp {
%cmp = fcmp olt float %x, 0.000000e+00 ; <---- This
%conv1 = zext i1 %cmp to i32
%conv2 = sitofp i32 %conv1 to float
ret float %conv2
}
rdar://10215914
llvm-svn: 140869
|
|
|
|
|
|
| |
is a catch-all landingpad clause.
llvm-svn: 140858
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
catch or repeated filter clauses. Teach instcombine a bunch
of tricks for simplifying landingpad clauses. Currently the
code only recognizes the GNU C++ and Ada personality functions,
but that doesn't stop it doing a bunch of "generic" transforms
which are hopefully fine for any real-world personality function.
If these "generic" transforms turn out not to be generic, they
can always be conditioned on the personality function. Probably
someone should add the ObjC++ personality function. I didn't as
I don't know anything about it.
llvm-svn: 140852
|
|
|
|
|
|
|
|
| |
to be uniqued, without any benefit.
If someone prefers %tmp42 to %42, run instnamer.
llvm-svn: 140634
|
|
|
|
|
|
|
|
| |
construct is changed when it is not. (See included testcase.)
Patch by Xiaoyi Guo.
llvm-svn: 140072
|
|
|
|
|
|
| |
Spotted by inspection.
llvm-svn: 139768
|
|
|
|
| |
llvm-svn: 139229
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC. While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function. To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function. Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!). Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC. Patch mostly by Sanjoy Das.
llvm-svn: 139140
|
|
|
|
| |
llvm-svn: 138933
|
|
|
|
|
|
|
| |
Optimize chained bitcasts of the form A->B->A.
Undo r138722 and change isEliminableCastPair to allow this case.
llvm-svn: 138756
|
|
|
|
| |
llvm-svn: 138722
|
|
|
|
|
|
| |
things to disasterously over night, this can be reverted.
llvm-svn: 138702
|
|
|
|
| |
llvm-svn: 138469
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 20a05be15ea5271ab6185b83200fa88263362400. (svn rev 138340)
Conflicts:
test/Transforms/InstCombine/bitcast.ll
llvm-svn: 138366
|
|
|
|
| |
llvm-svn: 138342
|
|
|
|
|
|
|
| |
1. Cleanup the tests in ConstantFolding.cpp
2. Implement isAllOnes for Constant, ConstantFP, ConstantVector
llvm-svn: 138340
|
|
|
|
| |
llvm-svn: 138206
|
|
|
|
| |
llvm-svn: 137786
|
|
|
|
|
|
| |
FileCheckize. It is more properly an optimizer test.
llvm-svn: 137700
|
|
|
|
| |
llvm-svn: 137664
|
|
|
|
| |
llvm-svn: 137575
|
|
|
|
| |
llvm-svn: 137572
|
|
|
|
|
|
| |
when combining add and sub instructions. Patch by Pranav Bhandarkar!
llvm-svn: 137570
|
|
|
|
|
|
|
|
|
|
| |
of the instruction.
Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.
llvm-svn: 137527
|
|
|
|
|
|
|
|
|
| |
Don't replace a gep/bitcast with 'undef' because that will form a "free(undef)"
which in turn means "unreachable". What we wanted was a no-op. Instead, analyze
the whole tree and look for all the instructions we need to delete first, then
delete them second, not relying on the use_list to stay consistent.
llvm-svn: 136752
|
|
|
|
|
|
| |
malloc call.
llvm-svn: 136732
|
|
|
|
| |
llvm-svn: 136722
|
|
|
|
| |
llvm-svn: 136585
|
|
|
|
|
|
| |
are combined together. <rdar://problem/9859829>
llvm-svn: 136435
|
|
|
|
| |
llvm-svn: 135064
|
|
|
|
|
|
| |
another use of sqrt. rdar://9763193
llvm-svn: 135058
|
|
|
|
|
|
|
|
| |
more than one use.
Fixes PR10322.
llvm-svn: 134883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
patch brings numerous advantages to LLVM. One way to look at it
is through diffstat:
109 files changed, 3005 insertions(+), 5906 deletions(-)
Removing almost 3K lines of code is a good thing. Other advantages
include:
1. Value::getType() is a simple load that can be CSE'd, not a mutating
union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
uniques them. This means that the compiler doesn't merge them structurally
which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
"const Type *" everywhere.
Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.
There are still some cleanups pending after this, this patch is large enough
as-is.
llvm-svn: 134829
|
|
|
|
|
|
|
|
| |
compare when the AND has more than one use.
This can pessimize code, inequalities are generally more expensive.
llvm-svn: 134379
|
|
|
|
| |
llvm-svn: 133756
|
|
|
|
|
|
|
|
|
| |
for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the
target indep prefetch change.
As usual, updating the testsuite is a PITA.
llvm-svn: 133337
|
|
|
|
|
|
|
|
| |
applied
to functions and call/invokes, not to types.
llvm-svn: 133266
|
|
|
|
|
|
|
|
| |
been
needed since llvm-gcc 3.4 days.
llvm-svn: 133248
|
|
|
|
|
|
| |
was replaced with return of a "first class aggregate".
llvm-svn: 133245
|
|
|
|
|
|
|
| |
syntax and has been long obsolete. As usual, updating the tests is the nasty
part of this.
llvm-svn: 133242
|
|
|
|
|
|
| |
are either unreduced or only test old syntax.
llvm-svn: 133228
|