1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

45391 Commits

Author SHA1 Message Date
Nick Lewycky
6380885ba1 Tolerate degenerate phi nodes that can occur in the middle of optimization
passes. Fixes PR9112. Patch by Jakub Staszak!

llvm-svn: 125319
2011-02-10 23:54:10 +00:00
Cameron Zwarich
38343ff97c If we can't avoid running loop-simplify twice for now, at least avoid running
iv-users twice.

llvm-svn: 125318
2011-02-10 23:53:14 +00:00
Cameron Zwarich
9d8ab7d0f7 Rename 'loopsimplify' to 'loop-simplify'.
llvm-svn: 125317
2011-02-10 23:38:10 +00:00
David Greene
ed6f0caa6d [AVX] Implement 256-bit vector lowering for SCALAR_TO_VECTOR. This
largely completes support for 128-bit fallback lowering for code that
is not 256-bit ready.

llvm-svn: 125315
2011-02-10 23:11:29 +00:00
Bruno Cardoso Lopes
7cc40009a8 Fix a lot of o32 CC issues and add a bunch of tests. Patch by Akira Hatanaka with some small modifications by me.
llvm-svn: 125292
2011-02-10 18:05:10 +00:00
David Greene
bb3702619c [AVX] Implement 256-bit vector lowering for EXTRACT_VECTOR_ELT.
llvm-svn: 125284
2011-02-10 16:57:36 +00:00
Che-Liang Chiou
762ff2a943 ptx: add passing parameter to kernel functions
llvm-svn: 125279
2011-02-10 12:01:24 +00:00
Chris Lattner
d2c1936c14 implement the first part of PR8882: when lowering an inbounds
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
2011-02-10 07:11:16 +00:00
Chris Lattner
63f1d56458 switch the constantexpr, target folder, and IRBuilder interfaces
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
2011-02-10 07:01:55 +00:00
Chris Lattner
6e84f48cd8 Enhance a bunch of transformations in instcombine to start generating
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
2011-02-10 05:36:31 +00:00
Chris Lattner
72ac244f4e Enhance the "compare with shift" and "compare with div"
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
2011-02-10 05:23:05 +00:00
Chris Lattner
0decae4bf7 more cleanups, notably bitcast isn't used for "signed to unsigned type
conversions". :)

llvm-svn: 125265
2011-02-10 05:17:27 +00:00
Chris Lattner
b974ff0c57 A bunch of cleanups and simplifications using the new PatternMatch predicates
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
2011-02-10 05:14:58 +00:00
Chris Lattner
c741c5d744 teach SimplifyDemandedBits that exact shifts demand the bits they
are shifting out since they do require them to be zeros.  Similarly
for NUW/NSW bits of shl

llvm-svn: 125263
2011-02-10 05:09:34 +00:00
Evan Cheng
5a42a6a20f After 3-addressifying a two-address instruction, update the register maps; add a missing check when considering whether it's profitable to commute. rdar://8977508.
llvm-svn: 125259
2011-02-10 02:20:55 +00:00
Eric Christopher
c86930fa03 Revert this in an attempt to bring the builders back.
llvm-svn: 125257
2011-02-10 01:48:24 +00:00
Cameron Zwarich
9e1e6813bd Turn this pass ordering:
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
2011-02-10 01:07:54 +00:00
Jakob Stoklund Olesen
52f108703d Delete unused code for analyzing and splitting around loops.
Loop splitting is better handled by the more generic global region splitting
based on the edge bundle graph.

llvm-svn: 125243
2011-02-09 23:56:18 +00:00
Douglas Gregor
0044fad1e6 Rip out realpath() support. It's expensive, and often a bad idea, and
I have another way to achieve the same goal.

llvm-svn: 125239
2011-02-09 23:33:15 +00:00
Jakob Stoklund Olesen
e4c85b1fd5 Simplify using the new leaveIntvBefore()
llvm-svn: 125238
2011-02-09 23:33:02 +00:00
Jakob Stoklund Olesen
2205510f0c Use the LiveBLocks array for SplitEditor::splitSingleBlocks() as well.
This fixes a bug where splitSingleBlocks() could split a live range after a
terminator instruction.

llvm-svn: 125237
2011-02-09 23:30:25 +00:00
Cameron Zwarich
7538a1fb4a Attempt to fix the build after r125228.
llvm-svn: 125236
2011-02-09 23:02:14 +00:00
Mikhail Glushenkov
e8ece9bd63 Typo.
llvm-svn: 125232
2011-02-09 22:55:48 +00:00
Jakob Stoklund Olesen
21624a745c Move calcLiveBlockInfo() and the BlockInfo struct into SplitAnalysis.
No functional changes intended.

