Commit Graph

14421 Commits

Author SHA1 Message Date
Evan Cheng e5fcd333da Indentation and remove dead code.
llvm-svn: 106362
2010-06-19 00:11:54 +00:00
Bruno Cardoso Lopes 1888f11887 Clean up: remove now unnecessary Constraints
llvm-svn: 106361
2010-06-19 00:09:27 +00:00
Dan Gohman 5fc43eb186 Silence compiler warnings.
llvm-svn: 106360
2010-06-19 00:02:06 +00:00
Bruno Cardoso Lopes 502c4fe61c more refactoring! yay! big win over the intrinsics
llvm-svn: 106359
2010-06-19 00:00:22 +00:00
Eric Christopher 6bdbdb5544 Remove isTwoAddress from here too.
llvm-svn: 106358
2010-06-18 23:56:07 +00:00
Bruno Cardoso Lopes 66d2d57d9b Fix typo, SSE1 should be used by XS, not SSE2
llvm-svn: 106357
2010-06-18 23:53:27 +00:00
Eric Christopher 3577c1b811 Remove isTwoAddress from 64-bit files.
llvm-svn: 106356
2010-06-18 23:51:21 +00:00
Evan Cheng 119824ed4d Move ARM if-conversion before post-ra scheduling.
llvm-svn: 106355
2010-06-18 23:32:07 +00:00
Dan Gohman 8693650422 Teach regular and fast isel to set dead flags on unused implicit defs
on calls and similar instructions.

llvm-svn: 106353
2010-06-18 23:28:01 +00:00
Bruno Cardoso Lopes 2bfad417a1 Apply some refactor to packed instructions
llvm-svn: 106349
2010-06-18 23:13:35 +00:00
Evan Cheng 4f0781c9b3 Update cmake list.
llvm-svn: 106348
2010-06-18 23:12:10 +00:00
Evan Cheng 285935939d Thumb2 hazard recognizer.
llvm-svn: 106347
2010-06-18 23:11:35 +00:00
Evan Cheng 2d51c7c592 Allow ARM if-converter to be run after post allocation scheduling.
- This fixed a number of bugs in if-converter, tail merging, and post-allocation
  scheduler. If-converter now runs branch folding / tail merging first to
  maximize if-conversion opportunities.
- Also changed the t2IT instruction slightly. It now defines the ITSTATE
  register which is read by instructions in the IT block.
- Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
  change the instruction ordering in the IT block (since IT mask has been
  finalized). It also ensures no other instructions can be scheduled between
  instructions in the IT block.

This is not yet enabled.

llvm-svn: 106344
2010-06-18 23:09:54 +00:00
Jim Grosbach a57c2885cf back-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)
llvm-svn: 106342
2010-06-18 23:03:10 +00:00
Jim Grosbach 6860bb7796 Enable Expand handling of atomics for subtargets that can't do them inline.
llvm-svn: 106336
2010-06-18 22:35:32 +00:00
Bruno Cardoso Lopes 871439abd2 Use the new 'defm' class inheritance in SSE
llvm-svn: 106327
2010-06-18 22:10:11 +00:00
Bob Wilson a92e41a50a Rewrite chained if's as switches and replace assertions with llvm_unreachable
(as suggested in radar 8104405).

llvm-svn: 106318
2010-06-18 21:32:42 +00:00
Dale Johannesen 589ffb4902 Fix ARM/Thumb reversal in previous attempt.
llvm-svn: 106314
2010-06-18 21:07:47 +00:00
Jakob Stoklund Olesen 22a212f97c When using ADDri to get the address of a stack object, 255 is a conservative
limit on the offset that can be materialized without using the register
scavenger.

llvm-svn: 106312
2010-06-18 20:59:25 +00:00
Dan Gohman a46d607545 Make this comment less specific.
llvm-svn: 106311
2010-06-18 20:45:41 +00:00
Dan Gohman af4903d6ee Fix X86FastISel's address-mode folding to stay within the
original basic block. This avoids trouble with examining
instructions in other basic blocks which haven't been
assigned registers yet.

llvm-svn: 106310
2010-06-18 20:44:47 +00:00
Dale Johannesen a06c2f79fc An attempt to fix the problem Anton reported with
ARM tail calls.  Don't know if it works, but it
doesn't break Darwin.

