oota-llvm.git
14 years agoRemove unneeded #include.
Owen Anderson [Mon, 22 Jun 2009 22:09:07 +0000 (22:09 +0000)]
Remove unneeded #include.

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

14 years agoFix a few minor issues that were exposed by the removal of SCEVHandle.
Dan Gohman [Mon, 22 Jun 2009 22:08:45 +0000 (22:08 +0000)]
Fix a few minor issues that were exposed by the removal of SCEVHandle.

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

14 years agoAdd explicit types for shift count constants. This is in preparation for
Bob Wilson [Mon, 22 Jun 2009 22:08:29 +0000 (22:08 +0000)]
Add explicit types for shift count constants.  This is in preparation for
another change that makes the types ambiguous (at least as far as tablegen
is concerned).

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

14 years agoFix llvm::ComputeNumSignBits to handle pointer types
Dan Gohman [Mon, 22 Jun 2009 22:02:32 +0000 (22:02 +0000)]
Fix llvm::ComputeNumSignBits to handle pointer types
conservatively correctly, instead of aborting.

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

14 years agoRemove the parent pointer from SCEV, since it did not end up being needed.
Owen Anderson [Mon, 22 Jun 2009 21:57:23 +0000 (21:57 +0000)]
Remove the parent pointer from SCEV, since it did not end up being needed.

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

14 years agoSCEVHandle is no more!
Owen Anderson [Mon, 22 Jun 2009 21:39:50 +0000 (21:39 +0000)]
SCEVHandle is no more!

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

14 years agoUse thumb2 for ARM architectures V6T2 and later. Fix a bug in checking
Bob Wilson [Mon, 22 Jun 2009 21:28:22 +0000 (21:28 +0000)]
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

14 years agoFix some typos that Duncan noticed.
Dan Gohman [Mon, 22 Jun 2009 21:10:22 +0000 (21:10 +0000)]
Fix some typos that Duncan noticed.

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

14 years agoIt's coalescer, not coaleser.
Evan Cheng [Mon, 22 Jun 2009 21:09:17 +0000 (21:09 +0000)]
It's coalescer, not coaleser.

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

14 years agoFor Darwin on ARMv6 and newer, make register r9 available for use as a
Bob Wilson [Mon, 22 Jun 2009 21:01:46 +0000 (21:01 +0000)]
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

14 years agoFix memcpy expansion so it won't generate invalid
Dale Johannesen [Mon, 22 Jun 2009 20:59:07 +0000 (20:59 +0000)]
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

14 years agoFix another register coalescer crash: forgot to check if the instruction being update...
Evan Cheng [Mon, 22 Jun 2009 20:49:32 +0000 (20:49 +0000)]
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

14 years agoUse different functions to emit the string and symbol tables.
Bruno Cardoso Lopes [Mon, 22 Jun 2009 19:29:56 +0000 (19:29 +0000)]
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

14 years agoAdd more methods to gather target specific elf stuff
Bruno Cardoso Lopes [Mon, 22 Jun 2009 19:16:16 +0000 (19:16 +0000)]
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

14 years agohasFP should return true if frame address is taken.
Evan Cheng [Mon, 22 Jun 2009 18:38:48 +0000 (18:38 +0000)]
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

14 years agoBanish global state from ScalarEvolution! SCEV uniquing is now done by tables attach...
Owen Anderson [Mon, 22 Jun 2009 18:25:46 +0000 (18:25 +0000)]
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

14 years agoRecognize and handle ARM v7 target triples for Darwin.
Bob Wilson [Mon, 22 Jun 2009 18:01:28 +0000 (18:01 +0000)]
Recognize and handle ARM v7 target triples for Darwin.

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

14 years agoFix llvm-gcc build for armv6t2 and later architectures. The hasV6T2Ops
Bob Wilson [Mon, 22 Jun 2009 17:29:13 +0000 (17:29 +0000)]
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

14 years agoMake use of getUMinFromMismatchedTypes when computing backedge-taken
Dan Gohman [Mon, 22 Jun 2009 15:09:28 +0000 (15:09 +0000)]
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

