Commit Graph

42688 Commits

Author SHA1 Message Date
Anton Korobeynikov bff4b37af5 Make a convenient helper for printing offsets.
llvm-svn: 59872
2008-11-22 16:15:34 +00:00
Bill Wendling 5424e6d4ec 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 be8e7f851c - 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 702f45df58 Fix build failure.
llvm-svn: 59844
2008-11-21 21:00:20 +00:00
Devang Patel cb181bb203 Silence unused variable warnings.
llvm-svn: 59841
2008-11-21 20:00:59 +00:00
Devang Patel b885a91a12 Document TEST=dbgopt
llvm-svn: 59839
2008-11-21 19:35:57 +00:00
Dan Gohman 57d0b88830 Correctly set the isCtrl flag for chain dependencies.
llvm-svn: 59837
2008-11-21 19:17:25 +00:00
Dan Gohman 546bcfe8d6 Update comments.
llvm-svn: 59836
2008-11-21 19:16:58 +00:00
Dan Gohman 8dfa51c5ef Update comments.
llvm-svn: 59834
2008-11-21 19:10:41 +00:00
Chris Lattner dd7083452f 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 4bce2bff88 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 09a203765a Make mem[cpy,move,set] intrinsics overloaded.
llvm-svn: 59802
2008-11-21 07:49:09 +00:00
Bill Wendling 0b5be6c5e0 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 07d726ec4d 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
Duraid Madina 132f6b472c LLVM does have a fortran FE!
llvm-svn: 59795
2008-11-21 06:26:56 +00:00
Mon P Wang c311360909 Clean up normalization of shuffles
llvm-svn: 59792
2008-11-21 04:25:21 +00:00
Scott Michel c6918c1ffa 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 5eee74446d 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 d7d1fd7eb7 Set the isAntiDep flag in the MachineInstr scheduler.
llvm-svn: 59787
2008-11-21 02:38:21 +00:00
Bill Wendling 87c175e629 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 f00cef4491 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 cf678eddd0 Update comment to reflect a semblance of reality.
llvm-svn: 59784
2008-11-21 02:24:44 +00:00
Bill Wendling 8badb674eb Remove chains. Unnecessary.
llvm-svn: 59783
2008-11-21 02:22:59 +00:00
Dan Gohman 67b35bd4d1 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 d10202bfb1 Add generic test for add with overflow.
llvm-svn: 59781
2008-11-21 02:15:51 +00:00
Bill Wendling 77538cc510 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 74296c60ff 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 45f1ae028e Fix unused variable warnings.
llvm-svn: 59778
2008-11-21 01:52:59 +00:00
Dan Gohman d1f33e2397 Use ComputeLatency in the MachineInstr scheduler.
llvm-svn: 59777
2008-11-21 01:44:51 +00:00
Dan Gohman 63be531e09 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
Bill Wendling 526cbee901 Update comment.
llvm-svn: 59766
2008-11-21 00:45:00 +00:00
Oscar Fuentes 02b5c3222b CMake: Do not rebuild the world when tblgen changes but the .inc files
it produces are not affected by the change.

llvm-svn: 59763
2008-11-21 00:18:45 +00:00
Dan Gohman 7b7ca502fa 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 39acb29ff8 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 c602dd407c 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 f5260d29c2 Fix error where it wasn't getting the correct caller function.
llvm-svn: 59758
2008-11-21 00:09:21 +00:00
Bill Wendling 26c6a3e736 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
Bill Wendling 3d9cdd4484 Introduce two new "add" intrinsics. These return the sum plus a bit indicating
that an overflow/carry occured. These are converted into ISD::[SU]ADDO nodes,
which are lowered in a target-independent way into something sane. Eventually,
each target can implement their own method of checking the overflow/carry flags.

llvm-svn: 59756
2008-11-21 00:05:31 +00:00
Oscar Fuentes 50ff154ea5 CMake: More documentation.
llvm-svn: 59755
2008-11-20 23:35:09 +00:00
Dan Gohman 4fafdcfcb1 Delete redundant inline keywords.
llvm-svn: 59754
2008-11-20 22:10:21 +00:00
Dan Gohman 4b17f24047 Doxygenate comments.
llvm-svn: 59753
2008-11-20 22:09:52 +00:00
Oscar Fuentes 8395ac96c4 CMake: Some documentation. Work in progress.
llvm-svn: 59752
2008-11-20 22:05:48 +00:00
Dan Gohman 22e9677a5e 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 06613bc7de 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 38642e598e Don't forget arguments!
llvm-svn: 59745
2008-11-20 19:50:17 +00:00
Dan Gohman 52aece7eff Test -pre-RA-sched=fast too, for completeness.
llvm-svn: 59741
2008-11-20 19:26:04 +00:00
Oscar Fuentes 073b0b12a5 CMake: Option for building with -fPIC.
llvm-svn: 59739
2008-11-20 19:13:51 +00:00
Scott Michel 3726019aa3 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 3fa0a5afab Add some documentation.
llvm-svn: 59727
2008-11-20 10:34:43 +00:00
Mon P Wang e15a540071 Allow XMM2 and XMM3 to be used for non ABI compliant code.
llvm-svn: 59720
2008-11-20 07:48:19 +00:00