oota-llvm.git
14 years agoHonour addGlobalMapping() in the interpreter, if it was used to add mappings for
Torok Edwin [Tue, 30 Mar 2010 12:31:58 +0000 (12:31 +0000)]
Honour addGlobalMapping() in the interpreter, if it was used to add mappings for
external Functions (the JIT does honour this).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99885 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReapply r99881 with some fixes: only call destructor in releaseMemory!
Torok Edwin [Tue, 30 Mar 2010 11:17:48 +0000 (11:17 +0000)]
Reapply r99881 with some fixes: only call destructor in releaseMemory!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99883 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 99881, it brooke smooshlab's llvm-gcc-i386-darwin9.
Torok Edwin [Tue, 30 Mar 2010 10:25:08 +0000 (10:25 +0000)]
Revert 99881, it brooke smooshlab's llvm-gcc-i386-darwin9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99882 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIntroduce another Reset() method in BumpPtrAllocator that calls a destructor
Torok Edwin [Tue, 30 Mar 2010 10:08:26 +0000 (10:08 +0000)]
Introduce another Reset() method in BumpPtrAllocator that calls a destructor
on all objects it has allocated, if they are all of the same size and alignment.
Use this to destruct all VNInfos allocated in LiveIntervalAnalysis (PR6653).

valnos is not reliable for this purpose, as seen in r99400
(which still leaked, and sometimes caused double frees).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99881 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid being influenced by the presence of dbg_value instructions.
Evan Cheng [Tue, 30 Mar 2010 05:49:07 +0000 (05:49 +0000)]
Avoid being influenced by the presence of dbg_value instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99879 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agostringref'ize Timer apis
Chris Lattner [Tue, 30 Mar 2010 05:34:02 +0000 (05:34 +0000)]
stringref'ize Timer apis

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99877 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofinally, maintain a global list of timer groups, allowing us to
Chris Lattner [Tue, 30 Mar 2010 05:27:58 +0000 (05:27 +0000)]
finally, maintain a global list of timer groups, allowing us to
implement TimerGroup::printAll, which prints and resets all active
timers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99876 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a new TimerGroup::print method, and refactor away the bogus
Chris Lattner [Tue, 30 Mar 2010 05:20:02 +0000 (05:20 +0000)]
add a new TimerGroup::print method, and refactor away the bogus
TimerGroup copy ctor and assignment operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99875 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
Chris Lattner [Tue, 30 Mar 2010 05:01:08 +0000 (05:01 +0000)]
rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
have it always return a new stream to simplify clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99874 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoif a timergroup is destroyed before its timers, print times.
Chris Lattner [Tue, 30 Mar 2010 04:58:26 +0000 (04:58 +0000)]
if a timergroup is destroyed before its timers, print times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99873 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agochange TimerGroup to keep a linked list of active timers
Chris Lattner [Tue, 30 Mar 2010 04:40:01 +0000 (04:40 +0000)]
change TimerGroup to keep a linked list of active timers
instead of just a count of them, and refactor the guts of
report printing out of removeTimer into its own method.
Refactor addTimerToPrint away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99872 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreapply my timer rewrite with a change for PassManager to store
Chris Lattner [Tue, 30 Mar 2010 04:03:22 +0000 (04:03 +0000)]
reapply my timer rewrite with a change for PassManager to store
timers by pointer instead of by-value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99871 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert r99862 which is causing FNT failures.
Chris Lattner [Tue, 30 Mar 2010 03:57:00 +0000 (03:57 +0000)]
revert r99862 which is causing FNT failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99870 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofairly major rewrite of various timing related stuff.
Chris Lattner [Tue, 30 Mar 2010 02:38:19 +0000 (02:38 +0000)]
fairly major rewrite of various timing related stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99862 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd FIXME for operand promotion.
Eric Christopher [Tue, 30 Mar 2010 01:04:59 +0000 (01:04 +0000)]
Add FIXME for operand promotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99859 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBe gentle to MSVC. C++ is hard, after all.
Jakob Stoklund Olesen [Tue, 30 Mar 2010 00:09:32 +0000 (00:09 +0000)]
Be gentle to MSVC. C++ is hard, after all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99855 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC/Mach-O/x86_64: Support @GOTPCREL on symbols, even for non-PCrel relocations!
Daniel Dunbar [Mon, 29 Mar 2010 23:56:40 +0000 (23:56 +0000)]
MC/Mach-O/x86_64: Support @GOTPCREL on symbols, even for non-PCrel relocations!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99853 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-add back in the slow way of determining of a clean-up should become a
Bill Wendling [Mon, 29 Mar 2010 23:37:07 +0000 (23:37 +0000)]
Re-add back in the slow way of determining of a clean-up should become a
catch-all. The "dominates" way won't catch all of the selectors which must be
changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99850 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoBasic implementation of SSEDomainFix pass.
Jakob Stoklund Olesen [Mon, 29 Mar 2010 23:24:21 +0000 (23:24 +0000)]
Basic implementation of SSEDomainFix pass.