14 years agoAdd a getUMinFromMismatchedTypes helper function.
Dan Gohman [Mon, 22 Jun 2009 15:03:27 +0000 (15:03 +0000)]
Add a getUMinFromMismatchedTypes helper function.

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

14 years agoInclude cstdio to get EOF, needed with gcc-4.4.
Duncan Sands [Mon, 22 Jun 2009 06:59:32 +0000 (06:59 +0000)]
Include cstdio to get EOF, needed with gcc-4.4.

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

14 years agoprocess memory operands with a parenthesized expression for a displacement,
Chris Lattner [Mon, 22 Jun 2009 06:35:58 +0000 (06:35 +0000)]
process memory operands with a parenthesized expression for a displacement,
like "(4+5)(%eax)".

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

14 years agoImplement full support for parsing primary expressions. We can now parse
Chris Lattner [Mon, 22 Jun 2009 06:32:03 +0000 (06:32 +0000)]
Implement full support for parsing primary expressions.  We can now parse
all of health and voronoi (ignoring directives).  We only get 409 lines into
176.gcc though because we don't have binary operators yet:

Parsing 176.gcc.llc.s:409: unexpected token in operand list
movsbl _arityvec+1(,%edi,8), %eax
                ^

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

14 years agoimplement parser support for '*' operands, as in "call *%eax".
Chris Lattner [Mon, 22 Jun 2009 06:02:13 +0000 (06:02 +0000)]
implement parser support for '*' operands, as in "call *%eax".

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

14 years agoimplement memory operand parsing.
Chris Lattner [Mon, 22 Jun 2009 05:51:26 +0000 (05:51 +0000)]
implement memory operand parsing.

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

14 years agoTestcase for (llvm-gcc) 73873. Usually
Dale Johannesen [Mon, 22 Jun 2009 04:47:32 +0000 (04:47 +0000)]
Testcase for (llvm-gcc) 73873.  Usually
std::pair<double, float*>
is 16 bytes on darwin-powerpc, but not always.
See testcase for full weirdness.

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

14 years agoFactor out code for computing umin and smin for SCEV expressions into
Dan Gohman [Mon, 22 Jun 2009 03:18:45 +0000 (03:18 +0000)]
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

14 years agostart implementing some simple operand parsing.
Chris Lattner [Mon, 22 Jun 2009 01:29:09 +0000 (01:29 +0000)]
start implementing some simple operand parsing.

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

14 years agoTeach ScalarEvolution how to analyze loops with multiple exit
Dan Gohman [Mon, 22 Jun 2009 00:31:57 +0000 (00:31 +0000)]
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

14 years agoDelete an unused variable.
Dan Gohman [Mon, 22 Jun 2009 00:19:17 +0000 (00:19 +0000)]
Delete an unused variable.

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

14 years agoFix this code to correctly handle loops with multiple exits. Until
Dan Gohman [Mon, 22 Jun 2009 00:15:15 +0000 (00:15 +0000)]
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

14 years agoRename a variable for consistency with the ExitBlock vs ExitingBlock
Dan Gohman [Sun, 21 Jun 2009 23:48:38 +0000 (23:48 +0000)]
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

14 years agoFix ScalarEvolution's backedge-taken count computations to check for
Dan Gohman [Sun, 21 Jun 2009 23:46:38 +0000 (23:46 +0000)]
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

14 years agorename SourceMgr::PrintError to PrintMessage.
Chris Lattner [Sun, 21 Jun 2009 21:22:11 +0000 (21:22 +0000)]
rename SourceMgr::PrintError to PrintMessage.

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

14 years agoset up the top-level parsing loop.
Chris Lattner [Sun, 21 Jun 2009 20:54:55 +0000 (20:54 +0000)]
set up the top-level parsing loop.

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