llvm-svn: 106309
2010-06-18 20:44:28 +00:00
Dale Johannesen c1570dda5c Enable tail calls on ARM by default, with some
basic tests.

This has been well tested on Darwin but not elsewhere.
It should work provided the linker correctly resolves
  B.W  <label in other function>
which it has not seen before, at least from llvm-based
compilers.  I'm leaving the arm-tail-calls switch in
until I see if there's any problems because of that;
it might need to be disabled for some environments.

llvm-svn: 106299
2010-06-18 19:00:18 +00:00
Dan Gohman 882bb2984e Start TargetRegisterClass indices at 0 instead of 1, so that
MachineRegisterInfo doesn't have to confusingly allocate an extra
entry.

llvm-svn: 106296
2010-06-18 18:13:55 +00:00
Dale Johannesen 3ac52b3e43 Last round of changes for ARM tail calls.
Not turning them on yet.

llvm-svn: 106295
2010-06-18 18:13:11 +00:00
Jakob Stoklund Olesen b9f91667e1 Treat the ARM inline asm {cc} constraint as a physreg (%CPSR), just like X86
does for {flags}. If we create virtual registers of the CCR class, RegAllocFast
may try to spill them, and we can't do that.

llvm-svn: 106289
2010-06-18 16:49:33 +00:00
Dan Gohman 92c11acdb8 Change UpdateNodeOperands' operand and return value from SDValue to
SDNode *, since it doesn't care about the ResNo value.

llvm-svn: 106282
2010-06-18 15:30:29 +00:00
Dan Gohman c3479f5342 Delete unused variables.
llvm-svn: 106280
2010-06-18 14:32:32 +00:00
Dan Gohman f1d8304fe3 Eliminate unnecessary uses of getZExtValue().
llvm-svn: 106279
2010-06-18 14:22:04 +00:00
Dan Gohman 35b6f9a929 isValueValidForType can be a static member function.
llvm-svn: 106278
2010-06-18 14:01:07 +00:00
Eric Christopher 67d25f91c5 Some assorted isTwoAddress -> Constraints cleanup.
llvm-svn: 106273
2010-06-18 02:41:19 +00:00
Dan Gohman 99ba4dac59 Don't maintain a set of deleted nodes; instead, use a HandleSDNode
to track a node over CSE events. This fixes PR7368.

llvm-svn: 106266
2010-06-18 01:24:29 +00:00
Bruno Cardoso Lopes 2323168705 Add {mix,max}{ss,sd}{rr,rm} AVX forms.
llvm-svn: 106264
2010-06-18 01:12:56 +00:00
Dan Gohman b92156d5e4 Fold the ShrinkDemandedOps pass into the regular DAGCombiner pass,
which is faster, simpler, and less surprising.

llvm-svn: 106263
2010-06-18 01:05:21 +00:00
Bruno Cardoso Lopes 6b98f7129f Use new tablegen resources in SSE tablegen code. This will
be done incrementally and intermixed with the adding of more
AVX instructions. This is a first step in that direction

llvm-svn: 106251
2010-06-17 23:05:30 +00:00
Stuart Hastings 0125b6410a Add a DebugLoc parameter to TargetInstrInfo::InsertBranch(). This
addresses a longstanding deficiency noted in many FIXMEs scattered
across all the targets.

This effectively moves the problem up one level, replacing eleven
FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path
through FastISel where we actually supply a DebugLoc, fixing Radar
7421831.

llvm-svn: 106243
2010-06-17 22:43:56 +00:00
Jim Grosbach 5712c77c89 Thumb1 and any pre-v6 ARM target should use the libcall expansion of
ISD::MEMBARRIER. v7 and v7 ARM mode continue to use the custom lowering.

llvm-svn: 106204
2010-06-17 02:02:03 +00:00
Jim Grosbach 6e758c97fd simplify code a bit and add a more explanatory assert for cases that
previously would result in 'cannot yet select' errors.

llvm-svn: 106199
2010-06-17 01:37:00 +00:00
Eric Christopher 29b58afdf1 Hack to let the move lowering handle dynamic-no-pic absolute moves of
TLVP:

movl _a@TLVP, %eax

