1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

7293 Commits

Author SHA1 Message Date
Chris Lattner
7ae87447ed Fix sentinels to use correctly 'aligned' pointers.
llvm-svn: 60229
2008-11-29 01:36:16 +00:00
Chris Lattner
070df849e9 Fix spello, add DenseMapInfo specialization for PointerIntPair.
llvm-svn: 60228
2008-11-29 01:18:05 +00:00
Chris Lattner
b41c45dbdf fix comment typo
llvm-svn: 60227
2008-11-28 23:57:26 +00:00
Chris Lattner
507e71fce3 fix a bug.
llvm-svn: 60225
2008-11-28 23:36:15 +00:00
Chris Lattner
d8b755ed95 add a generic "bitmangled pointer" class, which allows a parameterized
pointer and integer type to be used.

llvm-svn: 60224
2008-11-28 23:31:44 +00:00
Chris Lattner
7376e32840 comment cleanups.
llvm-svn: 60220
2008-11-28 22:41:36 +00:00
Chris Lattner
8fc7870ff1 forward declare CallSite instead of #includ'ing it.
llvm-svn: 60217
2008-11-28 21:47:19 +00:00
Chris Lattner
cc3a3c0c98 rename "ping" to "verifyRemoved". I don't know why 'ping' what chosen,
but it doesn't make any sense at all.

Also make the method const, private, and fit in 80 cols while we're at it.

llvm-svn: 60215
2008-11-28 21:42:09 +00:00
Chris Lattner
b9ef82dada comment and indentation improvements.
llvm-svn: 60214
2008-11-28 21:36:43 +00:00
Mikhail Glushenkov
187b171022 Add 'hidden' and 'really_hidden' option properties.
llvm-svn: 60198
2008-11-28 00:13:25 +00:00
Chris Lattner
8b382de4e0 Enhance RecursivelyDeleteTriviallyDeadInstructions to optionally
return a list of deleted instructions.

llvm-svn: 60193
2008-11-27 23:14:34 +00:00
Chris Lattner
b374a0158a remove doConstantPropagation and dceInstruction, they are just
wrappers around the interesting code and use an obscure iterator
abstraction that dates back many many years.

Move EraseDeadInstructions to Transforms/Utils and name it
RecursivelyDeleteTriviallyDeadInstructions.

llvm-svn: 60191
2008-11-27 22:57:53 +00:00
Chris Lattner
dd755c74d6 improve const correctness.
llvm-svn: 60168
2008-11-27 08:39:18 +00:00
Chris Lattner
577096bcaa move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.
llvm-svn: 60166
2008-11-27 08:10:05 +00:00
Chris Lattner
bb86dff3fe move MergeBasicBlockIntoOnlyPred to Transforms/Utils.
llvm-svn: 60162
2008-11-27 07:43:12 +00:00
Evan Cheng
f18016728c On x86 favors folding short immediate into some arithmetic operations (e.g. add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size.
e.g.
movl 4(%esp), %eax
addl $4, %eax

is 2 bytes shorter than

movl $4, %eax
addl 4(%esp), %eax

llvm-svn: 60139
2008-11-27 00:49:46 +00:00
Ted Kremenek
d0f8118dc1 Add typedef to StringMapEntry.
llvm-svn: 60134
2008-11-27 00:17:25 +00:00
Mikhail Glushenkov
869ded12c8 Disallow multiple edges.
llvm-svn: 60127
2008-11-26 22:59:45 +00:00
Devang Patel
02a25292de Fix typo.
llvm-svn: 60111
2008-11-26 18:13:11 +00:00
Mikhail Glushenkov
01a62b9117 Fix the -I option (llvmc -I dir1 -I dir2 didn't work).
llvm-svn: 60101
2008-11-26 10:57:31 +00:00
Mikhail Glushenkov
3dd6b7e4e9 Refactor Tools.td to remove repetition.
llvm-svn: 60100
2008-11-26 10:56:56 +00:00
Dan Gohman
7b56f8686f LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.

llvm-svn: 60092
2008-11-26 05:50:31 +00:00
Ted Kremenek
b31e49cd47 Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
llvm-svn: 60085
2008-11-26 03:33:13 +00:00
Chris Lattner
c9d864b689 add a long-overdue AllocaInst::isStaticAlloca method.
llvm-svn: 60080
2008-11-26 02:54:17 +00:00
Nuno Lopes
821f6d257e change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)
llvm-svn: 60064
2008-11-26 00:00:44 +00:00
Mikhail Glushenkov
bcf77dcb9a Make -fsyntax-only, -include and -emit-llvm work for C++ and Objective-C/C++.
llvm-svn: 60047
2008-11-25 21:35:20 +00:00
Dan Gohman
92cedc8a95 Initial support for anti-dependence breaking. Currently this code does not
introduce any new spilling; it just uses unused registers.

Refactor the SUnit topological sort code out of the RRList scheduler and
make use of it to help with the post-pass scheduler.

llvm-svn: 59999
2008-11-25 00:52:40 +00:00
Dan Gohman
07c5a496e4 Move the scheduler constructor functions to SchedulerRegistry.h, to
simplify header dependencies for front-ends that just want to choose
a scheduler and don't need all the scheduling machinery declarations.

llvm-svn: 59978
2008-11-24 19:53:21 +00:00
Dan Gohman
f084381b98 Fix an unused-parameter warning.
llvm-svn: 59977
2008-11-24 19:51:59 +00:00
Dan Gohman
bacca559dd Check in the rest of this change. The isAntiDep flag needs to be passed
to removePred because an SUnit can both data-depend and anti-depend
on the same SUnit.

llvm-svn: 59969
2008-11-24 17:33:52 +00:00
Duncan Sands
9816d42357 If the type legalizer actually legalized anything
(this doesn't happen that often, since most code
does not use illegal types) then follow it by a
DAG combiner run that is allowed to generate
illegal operations but not illegal types.  I didn't
modify the target combiner code to distinguish like
this between illegal operations and illegal types,
so it will not produce illegal operations as well
as not producing illegal types.

llvm-svn: 59960
2008-11-24 14:53:14 +00:00
Evan Cheng
a19ef59d6c Move target independent td files from lib/Target/ to include/llvm/Target so they can be distributed along with the header files.
llvm-svn: 59953
2008-11-24 07:34:46 +00:00
Scott Michel
d8a57b624e Roll back rev 59890, since Chris says this can never happen.
llvm-svn: 59914
2008-11-23 19:22:48 +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
Scott Michel
0da772db1c Check for NULL before traversing the isa<> type hierarchy checking with a
NULL-based reference.

Note: Encountered this a few times on Tiger + gcc 4.0.1. Might just be a
platform-specific compiler issue, but it's good defensive programming in any
case.

llvm-svn: 59890
2008-11-22 23:49:26 +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
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
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
939fe53962 Update comment to reflect a semblance of reality.
llvm-svn: 59784
2008-11-21 02:24:44 +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
Bill Wendling
239302c6c9 Update comment.
llvm-svn: 59766
2008-11-21 00:45:00 +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
Bill Wendling
d0bd6f6e73 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
Dan Gohman
b8f4f58938 Delete redundant inline keywords.
llvm-svn: 59754
2008-11-20 22:10:21 +00:00