oota-llvm.git
14 years agochange TLS_ADDR lowering to lower to a real mem operand, instead of matching as
Chris Lattner [Sat, 20 Jun 2009 20:38:48 +0000 (20:38 +0000)]
change TLS_ADDR lowering to lower to a real mem operand, instead of matching as
a global with that gets printed with the :mem modifier.  All operands to lea's
should be handled with the lea32mem operand kind, and this allows the TLS stuff
to do this.  There are several better ways to do this, but I went for the minimal
change since I can't really test this (beyond make check).

This also makes the use of EBX explicit in the operand list in the 32-bit,
instead of implicit in the instruction.

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

14 years agono need for unwind info
Chris Lattner [Sat, 20 Jun 2009 19:48:26 +0000 (19:48 +0000)]
no need for unwind info

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

14 years agono need for unwind info here.
Chris Lattner [Sat, 20 Jun 2009 19:43:09 +0000 (19:43 +0000)]
no need for unwind info here.

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

14 years agoremove dead code, the main codepath never has to deal
Chris Lattner [Sat, 20 Jun 2009 19:34:47 +0000 (19:34 +0000)]
remove dead code, the main codepath never has to deal
with MBB's.

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

14 years agoeliminate the "call" operand modifier from the asm descriptions, modeling
Chris Lattner [Sat, 20 Jun 2009 19:34:09 +0000 (19:34 +0000)]
eliminate the "call" operand modifier from the asm descriptions, modeling
it as a pcrel immediate instead.  This gets pc-rel weirdness out of the
main printoperand codepath.

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

14 years agoClarify that if the alignment is zero then an alignment
Duncan Sands [Sat, 20 Jun 2009 13:26:06 +0000 (13:26 +0000)]
Clarify that if the alignment is zero then an alignment
compatible with the type will be used (at least the ABI
alignment).

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

14 years agofix edit-o
Chris Lattner [Sat, 20 Jun 2009 08:13:12 +0000 (08:13 +0000)]
fix edit-o

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

14 years agosome comments and cleanup
Chris Lattner [Sat, 20 Jun 2009 07:59:10 +0000 (07:59 +0000)]
some comments and cleanup

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

14 years agoimplement support for lowering subregs when preparing to print
Chris Lattner [Sat, 20 Jun 2009 07:03:18 +0000 (07:03 +0000)]
implement support for lowering subregs when preparing to print
LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes.

Implement support for printing mbb labels as operands.

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

14 years agoFix PR4419: handle defs of partial uses.
Evan Cheng [Sat, 20 Jun 2009 04:34:51 +0000 (04:34 +0000)]
Fix PR4419: handle defs of partial uses.

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

14 years agoRemove unused field.
Devang Patel [Sat, 20 Jun 2009 01:07:54 +0000 (01:07 +0000)]
Remove unused field.

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

14 years agoInitialize MMI
Devang Patel [Sat, 20 Jun 2009 01:00:07 +0000 (01:00 +0000)]
Initialize MMI

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

14 years agohook up printMemReference.
Chris Lattner [Sat, 20 Jun 2009 00:50:32 +0000 (00:50 +0000)]
hook up printMemReference.

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

14 years agoStart implementing translation of MachineInstr to MCInst. Next
Chris Lattner [Sat, 20 Jun 2009 00:49:26 +0000 (00:49 +0000)]
Start implementing translation of MachineInstr to MCInst.  Next
step is to make tblgen generate something more appropriate for MCInst,
and generate calls to operand translation routines where needed.
This includes a bunch of #if 0 code which will slowly be refactored into
something sensible.

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

14 years agomake immediates be int64_t like machineoperand. Add some apis
Chris Lattner [Sat, 20 Jun 2009 00:47:37 +0000 (00:47 +0000)]
make immediates be int64_t like machineoperand.  Add some apis

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

14 years agoTweak this test to be a little less unusual.
Dan Gohman [Sat, 20 Jun 2009 00:40:56 +0000 (00:40 +0000)]
Tweak this test to be a little less unusual.

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