Daniel: Please review if you get a chance.
llvm-svn: 106194
2010-06-17 00:51:48 +00:00
Jim Grosbach e3864cc15e format and 80-column cleanup
llvm-svn: 106173
2010-06-16 23:45:49 +00:00
Jakob Stoklund Olesen 2334144e6e Don't attempt preserving conservative kill flags. We were doing it wrong.
This is before LiveVariables anyway, where these kill flags are recalculated.

llvm-svn: 106157
2010-06-16 22:11:08 +00:00
Bob Wilson 01ac8f9fc0 Remove the hidden "neon-reg-sequence" option. The reg sequences are working
now, so there's no need to disable them.

llvm-svn: 106155
2010-06-16 21:34:01 +00:00
Benjamin Kramer 41476410c9 TODO--
llvm-svn: 106102
2010-06-16 15:47:00 +00:00
Evan Cheng f128bdcb55 Make post-ra scheduling, anti-dep breaking, and register scavenger (conservatively) aware of predicated instructions. This enables ARM to move if-conversion before post-ra scheduler.
llvm-svn: 106091
2010-06-16 07:35:02 +00:00
Bill Wendling 8c0cf0994d Create a more targeted fix for not sinking instructions into a range where it
will conflict with another live range. The place which creates this scenerio is
the code in X86 that lowers a select instruction by splitting the MBBs. This
eliminates the need to check from the bottom up in an MBB for live pregs.

llvm-svn: 106066
2010-06-15 23:46:31 +00:00
Eric Christopher 6c4d63e1a5 For 32-bit non-pic tlv mach-o addressing we don't need a pic base or
a relative address.

llvm-svn: 106064
2010-06-15 23:08:42 +00:00
Dale Johannesen 438c35b5d1 Add file missing from previous commit.
llvm-svn: 106058
2010-06-15 22:24:08 +00:00
Dale Johannesen 44f9dfc9cf Next round of tail call changes. Register used in a tail
call must not be callee-saved; following x86, add a new
regclass to represent this.  Also fixes a couple of bugs.
Still disabled by default; Thumb doesn't work yet.

llvm-svn: 106053
2010-06-15 22:08:33 +00:00
Dale Johannesen 89456b2612 Reapply 105986 with fix for bug pointed out by Jakob:
flag argument to addReg is not the same format as flags attached
to MachineOperand, although both have the same info.  I don't
think this actually mattered; the bootstrap failure did not
reproduce on the next run anyway.

llvm-svn: 106049
2010-06-15 21:36:43 +00:00
Chris Lattner 874c92bd47 fix fastisel to handle GS and FS relative pointers. Patch by
Nelson Elhage!

llvm-svn: 106031
2010-06-15 19:08:40 +00:00
Bob Wilson f3f7a770b7 Add basic support for NEON modified immediates besides VMOV.
llvm-svn: 106030
2010-06-15 19:05:35 +00:00
Daniel Dunbar 0904134252 Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.
llvm-svn: 105994
2010-06-15 14:50:42 +00:00
Bob Wilson 1478142485 VMOVQQ and VMOVQQQQ are pseudo instructions and not predicable.
llvm-svn: 105990
2010-06-15 05:51:27 +00:00
Dale Johannesen 3f253d2353 Revert 105986; looks like I'd better try bootstrapping.
llvm-svn: 105988
2010-06-15 04:55:06 +00:00
Dale Johannesen c338ef2b65 The form of BuildMI used for TAILJMPr was changing the register
containing the target address, an input, into an output.  I don't
think this actually broke anything on x86 (it does on ARM), but
it's wrong.

llvm-svn: 105986
2010-06-15 03:13:49 +00:00
Jim Grosbach f14e08b01b Make sure to skip dbg_value instructions when finding an insertion point for
the combined load/store instruction. rdar://7797940

llvm-svn: 105982
2010-06-15 00:41:09 +00:00
Bob Wilson 5b2b504038 Rename functions referring to VMOV immediates to refer to NEON "modified
immediate" operands.  These functions have so far only been used for VMOV
but they also apply to other NEON instructions with modified immediate
operands.  No functional changes.

llvm-svn: 105969
2010-06-14 22:19:57 +00:00
Chris Lattner faa7bdccbf fix a nasty bug where we were not treating available_externally
symbols as declarations in the X86 backend.  This would manifest
on darwin x86-32 as errors like this with -fvisibility=hidden:

symbol '__ZNSbIcED1Ev' can not be undefined in a subtraction expression

This fixes PR7353.

llvm-svn: 105954
2010-06-14 20:11:56 +00:00
Chris Lattner 58c09b2859 fix a -Wbool-conversions warning from clang.
llvm-svn: 105943
2010-06-14 18:28:57 +00:00
Eli Friedman ba1f1fcae5 Add back some possible optimizations for va_arg, with wording that makes it
more clear what exactly is missing.

llvm-svn: 105934
2010-06-14 07:03:30 +00:00
Rafael Espindola e302f833e1 Merge getStoreRegOpcode and getLoadRegOpcode.
llvm-svn: 105900
2010-06-12 20:13:29 +00:00
Eli Friedman e17e4aea2a Add README entry; based on testcase from Bill Hart.
llvm-svn: 105878
2010-06-12 05:54:27 +00:00
Bruno Cardoso Lopes ada854f8b6 make the avx intrinsics 3 address
llvm-svn: 105876
2010-06-12 03:12:14 +00:00
Bruno Cardoso Lopes f203703467 Add some basic fp intrinsics for AVX
llvm-svn: 105873
2010-06-12 02:38:32 +00:00
Bruno Cardoso Lopes a714ea0f7d More AVX: {ADD,SUB,MUL,DIV}{PD,PS}rm
llvm-svn: 105870
2010-06-12 01:53:48 +00:00
Bruno Cardoso Lopes b06f54b852 More AVX: {ADD,SUB,MUL,DIV}{PD,PS}rr
Handle OpSize TSFlag for AVX

llvm-svn: 105869
2010-06-12 01:23:26 +00:00
Bruno Cardoso Lopes 8947c32493 Add some comments about REX fields
llvm-svn: 105860
2010-06-12 00:03:52 +00:00
Bruno Cardoso Lopes fd5458d4bd More AVX instructions ({ADD,SUB,MUL,DIV}{SS,SD}rm)
Introduce the VEX_X field

llvm-svn: 105859
2010-06-11 23:50:47 +00:00
Bob Wilson f07d33d8f1 Add a missing bitcast. This code used to only handle conversions between
i64 and f64 types, but now it also handle Neon vector types, so the f64 result
of VMOVDRR may need to be converted to a Neon type.  Radar 8084742.

llvm-svn: 105845
2010-06-11 22:45:25 +00:00
Bob Wilson 6eae520de9 Add instruction encoding for the Neon VMOV immediate instruction. This changes
the machine instruction representation of the immediate value to be encoded
into an integer with similar fields as the actual VMOV instruction.  This makes
things easier for the disassembler, since it can just stuff the bits into the
immediate operand, but harder for the asm printer since it has to decode the
value to be printed.  Testcase for the encoding will follow later when MC has
more support for ARM.

llvm-svn: 105836
2010-06-11 21:34:50 +00:00
Evan Cheng 2901371c32 Delete code that's not safe.
llvm-svn: 105774
2010-06-10 02:08:20 +00:00
Jim Grosbach 5fa0158ecd be slightly more subtle about skipping dbg_value instructions; otherwise, if a
dbg_value immediately follows a sequence of ldr/str instructions that should
be combined into an ldm/stm and is the last instruction in the block, then
combine may end up being skipped.

llvm-svn: 105758
2010-06-09 22:21:24 +00:00
Evan Cheng a0746bd50a Allow target to place 2-address pass inserted copies in better spots. Thumb2 will use this to try to avoid breaking up IT blocks.
llvm-svn: 105745
2010-06-09 19:26:01 +00:00
Kalle Raiskila 5e0862f7f5 Fix SPU to cope with vector insertelement to an undef position.
We default to inserting to lane 0.

llvm-svn: 105722
2010-06-09 09:58:17 +00:00
Kalle Raiskila 056113a211 Handle loading from/storing to undef pointers on SPU by inserting a
random load/store, rather than crashing llc.