14 years agostub out parser for asm files. Change invariant on lexer to always
Chris Lattner [Sun, 21 Jun 2009 20:16:42 +0000 (20:16 +0000)]
stub out parser for asm files.  Change invariant on lexer to always
print its error message when it returns an asmtok::Error token.
Compute a proper error code for llvm-mc in 'lex' mode.  Add new
-as-lex option to enable lexing mode (vs parsing mode).

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

14 years agoadd string literals.
Chris Lattner [Sun, 21 Jun 2009 19:56:35 +0000 (19:56 +0000)]
add string literals.

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

14 years agohopefully fix the build on linux.
Chris Lattner [Sun, 21 Jun 2009 19:43:50 +0000 (19:43 +0000)]
hopefully fix the build on linux.

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

14 years agosimplify some error recovery stuff.
Chris Lattner [Sun, 21 Jun 2009 19:22:49 +0000 (19:22 +0000)]
simplify some error recovery stuff.

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

14 years agoimplement enough of a lexer to get through Olden/health/Output/health.llc.s
Chris Lattner [Sun, 21 Jun 2009 19:21:25 +0000 (19:21 +0000)]
implement enough of a lexer to get through Olden/health/Output/health.llc.s
without errors.

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

14 years agoFix PR4185.
Rafael Espindola [Sun, 21 Jun 2009 12:02:51 +0000 (12:02 +0000)]
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

14 years agooh yeah, cmake needs to be told explicitly about new files :)
Chris Lattner [Sun, 21 Jun 2009 07:19:34 +0000 (07:19 +0000)]
oh yeah, cmake needs to be told explicitly about new files :)

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

14 years agosome baby steps.
Chris Lattner [Sun, 21 Jun 2009 07:19:10 +0000 (07:19 +0000)]
some baby steps.

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

14 years agoprune #include, fix warning.
Chris Lattner [Sun, 21 Jun 2009 05:33:06 +0000 (05:33 +0000)]
prune #include, fix warning.

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

14 years agostart wiring up support for asm parsing.
Chris Lattner [Sun, 21 Jun 2009 05:22:37 +0000 (05:22 +0000)]
start wiring up support for asm parsing.

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

14 years agomove include searching logic from TGLexer to SourceMgr.
Chris Lattner [Sun, 21 Jun 2009 05:06:04 +0000 (05:06 +0000)]
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

14 years agoRename TGSourceMgr -> SourceMgr.
Chris Lattner [Sun, 21 Jun 2009 03:41:50 +0000 (03:41 +0000)]
Rename TGSourceMgr -> SourceMgr.

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

14 years agorename TGLoc -> SMLoc.
Chris Lattner [Sun, 21 Jun 2009 03:39:35 +0000 (03:39 +0000)]
rename TGLoc -> SMLoc.

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

14 years agomove TGSourceMgr class out of TableGen into libsupport.
Chris Lattner [Sun, 21 Jun 2009 03:36:54 +0000 (03:36 +0000)]
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

14 years agosimplify closing paren and (rip) printing.
Chris Lattner [Sun, 21 Jun 2009 02:22:53 +0000 (02:22 +0000)]
simplify closing paren and (rip) printing.

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

14 years agoindentation fix
Chris Lattner [Sun, 21 Jun 2009 02:22:34 +0000 (02:22 +0000)]
indentation fix

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

14 years agoExpand this test to handle more cases (remainder and shifts) of zero.
Nick Lewycky [Sun, 21 Jun 2009 01:56:41 +0000 (01:56 +0000)]
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

14 years agofit in 80 cols
Chris Lattner [Sun, 21 Jun 2009 01:52:00 +0000 (01:52 +0000)]
fit in 80 cols

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

14 years agoremove #if 0 code
Chris Lattner [Sun, 21 Jun 2009 01:48:49 +0000 (01:48 +0000)]
remove #if 0 code

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

14 years agocosmetic changes.
Chris Lattner [Sun, 21 Jun 2009 01:27:55 +0000 (01:27 +0000)]
cosmetic changes.

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

14 years agoimplement PR4424: 0/x is always 0 for integer division.
Chris Lattner [Sun, 21 Jun 2009 01:15:55 +0000 (01:15 +0000)]
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

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