14 years agoGeneralize isLoopGuardedByCond's checking to consider two
Dan Gohman [Sat, 20 Jun 2009 00:35:32 +0000 (00:35 +0000)]
Generalize isLoopGuardedByCond's checking to consider two
SCEVUnknowns with identical Instructions to be equal. This allows
it to analze cases such as the attached testcase, where the front-end
has cloned the loop controlling expression. Along with r73805, this
lets IndVarSimplify eliminate all the sign-extend casts in the
loop in the attached testcase.

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

14 years agoWorkaround for an... interesting bug in Darwin's pthread_rwlock_init.
Owen Anderson [Sat, 20 Jun 2009 00:32:27 +0000 (00:32 +0000)]
Workaround for an... interesting bug in Darwin's pthread_rwlock_init.

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

14 years agoUse ScalarEvolution's new GetMinSignBits and GetMinLeadingZeros
Dan Gohman [Sat, 20 Jun 2009 00:32:22 +0000 (00:32 +0000)]
Use ScalarEvolution's new GetMinSignBits and GetMinLeadingZeros
in the loop backedge-taken count computation of the maximum
possible trip count.

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

14 years agoAdd debugging code to test for various locking faux-pas's, when running in single...
Owen Anderson [Sat, 20 Jun 2009 00:27:21 +0000 (00:27 +0000)]
Add debugging code to test for various locking faux-pas's, when running in single threaded mode.  This should help improve testing coverage for
threading support, without having extensive actually concurrent clients yet.

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

14 years agoForgot this file.
Owen Anderson [Sat, 20 Jun 2009 00:26:26 +0000 (00:26 +0000)]
Forgot this file.

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

14 years agoRevert r73790, and replace it with a significantly less ugly solution. Rather than...
Owen Anderson [Sat, 20 Jun 2009 00:24:58 +0000 (00:24 +0000)]
Revert r73790, and replace it with a significantly less ugly solution.  Rather than trying to make the global reader-writer lock work,
create separate recursive mutexes for each value map.  The recursive-ness fixes the double-acquiring issue, which having one per ValueMap
lets us continue to maintain some concurrency.

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

14 years agostub out some hacky code for wiring up the new asmprinter interfaces
Chris Lattner [Fri, 19 Jun 2009 23:59:57 +0000 (23:59 +0000)]
stub out some hacky code for wiring up the new asmprinter interfaces
on X86.  Not useful yet.

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

14 years agoallow clients of the asmprinter to opt-out of the boilerplate with a #define.
Chris Lattner [Fri, 19 Jun 2009 23:57:53 +0000 (23:57 +0000)]
allow clients of the asmprinter to opt-out of the boilerplate with a #define.

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

14 years agoFix a typo in a comment that Frits von Bommel noticed.
Dan Gohman [Fri, 19 Jun 2009 23:41:37 +0000 (23:41 +0000)]
Fix a typo in a comment that Frits von Bommel noticed.

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

14 years agoMake GetMinTrailingZeros a member function of ScalarEvolution,
Dan Gohman [Fri, 19 Jun 2009 23:29:04 +0000 (23:29 +0000)]
Make GetMinTrailingZeros a member function of ScalarEvolution,
so that it can access the TargetData member (when available) and
use ValueTracking.h information to compute information for
SCEVUnknown Values.

Also add GetMinLeadingZeros and GetMinSignBits functions,
with minimal implementations.

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

14 years agoRe-apply r73718, now that the fix in r73787 is in, and add a
Dan Gohman [Fri, 19 Jun 2009 23:23:27 +0000 (23:23 +0000)]
Re-apply r73718, now that the fix in r73787 is in, and add a
hand-crafted testcase which demonstrates the bug that was exposed
in 254.gap.

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

14 years agoDwarfWriter is used to emit EH info also.
Devang Patel [Fri, 19 Jun 2009 23:21:20 +0000 (23:21 +0000)]
DwarfWriter is used to emit EH info also.

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