llvm-svn: 105710
2010-06-09 08:29:41 +00:00
Evan Cheng 83c64ee8de Typo.
llvm-svn: 105677
2010-06-09 03:49:12 +00:00
Eli Friedman ab44d1281a A few new x86-64 specific README entries.
llvm-svn: 105674
2010-06-09 02:43:17 +00:00
Evan Cheng 47cd593023 Thumb2 IT blocks are fairly expensive. When there are multiple selects using
the same condition, it's important to make sure they are scheduled together
to avoid forming multiple IT blocks. I'm adding a pre-regalloc pass that forms
IT blocks early (by re-scheduling instructions and split basic blocks) to
attempt to fix this. This is not turned on by default since I am not sure this
is the right fix.

Another issue is llvm selects are modeled as two-address conditional moves.
This can be very bad when the copies before the conditional moves are not
coalesced away. Teach IT formation pass to move the copies above the IT block
(when legal) to avoid breaking the IT block.

llvm-svn: 105669
2010-06-09 01:46:50 +00:00
Kevin Enderby 0de0f3fc02 Incremental improvement to the handling of the x86 "Jump if rCX Zero"
instruction.  Added the 64-bit version "jrcxz" so it is recognized and also
added the checks for incorrect uses of "jcxz" in 64-bit mode and "jrcxz" in
32-bit mode.  Still to do is to correctly handle the encoding of the
instruction adding the Address-size override prefix byte, 0x67, when the width
of the count register is not the same as the mode the machine is running in.
Which for example means the encoding of "jecxz" depends if you are assembling
as a 32-bit target or a 64-bit target.

llvm-svn: 105661
2010-06-08 23:48:44 +00:00
Eric Christopher 6ab55c5683 Split out these asserts so it's more apparent why we're not assembling
that rip-relative address when executing in 32-bit mode.

llvm-svn: 105656
2010-06-08 22:57:33 +00:00
Jim Grosbach 8fe3cc8055 fix copy/paste/modify think-o
llvm-svn: 105653
2010-06-08 22:53:32 +00:00
Bruno Cardoso Lopes c2f87b7bb2 Reapply r105521, this time appending "LLU" to 64 bit
immediates to avoid breaking the build.

llvm-svn: 105652
2010-06-08 22:51:23 +00:00
Eric Christopher 89d103a8ce Ensure that mov and not lea are used to stick the address into
the register.  While we're at it, make sure it's in the right one.

llvm-svn: 105645
2010-06-08 22:04:25 +00:00
Jim Grosbach 57c6fd452e fix typo
llvm-svn: 105634
2010-06-08 20:06:55 +00:00
Kalle Raiskila 6c40caf729 Flag SPU's function call sequence together.
Discussed here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-June/032107.html

llvm-svn: 105601
2010-06-08 07:55:16 +00:00
Bob Wilson 0271c5928e Fix up a comment.
llvm-svn: 105591
2010-06-08 00:42:08 +00:00
Bob Wilson 846bd7992c Further changes for Neon vector shuffles:
- change isShuffleMaskLegal to show that all shuffles with 32-bit and 64-bit
  elements are legal
- the Neon shuffle instructions do not support 64-bit elements, but we were
  not checking for that before lowering shuffles to use them
- remove some 64-bit element vduplane patterns that are no longer needed

llvm-svn: 105586
2010-06-07 23:53:38 +00:00
Jim Grosbach 723d242a95 Handle dbg_value instructions (i.e., skip them) when generating IT blocks.
rdar://7797940

llvm-svn: 105557
2010-06-07 21:48:47 +00:00
Bill Wendling a3bba3371a Create new accessors to get arguments for call/invoke instructions. It breaks
encapsulation to force the users of these classes to know about the internal
data structure of the Operands structure. It also can lead to errors, like in
the MSIL writer.

llvm-svn: 105539
2010-06-07 19:05:06 +00:00
Duncan Sands e4f45cc88f This bug is also present in MSVC10. Requested by Elrood on IRC.
llvm-svn: 105527
2010-06-05 12:40:43 +00:00
Chris Lattner fdd2614330 revert r105521, which is breaking the buildbots with stuff like this:
In file included from X86InstrInfo.cpp:16:
X86GenInstrInfo.inc:2789: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2790: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2792: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2793: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2808: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2809: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2816: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2817: error: integer constant is too large for 'long' type

llvm-svn: 105524
2010-06-05 04:17:30 +00:00
Bruno Cardoso Lopes 594fa26317 Initial AVX support for some instructions. No patterns matched
yet, only assembly encoding support.

