oota-llvm.git
14 years agoHandle MVT::i64 type in DAG combine for ISD::ADD. Fold 64 bit
Richard Osborne [Wed, 10 Mar 2010 18:12:27 +0000 (18:12 +0000)]
Handle MVT::i64 type in DAG combine for ISD::ADD. Fold 64 bit
expression add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if all
operands are zero extended.

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

14 years agoRemove unneeded includes.
Daniel Dunbar [Wed, 10 Mar 2010 17:56:05 +0000 (17:56 +0000)]
Remove unneeded includes.

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

14 years agoTestcase for pr6552. I changed the code to use "ip" instead of "fp" because
Bob Wilson [Wed, 10 Mar 2010 17:54:11 +0000 (17:54 +0000)]
Testcase for pr6552.  I changed the code to use "ip" instead of "fp" because
the "fp" register name is not valid on Darwin, and the "ip" register name was
broken for all ARM targets.

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

14 years agoFix checking of intermediates having one use in isADDADDMUL
Richard Osborne [Wed, 10 Mar 2010 17:16:29 +0000 (17:16 +0000)]
Fix checking of intermediates having one use in isADDADDMUL

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

14 years agoExtract recognition of patterns such as add(add(mul(x,y),a),b)
Richard Osborne [Wed, 10 Mar 2010 17:10:35 +0000 (17:10 +0000)]
Extract recognition of patterns such as add(add(mul(x,y),a),b)
into a seperate function.

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

14 years agoFix thinko.
Richard Osborne [Wed, 10 Mar 2010 16:27:11 +0000 (16:27 +0000)]
Fix thinko.

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

14 years agoFold add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if the intermediate
Richard Osborne [Wed, 10 Mar 2010 16:19:31 +0000 (16:19 +0000)]
Fold add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if the intermediate
results are unused elsewhere.

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

14 years agoRemove duplicated code. No functionality change.
Benjamin Kramer [Wed, 10 Mar 2010 16:04:20 +0000 (16:04 +0000)]
Remove duplicated code. No functionality change.

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

14 years agoFix a bug in DEBUG_VALUE handling Devang ran into.
Dale Johannesen [Wed, 10 Mar 2010 15:06:26 +0000 (15:06 +0000)]
Fix a bug in DEBUG_VALUE handling Devang ran into.
I'll get this loop right yet.

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

14 years agoPrefer LMUL to MACCU as LMUL has no tied operands.
Richard Osborne [Wed, 10 Mar 2010 13:27:10 +0000 (13:27 +0000)]
Prefer LMUL to MACCU as LMUL has no tied operands.

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

14 years agoCustom lower (S|U)MUL_LOHI -> MACC(S|U)
Richard Osborne [Wed, 10 Mar 2010 13:20:07 +0000 (13:20 +0000)]
Custom lower (S|U)MUL_LOHI -> MACC(S|U)

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

14 years agoFix indentation
Richard Osborne [Wed, 10 Mar 2010 11:42:05 +0000 (11:42 +0000)]
Fix indentation

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

14 years agoLower add (mul a, b), c into MACCU / MACCS nodes which translate
Richard Osborne [Wed, 10 Mar 2010 11:41:08 +0000 (11:41 +0000)]
Lower add (mul a, b), c into MACCU / MACCS nodes which translate
directly to the maccu / maccs instructions. We handle this in
ExpandADDSUB since after type legalisation it is messy to
recognise these operations.

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

14 years agoConvert test to FileCheck.
Richard Osborne [Wed, 10 Mar 2010 11:24:03 +0000 (11:24 +0000)]
Convert test to FileCheck.

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

14 years agomove three lowering hooks from MAI to TLOF and make one of them
Chris Lattner [Wed, 10 Mar 2010 07:20:42 +0000 (07:20 +0000)]
move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic.  This completes MCization of
darwin/x86[-64]!

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

14 years agoFix typo.
Evan Cheng [Wed, 10 Mar 2010 07:07:55 +0000 (07:07 +0000)]
Fix typo.

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

14 years agoUnbreak test on Linux.
Evan Cheng [Wed, 10 Mar 2010 07:07:45 +0000 (07:07 +0000)]
Unbreak test on Linux.

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

