1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
Commit Graph

25822 Commits

Author SHA1 Message Date
Mon P Wang
c9ba9d066e Added missing description for -disable-mmx option.
llvm-svn: 59929
2008-11-24 02:10:43 +00:00
Bill Wendling
4bb8a7a498 Add support for llvm.uadd.with.overflow.
llvm-svn: 59926
2008-11-24 01:38:29 +00:00
Duncan Sands
f9ea1124c9 Rename SetCCResultContents to BooleanContents. In
practice these booleans are mostly produced by SetCC,
however the concept is more general.

llvm-svn: 59911
2008-11-23 15:47:28 +00:00
Chris Lattner
5c70ae0588 Make JIT::runFunction handle functions with non-C calling conventions.
llvm-svn: 59904
2008-11-23 08:00:11 +00:00
Mon P Wang
0f887d148c Added -disable-mmx using a patch from Preston Gurd.
llvm-svn: 59901
2008-11-23 04:37:22 +00:00
Mon P Wang
e1c40f4258 Added check to avoid generating extract subvector beyond the end of the vector when normalizing vector shuffles.
llvm-svn: 59900
2008-11-23 04:35:05 +00:00
Scott Michel
50e49b28f0 CellSPU: Fix bug 3056. Varadic extract_element was not implemented (nor was it
ever conceived to occur).

llvm-svn: 59891
2008-11-22 23:50:42 +00:00
Anton Korobeynikov
ba74a11c9b Make a convenient helper for printing offsets.
llvm-svn: 59872
2008-11-22 16:15:34 +00:00
Bill Wendling
0b07d30acc Cleanup of the [SU]ADDO type legalization code. Patch by Duncan!
"It simplifies the type legalization part a bit, and produces better code by
teaching SelectionDAG about the extra bits in an i8 SADDO/UADDO node.  In
essence, I spontaneously decided that on x86 this i8 boolean result would be
either 0 or 1, and on other platforms 0/1 or 0/-1, depending on whether the
platform likes it's boolean zero extended or sign extended."

llvm-svn: 59864
2008-11-22 07:24:01 +00:00
Bill Wendling
3175516f94 - Move conversion of [SU]ADDO from DAG combiner into legalizer.
- Add "promote integer type" stuff to the legalizer for these nodes.

llvm-svn: 59847
2008-11-22 00:22:52 +00:00
Devang Patel
ce00a4dac7 Fix build failure.
llvm-svn: 59844
2008-11-21 21:00:20 +00:00
Devang Patel
a2ccbea45a Silence unused variable warnings.
llvm-svn: 59841
2008-11-21 20:00:59 +00:00
Dan Gohman
fd0ae4a637 Correctly set the isCtrl flag for chain dependencies.
llvm-svn: 59837
2008-11-21 19:17:25 +00:00
Dan Gohman
4a7eec40e8 Update comments.
llvm-svn: 59836
2008-11-21 19:16:58 +00:00
Dan Gohman
13a8a98bd8 Update comments.
llvm-svn: 59834
2008-11-21 19:10:41 +00:00
Chris Lattner
08bdf9dfab reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an
arbitrary integer width for the count.