14 years agoEnable arm pre-allocation load / store multiple optimization pass.
Evan Cheng [Fri, 19 Jun 2009 23:17:27 +0000 (23:17 +0000)]
Enable arm pre-allocation load / store multiple optimization pass.

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

14 years agoFix a serious bug that would cause deadlock during abstract type refinement. The...
Owen Anderson [Fri, 19 Jun 2009 23:16:19 +0000 (23:16 +0000)]
Fix a serious bug that would cause deadlock during abstract type refinement.  The constant creation
gets involved, and we end up trying to recursively acquire a writer lock.  The fix for this is slightly horrible,
and involves passing a boolean "locked" parameter around in Constants.cpp, but it's better than having locked and
unlocked versions of most of the code.

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

14 years agoFix LSR's OptimizeSMax to ignore max operators with more than 2 operands,
Dan Gohman [Fri, 19 Jun 2009 23:03:46 +0000 (23:03 +0000)]
Fix LSR's OptimizeSMax to ignore max operators with more than 2 operands,
which it isn't prepared to handle.

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

14 years agomv CodeGen/DebugLoc.h Support/DebugLoc.h
Devang Patel [Fri, 19 Jun 2009 22:08:58 +0000 (22:08 +0000)]
mv CodeGen/DebugLoc.h Support/DebugLoc.h

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

14 years agoMove up dwarf writer initialization in common AsmPrinter class.
Devang Patel [Fri, 19 Jun 2009 21:54:26 +0000 (21:54 +0000)]
Move up dwarf writer initialization in common AsmPrinter class.

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

14 years agoRevert 73718. It's breaking 254.gap.
Evan Cheng [Fri, 19 Jun 2009 21:15:06 +0000 (21:15 +0000)]
Revert 73718. It's breaking 254.gap.

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

14 years agoUnbreak cyclic deps
Anton Korobeynikov [Fri, 19 Jun 2009 19:36:55 +0000 (19:36 +0000)]
Unbreak cyclic deps

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

14 years agoFix bad paste-o in the MSVC atomics.
Owen Anderson [Fri, 19 Jun 2009 18:37:50 +0000 (18:37 +0000)]
Fix bad paste-o in the MSVC atomics.

Patch by Ð\98ван Ð¡Ð¾Ñ\80окин.

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

14 years agoForgot to remove some explicit locking when it became implicit in the ValueMap.
Owen Anderson [Fri, 19 Jun 2009 18:34:09 +0000 (18:34 +0000)]
Forgot to remove some explicit locking when it became implicit in the ValueMap.

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

14 years agoFences are expensive. Avoid doing them when we're not in multithreaded mode.
Owen Anderson [Fri, 19 Jun 2009 17:50:11 +0000 (17:50 +0000)]
Fences are expensive.  Avoid doing them when we're not in multithreaded mode.

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

14 years agoMake ScalarEvolution::print print getSCEVAtScope values for
Dan Gohman [Fri, 19 Jun 2009 17:49:54 +0000 (17:49 +0000)]
Make ScalarEvolution::print print getSCEVAtScope values for
expressions, when interesting.

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

14 years agoMove the memory fences out of the path for single-threaded mode.
Owen Anderson [Fri, 19 Jun 2009 17:45:12 +0000 (17:45 +0000)]
Move the memory fences out of the path for single-threaded mode.

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

14 years agoDon't (unconditionally) use getSCEVAtScope to simplify the step
Dan Gohman [Fri, 19 Jun 2009 17:33:15 +0000 (17:33 +0000)]
Don't (unconditionally) use getSCEVAtScope to simplify the step
expression in IVUsers, because in the case of a use of a non-linear
addrec outside of a loop, this causes the addrec to be evaluated as
a linear addrec.

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

14 years agoFix incorrect comment pointed out by Duncan.
Owen Anderson [Fri, 19 Jun 2009 17:20:50 +0000 (17:20 +0000)]
Fix incorrect comment pointed out by Duncan.

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

