Commit Graph

29084 Commits

Author SHA1 Message Date
Bob Wilson
9170ab6685 Use thumb2 for ARM architectures V6T2 and later. Fix a bug in checking
for "thumb" and add a check for V6T2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73905 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 21:28:22 +00:00
Dan Gohman
d32f5bf22d Fix some typos that Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73903 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 21:10:22 +00:00
Bob Wilson
54fc124d72 For Darwin on ARMv6 and newer, make register r9 available for use as a
caller-saved register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73901 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 21:01:46 +00:00
Dale Johannesen
08bc98e3cc Fix memcpy expansion so it won't generate invalid
types for the target (I think).  This was breaking
the PPC32 calling sequence.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 20:59:07 +00:00
Evan Cheng
81909b7423 Fix another register coalescer crash: forgot to check if the instruction being updated has already been coalesced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 20:49:32 +00:00
Bruno Cardoso Lopes
c236a345c7 Use different functions to emit the string and symbol tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 19:29:56 +00:00
Bruno Cardoso Lopes
0d3193ef3c Add more methods to gather target specific elf stuff
Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64.
Use a map to track global values to their symbol table indexes
Code cleanup and small fixes



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 19:16:16 +00:00
Evan Cheng
8dcbbdd00e hasFP should return true if frame address is taken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73893 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 18:38:48 +00:00
Owen Anderson
08367b6163 Banish global state from ScalarEvolution! SCEV uniquing is now done by tables attached to the ScalarEvolution pass.
This also throws out the SCEV reference counting scheme, as the the SCEVs now have a lifetime controlled by the
ScalarEvolution pass.

Note that SCEVHandle is now a no-op, and will be remove in a future commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 18:25:46 +00:00
Bob Wilson
e64e3cf9ad Fix llvm-gcc build for armv6t2 and later architectures. The hasV6T2Ops
predicate does not check if Thumb mode is enabled, and when in ARM mode
there are still some checks for constant-pool use that need to run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73887 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 17:29:13 +00:00
Dan Gohman
60e9b0708a Make use of getUMinFromMismatchedTypes when computing backedge-taken
counts for loops with multiple exits, replacing more conservative code
which only handled constants. This is derived from a patch by
Nick Lewycky.

This also fixes llc aborts in ClamAV and others, as
getUMinFromMismatchedTypes takes care of balancing the types before
working with them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73884 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 15:09:28 +00:00
Dan Gohman
c9759e80f4 Add a getUMinFromMismatchedTypes helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 15:03:27 +00:00
Dan Gohman
f9a9a9928c Factor out code for computing umin and smin for SCEV expressions into
helper functions. Based on a patch by Nick Lewycky.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 03:18:45 +00:00
Dan Gohman
a334aa7a10 Teach ScalarEvolution how to analyze loops with multiple exit
blocks, and also exit blocks with multiple conditions (combined
with (bitwise) ands and ors). It's often infeasible to compute an
exact trip count in such cases, but a useful upper bound can often
be found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73866 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 00:31:57 +00:00
Dan Gohman
743ab498d8 Delete an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73865 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 00:19:17 +00:00
Dan Gohman
03ad6982c4 Fix this code to correctly handle loops with multiple exits. Until
now, this hasn't mattered, because ScalarEvolution hasn't been able
to compute trip counts for loops with multiple exits. But it will
soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73864 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 00:15:15 +00:00
Dan Gohman
5392dce881 Rename a variable for consistency with the ExitBlock vs ExitingBlock
terminology that LoopInfo uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 23:48:38 +00:00
Dan Gohman
51f53b7f5a Fix ScalarEvolution's backedge-taken count computations to check for
overflow when computing a integer division to round up.