Cross-block inference is primitive and wrong, but the pass is working otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99848 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoA more general (and simpler!) implementation of r99671. It performs a similar
Bill Wendling [Mon, 29 Mar 2010 23:02:46 +0000 (23:02 +0000)]
A more general (and simpler!) implementation of r99671. It performs a similar
transform. I.e., if a clean-up eh.selector call dominates the invoke of an
_Unwind_Resume_or_Rethrow, then we convert the eh.selector into a
catch-all. This patch, however, uses the DominatorTree information, and doesn't
go through the whole rigmarole of starting at the eh.exception call, finding the
corresponding URoR and eh.selector calls, and trying to trace through any number
of instruction types to get to them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99846 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEncode start location of debug value, communicated through DBG_VALUE machine instruct...
Devang Patel [Mon, 29 Mar 2010 22:59:58 +0000 (22:59 +0000)]
Encode start location of debug value, communicated through DBG_VALUE machine instruction, in a variable's DIE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99845 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove a function into a more logical place in the file
Chris Lattner [Mon, 29 Mar 2010 21:34:06 +0000 (21:34 +0000)]
move a function into a more logical place in the file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99842 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove support for per-time peak memory tracking, this
Chris Lattner [Mon, 29 Mar 2010 21:28:41 +0000 (21:28 +0000)]
remove support for per-time peak memory tracking, this
isn't used by anyone and is better exposed as a non-per-timer
thing.  Also, stop including System/Mutex.h in Timer.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99841 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR4975. Avoid referencing empty vector.
Evan Cheng [Mon, 29 Mar 2010 21:27:30 +0000 (21:27 +0000)]
Fix PR4975. Avoid referencing empty vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99840 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agovarious timer fixes: move operator= out of line,
Chris Lattner [Mon, 29 Mar 2010 21:24:52 +0000 (21:24 +0000)]
various timer fixes: move operator= out of line,
eliminate the per-timer lock (timers should be
externally locked if needed), the info-output-stream
can never be dbgs(), so drop the check.  Make some
stuff private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99839 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake isInt?? and isUint?? template specializations of the generic versions. This
Benjamin Kramer [Mon, 29 Mar 2010 21:13:41 +0000 (21:13 +0000)]
Make isInt?? and isUint?? template specializations of the generic versions. This
makes calls a little bit more consistent and allows easy removal of the
specializations in the future. Convert all callers to the templated functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99838 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPool allocate SDDbgValue nodes.
Evan Cheng [Mon, 29 Mar 2010 20:48:30 +0000 (20:48 +0000)]
Pool allocate SDDbgValue nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99836 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWe'll never match these as instructions, just as intrinsics so remove
Eric Christopher [Mon, 29 Mar 2010 20:41:51 +0000 (20:41 +0000)]
We'll never match these as instructions, just as intrinsics so remove
the SDNodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99835 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agos/.../.
Chris Lattner [Mon, 29 Mar 2010 20:40:19 +0000 (20:40 +0000)]
s/.../.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99834 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse RAII for ExceptionTimer too
Chris Lattner [Mon, 29 Mar 2010 20:39:38 +0000 (20:39 +0000)]
use RAII for ExceptionTimer too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99833 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a variety of issues were we'd start DebugTimer but
Chris Lattner [Mon, 29 Mar 2010 20:38:20 +0000 (20:38 +0000)]
fix a variety of issues were we'd start DebugTimer but
not stop it by using RAII.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99832 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove code around and improve indentation, no functionality change.
Chris Lattner [Mon, 29 Mar 2010 20:35:01 +0000 (20:35 +0000)]
move code around and improve indentation, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99831 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a bunch of integer width predicate functions in favor of MathExtras.
Benjamin Kramer [Mon, 29 Mar 2010 19:07:58 +0000 (19:07 +0000)]
Remove a bunch of integer width predicate functions in favor of MathExtras.
Most of these were unused, some of them were wrong and unused (isS16Constant<short>,
isS10Constant<short>).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99827 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosome other notes.
Chris Lattner [Mon, 29 Mar 2010 18:42:42 +0000 (18:42 +0000)]
some other notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99826 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoapparently llvm 2.7 now has great armv4 support, from
Chris Lattner [Mon, 29 Mar 2010 18:39:28 +0000 (18:39 +0000)]
apparently llvm 2.7 now has great armv4 support, from
John Tytgat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99825 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoupdate the vmkit blurb
Chris Lattner [Mon, 29 Mar 2010 18:34:13 +0000 (18:34 +0000)]
update the vmkit blurb

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99824 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd tce
Chris Lattner [Mon, 29 Mar 2010 17:50:39 +0000 (17:50 +0000)]
add tce

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99820 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFrom Kalle Raiskila:
Chris Lattner [Mon, 29 Mar 2010 17:38:47 +0000 (17:38 +0000)]
From Kalle Raiskila:

"the bigstack patch for SPU, with testcase. It is essentially the patch committed as 97091, and reverted as 97099, but with the following additions:
-in vararg handling, registers are marked to be live, to not confuse the register scavenger
-function prologue and epilogue are not emitted, if the stack size is 16. 16 means it is empty - there is only the register scavenger emergency spill slot, which is not used as there is no stack."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99819 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd support for zero initialized unions, patch by Tim Northover!
Chris Lattner [Mon, 29 Mar 2010 17:36:02 +0000 (17:36 +0000)]
add support for zero initialized unions, patch by Tim Northover!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99818 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor code to push DILocation prcessing into DwarfDebug.cpp from AsmPrinter.cpp.
Devang Patel [Mon, 29 Mar 2010 17:20:31 +0000 (17:20 +0000)]
Refactor code to push DILocation prcessing into DwarfDebug.cpp from AsmPrinter.cpp.
This is same as r99772 (which was reverted) with just one meaningful difference where two source lines exchanged their positions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99816 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a note.
Chris Lattner [Mon, 29 Mar 2010 17:02:02 +0000 (17:02 +0000)]
add a note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99815 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSwitch pattern sorting predicate from stable sort -> sort, it
Chris Lattner [Mon, 29 Mar 2010 02:02:45 +0000 (02:02 +0000)]
Switch pattern sorting predicate from stable sort -> sort, it
doesn't need to be stable because the patterns are fully ordered.

Add a first level sort predicate that orders patterns in this
order:  1) scalar integer operations 2) scalar floating point
3) vector int 4) vector float.  This is a trivial sort on their
top level pattern type so it is nice and transitive.  The
benefit of doing this is that simple integer operations are
much more common than insane vector things and isel was trying
to match the big complex vector patterns before the simple
ones because the complexity of the vector operations was much
higher.  Since they can't both match, it is best (for compile
time) to try the simple integer ones first.