llvm-svn: 59823
2008-11-21 16:42:48 +00:00
Bill Wendling
4c5afef830 Revert r59802. It was breaking the build of llvm-gcc:
g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic'
make[3]: *** [llvm-convert.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

llvm-svn: 59809
2008-11-21 09:09:41 +00:00
Sanjiv Gupta
89a7e67578 Make mem[cpy,move,set] intrinsics overloaded.
llvm-svn: 59802
2008-11-21 07:49:09 +00:00
Bill Wendling
6c369d3a6f Default to converting UADDO to the generic form that SADDO is converted to.
llvm-svn: 59801
2008-11-21 07:44:30 +00:00
Nick Lewycky
2fbf26fe70 Optimize (x/y)*y into x-(x%y) in general. Div and rem are about the same, and
a subtract is cheaper than a multiply. This generalizes an existing transform.

llvm-svn: 59800
2008-11-21 07:33:58 +00:00
Mon P Wang
1026a93fd1 Clean up normalization of shuffles
llvm-svn: 59792
2008-11-21 04:25:21 +00:00
Scott Michel
314d705baf CellSPU:
(a) Fix bgs 3052, 3057
(b) Incorporate Duncan's suggestions re: i1 promotion
(c) Indentation updates.

llvm-svn: 59790
2008-11-21 02:56:16 +00:00
Bill Wendling
380aac5f70 Combine the two add with overflow intrinsics lowerings. They differ only in DAG node type.
llvm-svn: 59788
2008-11-21 02:38:44 +00:00
Dan Gohman
79202c165e Set the isAntiDep flag in the MachineInstr scheduler.
llvm-svn: 59787
2008-11-21 02:38:21 +00:00
Bill Wendling
b2442fb4d2 Generate code for llvm.uadd.with.overflow intrinsic. No conversion support yet.
llvm-svn: 59786
2008-11-21 02:33:36 +00:00
Dan Gohman
be413b4a40 Add a flag to SDep for tracking which edges are anti-dependence edges.
llvm-svn: 59785
2008-11-21 02:27:52 +00:00
Bill Wendling
e4815d4f45 Remove chains. Unnecessary.
llvm-svn: 59783
2008-11-21 02:22:59 +00:00
Dan Gohman
62180eb6f2 Rename SDep's isSpecial to isArtificial, to make this field a little
less mysterious.

llvm-svn: 59782
2008-11-21 02:18:56 +00:00
Bill Wendling
0f9b6c3524 Rename "ADDO" to "SADDO" and "UADDO". The "UADDO" isn't equivalent to "ADDC"
because the boolean it returns to indicate an overflow may not be treated like
as a flag. It could be stored to memory, for instance.

llvm-svn: 59780
2008-11-21 02:12:42 +00:00
Bill Wendling
02db3b99bf Implement the sadd_with_overflow intrinsic. This is converted into
"ISD::ADDO". ISD::ADDO is lowered into a target-independent form that does the
addition and then checks if the result is less than one of the operands. (If it
is, then there was an overflow.)

llvm-svn: 59779
2008-11-21 02:03:52 +00:00
Devang Patel
b6d277da6c Fix unused variable warnings.
llvm-svn: 59778
2008-11-21 01:52:59 +00:00
Dan Gohman
fe33ecd2d3 Use ComputeLatency in the MachineInstr scheduler.
llvm-svn: 59777
2008-11-21 01:44:51 +00:00
Dan Gohman
34f79b2425 Remove the CycleBound computation code from the ScheduleDAGRRList
schedulers. This doesn't have much immediate impact because
targets that use these schedulers by default don't yet provide
pipeline information.

This code also didn't have the benefit of register pressure
information. Also, removing it will avoid problems with list-burr
suddenly starting to do latency-oriented scheduling on x86 when we
start providing pipeline data, which would increase spilling.

llvm-svn: 59775
2008-11-21 01:30:54 +00:00
Dan Gohman
60693dacec Implement ComputeLatency for MachineInstr ScheduleDAGs. Factor
some of the latency computation logic out of the SDNode
ScheduleDAG code into a TargetInstrItineraries helper method
to help with this.

llvm-svn: 59761
2008-11-21 00:12:10 +00:00
Bill Wendling
6d749434a5 Add UADDO and SADDO nodes. These will be used for determining an overflow
condition in an addition operation.

llvm-svn: 59760
2008-11-21 00:11:16 +00:00
Dan Gohman
66e692dd8f Change these schedulers to not emit no-ops. It turns out that
the RR scheduler actually does look at latency values, but it
doesn't use a hazard recognizer so it has no way to know when
a no-op is needed, as opposed to just stalling and incrementing
the cycle count.

llvm-svn: 59759
2008-11-21 00:10:42 +00:00
Bill Wendling
4020b2b907 Fix error where it wasn't getting the correct caller function.
llvm-svn: 59758
2008-11-21 00:09:21 +00:00
Bill Wendling
f85b54db6c If the function being inlined has a higher stack protection level than the
inlining function, then increase the stack protection level on the inlining
function.

llvm-svn: 59757
2008-11-21 00:06:32 +00:00
Dan Gohman
fd06b62f9c Treat mid-block labels the same as terminators when building the
MachineInstr scheduling DAG, meaning they implicitly depend on all
preceding defs. This fixes Benchmarks/Shootout-C++/except and
Regression/C++/EH/simple_rethrow in
  -relocation-model=pic -disable-post-RA-scheduler=false
mode.

llvm-svn: 59747
2008-11-20 19:58:35 +00:00
Dan Gohman
3b3afa49f8 Add another machine-code printing pass when post-pass scheduling is run.
llvm-svn: 59746
2008-11-20 19:54:21 +00:00
Devang Patel
0c43c5a17f Don't forget arguments!
llvm-svn: 59745
2008-11-20 19:50:17 +00:00
Scott Michel
4026c8f44a CellSPU:
(a) Remove moved file (SPUAsmPrinter.cpp) to make svn happy.
(b) Remove truncated stores that will never be used.
(c) Add initial support for __muldi3 as a libcall.

llvm-svn: 59734
2008-11-20 16:36:33 +00:00
Duncan Sands
84e2128d5e Add some documentation.
llvm-svn: 59727
2008-11-20 10:34:43 +00:00
Mon P Wang
76b86c996e Allow XMM2 and XMM3 to be used for non ABI compliant code.
llvm-svn: 59720
2008-11-20 07:48:19 +00:00
Bill Wendling
939e13da58 80-column violation.
llvm-svn: 59718
2008-11-20 07:24:30 +00:00
Scott Michel
c4efcfdcd6 CellSPU: Custom lower truncating stores of i8 to i1 (should not have been
promote), fix signed conversion of indexed offsets.

llvm-svn: 59707
2008-11-20 05:01:09 +00:00
Nick Lewycky
f95bff882d undef beats zero. Fix this missed optimization opportunity. Patch by Matt Elder!
llvm-svn: 59705
2008-11-20 04:36:13 +00:00
Scott Michel
d811d41fe7 CellSPU: Adjust spacing/tabulation
llvm-svn: 59703
2008-11-20 04:26:21 +00:00
Dan Gohman
d5d4c72217 Remove a remnant of list-burr's fast mode.
llvm-svn: 59702
2008-11-20 03:32:45 +00:00
Dan Gohman
dd45a57684 Factor out the SethiUllman numbering logic from the list-burr and
list-tdrr schedulers into a common base class.

llvm-svn: 59701
2008-11-20 03:30:37 +00:00