llvm-svn: 125231
2011-02-09 22:50:26 +00:00
Douglas Gregor
75fafed2fd Add llvm::sys::path::canonical(), which provides the canonicalized
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
2011-02-09 22:11:23 +00:00
Jakob Stoklund Olesen
5c13598fd7 Ignore <undef> uses when analyzing and rewriting.
llvm-svn: 125226
2011-02-09 21:52:09 +00:00
Jakob Stoklund Olesen
9f7beb42a8 Assert on bad jump tables.
llvm-svn: 125225
2011-02-09 21:52:06 +00:00
Jakob Stoklund Olesen
16c11feb5a Add tags to live interval unions to avoid using stale queries.
The tag is updated whenever the live interval union is changed, and it is tested
before using cached information.

llvm-svn: 125224
2011-02-09 21:52:03 +00:00
Shantonu Sen
70e390fa15 Fix comparator used for looking up previously instantiated EDDisassemblers.
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
2011-02-09 21:03:19 +00:00
Duncan Sands
db22898512 Formatting and comment tweaks.
llvm-svn: 125200
2011-02-09 17:45:03 +00:00
Chris Lattner
02088f3ab8 Teach instsimplify some tricks about exact/nuw/nsw shifts.
improve interfaces to instsimplify to take this info.

llvm-svn: 125196
2011-02-09 17:15:04 +00:00
Chris Lattner
7468ab4b90 Rework InstrTypes.h so to reduce the repetition around the NSW/NUW/Exact
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
2011-02-09 17:00:45 +00:00
Chris Lattner
7a5307ec0b refactor ConstantExpr interfaces a bit around "exactness".
llvm-svn: 125190
2011-02-09 16:43:07 +00:00
David Greene
dafc330bf6 [AVX] Implement 256-bit vector lowering for INSERT_VECTOR_ELT.
llvm-svn: 125187
2011-02-09 15:32:06 +00:00
Richard Osborne
112cff2533 Add intrinsic for setc instruction on the XCore.
llvm-svn: 125186
2011-02-09 13:22:12 +00:00
Nick Lewycky
b162446cda When removing a function from the function set and adding it to deferred, we
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
2011-02-09 06:32:02 +00:00
NAKAMURA Takumi
55dd89bf51 lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in 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
2011-02-09 04:18:48 +00:00
NAKAMURA Takumi
26a6cce27e Windows/Windows.h: Redefine _WIN32_WINNT here. mingw-w64 tends to define it as 0x0502 in its headers.
llvm-svn: 125171
2011-02-09 04:18:30 +00:00
NAKAMURA Takumi
6a5d1afdb4 Windows/Program.inc: Eliminate the declaration of SetInformationJobObject(). It should be provided with _WIN32_WINNT>=0x0500.
llvm-svn: 125170
2011-02-09 04:18:21 +00:00
NAKAMURA Takumi
8648711e14 Windows/DynamicLibrary.inc: ELM_Callback fix for mingw-w64.
llvm-svn: 125169
2011-02-09 04:18:12 +00:00
Jakob Stoklund Olesen
d324b906a8 Evict a lighter single interference before attempting to split a live range.
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
2011-02-09 01:14:03 +00:00
Jakob Stoklund Olesen
5d66cf0c01 Set an allocation hint when rematting before a COPY.
This almost guarantees that the COPY will be coalesced.

llvm-svn: 125140
2011-02-09 00:25:36 +00:00
Jakob Stoklund Olesen
3433de2114 Fix one more case of splitting after the last split point.
llvm-svn: 125137
2011-02-08 23:26:48 +00:00
Jakob Stoklund Olesen
3da2844610 Reorganize interference code to check LastSplitPoint first.
The last split point can be anywhere in the block, so it interferes with the
strictly monotonic requirements of advanceTo().

llvm-svn: 125132
2011-02-08 23:02:58 +00:00
Rafael Espindola
43f9672afa Don't open the file again in the gold plugin. To be able to do this, update
MemoryBuffer::getOpenFile to not close the file descriptor.