14 years agoClean up nightly tester to use Perl's File::Find.
Bob Wilson [Fri, 19 Jun 2009 17:19:38 +0000 (17:19 +0000)]
Clean up nightly tester to use Perl's File::Find.
Patch by Benjamin Kramer.

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

14 years agoFix a major typo.
Owen Anderson [Fri, 19 Jun 2009 17:08:20 +0000 (17:08 +0000)]
Fix a major typo.

Nicolas, this is probably the cause of the failures you were seeing.

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

14 years agomake jump threading handle lexically identical compare instructions
Chris Lattner [Fri, 19 Jun 2009 16:27:56 +0000 (16:27 +0000)]
make jump threading handle lexically identical compare instructions
as if they were multiple uses of the same instruction.  This interacts
well with the existing loadpre that j-t does to open up many new jump
threads earlier.

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

14 years agofix the sparc codegen to not depend on the sparc asmprinter.
Chris Lattner [Fri, 19 Jun 2009 15:48:10 +0000 (15:48 +0000)]
fix the sparc codegen to not depend on the sparc asmprinter.

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

14 years agoAdd support for AuroraUX. Patch by evocallaghan.
Duncan Sands [Fri, 19 Jun 2009 14:40:01 +0000 (14:40 +0000)]
Add support for AuroraUX.  Patch by evocallaghan.

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

14 years agoSince -Wno-long-long is ignored without -pedantic,
Duncan Sands [Fri, 19 Jun 2009 12:40:30 +0000 (12:40 +0000)]
Since -Wno-long-long is ignored without -pedantic,
place it with -pedantic.  Remove -Wunused since it
is implied by -Wall.  Group -Wno-unused-parameter
with -Wall -W since it is the combination of these
two that turns on -Wunused-parameter.

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

14 years agoAdd comments.
Evan Cheng [Fri, 19 Jun 2009 07:06:07 +0000 (07:06 +0000)]
Add comments.

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

14 years agoFix for PR2484: add an SSE1 pattern for a shuffle we normally prefer to
Eli Friedman [Fri, 19 Jun 2009 07:00:55 +0000 (07:00 +0000)]
Fix for PR2484: add an SSE1 pattern for a shuffle we normally prefer to
handle with an SSE2 instruction.

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

14 years agoShould be using Bcc (average) latency to determine if-conversion threshold, not BL.
Evan Cheng [Fri, 19 Jun 2009 06:56:26 +0000 (06:56 +0000)]
Should be using Bcc (average) latency to determine if-conversion threshold, not BL.

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

14 years agoMinor cleanup; fixes review comments for a previous patch. Sorry for
Eli Friedman [Fri, 19 Jun 2009 06:01:55 +0000 (06:01 +0000)]
Minor cleanup; fixes review comments for a previous patch.  Sorry for
taking so long to get to this!

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

14 years agoTeach jump threading to look at comparisons between phi nodes and non-constants.
Nick Lewycky [Fri, 19 Jun 2009 04:56:29 +0000 (04:56 +0000)]
Teach jump threading to look at comparisons between phi nodes and non-constants.

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

14 years agoMisc tweaks to Intel asm printing to make it more compatible with MASM.
Eli Friedman [Fri, 19 Jun 2009 04:48:38 +0000 (04:48 +0000)]
Misc tweaks to Intel asm printing to make it more compatible with MASM.
Patch by Benedict Gaster.

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

14 years agoImprove tail call elim to move loads above readonly calls
Chris Lattner [Fri, 19 Jun 2009 04:22:16 +0000 (04:22 +0000)]
Improve tail call elim to move loads above readonly calls
when it allows forming a tail call.  Patch by Frits van
Bommel.  This implements PR4323.

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

14 years agopart of PR4405: disable a contentious optimization for
Chris Lattner [Fri, 19 Jun 2009 04:17:36 +0000 (04:17 +0000)]
part of PR4405: disable a contentious optimization for
strcmp -> memcmp when the lengths of the strings are unknown.