This cuts down the # failed match attempts on real code by
quite a bit, for example, this reduces backtracks on crafty
(as a random example) from 228285 -> 188369.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99797 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert 99795, as mentioned, it is disabled anyway.
Chris Lattner [Mon, 29 Mar 2010 01:58:15 +0000 (01:58 +0000)]
revert 99795, as mentioned, it is disabled anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99796 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCheck in a (disabled) failed attempt to improve the ordering of
Chris Lattner [Mon, 29 Mar 2010 01:56:19 +0000 (01:56 +0000)]
Check in a (disabled) failed attempt to improve the ordering of
patterns within the generated matcher.  This works great except
that the sort fails because the relation defined isn't
transitive.  I have a much simpler solution coming next, but want
to archive the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99795 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoprint the complexity of the pattern being matched in the
Chris Lattner [Mon, 29 Mar 2010 01:40:38 +0000 (01:40 +0000)]
print the complexity of the pattern being matched in the
comment in the generated table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99794 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd NVTBLFrm to represent A8.6.406 VTBL, VTBX Vector Table Lookup Instructions.
Johnny Chen [Mon, 29 Mar 2010 01:14:22 +0000 (01:14 +0000)]
Add NVTBLFrm to represent A8.6.406 VTBL, VTBX Vector Table Lookup Instructions.
These instructions use byte index in a control vector (M:Vm) to lookup byte
values in a table and generate a new vector (D:Vd).  The table is specified via
a list of vectors, which can be:

{Dn}
{Dn D<n+1>}
{Dn D<n+1> D<n+2>}
{Dn D<n+1> D<n+2> D<n+3>}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99789 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 99772.
Devang Patel [Sun, 28 Mar 2010 21:23:37 +0000 (21:23 +0000)]
Revert 99772.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99778 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a statistic for the # times isel has to backtrack.
Chris Lattner [Sun, 28 Mar 2010 19:46:56 +0000 (19:46 +0000)]
add a statistic for the # times isel has to backtrack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99774 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactoring. Push DILocation processing in to DwarfDebug from AsmPrinter.
Devang Patel [Sun, 28 Mar 2010 18:57:09 +0000 (18:57 +0000)]
Refactoring. Push DILocation processing in to DwarfDebug from AsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99772 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agozap an extra line that Eli noticed!
Chris Lattner [Sun, 28 Mar 2010 18:52:28 +0000 (18:52 +0000)]
zap an extra line that Eli noticed!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99770 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoProperly quote the quotes :) during cmdline construction on Windows.
Anton Korobeynikov [Sun, 28 Mar 2010 15:07:02 +0000 (15:07 +0000)]
Properly quote the quotes :) during cmdline construction on Windows.
Otherwise, e.g. in the invocation like clang -DFOO=\"bar\" FOO macro
got the bar value, not "bar".

Patch by Alexander Esilevich!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99763 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix use-of-uninitialized value when RWX memory can't be allocated (PR6701).
Torok Edwin [Sun, 28 Mar 2010 11:07:36 +0000 (11:07 +0000)]
Fix use-of-uninitialized value when RWX memory can't be allocated (PR6701).

SELinux doesn't allow 'execmem', returning MAP_FAILED and 'Permission denied'
for mmap or RWX memory. In this case AllocateRWX was returning a MemoryBlock
with uninitialized fields, which sometimes caused crashes.