llvm-svn: 125128
2011-02-08 22:40:47 +00:00
Owen Anderson
899a6d74bf Revert both r121082 (which broke a bunch of constant pool stuff) and r125074 (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
2011-02-08 22:39:40 +00:00
Benjamin Kramer
8ff71a1384 Support for .ifdef / .ifndef in the assembler parser. Patch by Joerg Sonnenberger.
llvm-svn: 125120
2011-02-08 22:29:56 +00:00
Jakob Stoklund Olesen
e0a74b3dcf Also handle the situation where an indirect branch is the first (and last)
instruction in a basic block.

llvm-svn: 125116
2011-02-08 21:46:11 +00:00
Jakob Stoklund Olesen
fe0a7ea3aa Add LiveIntervals::addKillFlags() to recompute kill flags after register allocation.
This is a lot easier than trying to get kill flags right during live range
splitting and rematerialization.

llvm-svn: 125113
2011-02-08 21:13:03 +00:00
Jakob Stoklund Olesen
5574089a0b Trim debug spew
llvm-svn: 125109
2011-02-08 19:33:58 +00:00
Jakob Stoklund Olesen
acdd9ab5ff Avoid folding a load instruction into an instruction that redefines the register.
The target hook doesn't know how to do that. (Neither do I).

llvm-svn: 125108
2011-02-08 19:33:55 +00:00
David Greene
1fc808c066 [AVX] Implement BUILD_VECTOR lowering for 256-bit vectors. For
anything but the simplest of cases, lower a 256-bit BUILD_VECTOR by
splitting it into 128-bit parts and recombining.

llvm-svn: 125105
2011-02-08 19:04:41 +00:00
Jakob Stoklund Olesen
d5ad17c42b Add SplitEditor::overlapIntv() to create small ranges where both registers 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
2011-02-08 18:50:21 +00:00
Jakob Stoklund Olesen
5a0048302f Add assertion.
llvm-svn: 125101
2011-02-08 18:50:18 +00:00
Andrew Trick
3286438277 Fix PostRA antidependence breaker.
Avoid using the same register for two def operands or and earlyclobber
def and use operand. This fixes PR8986 and improves on the prior fix
for rdar://problem/8959122.

llvm-svn: 125089
2011-02-08 17:39:46 +00:00
Evan Cheng
ce4ff6b69e Temporary workaround for a bad bug introduced by r121082 which replaced
t2LDRpci with t2LDRi12.
There are a couple of problems with this.
1. The encoding for the literal and immediate constant are different.
   Note bit 7 of the literal case is 'U' so it can be negative.
2. t2LDRi12 is now narrowed to tLDRpci before constant island pass is run.
   So we end up never using the Thumb2 instruction, which ends up creating a
   lot more constant islands.

llvm-svn: 125074
2011-02-08 03:07:03 +00:00
Dan Gohman
ae7dba9ba8 Don't split any loop backedges, including backedges of loops other than
the active loop. This is generally desirable, and it avoids trouble
in situations such as the testcase in PR9123, though the failure
mode depends on use-list order, so it is infeasible to test.

llvm-svn: 125065
2011-02-08 00:55:13 +00:00
Jakob Stoklund Olesen
a5e0ea6e4e Add LiveIntervals::shrinkToUses().
After uses of a live range are removed, recompute the live range to only cover
the remaining uses. This is necessary after rematerializing the value before
some (but not all) uses.

llvm-svn: 125058
2011-02-08 00:03:05 +00:00
Benjamin Kramer
04249128ab SimplifyCFG: Track the number of used icmps when turning a icmp chain into a switch. If we used only one icmp, don't turn it into a switch.
Also prevent the switch-to-icmp transform from creating identity adds, noticed by Marius Wachtler.

llvm-svn: 125056
2011-02-07 22:37:28 +00:00
Bruno Cardoso Lopes
0ce5b0f4a8 Add support for parsing dmb/dsb instructions
llvm-svn: 125055
2011-02-07 22:09:15 +00:00
Devang Patel
2c62329722 Remove comment about an argument that was removed couple of years ago.
llvm-svn: 125054
2011-02-07 21:58:52 +00:00
Bruno Cardoso Lopes
0695c35ca2 Remove the MCR asm parser hack and start using the custom target specific asm
parsing of operands introduced in r125030. As a small note, besides using a more
generic approach we can also have more descriptive output when debugging
llvm-mc, example:

mcr  p7, #1, r5, c1, c1, #4

note: parsed instruction:
  ['mcr', <ARMCC::al>,
          <coprocessor number: 7>,
          1,
          <register 73>,
          <coprocessor register: 1>,
          <coprocessor register: 1>,
          4]
llvm-svn: 125052
2011-02-07 21:41:25 +00:00
Chris Lattner
b641eb91a3 fix comment change.
llvm-svn: 125047
2011-02-07 20:03:14 +00:00
David Greene
597e995e8d [AVX] Insert/extract subvector lowering support. This includes a
couple of utility functions that will be used in other places for more
AVX lowering.

llvm-svn: 125029
2011-02-07 19:36:54 +00:00
Jason W Kim
1a423a93dc ARM/MC/ELF Lowercase .cpu attributes in .s, but make them uppercase in .o
llvm-svn: 125025
2011-02-07 19:07:11 +00:00
Evan Cheng
56b78e409e Fix an obvious typo which caused an isel assertion. rdar://8964854.
llvm-svn: 125023
2011-02-07 18:50:47 +00:00
Bob Wilson
65f4a70b82 Add codegen support for using post-increment NEON load/store instructions.
The vld1-lane, vld1-dup and vst1-lane instructions do not yet support using
post-increment versions, but all the rest of the NEON load/store instructions
should be handled now.

llvm-svn: 125014
2011-02-07 17:43:21 +00:00
Bob Wilson
46b105c6a2 Change VLD3/4 and VST3/4 for quad registers to not update the address register.
These operations are expanded to pairs of loads or stores, and the first one
uses the address register update to produce the address for the second one.
So far, the second load/store has also updated the address register, just
for convenience, since that output has never been used.  In anticipation of
actually supporting post-increment updates for these operations, this changes
the non-updating operations to use a non-updating load/store for the second
instruction.

llvm-svn: 125013
2011-02-07 17:43:15 +00:00
Bob Wilson
cdda05b3cc Fix some NEON instruction itineraries.
llvm-svn: 125012
2011-02-07 17:43:12 +00:00
Bob Wilson
b35115db20 Fix a comment: addrmode6 no longer includes the optional writeback flag.
llvm-svn: 125011
2011-02-07 17:43:09 +00:00
Bob Wilson
e742c362e3 Remove inaccurate comments: so_imm and t2_so_imm operands are not encoded
until the instructions are emitted or printed.

llvm-svn: 125010
2011-02-07 17:43:06 +00:00
Bob Wilson
382d661f6a Move code for OffsetCompare struct closer to where it is used.
llvm-svn: 125009
2011-02-07 17:43:03 +00:00
Chris Lattner
2fd09e3397 implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.
Factor some code better.

llvm-svn: 125006
2011-02-07 16:40:21 +00:00
Duncan Sands
7c3f34d524 Add an m_Div pattern for matching either a udiv or an sdiv and use it
to simplify the "(X/Y)*Y->X when the division is exact" transform.

llvm-svn: 125004
2011-02-07 09:36:32 +00:00
Jason W Kim
7342155b4c Teach ARM/MC/ELF about gcc compatible reloc output to get past odd linkage
failures with relocations.

The code committed is a first cut at compatibility for emitted relocations in
ELF .o.

Why do this? because existing ARM tools like emitting relocs symbols as
explicit relocations, not as section-offset relocs.

Result is that with these changes,
1) relocs are now substantially identical what to gcc outputs.
2) larger apps (including many spec2k tests) compile, cross-link, and pass