Patch by Nick Lewycky!

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

14 years agoMore VNInfo tweaking, plus a little progress on intra-block splitting.
Lang Hames [Fri, 19 Jun 2009 02:17:53 +0000 (02:17 +0000)]
More VNInfo tweaking, plus a little progress on intra-block splitting.

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

14 years agoTransfer dead markers when a ldrd is changed into a ldm or a pair of ldr.
Evan Cheng [Fri, 19 Jun 2009 01:59:04 +0000 (01:59 +0000)]
Transfer dead markers when a ldrd is changed into a ldm or a pair of ldr.

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

14 years agoInclude DataTypes.h for 'uint64_t'.
Zhongxing Xu [Fri, 19 Jun 2009 01:56:53 +0000 (01:56 +0000)]
Include DataTypes.h for 'uint64_t'.

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

14 years agoLatency information for ARM v6. It's rough and not yet hooked up. Right now we are...
Evan Cheng [Fri, 19 Jun 2009 01:51:50 +0000 (01:51 +0000)]
Latency information for ARM v6. It's rough and not yet hooked up. Right now  we are only using branch latency to determine if-conversion limits.

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

14 years agoMark a few Thumb instructions commutable; just happened to spot this
Eli Friedman [Fri, 19 Jun 2009 01:43:08 +0000 (01:43 +0000)]
Mark a few Thumb instructions commutable; just happened to spot this
while experimenting.  I'm reasonably sure this is correct, but please
tell me if these instructions have some strange property which makes this
change unsafe.

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

14 years agoFix weird class-size-being-different problems. At some level this is being caused...
Owen Anderson [Fri, 19 Jun 2009 00:48:22 +0000 (00:48 +0000)]
Fix weird class-size-being-different problems.  At some level this is being caused by config.h not being
included everywhere.

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

14 years agoadd a file I missed, this goes with r73743
Chris Lattner [Fri, 19 Jun 2009 00:47:59 +0000 (00:47 +0000)]
add a file I missed, this goes with r73743

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

14 years agoAdd some scaffolding for a new experimental asmprinter
Chris Lattner [Fri, 19 Jun 2009 00:47:33 +0000 (00:47 +0000)]
Add some scaffolding for a new experimental asmprinter
implementation.  The idea is that we want asmprinting to
work by converting MachineInstrs into a new MCInst class,
then the per-instruction asmprinter works on MCInst.  MCInst
and the new asmprinters will not depend on most of the
llvm code generators.  This allows building diassemblers
that don't link in the whole llvm code generator.  This is
step #1 of many.

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

14 years agomerge the common darwin settings from the X86/PPC/ARM targets
Chris Lattner [Fri, 19 Jun 2009 00:08:39 +0000 (00:08 +0000)]
merge the common darwin settings from the X86/PPC/ARM targets
into DarwinTargetAsmInfo.cpp.  The remaining differences should
be evaluated.  It seems strange that x86/arm has .zerofill but ppc
doesn't, etc.

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

14 years agofix build problem pointed out by John Thompson!
Chris Lattner [Thu, 18 Jun 2009 23:46:04 +0000 (23:46 +0000)]
fix build problem pointed out by John Thompson!

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

14 years agomove mangler quote handling from asm printers to TargetAsmInfo.
Chris Lattner [Thu, 18 Jun 2009 23:41:35 +0000 (23:41 +0000)]
move mangler quote handling from asm printers to TargetAsmInfo.

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

14 years agominor cleanup
Chris Lattner [Thu, 18 Jun 2009 23:33:13 +0000 (23:33 +0000)]
minor cleanup

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

14 years agosimplify macro debug info directive handling.
Chris Lattner [Thu, 18 Jun 2009 23:31:37 +0000 (23:31 +0000)]
simplify macro debug info directive handling.

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

14 years agoRemove UseThumbBacktraces. Just check if subtarget is darwin.
Evan Cheng [Thu, 18 Jun 2009 23:14:30 +0000 (23:14 +0000)]
Remove UseThumbBacktraces. Just check if subtarget is darwin.

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