llvm-svn: 105521
2010-06-05 03:53:24 +00:00
Dale Johannesen 81ef35b3ca Improvements to tail call code. No functional effect
unless using -arm-tail-calls.

llvm-svn: 105515
2010-06-05 00:51:39 +00:00
Dale Johannesen df1a7f83bf Fix some liveout handling related to tail calls, see comments.
I don't think this ever resulted in problems on x86, but it
would on ARM.

llvm-svn: 105509
2010-06-05 00:30:45 +00:00
Dale Johannesen d1b9311afa More thoroughly disable tails calls by default.
8060143, although this doesn't fix the real problem with tail call.

llvm-svn: 105472
2010-06-04 18:04:24 +00:00
Jim Grosbach 3548803f62 Another fix to prevent debug info from affecting codegen. rdar://7797940
llvm-svn: 105470
2010-06-04 17:57:34 +00:00
Jim Grosbach 4e5e6a8973 more dbg_value adjustments so debug info doesn't affect codegen
llvm-svn: 105454
2010-06-04 01:23:30 +00:00
Jim Grosbach 1bcdf32d22 fix typo
llvm-svn: 105441
2010-06-04 00:15:00 +00:00
Bob Wilson d8a9a04739 For NEON vectors with 32- or 64-bit elements, select BUILD_VECTORs and
VECTOR_SHUFFLEs to REG_SEQUENCE instructions.  The standard ISD::BUILD_VECTOR
node corresponds closely to REG_SEQUENCE but I couldn't use it here because
its operands do not get legalized.  That is pretty awful, but I guess it
makes sense for other targets.  Instead, I have added an ARM-specific version
of BUILD_VECTOR that will have its operands properly legalized.
This fixes the rest of Radar 7872877.

llvm-svn: 105439
2010-06-04 00:04:02 +00:00
Jim Grosbach b30b81edb6 Teach the ARM load-store optimizer to deal with dbg_value instructions.
llvm-svn: 105427
2010-06-03 22:41:15 +00:00
Dale Johannesen d679ff7330 Early implementation of tail call for ARM.
A temporary flag -arm-tail-calls defaults to off,
so there is no functional change by default.
Intrepid users may try this; simple cases work
but there are bugs.

llvm-svn: 105413
2010-06-03 21:09:53 +00:00
Eric Christopher b0e1a458ce Add first pass at darwin tls compiler support.
llvm-svn: 105381
2010-06-03 04:07:48 +00:00
Eli Friedman ceb13f2af3 Remove some already-fixed README entries.
llvm-svn: 105377
2010-06-03 01:47:31 +00:00
Eli Friedman a59b7a72b9 Remove README entry which no longer compiles to something sane.
llvm-svn: 105376
2010-06-03 01:16:51 +00:00
Eli Friedman 1f41303260 Remove a fixed item, update a couple partially-fixed items.
llvm-svn: 105375
2010-06-03 01:01:48 +00:00
Jakob Stoklund Olesen a8ad97743d Slightly change the meaning of the reMaterialize target hook when the original
instruction defines subregisters.

Any existing subreg indices on the original instruction are preserved or
composed with the new subreg index.

Also substitute multiple operands mentioning the original register by using the
new MachineInstr::substituteRegister() function. This is necessary because there
will soon be <imp-def> operands added to non read-modify-write partial
definitions. This instruction:

  %reg1234:foo = FLAP %reg1234<imp-def>

will reMaterialize(%reg3333, bar) like this:

  %reg3333:bar-foo = FLAP %reg333:bar<imp-def>

Finally, replace the TargetRegisterInfo pointer argument with a reference to
indicate that it cannot be NULL.

llvm-svn: 105358
2010-06-02 22:47:25 +00:00
Jim Grosbach 84511e1526 Clean up 80 column violations. No functional change.
llvm-svn: 105350
2010-06-02 21:53:11 +00:00
Rafael Espindola f2dffcef82 Remove the TargetRegisterClass member from CalleeSavedInfo
llvm-svn: 105344
2010-06-02 20:02:30 +00:00
Eli Friedman 6e3d5af945 Fix comment so it doesn't include comments which are irrelevant to the x86
backend.  Add a FIXME noting what can be fixed here.