Added reminder fixme to tests for future conversion to .s form.

llvm-svn: 124996
2011-02-07 01:11:15 +00:00
Jason W Kim
b0d4492aa1 Rework some .ARM.attribute work for improved gcc compatibility.
Unified EmitTextAttribute for both Asm and Obj emission (.cpu only)
Added necessary cortex-A8 related attrs for codegen compat tests.

llvm-svn: 124995
2011-02-07 00:49:53 +00:00
Chris Lattner
1c1b342a62 teach instsimplify to transform (X / Y) * Y to X
when the div is an exact udiv.

llvm-svn: 124994
2011-02-06 22:05:31 +00:00
Chris Lattner
7b6a968f5d enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.

Nothing forms exact udivs yet though.  This is progress on PR8862

llvm-svn: 124992
2011-02-06 21:44:57 +00:00
Eric Christopher
b81307b728 Remove premature optimization that avoided calculating argument weights
if we weren't going to inline the function. The rest of the code using
this was removed.

Fixes PR9154.

llvm-svn: 124991
2011-02-06 21:27:46 +00:00
Anders Carlsson
61133e38a9 Simplify test, as suggested by Chris.
llvm-svn: 124990
2011-02-06 20:22:49 +00:00
Anders Carlsson
61f2126479 Remove a virtual inheritance case that clang can devirtualize fully now.
llvm-svn: 124989
2011-02-06 20:16:49 +00:00
Anders Carlsson
1eeebf1c22 When loading from a constant, fold inttoptr if the integer type and the resulting pointer type both have the same size.
llvm-svn: 124987
2011-02-06 20:11:56 +00:00
Nick Lewycky
7e863fb906 Simplify away redundant test, and document what's going on.
llvm-svn: 124977
2011-02-06 05:04:00 +00:00
Nick Lewycky
fb03aee332 Remove specialized comparison of InlineAsm objects. They're uniqued on creation
now, and this wasn't comparing some of their relevant bits anyhow.

