| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
largely completes support for 128-bit fallback lowering for code that
is not 256-bit ready.
llvm-svn: 125315
|
| |
|
|
|
|
| |
with some small modifications by me.
llvm-svn: 125292
|
| |
|
|
| |
llvm-svn: 125284
|
| |
|
|
| |
llvm-svn: 125279
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gep to explicit addressing, we know that none of the intermediate
computation overflows.
This could use review: it seems that the shifts certainly wouldn't
overflow, but could the intermediate adds overflow if there is a
negative index?
Previously the testcase would instcombine to:
define i1 @test(i64 %i) {
%p1.idx.mask = and i64 %i, 4611686018427387903
%cmp = icmp eq i64 %p1.idx.mask, 1000
ret i1 %cmp
}
now we get:
define i1 @test(i64 %i) {
%cmp = icmp eq i64 %i, 1000
ret i1 %cmp
}
llvm-svn: 125271
|
| |
|
|
|
|
|
| |
for NSW/NUW binops to follow the pattern of exact binops. This
allows someone to use Builder.CreateAdd(x, y, "tmp", MaybeNUW);
llvm-svn: 125270
|
| |
|
|
|
|
|
|
|
|
|
| |
exact/nsw/nuw shifts and have instcombine infer them when it can prove
that the relevant properties are true for a given shift without them.
Also, a variety of refactoring to use the new patternmatch logic thrown
in for good luck. I believe that this takes care of a bunch of related
code quality issues attached to PR8862.
llvm-svn: 125267
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
optimizations to be much more aggressive in the face of
exact/nsw/nuw div and shifts. For example, these (which
are the same except the first is 'exact' sdiv:
define i1 @sdiv_icmp4_exact(i64 %X) nounwind {
%A = sdiv exact i64 %X, -5 ; X/-5 == 0 --> x == 0
%B = icmp eq i64 %A, 0
ret i1 %B
}
define i1 @sdiv_icmp4(i64 %X) nounwind {
%A = sdiv i64 %X, -5 ; X/-5 == 0 --> x == 0
%B = icmp eq i64 %A, 0
ret i1 %B
}
compile down to:
define i1 @sdiv_icmp4_exact(i64 %X) nounwind {
%1 = icmp eq i64 %X, 0
ret i1 %1
}
define i1 @sdiv_icmp4(i64 %X) nounwind {
%X.off = add i64 %X, 4
%1 = icmp ult i64 %X.off, 9
ret i1 %1
}
This happens when you do something like:
(ptr1-ptr2) == 42
where the pointers are pointers to non-unit types.
llvm-svn: 125266
|
| |
|
|
|
|
| |
conversions". :)
llvm-svn: 125265
|
| |
|
|
|
|
|
|
|
|
| |
and generally tidying things up. Only very trivial functionality changes
like now doing (-1 - A) -> (~A) for vectors too.
InstCombineAddSub.cpp | 296 +++++++++++++++++++++-----------------------------
1 file changed, 126 insertions(+), 170 deletions(-)
llvm-svn: 125264
|
| |
|
|
|
|
|
| |
are shifting out since they do require them to be zeros. Similarly
for NUW/NSW bits of shl
llvm-svn: 125263
|
| |
|
|
|
|
| |
add a missing check when considering whether it's profitable to commute. rdar://8977508.
llvm-svn: 125259
|
| |
|
|
| |
llvm-svn: 125257
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Natural Loop Information
Loop Pass Manager
Canonicalize natural loops
Scalar Evolution Analysis
Loop Pass Manager
Induction Variable Users
Canonicalize natural loops
Induction Variable Users
Loop Strength Reduction
into this:
Scalar Evolution Analysis
Loop Pass Manager
Canonicalize natural loops
Induction Variable Users
Loop Strength Reduction
This fixes <rdar://problem/8869639>. I also filed PR9184 on doing this sort of
thing automatically, but it seems easier to just change the ordering of the
passes if this is the only case.
llvm-svn: 125254
|
| |
|
|
|
|
|
| |
Loop splitting is better handled by the more generic global region splitting
based on the edge bundle graph.
llvm-svn: 125243
|
| |
|
|
|
|
| |
I have another way to achieve the same goal.
llvm-svn: 125239
|
| |
|
|
| |
llvm-svn: 125238
|
| |
|
|
|
|
|
| |
This fixes a bug where splitSingleBlocks() could split a live range after a
terminator instruction.
llvm-svn: 125237
|
| |
|
|
| |
llvm-svn: 125236
|
| |
|
|
| |
llvm-svn: 125232
|
| |
|
|
|
|
| |
No functional changes intended.
llvm-svn: 125231
|
| |
|
|
|
|
|
|
|
|
| |
name of a path, after resolving symbolic links and eliminating excess
path elements such as "foo/../" and "./".
This routine still needs a Windows implementation, but I don't have a
Windows machine available. Help? Please?
llvm-svn: 125228
|
| |
|
|
| |
llvm-svn: 125226
|
| |
|
|
| |
llvm-svn: 125225
|
| |
|
|
|
|
|
| |
The tag is updated whenever the live interval union is changed, and it is tested
before using cached information.
llvm-svn: 125224
|
| |
|
|
|
|
|
|
|
| |
Now, Syntax is only used as a tie-breaker if the Arch
matches. Previously, a request for x86_64 disassembler followed by the
i386 disassembler in a single process would return the cached x86_64
disassembler. Fixes <rdar://problem/8958982>
llvm-svn: 125215
|
| |
|
|
| |
llvm-svn: 125200
|
| |
|
|
|
|
| |
improve interfaces to instsimplify to take this info.
llvm-svn: 125196
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
versions of creation functions. Eventually, the "insertion point" versions
of these should just be removed, we do have IRBuilder afterall.
Do a massive rewrite of much of pattern match. It is now shorter and less
redundant and has several other widgets I will be using in other patches.
Among other changes, m_Div is renamed to m_IDiv (since it only matches
integer divides) and m_Shift is gone (it used to match all binops!!) and
we now have m_LogicalShift for the one client to use.
Enhance IRBuilder to have "isExact" arguments to things like CreateUDiv
and reduce redundancy within IRbuilder by having these methods chain to
each other more instead of duplicating code.
llvm-svn: 125194
|
| |
|
|
| |
llvm-svn: 125190
|
| |
|
|
| |
llvm-svn: 125187
|
| |
|
|
| |
llvm-svn: 125186
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
could end up removing a different function than we intended because it was
functionally equivalent, then end up with a comparison of a function against
itself in the next round of comparisons (the one in the function set and the
one on the deferred list). To fix this, I introduce a choice in the form of
comparison for ComparableFunctions, either normal or "pointer only" used to
find exact Function*'s in lookups.
Also add some debugging statements.
llvm-svn: 125180
|
| |
|
|
|
|
|
|
|
|
| |
config.h.*.
AC_CHECK_FUNCS seeks a symbol only in libs. We should check the declaration in string.h.
FIXME: I have never seen mingw(s) have strerror_s() (not _strerror_s()).
FIXME: Autoconf/CMake may seek strerror_s() with the definition MINGW_HAS_SECURE_API in future.
llvm-svn: 125172
|
| |
|
|
|
|
| |
as 0x0502 in its headers.
llvm-svn: 125171
|
| |
|
|
|
|
| |
It should be provided with _WIN32_WINNT>=0x0500.
llvm-svn: 125170
|
| |
|
|
| |
llvm-svn: 125169
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Registers are not allocated strictly in spill weight order when live range
splitting and spilling has created new shorter intervals with higher spill
weights.
When one of the new heavy intervals conflicts with a single lighter interval,
simply evict the old interval instead of trying to split the heavy one.
The lighter interval is a better candidate for splitting, it has a smaller use
density.
llvm-svn: 125151
|
| |
|
|
|
|
| |
This almost guarantees that the COPY will be coalesced.
llvm-svn: 125140
|
| |
|
|
| |
llvm-svn: 125137
|
| |
|
|
|
|
|
| |
The last split point can be anywhere in the block, so it interferes with the
strictly monotonic requirements of advanceTo().
llvm-svn: 125132
|
| |
|
|
|
|
| |
MemoryBuffer::getOpenFile to not close the file descriptor.
llvm-svn: 125128
|
| |
|
|
|
|
| |
(which worked around it). This should get us back to the old, correct behavior, though it will make the integrated assembler unhappy for the time being.
llvm-svn: 125127
|
| |
|
|
|
|
| |
Sonnenberger.
llvm-svn: 125120
|
| |
|
|
|
|
| |
instruction in a basic block.
llvm-svn: 125116
|
| |
|
|
|
|
|
|
|
| |
allocation.
This is a lot easier than trying to get kill flags right during live range
splitting and rematerialization.
llvm-svn: 125113
|
| |
|
|
| |
llvm-svn: 125109
|
| |
|
|
|
|
|
|
| |
register.
The target hook doesn't know how to do that. (Neither do I).
llvm-svn: 125108
|
| |
|
|
|
|
|
| |
anything but the simplest of cases, lower a 256-bit BUILD_VECTOR by
splitting it into 128-bit parts and recombining.
llvm-svn: 125105
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
are live.
If a live range is used by a terminator instruction, and that live range needs
to leave the block on the stack or in a different register, it can be necessary
to have both sides of the split live at the terminator instruction.
Example:
%vreg2 = COPY %vreg1
JMP %vreg1
Becomes after spilling %vreg2:
SPILL %vreg1
JMP %vreg1
The spill doesn't kill the register as is normally the case.
llvm-svn: 125102
|