14 years agofix file header
Chris Lattner [Thu, 18 Jun 2009 23:05:21 +0000 (23:05 +0000)]
fix file header

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

14 years agoAdd a skeleton driver for new machine code level fun. llvm-mc is meant
Chris Lattner [Thu, 18 Jun 2009 23:04:45 +0000 (23:04 +0000)]
Add a skeleton driver for new machine code level fun.  llvm-mc is meant
to be a test driver of other components in the system, which will develop
over time.

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

14 years agonew testcase for rdar://6983634
Chris Lattner [Thu, 18 Jun 2009 22:53:26 +0000 (22:53 +0000)]
new testcase for rdar://6983634

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

14 years agoAdd a parent pointer to SCEV, in preparation for getting rid of the global uniquing...
Owen Anderson [Thu, 18 Jun 2009 22:25:12 +0000 (22:25 +0000)]
Add a parent pointer to SCEV, in preparation for getting rid of the global uniquing tables.  No functionality change.

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

14 years agoImproved PHI def marking, replaced some gotos with breaks.
Lang Hames [Thu, 18 Jun 2009 22:01:47 +0000 (22:01 +0000)]
Improved PHI def marking, replaced some gotos with breaks.

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

14 years agoAllow user to specify separate SVN url for llvm and the test suite.
Evan Cheng [Thu, 18 Jun 2009 21:39:50 +0000 (21:39 +0000)]
Allow user to specify separate SVN url for llvm and the test suite.

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

14 years agoSimplify.
Owen Anderson [Thu, 18 Jun 2009 21:35:56 +0000 (21:35 +0000)]
Simplify.

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

14 years agoSimplify.
Owen Anderson [Thu, 18 Jun 2009 20:56:48 +0000 (20:56 +0000)]
Simplify.

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

14 years agoAdd a SmartScopedLock, and use it to simplify code.
Owen Anderson [Thu, 18 Jun 2009 20:51:00 +0000 (20:51 +0000)]
Add a SmartScopedLock, and use it to simplify code.

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

14 years agoSimplify with SmartRWMutex.
Owen Anderson [Thu, 18 Jun 2009 20:44:31 +0000 (20:44 +0000)]
Simplify with SmartRWMutex.

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

14 years agoOn Darwin, ams printer should output a second label before a jump table so the linker...
Evan Cheng [Thu, 18 Jun 2009 20:37:15 +0000 (20:37 +0000)]
On Darwin, ams printer should output a second label before a jump table so the linker knows it's a new atom. But this is only needed if the jump table is put in a separate section from the function body.

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

14 years agoSimplify by using no-op-when-not-multithreaded locks.
Owen Anderson [Thu, 18 Jun 2009 20:36:21 +0000 (20:36 +0000)]
Simplify by using no-op-when-not-multithreaded locks.

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

14 years agoGeneralize LSR's OptimizeSMax to handle unsigned max tests as well
Dan Gohman [Thu, 18 Jun 2009 20:23:18 +0000 (20:23 +0000)]
Generalize LSR's OptimizeSMax to handle unsigned max tests as well
as signed max tests. Along with r73717, this helps CodeGen avoid
emitting code for a maximum operation for this class of loop.

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

14 years agoRecognize n != 0 ? n : 1 as umax(n, 1). Previously only ULT/UGT/ULE/UGE
Dan Gohman [Thu, 18 Jun 2009 20:21:07 +0000 (20:21 +0000)]
Recognize n != 0 ? n : 1 as umax(n, 1). Previously only ULT/UGT/ULE/UGE
comparisons were recognized for umax, but instcombine canonicalizes
unsigned comparisons with zero to this simpler form.

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

14 years agoSimplify using mutexes that become no-ops when not in multithreaded mode.
Owen Anderson [Thu, 18 Jun 2009 20:15:26 +0000 (20:15 +0000)]
Simplify using mutexes that become no-ops when not in multithreaded mode.

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