llvm-svn: 105342
2010-06-02 19:35:46 +00:00
Dan Gohman a690618c58 Use comments to document non-obvious code rather than
mailing list archives.

llvm-svn: 105341
2010-06-02 19:13:40 +00:00
Bob Wilson 2d35a9e810 Rename canCombinedSubRegIndex method to something more grammatically correct
and tidy up the comment describing it.

llvm-svn: 105339
2010-06-02 18:54:47 +00:00
Rafael Espindola 94801a47f8 Replace ARM's getCalleeSavedRegClasses with a simpler solution
llvm-svn: 105335
2010-06-02 17:54:50 +00:00
Rafael Espindola 7881a64a50 Remove unused function.
llvm-svn: 105325
2010-06-02 15:44:20 +00:00
Rafael Espindola ef2b6ce00a cleanup
llvm-svn: 105322
2010-06-02 13:53:17 +00:00
Rafael Espindola c08ecba597 Remove uses of getCalleeSavedRegClasses from outside the
backends and removes the virtual declaration. With that out of the way
I should be able to cleanup one backend at a time.

llvm-svn: 105321
2010-06-02 12:39:06 +00:00
Eli Friedman 526e6d045f Don't try to custom-lower 64-bit add-with-overflow and friends on x86-32; the
x86 backend currently doesn't know how to handle them.

This doesn't really fix anything because LegalizeTypes doesn't know how to
handle them either.  We do get a better error message, though.

llvm-svn: 105305
2010-06-02 00:27:18 +00:00
Eli Friedman 6382c9c681 Remove outdated README entries.
llvm-svn: 105303
2010-06-02 00:10:36 +00:00
Dan Gohman 47a0724425 Fix the allocation of shadow space for the Win64 calling convention
in X86FastISel. Patch by Jan Sjodin.

llvm-svn: 105290
2010-06-01 21:09:47 +00:00
Bruno Cardoso Lopes d44677ba69 Refactor some SSE 2 unpack instructions
llvm-svn: 105276
2010-06-01 17:02:50 +00:00
Kalle Raiskila 8916358f97 Fix handling of 'load' nodes.
llvm-svn: 105269
2010-06-01 13:34:47 +00:00
Anton Korobeynikov a09d95412e Some A9 load/store cleanups
llvm-svn: 105109
2010-05-29 19:25:39 +00:00
Anton Korobeynikov 2a21aef8f2 Some rough approximations for load/stores on A9
llvm-svn: 105108
2010-05-29 19:25:34 +00:00
Anton Korobeynikov d4c7cceb70 NEON/VFP stuff can be issued only via Pipe1 on A9
llvm-svn: 105107
2010-05-29 19:25:29 +00:00
Anton Korobeynikov 94d7fd88fd Add some integer instruction itineraries for A9
llvm-svn: 105106
2010-05-29 19:25:17 +00:00
Evan Cheng 27c4933e02 Fix PR7193: if sibling call address can take a register, make sure there are enough registers available by counting inreg arguments.
llvm-svn: 105092
2010-05-29 01:35:22 +00:00
Jakob Stoklund Olesen e02996ca8f Merge the SystemZ subreg_even32 SubRegIndex into subreg_32bit. The SubRegIndices
were overspecified when inheriting sub-subregisters, for instance:

R0Q:subreg_even32 = R0Q:subreg_32bit = R0Q:subreg_even:subreg_32bit.

This meant that composeSubRegIndices(subreg_even, subreg_32bit) was ambiguous.

llvm-svn: 105063
2010-05-28 23:48:29 +00:00
Evan Cheng bf91499f1a Schedule high latency instructions for latency reduction even if they are not vfp / NEON instructions.
llvm-svn: 105060
2010-05-28 23:25:23 +00:00
Dale Johannesen e8be73f3e7 Fix comment typos.
llvm-svn: 105059
2010-05-28 23:24:28 +00:00
Bruno Cardoso Lopes 1f79289806 More SSE 1 & 2 merge, this time with logical instructions
llvm-svn: 105014
2010-05-28 22:47:03 +00:00
Kevin Enderby 4c71e08ed8 MC/X86: Add alias for movzx.
llvm-svn: 105005
2010-05-28 21:20:21 +00:00
Kevin Enderby b29228905f MC/X86: Add alias for fwait.
llvm-svn: 105001
2010-05-28 20:59:10 +00:00
Kevin Enderby 76413597a9 Fix the use of x86 control and debug registers so that the assertion failure in
getX86RegNum() does not happen.  Patch by Shantonu Sen!