llvm-svn: 124976
2011-02-06 04:33:50 +00:00
Anders Carlsson
96a35fc26e Fix another warning.
llvm-svn: 124961
2011-02-05 18:33:43 +00:00
Anders Carlsson
909058c68b Fix a clang warning.
llvm-svn: 124960
2011-02-05 18:19:35 +00:00
NAKAMURA Takumi
aa8b506820 Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.
config.h.* have conditions whether each symbol is defined or not.
Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw.

llvm-svn: 124950
2011-02-05 15:11:53 +00:00
NAKAMURA Takumi
07a84f5950 Target/X86: Tweak allocating shadow area (aka home) on Win64. It must be enough for caller to allocate one.
llvm-svn: 124949
2011-02-05 15:11:32 +00:00
NAKAMURA Takumi
5ae1b1d643 lib/Target/X86/X86ISelLowering.cpp: Introduce a new variable "IsWin64". No functional changes.
llvm-svn: 124948
2011-02-05 15:11:13 +00:00
NAKAMURA Takumi
4f4192b398 lib/Target/X86/X86JITInfo.cpp: Add Win64 stuff.
llvm-svn: 124947
2011-02-05 15:11:03 +00:00
NAKAMURA Takumi
c4522ab931 Target/X86: Fix whitespace.
llvm-svn: 124946
2011-02-05 15:10:54 +00:00
NAKAMURA Takumi
6008a70d4a Windows/Program.inc: Quote arguments when dubious characters (used by cmd.exe or MSYS shell) are included to invoke CreateProcess(). Thanks to Danil Malyshev.
llvm-svn: 124945
2011-02-05 08:53:12 +00:00
Andrew Trick
2cdb14d30b Fix an anti-dep breaker corner case.
<rdar://problem/8959122> illegal register operands for UMULL instruction in cfrac nightly test
I'm stil working on a unit test, but the case is:
rx = movcc rx, r3
r2 = ldr
r2, r3 = umull r2, r2

The anti-dep breaker should not convert this into an illegal instruction:
r2, r2 = umull

llvm-svn: 124932
2011-02-05 02:58:46 +00:00
Eric Christopher
6dbf0c6bbe Fix cut and paste error spotted by Jakob.
llvm-svn: 124930
2011-02-05 02:48:47 +00:00
Jakob Stoklund Olesen
2a26f7f183 Be more strict about the first/last interference-free use.
If the interference overlaps the instruction, we cannot separate it.

llvm-svn: 124918
2011-02-05 01:06:39 +00:00
Jakob Stoklund Olesen
99be342f10 Add assertions to verify that the new interval is clear of the interference.
If these inequalities don't hold, we are creating a live range split that won't
allocate.

llvm-svn: 124917
2011-02-05 01:06:36 +00:00
Eric Christopher
ddc2157034 Rewrite how the indirect call bonus is handled. This now works by:
a) Making it a per call site bonus for functions that we can move from
indirect to direct calls.
b) Reduces the bonus from 500 to 100 per call site.
c) Subtracts the size of the possible newly inlineable call from the
bonus to only add a bonus if we can inline a small function to devirtualize
it.

Also changes the bonus from a positive that's subtracted to a negative
that's added.

Fixes the remainder of rdar://8546196 by reducing the object file size
after inlining by 84%.

llvm-svn: 124916
2011-02-05 00:49:15 +00:00
David Greene
50efbf730f [AVX] Revert 124910 until clients are ready.
llvm-svn: 124912
2011-02-05 00:24:41 +00:00
David Greene
0b0ec3aed7 [AVX] Add some utilities to insert and extract 128-bit subvectors.
This allows us to easily support 256-bit operations that don't have
native 256-bit support.  This applies to integer operations, certain
types of shuffles and various othher things.

llvm-svn: 124910
2011-02-04 23:29:33 +00:00
Jakob Stoklund Olesen
b416dbf12e Apparently, it is possible for a block with a landing pad successor to have no calls.
In that case we simply ignore the landing pad and split live ranges before the
first terminator.

llvm-svn: 124907
2011-02-04 23:11:13 +00:00