14 years agoThis survived a bootstrap, so let's try 98104 again.
Dale Johannesen [Wed, 10 Mar 2010 05:45:47 +0000 (05:45 +0000)]
This survived a bootstrap, so let's try 98104 again.

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

14 years agoEnable machine cse pass.
Evan Cheng [Wed, 10 Mar 2010 03:07:41 +0000 (03:07 +0000)]
Enable machine cse pass.

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

14 years agomcize the rest of EH emission, only one more directive missing
Chris Lattner [Wed, 10 Mar 2010 02:48:06 +0000 (02:48 +0000)]
mcize the rest of EH emission, only one more directive missing
for darwin/x86 to be completely mcized.

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

14 years agoadd missing filename!
Chris Lattner [Wed, 10 Mar 2010 02:29:31 +0000 (02:29 +0000)]
add missing filename!

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

14 years agoset the temporary bit on MCSymbols correctly.
Chris Lattner [Wed, 10 Mar 2010 02:25:11 +0000 (02:25 +0000)]
set the temporary bit on MCSymbols correctly.

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

14 years agoFix a comment.
Dan Gohman [Wed, 10 Mar 2010 02:18:48 +0000 (02:18 +0000)]
Fix a comment.

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

14 years agoAdd a couple more heuristics to neuter machine cse some more.
Evan Cheng [Wed, 10 Mar 2010 02:12:03 +0000 (02:12 +0000)]
Add a couple more heuristics to neuter machine cse some more.

1. Be careful with cse "cheap" expressions. e.g. constant materialization. Only cse them when the common expression is local or in a direct predecessor. We don't want cse of cheap instruction causing other expressions to be spilled.
2. Watch out for the case where the expression doesn't itself uses a virtual register. e.g. lea of frame object. If the common expression itself is used by copies (common for passing addresses to function calls), don't perform the cse. Since these expressions do not use a register, it creates a live range but doesn't close any, we want to be very careful with increasing register pressure.

Note these are heuristics so machine cse doesn't make register allocator unhappy. Once we have proper live range splitting and re-materialization support in place, these should be evaluated again.

Now machine cse is almost always a win on llvm nightly tests on x86 and x86_64.

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

14 years agoMC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly different.
Daniel Dunbar [Wed, 10 Mar 2010 02:10:29 +0000 (02:10 +0000)]
MC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly different.

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

14 years agoClarify the documentation for MachineFunctionPasses.
Dan Gohman [Wed, 10 Mar 2010 01:29:39 +0000 (01:29 +0000)]
Clarify the documentation for MachineFunctionPasses.

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

14 years agoeliminate MCContext::CreateSymbol and CreateTemporarySymbol.
Chris Lattner [Wed, 10 Mar 2010 01:29:27 +0000 (01:29 +0000)]
eliminate MCContext::CreateSymbol and CreateTemporarySymbol.
Add a new GetOrCreateTemporarySymbol method and a version that
takes a twine.

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

14 years agoinline away a form of IsPCRelative, eliminating the
Chris Lattner [Wed, 10 Mar 2010 01:17:49 +0000 (01:17 +0000)]
inline away a form of IsPCRelative, eliminating the
dead IsPCRel argument.

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