This patch initializes MemoryBlock fields to 0, so that the RWX-failure check
works.
It doesn't fix the SELinux 'execmem' issues though (the JIT will not work when
SELinux is in enforcing mode).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99762 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove type checking of SDNode operand count. This rejects all cases
Chris Lattner [Sun, 28 Mar 2010 08:48:47 +0000 (08:48 +0000)]
improve type checking of SDNode operand count.  This rejects all cases
where an incorrect number of operands is provided to an sdnode instead
of just a few cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99761 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a type contradition: XCoreISD::RETSP has one argument, not zero.
Chris Lattner [Sun, 28 Mar 2010 08:47:39 +0000 (08:47 +0000)]
fix a type contradition: XCoreISD::RETSP has one argument, not zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99760 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofinally remove the immAllOnesV_bc/immAllZerosV_bc patterns
Chris Lattner [Sun, 28 Mar 2010 08:43:23 +0000 (08:43 +0000)]
finally remove the immAllOnesV_bc/immAllZerosV_bc patterns
and those derived from them.  These are obnoxious because
they were written as: PatLeaf<(bitconvert).  Not having an
argument was foiling adding better type checking for operand
count matching up with what was required (in this case,
bitconvert always requires an operand!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99759 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove a pattern with no testcase that doesn't appear to be
Chris Lattner [Sun, 28 Mar 2010 08:40:48 +0000 (08:40 +0000)]
remove a pattern with no testcase that doesn't appear to be
matchable: it seems like it would always constant fold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99758 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix integer negates to use the proper type for the zero vectors,
Chris Lattner [Sun, 28 Mar 2010 08:39:10 +0000 (08:39 +0000)]
fix integer negates to use the proper type for the zero vectors,
this also depends on the new "bitconvert dropping" behavior just
added to tblgen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99757 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoteach tblgen to allow patterns like (add (i32 (bitconvert (i32 GPR))), 4),
Chris Lattner [Sun, 28 Mar 2010 08:38:32 +0000 (08:38 +0000)]
teach tblgen to allow patterns like (add (i32 (bitconvert (i32 GPR))), 4),
transforming it into (add (i32 GPR), 4).  This allows us to write type
generic multi patterns and have tblgen automatically drop the bitconvert
in the case when the types align.  This allows us to fold an extra load
in the changed testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99756 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a typo, bitconvert from node to itself isn't valid.
Chris Lattner [Sun, 28 Mar 2010 08:36:45 +0000 (08:36 +0000)]
fix a typo, bitconvert from node to itself isn't valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99755 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix vnot matching to explicitly specify the type of the
Chris Lattner [Sun, 28 Mar 2010 08:08:07 +0000 (08:08 +0000)]
fix vnot matching to explicitly specify the type of the
input to be v8i8 or v16i8, which buildvectors get canonicalized to.

This allows the patterns that were previously using a bare 'vnot' to
match, before they couldn't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99754 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix up vnot matching, eliminating a dead pattern, correcting a couple of
Chris Lattner [Sun, 28 Mar 2010 08:00:23 +0000 (08:00 +0000)]
fix up vnot matching, eliminating a dead pattern, correcting a couple of
patterns that would never match because of bitcast, and eliminating use
of vnot_conv.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99753 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd some nounwinds
Chris Lattner [Sun, 28 Mar 2010 07:58:37 +0000 (07:58 +0000)]
add some nounwinds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99752 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agothis takes an insane amount of time to run, disable it for now (PR6727)
Chris Lattner [Sun, 28 Mar 2010 07:58:09 +0000 (07:58 +0000)]
this takes an insane amount of time to run, disable it for now (PR6727)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99751 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agostop using vnot_conv
Chris Lattner [Sun, 28 Mar 2010 07:48:17 +0000 (07:48 +0000)]
stop using vnot_conv

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99750 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert r99743, this is saying that the repmovs instructinos have an
Chris Lattner [Sun, 28 Mar 2010 07:38:39 +0000 (07:38 +0000)]
revert r99743, this is saying that the repmovs instructinos have an
*input* of other type, which is the VT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99749 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove a bunch of dead patterns.
Chris Lattner [Sun, 28 Mar 2010 07:38:00 +0000 (07:38 +0000)]
remove a bunch of dead patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99748 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agovalidate that input sdnodes don't exist in an output pattern.
Chris Lattner [Sun, 28 Mar 2010 06:57:56 +0000 (06:57 +0000)]
validate that input sdnodes don't exist in an output pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99747 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoeliminate a bunch of code duplication in ParseTreePattern
Chris Lattner [Sun, 28 Mar 2010 06:50:34 +0000 (06:50 +0000)]
eliminate a bunch of code duplication in ParseTreePattern
by rotating it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99746 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd some node definitions.
Chris Lattner [Sun, 28 Mar 2010 06:16:41 +0000 (06:16 +0000)]
add some node definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99745 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSDTCisVT<0, isVoid> is not valid, reject it.
Chris Lattner [Sun, 28 Mar 2010 06:04:39 +0000 (06:04 +0000)]
SDTCisVT<0, isVoid> is not valid, reject it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99744 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoclaiming to return other is pointless.
Chris Lattner [Sun, 28 Mar 2010 05:57:36 +0000 (05:57 +0000)]
claiming to return other is pointless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99743 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocomply with the wishes of a fixme.
Chris Lattner [Sun, 28 Mar 2010 05:55:17 +0000 (05:55 +0000)]
comply with the wishes of a fixme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99742 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonow that (parallel) is gone and a variety of bugs in targets
Chris Lattner [Sun, 28 Mar 2010 05:54:03 +0000 (05:54 +0000)]
now that (parallel) is gone and a variety of bugs in targets
are cleaned up, we can remove an old fixme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99741 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd an optimized form of OPC_EmitMergeInputChains for the 1, 0 and
Chris Lattner [Sun, 28 Mar 2010 05:50:16 +0000 (05:50 +0000)]
add an optimized form of OPC_EmitMergeInputChains for the 1, 0 and
1, 1 cases which are by-far the most frequent.  This shrinks the X86
isel table from 77014 -> 74657 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99740 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't add nodes to the now-dead nodes list multiple times, this
Chris Lattner [Sun, 28 Mar 2010 05:28:31 +0000 (05:28 +0000)]
don't add nodes to the now-dead nodes list multiple times, this
can cause a crash on crazy situations in msp430 when morph-node-to
is disabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99739 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove systemz to model cmp and ucmp nodes as returning
Chris Lattner [Sun, 28 Mar 2010 05:21:52 +0000 (05:21 +0000)]
Improve systemz to model cmp and ucmp nodes as returning
their flags correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99738 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agothe FPCmp node returns an i32.
Chris Lattner [Sun, 28 Mar 2010 05:12:57 +0000 (05:12 +0000)]
the FPCmp node returns an i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99737 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix some modelling problems exposed by a patch I'm working on. bsr/bsf/ptest
Chris Lattner [Sun, 28 Mar 2010 05:07:17 +0000 (05:07 +0000)]
fix some modelling problems exposed by a patch I'm working on.  bsr/bsf/ptest
nodes all have an EFLAGS result when made by isel lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99736 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodon't add flag nodes with chain results to the NowDeadNodes
Chris Lattner [Sun, 28 Mar 2010 04:54:33 +0000 (04:54 +0000)]
don't add flag nodes with chain results to the NowDeadNodes
list multiple times when MorphNodeTo can't be applied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99735 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOops, r98447 dropped the reference to ForwardType in the wrong place in
Jeffrey Yasskin [Sun, 28 Mar 2010 01:03:47 +0000 (01:03 +0000)]
Oops, r98447 dropped the reference to ForwardType in the wrong place in
Type::destroy(), so it got skipped for FunctionTypes, StructTypes, and
UnionTypes.  This fixes the resulting leaks in test/Feature/opaquetypes.ll and
test/Integer/opaquetypes_bt.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99732 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a long standing fixme, which required fixing a bunch of other
Chris Lattner [Sat, 27 Mar 2010 20:45:15 +0000 (20:45 +0000)]
fix a long standing fixme, which required fixing a bunch of other
issues to get here.  We now trim the result type list of the
CompleteMatch or MorphNodeTo operation to be the same size as the
thing we're matching.  this means that if you match (add GPR, GPR)
with an instruction that produces a normal result and a flag that
we now trim the result in tblgen instead of having to do it
dynamically.  This exposed a bunch of inconsistencies in result
counting that happened to be getting lucky since the days of the
old isel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99728 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix CodeGenTarget::getRegisterVTs to not return the
Chris Lattner [Sat, 27 Mar 2010 20:32:26 +0000 (20:32 +0000)]
fix CodeGenTarget::getRegisterVTs to not return the
same vt multiple times for a register.  For example,
ECX is in 5 different i32 reg classes, just return
1 i32 instead of 5.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99727 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agohoist some funky logic into CodeGenInstruction
Chris Lattner [Sat, 27 Mar 2010 20:09:24 +0000 (20:09 +0000)]
hoist some funky logic into CodeGenInstruction
from two places in CodeGenDAGPatterns.cpp, and
use it in DAGISelMatcherGen.cpp instead of using
an incorrect predicate that happened to get lucky
on our current targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99726 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocontinue pushing tblgen's support for nodes with multiple
Chris Lattner [Sat, 27 Mar 2010 19:15:02 +0000 (19:15 +0000)]
continue pushing tblgen's support for nodes with multiple
results forward.  We can now handle an instruction that
produces one implicit def and one result instead of one or
the other when not at the root of the pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99725 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoimprove -debug-only=isel comments for cases when we don't enter a
Chris Lattner [Sat, 27 Mar 2010 18:54:50 +0000 (18:54 +0000)]
improve -debug-only=isel comments for cases when we don't enter a
scope due to obviously false predicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99723 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix a bug in my recent patch that increased opcode size to 2 bytes:
Chris Lattner [Sat, 27 Mar 2010 18:49:33 +0000 (18:49 +0000)]
fix a bug in my recent patch that increased opcode size to 2 bytes:
the index comments nested under OPC_SwitchOpcode were off by one.
This fixes the comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99722 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorevert r99719 which is breaking the botz.
Chris Lattner [Sat, 27 Mar 2010 18:01:10 +0000 (18:01 +0000)]
revert r99719 which is breaking the botz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99721 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake llvm-ld remove its output files in the event of an error.
Dan Gohman [Sat, 27 Mar 2010 16:49:51 +0000 (16:49 +0000)]
Make llvm-ld remove its output files in the event of an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99719 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGive FileRemover a default constructor to allow FileRemovers to be created
Dan Gohman [Sat, 27 Mar 2010 16:39:56 +0000 (16:39 +0000)]
Give FileRemover a default constructor to allow FileRemovers to be created
and initialized separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99717 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNo need to check the same condition twice.
Dan Gohman [Sat, 27 Mar 2010 16:36:08 +0000 (16:36 +0000)]
No need to check the same condition twice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99716 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a comment.
Dan Gohman [Sat, 27 Mar 2010 16:34:32 +0000 (16:34 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99715 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove an unnecessary #include.
Dan Gohman [Sat, 27 Mar 2010 16:33:36 +0000 (16:33 +0000)]
Remove an unnecessary #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99714 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove another memory leak from ABCD by using Edges by value instead of
Jeffrey Yasskin [Sat, 27 Mar 2010 09:09:17 +0000 (09:09 +0000)]
Remove another memory leak from ABCD by using Edges by value instead of
pointer.  There was also a SmallPtrSet whose settiness wasn't being used, so I
changed it to a SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99713 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIn ABCD, change the non-null Bound*s to Bound&s.
Jeffrey Yasskin [Sat, 27 Mar 2010 08:15:46 +0000 (08:15 +0000)]
In ABCD, change the non-null Bound*s to Bound&s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99711 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a memory leak in ABCD by giving ownership of Bound objects to the
Jeffrey Yasskin [Sat, 27 Mar 2010 08:09:24 +0000 (08:09 +0000)]
Fix a memory leak in ABCD by giving ownership of Bound objects to the
MemoizedResultChart.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99710 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoXFAIL a new tblgen test for memory leak checking.
Jeffrey Yasskin [Sat, 27 Mar 2010 04:59:47 +0000 (04:59 +0000)]
XFAIL a new tblgen test for memory leak checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99707 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid leaking the memory allocated for GlobalVariables in the interpreter, by
Jeffrey Yasskin [Sat, 27 Mar 2010 04:53:56 +0000 (04:53 +0000)]
Avoid leaking the memory allocated for GlobalVariables in the interpreter, by
freeing that memory when the GV is destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99706 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix indentation.
Bob Wilson [Sat, 27 Mar 2010 04:01:23 +0000 (04:01 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99705 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a format argument to the N3V and N3VX classes, removing the N3Vf class.
Bob Wilson [Sat, 27 Mar 2010 03:56:52 +0000 (03:56 +0000)]
Add a format argument to the N3V and N3VX classes, removing the N3Vf class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99704 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove parallel support.
Chris Lattner [Sat, 27 Mar 2010 02:53:27 +0000 (02:53 +0000)]
remove parallel support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99703 91177308-0d34-0410-b5e6-96231b3b80d8