llvm-svn: 104994
2010-05-28 19:01:27 +00:00
Jim Grosbach b342e09b5e correct retattr
llvm-svn: 104980
2010-05-28 18:03:48 +00:00
Jim Grosbach 0b20fdaff0 Cosmetic cleanup. No functional change.
llvm-svn: 104974
2010-05-28 17:51:20 +00:00
Jim Grosbach 37eb2c24b9 make sure accesses to set up the jmpbuf don't get moved after it by the scheduler. Add a missing \n.
llvm-svn: 104967
2010-05-28 17:37:40 +00:00
Bob Wilson b6112e8706 Add the cc_out operand for t2RSBrs instructions. I missed this when I changed
the instruction class for t2RSB to add that operand in svn r104582.
Radar 8033757.

llvm-svn: 104907
2010-05-28 00:27:15 +00:00
Jim Grosbach faa3abbe39 Update the saved stack pointer in the sjlj function context following either
an alloca() or an llvm.stackrestore(). rdar://8031573

llvm-svn: 104900
2010-05-27 23:49:24 +00:00
Evan Cheng c2ebe0334a Use report_fatal_error, not llvm_unreachable.
llvm-svn: 104899
2010-05-27 23:45:31 +00:00
Jim Grosbach c9f532dddc back out 104862/104869. Can reuse stacksave after all. Very cool.
llvm-svn: 104897
2010-05-27 23:11:57 +00:00
Evan Cheng 3d3ee87d4e llvm can't correctly support 'H', 'Q' and 'R' modifiers. Just mark it an error.
llvm-svn: 104891
2010-05-27 22:08:38 +00:00
Kevin Enderby 9738f64bd9 MC/X86: Add aliases for Jcc variants.
llvm-svn: 104890
2010-05-27 21:33:19 +00:00
Bob Wilson 40e62dfdc0 Fix some bad fall-throughs in a switch statement. Both the 'Q' and 'R' cases
should fall through to the 'H' case, but instead 'Q' was falling through to 'R'
so that it would do the wrong thing for a big-endian ARM target.

llvm-svn: 104883
2010-05-27 20:23:42 +00:00
Dale Johannesen 9e43c07bc5 Mark some math lib intrinsic nodes Legal on SSE4.1.
No functional effect as these nodes are not generated yet.

llvm-svn: 104879
2010-05-27 20:12:41 +00:00
Dan Gohman dc53f1cb5c FastISel doesn't yet handle callee-pop functions.
To support this, move IsCalleePop from X86ISelLowering to X86Subtarget.

llvm-svn: 104866
2010-05-27 18:43:40 +00:00
Jim Grosbach 5cde219fb1 add ISD::STACKADDR to get the current stack pointer. Will be used by sjlj EH
to update the jmpbuf in the presence of VLAs.

llvm-svn: 104862
2010-05-27 18:23:48 +00:00
Bruno Cardoso Lopes 54b07ad2cd Merge basic binops SSE 1 & 2 instruction classes. This is a step towards refactoring
common code between SSE versions.

llvm-svn: 104860
2010-05-27 18:17:40 +00:00
Daniel Dunbar c0b69020cd AsmMatcher/X86: Mark _REV instructions as "code gen only", they aren't expected
to be matched.

llvm-svn: 104757
2010-05-26 22:21:28 +00:00
Jakob Stoklund Olesen 4f6da9e3a8 Give SubRegIndex names to all ARM subregisters. This will be required by
TableGen shortly.

llvm-svn: 104754
2010-05-26 22:15:03 +00:00
Daniel Dunbar b33dfbcba4 MC: Add TargetMachine support for setting the value of MCRelaxAll with
-filetype=obj.

llvm-svn: 104747
2010-05-26 21:48:55 +00:00
Jakob Stoklund Olesen d1d7ed63ff Add StringRef::compare_numeric and use it to sort TableGen register records.
This means that our Registers are now ordered R7, R8, R9, R10, R12, ...
Not R1, R10, R11, R12, R2, R3, ...

llvm-svn: 104745
2010-05-26 21:47:28 +00:00