14 years agoRevert IRBuilder CC propagation. Fix SimplifyLibCalls instead.
Anton Korobeynikov [Thu, 18 Jun 2009 20:05:31 +0000 (20:05 +0000)]
Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.

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

14 years agoSimplify a lot of code by using a R/W mutex that becomes a no-op when multithreading...
Owen Anderson [Thu, 18 Jun 2009 19:10:19 +0000 (19:10 +0000)]
Simplify a lot of code by using a R/W mutex that becomes a no-op when multithreading is disabled.

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

14 years agoUse SmartMutex to simplify.
Owen Anderson [Thu, 18 Jun 2009 18:36:34 +0000 (18:36 +0000)]
Use SmartMutex to simplify.

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

14 years agoSimplify the SmartMutex implementation a bit.
Owen Anderson [Thu, 18 Jun 2009 18:29:03 +0000 (18:29 +0000)]
Simplify the SmartMutex implementation a bit.

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

14 years agoGive RWMutex the SmartRWMutex treatment too.
Owen Anderson [Thu, 18 Jun 2009 18:26:15 +0000 (18:26 +0000)]
Give RWMutex the SmartRWMutex treatment too.

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

14 years agoInsert a SmartMutex templated class into the class hierarchy, which takes a template...
Owen Anderson [Thu, 18 Jun 2009 17:53:17 +0000 (17:53 +0000)]
Insert a SmartMutex templated class into the class hierarchy, which takes a template parameter specifying whether this mutex
should become a no-op when not running in multithreaded mode.  Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility.

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

14 years agoUpdate CMake files to account for new location of Threading.cpp.
Ted Kremenek [Thu, 18 Jun 2009 17:47:09 +0000 (17:47 +0000)]
Update CMake files to account for new location of Threading.cpp.

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

14 years agoMove Threading.[h|cpp] from Support to System.
Owen Anderson [Thu, 18 Jun 2009 16:54:52 +0000 (16:54 +0000)]
Move Threading.[h|cpp] from Support to System.

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

14 years agoRemove the code from IVUsers that attempted to handle
Dan Gohman [Thu, 18 Jun 2009 16:54:06 +0000 (16:54 +0000)]
Remove the code from IVUsers that attempted to handle
casted induction variables in cases where the cast
isn't foldable. It ended up being a pessimization in
many cases. This could be fixed, but it would require
a bunch of complicated code in IVUsers' clients. The
advantages of this approach aren't visible enough to
justify it at this time.

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

14 years agoGeneralize the zext(trunc(t) & C) instcombine to work even with
Dan Gohman [Thu, 18 Jun 2009 16:30:21 +0000 (16:30 +0000)]
Generalize the zext(trunc(t) & C) instcombine to work even with
C is not a low-bits mask, and add a similar instcombine for
zext((trunc(t) & C) ^ C).

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

14 years agoUpdate a comment to reflect the code.
Dan Gohman [Thu, 18 Jun 2009 16:24:47 +0000 (16:24 +0000)]
Update a comment to reflect the code.

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

14 years agoFix the double checked locking in this file too.
Owen Anderson [Thu, 18 Jun 2009 16:17:42 +0000 (16:17 +0000)]
Fix the double checked locking in this file too.

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

14 years agoAs pointed out by Duncan, I accidentally dropped the first MemoryFence of the
Owen Anderson [Thu, 18 Jun 2009 16:08:27 +0000 (16:08 +0000)]
As pointed out by Duncan, I accidentally dropped the first MemoryFence of the
double-checked locking pattern here.

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

14 years agoForgot to commit this hunk
Anton Korobeynikov [Thu, 18 Jun 2009 08:30:57 +0000 (08:30 +0000)]
Forgot to commit this hunk

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

14 years agoPropagate calling conv for invokes too
Anton Korobeynikov [Thu, 18 Jun 2009 08:13:56 +0000 (08:13 +0000)]
Propagate calling conv for invokes too

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