14 years agoadd some fixme's for MCizing. EH still has a few things that
Chris Lattner [Wed, 10 Mar 2010 01:04:13 +0000 (01:04 +0000)]
add some fixme's for MCizing.  EH still has a few things that
need to be MCized, but the last debug info thing are LEB and
cygwin specific (which the MC api doesn't support yet) and
one specific form of EmitReference which I'll tackle next.

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

14 years agoMC/Mach-O: Use the SECTDIFF relocation type for (A - B + constant) where A is external.
Daniel Dunbar [Wed, 10 Mar 2010 00:58:25 +0000 (00:58 +0000)]
MC/Mach-O: Use the SECTDIFF relocation type for (A - B + constant) where A is external.
 - I'm not sure why, but this is what 'as' does.

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

14 years agoClear up the last (famous last words) frame index value reuse issues for Thumb1.
Jim Grosbach [Wed, 10 Mar 2010 00:13:42 +0000 (00:13 +0000)]
Clear up the last (famous last words) frame index value reuse issues for Thumb1.

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

14 years agoSpeculatively revert 98104; could be what's causing crashes
Dale Johannesen [Wed, 10 Mar 2010 00:11:34 +0000 (00:11 +0000)]
Speculatively revert 98104; could be what's causing crashes

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

14 years agomcize uses of PrintRelDirective and eliminate it.
Chris Lattner [Wed, 10 Mar 2010 00:09:21 +0000 (00:09 +0000)]
mcize uses of PrintRelDirective and eliminate it.

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

14 years agoinline the bool form of PrintRelDirective away, leaving just the unsigned form.
Chris Lattner [Tue, 9 Mar 2010 23:54:52 +0000 (23:54 +0000)]
inline the bool form of PrintRelDirective away, leaving just the unsigned form.

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

14 years agoeliminate EOL, adding all comments with the OutStreamer.AddComment
Chris Lattner [Tue, 9 Mar 2010 23:52:58 +0000 (23:52 +0000)]
eliminate EOL, adding all comments with the OutStreamer.AddComment
method.  With this, comments should end up on the same lines as the .byte
directives (for example) and we now get no output with:

$ llc CodeGen/X86/2009-02-12-DebugInfoVLA.ll -o - -filetype=null -asm-verbose

woot.

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

14 years agoEver more complicated DEBUG_VALUE fixes for branch folding.
Dale Johannesen [Tue, 9 Mar 2010 23:52:37 +0000 (23:52 +0000)]
Ever more complicated DEBUG_VALUE fixes for branch folding.

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

14 years agoAvoid analyzing instructions in blocks not reachable from the entry block.
Dan Gohman [Tue, 9 Mar 2010 23:46:50 +0000 (23:46 +0000)]
Avoid analyzing instructions in blocks not reachable from the entry block.
They are lots of trouble, and they don't matter. This fixes PR6559.

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

14 years agoeliminate a bunch of \n's that are being printed to O. Next up is to kill
Chris Lattner [Tue, 9 Mar 2010 23:38:23 +0000 (23:38 +0000)]
eliminate a bunch of \n's that are being printed to O.  Next up is to kill
off "EOL".

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

14 years agoconvert the non-"ispcrel" case of EmitReference to MC,
Chris Lattner [Tue, 9 Mar 2010 23:19:15 +0000 (23:19 +0000)]
convert the non-"ispcrel" case of EmitReference to MC,
significant debug info testcases are now all going through
MCStreamer, though they print a lot of extraneous newlines to "O".

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

14 years agomake the NullStreamer set the section on a label when emitted so that isDefined(...
Chris Lattner [Tue, 9 Mar 2010 23:12:18 +0000 (23:12 +0000)]
make the NullStreamer set the section on a label when emitted so that isDefined() works.

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

14 years agoTry to keep the cached inliner costs around for a bit longer for big functions.
Jakob Stoklund Olesen [Tue, 9 Mar 2010 23:02:17 +0000 (23:02 +0000)]
Try to keep the cached inliner costs around for a bit longer for big functions.

The Caller cost info would be reset everytime a callee was inlined. If the
caller has lots of calls and there is some mutual recursion going on, the
caller cost info could be calculated many times.

This patch reduces inliner runtime from 240s to 0.5s for a function with 20000
small function calls.

This is a more conservative version of r98089 that doesn't break the clang
test CodeGenCXX/temp-order.cpp. That test relies on rather extreme inlining
for constant folding.

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

14 years agoMC/X86: Rename alternate spellings of ADD{8,16,32} and mark as "code gen only" so...
Daniel Dunbar [Tue, 9 Mar 2010 22:50:46 +0000 (22:50 +0000)]
MC/X86: Rename alternate spellings of ADD{8,16,32} and mark as "code gen only" so they don't get selected by the asm matcher.

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

14 years agoMC/X86: Rename alternate spellings of CMP{8,16,32} and mark as "code gen only" so...
Daniel Dunbar [Tue, 9 Mar 2010 22:50:40 +0000 (22:50 +0000)]
MC/X86: Rename alternate spellings of CMP{8,16,32} and mark as "code gen only" so they don't get selected by the asm matcher.

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

14 years agoContinue propagating the GoogleTest flags until we can update our version to
Chandler Carruth [Tue, 9 Mar 2010 22:45:10 +0000 (22:45 +0000)]
Continue propagating the GoogleTest flags until we can update our version to
eliminate this problem. This will hopefully let us make progress on Linux
bootstrapping.

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

14 years agoRevert r98089, it was breaking a clang test.
Jakob Stoklund Olesen [Tue, 9 Mar 2010 22:43:37 +0000 (22:43 +0000)]
Revert r98089, it was breaking a clang test.

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

14 years agoTry to keep the cached inliner costs around for a bit longer for big functions.
Jakob Stoklund Olesen [Tue, 9 Mar 2010 22:17:11 +0000 (22:17 +0000)]
Try to keep the cached inliner costs around for a bit longer for big functions.

The Caller cost info would be reset everytime a callee was inlined. If the
caller has lots of calls and there is some mutual recursion going on, the
caller cost info could be calculated many times.

This patch reduces inliner runtime from 240s to 0.5s for a function with 20000
small function calls.

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

14 years agoPermit inlining into huge functions. This heuristic is ancient, and inlining
Jakob Stoklund Olesen [Tue, 9 Mar 2010 22:17:06 +0000 (22:17 +0000)]
Permit inlining into huge functions. This heuristic is ancient, and inlining
can sometimes help reduce function size.

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

14 years agoChange the Value argument to eliminateFrameIndex to a type-tagged value. This
Jim Grosbach [Tue, 9 Mar 2010 21:45:49 +0000 (21:45 +0000)]
Change the Value argument to eliminateFrameIndex to a type-tagged value. This
is preparatory to having PEI's scavenged frame index value reuse logic
properly distinguish types of frame values (e.g., whether the value is
stack-pointer relative or frame-pointer relative).

No functionality change.

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

14 years agoMSR (Move to Special Register from ARM core register) requires a mask to specify
Johnny Chen [Tue, 9 Mar 2010 21:39:34 +0000 (21:39 +0000)]
MSR (Move to Special Register from ARM core register) requires a mask to specify
what fields of the CPSR or SPSR are affected.

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

14 years agoMC/Mach-O: For PCrel relocations, we need to compensate for the PCrel adjustment...
Daniel Dunbar [Tue, 9 Mar 2010 21:27:58 +0000 (21:27 +0000)]
MC/Mach-O: For PCrel relocations, we need to compensate for the PCrel adjustment when determining if we need a scattered relocation.

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

14 years agoMC/Mach-O: Also set the PCrel bit in the second half of paired relocation entries.
Daniel Dunbar [Tue, 9 Mar 2010 21:27:47 +0000 (21:27 +0000)]
MC/Mach-O: Also set the PCrel bit in the second half of paired relocation entries.

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

14 years agoMC/Mach-O: Don't generate relocations for PCrel fixups to local labels.
Daniel Dunbar [Tue, 9 Mar 2010 21:27:30 +0000 (21:27 +0000)]
MC/Mach-O: Don't generate relocations for PCrel fixups to local labels.

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

14 years agoThe address of an indirect call must be in R12 on Darwin.
Dale Johannesen [Tue, 9 Mar 2010 20:15:42 +0000 (20:15 +0000)]
The address of an indirect call must be in R12 on Darwin.
Make it so.  (This patch is in LowerCall_Darwin, which seems
to be used by SVR4 code as well; since that doesn't belong here,
I haven't worried about this case.)

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

14 years agoConsolidate GoogleTest make options and duplicate them to its own makefile.
Chandler Carruth [Tue, 9 Mar 2010 19:24:49 +0000 (19:24 +0000)]
Consolidate GoogleTest make options and duplicate them to its own makefile.

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

14 years agoscavenged frame index value re-use gets confused when more than one base
Jim Grosbach [Tue, 9 Mar 2010 19:07:28 +0000 (19:07 +0000)]
scavenged frame index value re-use gets confused when more than one base
register is involved for thumb1. Work around this for the moment by only
re-using SP-relative offsets. This is temporary 'til the code can distinguish
multiple base registers.

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

14 years agoThe ARM EH experiment worked!
Bill Wendling [Tue, 9 Mar 2010 18:31:07 +0000 (18:31 +0000)]
The ARM EH experiment worked!

Place the LSDA into the TEXT section for ARM platforms. This involves making the
encoding indirect, pcrel, and sdata4 instead of an absolute pointer. The
references to the type infos are then non-lazy pointers. Revision 98019 changed
the encoding of non-lazy pointers to add the symbol to the non-lazy pointer
definition if it's a local symbol (otherwise, it's external and set to '0' so
that the loader can adjust it to the real value). This paved the way for this
change to work on ARM.

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

14 years agoIn cases where the carry / borrow unused converted ladd / lsub
Richard Osborne [Tue, 9 Mar 2010 16:34:25 +0000 (16:34 +0000)]
In cases where the carry / borrow unused converted ladd / lsub
to an add or a sub.

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

14 years agoCanonicalize ladd constant to RHS.
Richard Osborne [Tue, 9 Mar 2010 16:13:57 +0000 (16:13 +0000)]
Canonicalize ladd constant to RHS.

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

14 years agoAdd DAG combine for ladd / lsub.
Richard Osborne [Tue, 9 Mar 2010 16:07:47 +0000 (16:07 +0000)]
Add DAG combine for ladd / lsub.

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

14 years agoAttempt to fix random build failures seen when doing highly
Duncan Sands [Tue, 9 Mar 2010 09:03:21 +0000 (09:03 +0000)]
Attempt to fix random build failures seen when doing highly
parallel builds: the gold plugin fails to link because the lto
library is in the middle of being written out by the linker.

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

14 years agoAllow more cross-rc coalescing.
Evan Cheng [Tue, 9 Mar 2010 06:38:17 +0000 (06:38 +0000)]
Allow more cross-rc coalescing.

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

14 years agoreapply r98035:
Chris Lattner [Tue, 9 Mar 2010 04:54:43 +0000 (04:54 +0000)]
reapply r98035:
Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.

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

14 years agoadd some extra checks. I'm not sure why, but this does unbreak a
Chris Lattner [Tue, 9 Mar 2010 04:48:35 +0000 (04:48 +0000)]
add some extra checks.  I'm not sure why, but this does unbreak a
failure remaining on mainline.

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

14 years agoRevert accidental commit.
Evan Cheng [Tue, 9 Mar 2010 04:04:38 +0000 (04:04 +0000)]
Revert accidental commit.

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

14 years agoDon't do illegal cross-class coalescing.
Jakob Stoklund Olesen [Tue, 9 Mar 2010 03:56:06 +0000 (03:56 +0000)]
Don't do illegal cross-class coalescing.

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

14 years ago- Make the machine cse dumb coalescer (as opposed to the more awesome simple
Evan Cheng [Tue, 9 Mar 2010 03:21:12 +0000 (03:21 +0000)]
- Make the machine cse dumb coalescer (as opposed to the more awesome simple
  coalescer) handle sub-register classes.
- Add heuristics to avoid non-profitable cse. Given the current lack of live
  range splitting, avoid cse when an expression has PHI use and the would be
  new use is in a BB where the expression wasn't already being used.

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

14 years agoDon't try to fold V_SET0 and V_SETALLONES to loads in medium and
Dan Gohman [Tue, 9 Mar 2010 03:01:40 +0000 (03:01 +0000)]
Don't try to fold V_SET0 and V_SETALLONES to loads in medium and
large code models.

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

14 years agoThis is part of an LLC-beta test used to test <rdar://problem/6804645>. Please
Bill Wendling [Tue, 9 Mar 2010 02:46:12 +0000 (02:46 +0000)]
This is part of an LLC-beta test used to test <rdar://problem/6804645>. Please
bear with the awful code. It won't last in its current state beyond tonight.

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

14 years agoSpeculatively revert r98035. It appears to have caused a set of buildbot
Eric Christopher [Tue, 9 Mar 2010 02:36:31 +0000 (02:36 +0000)]
Speculatively revert r98035. It appears to have caused a set of buildbot
failures.

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

14 years agoAttempt to make this debug output meaningful, both in the case of
Dan Gohman [Tue, 9 Mar 2010 02:15:05 +0000 (02:15 +0000)]
Attempt to make this debug output meaningful, both in the case of
multibyte opcodes and in the case of multiple scopes.

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

14 years agoNow that setStartLabel takes an MCSymbol, we can de-ID'ize
Chris Lattner [Tue, 9 Mar 2010 02:08:02 +0000 (02:08 +0000)]
Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.

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

14 years agochange DbgScope to keep track of the start/end label as MCSymbol*
Chris Lattner [Tue, 9 Mar 2010 01:58:53 +0000 (01:58 +0000)]
change DbgScope to keep track of the start/end label as MCSymbol*
now that the dependence on ID is removed from MMI.

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

14 years agoMake isLCSSA ignore uses in blocks not reachable from the entry block,
Dan Gohman [Tue, 9 Mar 2010 01:53:33 +0000 (01:53 +0000)]
Make isLCSSA ignore uses in blocks not reachable from the entry block,
as LCSSA no longer transforms such uses.

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

14 years agoremove a useless optimization: now that label replacement never
Chris Lattner [Tue, 9 Mar 2010 01:52:43 +0000 (01:52 +0000)]
remove a useless optimization: now that label replacement never
happens, the start/end of a scope can never be the same.

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

14 years agostrength reduce MMI::MappedLabel to MMI::isLabelDeleted,
Chris Lattner [Tue, 9 Mar 2010 01:51:43 +0000 (01:51 +0000)]
strength reduce MMI::MappedLabel to MMI::isLabelDeleted,
and add a FIXME about how we are eventually going to zap this
lookup table once mc world domination is complete.

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

14 years agoinline RemapLabel into its only caller and simplify.
Chris Lattner [Tue, 9 Mar 2010 01:29:59 +0000 (01:29 +0000)]
inline RemapLabel into its only caller and simplify.

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

14 years agoMC/Mach-O: Tweak .dump() formatting.
Daniel Dunbar [Tue, 9 Mar 2010 01:12:23 +0000 (01:12 +0000)]
MC/Mach-O: Tweak .dump() formatting.

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

14 years agoMC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad...
Daniel Dunbar [Tue, 9 Mar 2010 01:12:20 +0000 (01:12 +0000)]
MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad the address.

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

14 years agoAnother place where debug info affected codegen.
Dale Johannesen [Tue, 9 Mar 2010 01:08:11 +0000 (01:08 +0000)]
Another place where debug info affected codegen.

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

14 years agomcstreamerize AsmPrinter::printLabel.
Chris Lattner [Tue, 9 Mar 2010 01:02:30 +0000 (01:02 +0000)]
mcstreamerize AsmPrinter::printLabel.

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

14 years agoAdd inlining threshold to log output.
Jakob Stoklund Olesen [Tue, 9 Mar 2010 00:59:53 +0000 (00:59 +0000)]
Add inlining threshold to log output.

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

14 years agoDisable physical register coalescing when the number of live ranges for the
Jakob Stoklund Olesen [Tue, 9 Mar 2010 00:59:48 +0000 (00:59 +0000)]
Disable physical register coalescing when the number of live ranges for the
physreg becomes ridiculously high.

std::upper_bound may be log(N), but for sufficiently large live intervals, it
becomes log(N)*cachemiss = a long long time.

This patch improves coalescer time by 4500x for a function with 20000
function calls. The generated code is different, but not significantly worse -
the allocator hints are almost as good as physreg coalescing anyway.

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

14 years agoStart using DIFile. See updated SourceLevelDebugging.html for more information.
Devang Patel [Tue, 9 Mar 2010 00:44:10 +0000 (00:44 +0000)]
Start using DIFile.  See updated SourceLevelDebugging.html for more information.

This patch updates LLVMDebugVersion to 8.
Debug info descriptors encoded using LLVMDebugVersion 7 is supported.

Corresponding llvmgcc and clang FE commits are required.

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

14 years agoPrint blank line and clear stubs vector.
Bill Wendling [Tue, 9 Mar 2010 00:43:34 +0000 (00:43 +0000)]
Print blank line and clear stubs vector.

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

14 years agoMC-ize the stub printing in ARM.
Bill Wendling [Tue, 9 Mar 2010 00:40:17 +0000 (00:40 +0000)]
MC-ize the stub printing in ARM.

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

14 years agoadd a EmitSymbolValue convenience method to MCStreamer.
Chris Lattner [Tue, 9 Mar 2010 00:39:24 +0000 (00:39 +0000)]
add a EmitSymbolValue convenience method to MCStreamer.

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

14 years agomake InlineInfoLabels hold MCSymbol*'s, avoiding
Chris Lattner [Tue, 9 Mar 2010 00:31:02 +0000 (00:31 +0000)]
make InlineInfoLabels hold MCSymbol*'s, avoiding
recomputation of the labels.

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

14 years agomc'ize the last use of PrintLabelName and eliminate PrintLabelName.
Chris Lattner [Tue, 9 Mar 2010 00:26:09 +0000 (00:26 +0000)]
mc'ize the last use of PrintLabelName and eliminate PrintLabelName.

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

14 years agoeliminate an argument from PrintRelDirective, sinking
Chris Lattner [Tue, 9 Mar 2010 00:17:58 +0000 (00:17 +0000)]
eliminate an argument from PrintRelDirective, sinking
the one special case into EmitSectionOffset.  MCize
the non-special case in EmitSectionOffset.

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

14 years agoPrint the correct index in the "match failed at index" message.
Dan Gohman [Tue, 9 Mar 2010 00:07:36 +0000 (00:07 +0000)]
Print the correct index in the "match failed at index" message.

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

14 years agoremove the suffix form of PrintLabelName, which was only
Chris Lattner [Tue, 9 Mar 2010 00:00:57 +0000 (00:00 +0000)]
remove the suffix form of PrintLabelName, which was only
used for 'flavor'.

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

14 years agonow that the debug and eh emitters use a common .set counter,
Chris Lattner [Tue, 9 Mar 2010 00:00:15 +0000 (00:00 +0000)]
now that the debug and eh emitters use a common .set counter,
we can eliminate "flavor".

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

14 years agomove .set generation out of DwarfPrinter into AsmPrinter and
Chris Lattner [Mon, 8 Mar 2010 23:58:37 +0000 (23:58 +0000)]
move .set generation out of DwarfPrinter into AsmPrinter and
MCize it.

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

14 years agoDon't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implici...
Evan Cheng [Mon, 8 Mar 2010 23:49:12 +0000 (23:49 +0000)]
Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implicit-def for obvious performance reason.

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

14 years agoRestrict machine cse to really trivial coalescing. Leave the heavy lifting to a real...
Evan Cheng [Mon, 8 Mar 2010 23:28:08 +0000 (23:28 +0000)]
Restrict machine cse to really trivial coalescing. Leave the heavy lifting to a real coalescer.

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

14 years agosimplify EmitSectionOffset to always use .set if it is
Chris Lattner [Mon, 8 Mar 2010 23:23:25 +0000 (23:23 +0000)]
simplify EmitSectionOffset to always use .set if it is
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything.  Make EmitSectionOffset call EmitDifference
instead of duplicating it.

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

14 years agodon't reset defaults.
Chris Lattner [Mon, 8 Mar 2010 23:18:21 +0000 (23:18 +0000)]
don't reset defaults.

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

14 years agoRemove a version of EmitDifference.
Chris Lattner [Mon, 8 Mar 2010 23:02:59 +0000 (23:02 +0000)]
Remove a version of EmitDifference.

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

14 years agoFix a crash compiling 254.gap for Thumb2. The Thumb2 add/sub with 12-bit
Bob Wilson [Mon, 8 Mar 2010 22:56:15 +0000 (22:56 +0000)]
Fix a crash compiling 254.gap for Thumb2.  The Thumb2 add/sub with 12-bit
immediate instructions cannot set the condition codes, so they do not have
the extra cc_out operand.  We hit an assertion during tail duplication
because the instruction being duplicated had more operands that expected.

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

14 years agoRe-commit 97860 with fix. getMallocAllocatedType may return null.
Evan Cheng [Mon, 8 Mar 2010 22:54:36 +0000 (22:54 +0000)]
Re-commit 97860 with fix. getMallocAllocatedType may return null.

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