Owen Anderson
b2c80da4ae
Allow targets to specify a the type of the RHS of a shift parameterized on the type of the LHS.
...
llvm-svn: 126518
2011-02-25 21:41:48 +00:00
Devang Patel
f3292b2196
Revert r124611 - "Keep track of incoming argument's location while emitting LiveIns."
...
In other words, do not keep track of argument's location. The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body.
This requires some coordination with debugger to get this working.
- The debugger needs to be aware of prolog_end attribute attached with line table entries.
- The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+)
llvm-svn: 126155
2011-02-21 23:21:26 +00:00
Devang Patel
56cc5fdf09
Keep track of incoming argument's location while emitting LiveIns.
...
llvm-svn: 124611
2011-01-31 21:38:14 +00:00
Kalle Raiskila
6e5a54b36c
Allow sign-extending of i8 and i16 to i128 on SPU.
...
llvm-svn: 123912
2011-01-20 15:49:06 +00:00
Jeffrey Yasskin
249fcd4499
Remove unused variables found by gcc-4.6's -Wunused-but-set-variable.
...
llvm-svn: 123707
2011-01-18 00:51:23 +00:00
Kalle Raiskila
7e7b4ac751
Don't crash SPU BE with memory accesses with big alignmnet.
...
llvm-svn: 123620
2011-01-17 11:59:20 +00:00
Anton Korobeynikov
2f93128109
Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
...
llvm-svn: 123170
2011-01-10 12:39:04 +00:00
Chris Lattner
3e5fbd74ed
rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
...
something that just glues two nodes together, even if it is
sometimes used for flags.
llvm-svn: 122310
2010-12-21 02:38:05 +00:00
Kalle Raiskila
e0a1d2b32c
Use i8 as SETCC result type for i1 in SPU.
...
llvm-svn: 120092
2010-11-24 12:59:16 +00:00
Kalle Raiskila
e1b6c273b8
Division by pow-of-2 is not cheap on SPU, do it with
...
shifts.
llvm-svn: 120022
2010-11-23 13:27:59 +00:00
Wesley Peck
527da1b6e2
Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.
...
llvm-svn: 119990
2010-11-23 03:31:01 +00:00
Kalle Raiskila
77d11d054c
Fix a bug with extractelement on SPU.
...
In the attached testcase, the element was
never extracted (missing rotate).
llvm-svn: 119973
2010-11-22 16:28:26 +00:00
Kalle Raiskila
731d392d1c
Improve code layout, mostly indentation.
...
No functionality change.
llvm-svn: 119142
2010-11-15 10:12:32 +00:00
Kalle Raiskila
0a9dd405a5
Fix memory access lowering on SPU, adding
...
support for the case where alignment<value size.
These cases were silently miscompiled before this patch.
Now they are overly verbose -especially storing is- and
any front-end should still avoid misaligned memory
accesses as much as possible. The bit juggling algorithm
added here probably has some room for improvement still.
llvm-svn: 118889
2010-11-12 10:14:03 +00:00
Duncan Sands
1462777017
Simplify uses of MVT and EVT. An MVT can be compared directly
...
with a SimpleValueType, while an EVT supports equality and
inequality comparisons with SimpleValueType.
llvm-svn: 118169
2010-11-03 12:17:33 +00:00
John Thompson
e8360b7182
Inline asm multiple alternative constraints development phase 2 - improved basic logic, added initial platform support.
...
llvm-svn: 117667
2010-10-29 17:29:13 +00:00
Kalle Raiskila
5f2034c455
Improve lowering of sext to i128 on SPU.
...
The old algorithm inserted a 'rotqmbyi' instruction which was
both redundant and wrong - it made shufb select bytes from the
wrong end of the input quad.
llvm-svn: 116701
2010-10-18 09:34:19 +00:00
Kalle Raiskila
a845022ddd
Implement two virtual functions in SPUTargetLowering.
...
Before the implementation of isLegalAddressingMode, some rare cases
of code were miscompiled if optimized with the LoopStrengthReduce pass.
It is unclear (to me) if LSR is "allowed" to produce wrong code with a
bad TargetLowering, or if the bug is elsewhere and this patch just
hides it.
llvm-svn: 115919
2010-10-07 16:24:35 +00:00
Chris Lattner
676c61db0e
update a bunch of code to use the MachinePointerInfo version of getStore.
...
llvm-svn: 114461
2010-09-21 18:41:36 +00:00
Chris Lattner
82fd06d3ce
it's more elegant to put the "getConstantPool" and
...
"getFixedStack" on the MachinePointerInfo class. While
this isn't the problem I'm setting out to solve, it is the
right way to eliminate PseudoSourceValue, so lets go with it.
llvm-svn: 114406
2010-09-21 06:22:23 +00:00
Kalle Raiskila
01cda2d35a
Silence compiler warning.
...
llvm-svn: 113478
2010-09-09 07:30:15 +00:00
Kalle Raiskila
e542972828
Fix CellSPU vector shuffles, again.
...
Some cases of lowering to rotate were miscompiled.
llvm-svn: 113355
2010-09-08 11:53:38 +00:00
Kalle Raiskila
1e616572d9
Fix lowering of INSERT_VECTOR_ELT in SPU.
...
The IDX was treated as byte index, not element index.
llvm-svn: 112422
2010-08-29 12:41:50 +00:00
Kalle Raiskila
7e25bc4145
Fix SPU BE to use all the available return registers.
...
llc used to assert on the added testcase.
llvm-svn: 111911
2010-08-24 11:50:48 +00:00
Kalle Raiskila
8f3e3ba5ff
Remove some dead code from SPU BE that remained
...
from 64bit vector support.
llvm-svn: 111910
2010-08-24 11:05:51 +00:00
Kalle Raiskila
e60b5161d1
Fix a bug with insertelement on SPU.
...
The previous algorithm in LowerVECTOR_SHUFFLE
didn't check all requirements for "monotonic" shuffles.
llvm-svn: 111361
2010-08-18 10:20:29 +00:00
Kalle Raiskila
ab49360f59
Remove all traces of v2[i,f]32 on SPU.
...
The "half vectors" are now widened to full size by the legalizer.
The only exception is in parameter passing, where half vectors are
expanded. This causes changes to some dejagnu tests.
llvm-svn: 111360
2010-08-18 10:04:39 +00:00
Kalle Raiskila
999da1f3a0
Have SPU handle halfvec stores aligned by 8 bytes.
...
llvm-svn: 110576
2010-08-09 16:33:00 +00:00
Kalle Raiskila
8b2f70125f
Make SPU backend handle insertelement and
...
store for "half vectors"
llvm-svn: 110198
2010-08-04 13:59:48 +00:00
Kalle Raiskila
77558b7d13
More SPU v2f32 stuff added: insertelement and shuffle.
...
llvm-svn: 110038
2010-08-02 11:22:10 +00:00
Kalle Raiskila
68b3886678
Add preliminary v2f32 support for SPU. Like with v2i32, we just
...
duplicate the instructions and operate on half vectors.
Also reorder code in SPUInstrInfo.td for better coherency.
llvm-svn: 110037
2010-08-02 10:25:47 +00:00
Kalle Raiskila
622f8eb981
Add preliminary v2i32 support for SPU backend. As there are no
...
such registers in SPU, this support boils down to "emulating"
them by duplicating instructions on the general purpose registers.
This adds the most basic operations on v2i32: passing parameters,
addition, subtraction, multiplication and a few others.
llvm-svn: 110035
2010-08-02 08:54:39 +00:00
Kalle Raiskila
d799ea52cd
Switch SPU calling convention (function arguments)
...
to a Tablegen implementation.
llvm-svn: 107913
2010-07-08 21:15:22 +00:00
Dan Gohman
fe7532a308
Split the SDValue out of OutputArg so that SelectionDAG-independent
...
code can do calling-convention queries. This obviates OutputArgReg.
llvm-svn: 107786
2010-07-07 15:54:55 +00:00
Devang Patel
a3ca21b228
Propagate debug loc.
...
llvm-svn: 107710
2010-07-06 22:08:15 +00:00
Kalle Raiskila
d5ac287140
Remove some unused/redundant code.
...
llvm-svn: 107622
2010-07-05 18:40:09 +00:00
Evan Cheng
0664a67fe1
Remove isSS argument from CreateFixedObject. Fixed objects cannot be spill slots so it's always false.
...
llvm-svn: 107550
2010-07-03 00:40:23 +00:00
Dale Johannesen
ce97d55ad9
The hasMemory argument is irrelevant to how the argument
...
for an "i" constraint should get lowered; PR 6309. While
this argument was passed around a lot, this is the only
place it was used, so it goes away from a lot of other
places.
llvm-svn: 106893
2010-06-25 21:55:36 +00:00
Chris Lattner
74b5e3e0ae
remove some dead variables reported by clang++
...
llvm-svn: 106428
2010-06-21 17:20:18 +00:00
Kalle Raiskila
d7f50c118a
Fix the lowering of VECTOR_SHUFFLE on SPU to handle splats.
...
llvm-svn: 106419
2010-06-21 14:42:19 +00:00
Kalle Raiskila
6f58190f6f
Fix lowering of VECTOR_SHUFFLE on SPU. Old algorithm
...
used to choke llc with the attached test.
llvm-svn: 106411
2010-06-21 10:17:36 +00:00
Dan Gohman
f1d8304fe3
Eliminate unnecessary uses of getZExtValue().
...
llvm-svn: 106279
2010-06-18 14:22:04 +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
Evan Cheng
738e920edf
Code refactoring: pull SchedPreference enum from TargetLowering.h to TargetMachine.h and put it in its own namespace.
...
llvm-svn: 104147
2010-05-19 20:19:50 +00:00
Chris Lattner
38c1a1a247
teach cellspu how to return i8 and i16 from calls,
...
patch by Kalle Raiskila!
llvm-svn: 101875
2010-04-20 05:36:09 +00:00
Dan Gohman
21cea8ac2e
Use const qualifiers with TargetLowering. This eliminates several
...
const_casts, and it reinforces the design of the Target classes being
immutable.
SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.
And PIC16's AsmPrinter no longer uses TargetLowering.
llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Dan Gohman
31ae586c74
Move per-function state out of TargetLowering subclasses and into
...
MachineFunctionInfo subclasses.
llvm-svn: 101634
2010-04-17 14:41:14 +00:00
Dan Gohman
bcaf681cde
Add const qualifiers to CodeGen's use of LLVM IR constructs.
...
llvm-svn: 101334
2010-04-15 01:51:59 +00:00
Benjamin Kramer
a6769269f3
Use twines to simplify calls to report_fatal_error. For code size and readability.
...
llvm-svn: 100756
2010-04-08 10:44:28 +00:00
Chris Lattner
2104b8d36e
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00