Thanks to Nick Lewycky for noticing this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73862 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 23:46:38 +00:00
Chris Lattner
14ee48a5ba rename SourceMgr::PrintError to PrintMessage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 21:22:11 +00:00
Rafael Espindola
1c3329f707 Fix PR4185.
Handle FpSET_ST0_80 being used when ST0 is still alive.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73850 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 12:02:51 +00:00
Chris Lattner
7ee5d5f97b move include searching logic from TGLexer to SourceMgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 05:06:04 +00:00
Chris Lattner
8070ea3f06 Rename TGSourceMgr -> SourceMgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73844 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 03:41:50 +00:00
Chris Lattner
1e3a8a4924 rename TGLoc -> SMLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 03:39:35 +00:00
Chris Lattner
099e198ae8 move TGSourceMgr class out of TableGen into libsupport.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 03:36:54 +00:00
Chris Lattner
e372333597 simplify closing paren and (rip) printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 02:22:53 +00:00
Chris Lattner
4150c086d0 indentation fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73840 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 02:22:34 +00:00
Nick Lewycky
e47f59db44 Expand this test to handle more cases (remainder and shifts) of zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 01:56:41 +00:00
Chris Lattner
2f429e5eb6 remove #if 0 code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 01:48:49 +00:00
Chris Lattner
aecaa1f143 cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 01:27:55 +00:00
Chris Lattner
1db6866147 implement PR4424: 0/x is always 0 for integer division.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 01:15:55 +00:00
Chris Lattner
5c0b16d0c4 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
2009-06-20 20:38:48 +00:00
Chris Lattner
8cb65a5092 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
2009-06-20 19:34:47 +00:00
Chris Lattner
7680e73341 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
2009-06-20 19:34:09 +00:00
Chris Lattner
7f8217f64b fix edit-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73824 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 08:13:12 +00:00
Chris Lattner
dc479f6ebf some comments and cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73818 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 07:59:10 +00:00
Chris Lattner
c12430644a 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
2009-06-20 07:03:18 +00:00
Evan Cheng
694f6c81e8 Fix PR4419: handle defs of partial uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 04:34:51 +00:00
Devang Patel
e9fe6c7729 Remove unused field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 01:07:54 +00:00
Devang Patel
66b4d3ba52 Initialize MMI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 01:00:07 +00:00
Chris Lattner
ad48be0ea3 hook up printMemReference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 00:50:32 +00:00
Chris Lattner
f38c03af2a 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
2009-06-20 00:49:26 +00:00
Dan Gohman
763bad1a2b 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
2009-06-20 00:35:32 +00:00
Owen Anderson
107a537db1 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
2009-06-20 00:32:27 +00:00
Dan Gohman
3964acc2f4 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
2009-06-20 00:32:22 +00:00
Owen Anderson
ac7087ecf0 Forgot this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-20 00:26:26 +00:00
Owen Anderson
04fb7c36a9 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
2009-06-20 00:24:58 +00:00
Chris Lattner
d5fb790613 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
2009-06-19 23:59:57 +00:00
Dan Gohman
224a19c490 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
2009-06-19 23:41:37 +00:00
Dan Gohman
2c364ad4a6 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
2009-06-19 23:29:04 +00:00
Dan Gohman
2781f30eac 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
2009-06-19 23:23:27 +00:00
Devang Patel
5090f19f09 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
2009-06-19 23:21:20 +00:00
Evan Cheng
ae69a2a12b 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
2009-06-19 23:17:27 +00:00
Owen Anderson
430444b102 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
2009-06-19 23:16:19 +00:00
Dan Gohman
4d1c1efd80 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
2009-06-19 23:03:46 +00:00
Devang Patel
1e86a66b00 mv CodeGen/DebugLoc.h Support/DebugLoc.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 22:08:58 +00:00
Devang Patel
14a55d952c 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
2009-06-19 21:54:26 +00:00
Evan Cheng
73a76736fb Revert 73718. It's breaking 254.gap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73783 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 21:15:06 +00:00
Anton Korobeynikov
e494b9e0d7 Unbreak cyclic deps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 19:36:55 +00:00
Owen Anderson
b9c2f58229 Fix bad paste-o in the MSVC atomics.
Patch by Иван Сорокин.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 18:37:50 +00:00
Owen Anderson
1f0ba8c57b 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
2009-06-19 18:34:09 +00:00
Dan Gohman
0c689c5e05 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
2009-06-19 17:49:54 +00:00
Owen Anderson
8e1c17aa5a 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
2009-06-19 17:45:12 +00:00
Dan Gohman
958e292c7a 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
2009-06-19 17:33:15 +00:00
Owen Anderson
ae60c0f78e Fix incorrect comment pointed out by Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 17:20:50 +00:00
Chris Lattner
79c740ff47 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
2009-06-19 16:27:56 +00:00
Chris Lattner
225503a5b5 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
2009-06-19 15:48:10 +00:00
Duncan Sands
852cd112ed Add support for AuroraUX. Patch by evocallaghan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73766 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 14:40:01 +00:00
Evan Cheng
b1019480b6 Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-19 07:06:07 +00:00
Eli Friedman
7e2242be71 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
2009-06-19 07:00:55 +00:00
Evan Cheng
7a42b08be8 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
2009-06-19 06:56:26 +00:00
Eli Friedman
2fb070bf5a 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
2009-06-19 06:01:55 +00:00
Nick Lewycky
9683f18174 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
2009-06-19 04:56:29 +00:00
Eli Friedman
aace4b1a2c 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
2009-06-19 04:48:38 +00:00
Chris Lattner
6a35b40250 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
2009-06-19 04:22:16 +00:00
Chris Lattner
849832c0fb 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
2009-06-19 04:17:36 +00:00
Lang Hames
10382fb71d 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
2009-06-19 02:17:53 +00:00
Evan Cheng
974fe5d691 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
2009-06-19 01:59:04 +00:00
Evan Cheng
8557c2bcb8 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
2009-06-19 01:51:50 +00:00
Eli Friedman
6b7bb42c36 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
2009-06-19 01:43:08 +00:00
Chris Lattner
fadc83c699 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
2009-06-19 00:47:59 +00:00
Chris Lattner
475370b036 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
2009-06-19 00:47:33 +00:00
Chris Lattner
4e0f25b603 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
2009-06-19 00:08:39 +00:00
Chris Lattner
a93ca92379 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
2009-06-18 23:41:35 +00:00
Chris Lattner
7e816dc175 minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:33:13 +00:00
Chris Lattner
b839c3f577 simplify macro debug info directive handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:31:37 +00:00
Evan Cheng
cd828618b8 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
2009-06-18 23:14:30 +00:00
Owen Anderson
4a7893b452 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
2009-06-18 22:25:12 +00:00
Lang Hames
d21c31610c 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
2009-06-18 22:01:47 +00:00
Owen Anderson
e454067f97 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 21:35:56 +00:00
Owen Anderson
b2c0fe4d93 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73723 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 20:56:48 +00:00
Owen Anderson
3c8031df6d 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
2009-06-18 20:51:00 +00:00
Owen Anderson
f0f220a07e Simplify with SmartRWMutex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 20:44:31 +00:00
Evan Cheng
b13bafe5c1 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
2009-06-18 20:37:15 +00:00
Owen Anderson
bcf9737f1e 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
2009-06-18 20:36:21 +00:00
Dan Gohman
4658c9b4ea 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
2009-06-18 20:23:18 +00:00
Dan Gohman
30fb512e95 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
2009-06-18 20:21:07 +00:00
Owen Anderson
6cf69cfdee 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
2009-06-18 20:15:26 +00:00
Anton Korobeynikov
9547cdfa35 Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 20:05:31 +00:00
Owen Anderson
ee6aefcaa3 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
2009-06-18 19:10:19 +00:00
Owen Anderson
0e4d606684 Use SmartMutex to simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73712 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 18:36:34 +00:00