Commit Graph

58241 Commits

Author SHA1 Message Date
Chris Lattner 1f6689a8ba move PR6576 here.
llvm-svn: 98194
2010-03-10 21:42:42 +00:00
Chris Lattner 0c48de0d62 add DESTDIR support for TOOLALIAS, for PR6557, patch by
Matthias Klose!

llvm-svn: 98193
2010-03-10 21:27:53 +00:00
Dan Gohman 703b12d62f Fix another bitwidth calculation to handle vector types; based on a
patch by Micah Villmow for PR6572.

llvm-svn: 98188
2010-03-10 21:04:53 +00:00
Daniel Dunbar dc765e9f03 MC/Mach-O: Use the MCAssembler symbol map instead of reconstructing.
llvm-svn: 98187
2010-03-10 20:58:31 +00:00
Daniel Dunbar 6eab721011 MC: Move the backend section and symbol data maps to MCAssembler.
llvm-svn: 98186
2010-03-10 20:58:29 +00:00
Daniel Dunbar bf801a559a Remove unneeded declarations.
llvm-svn: 98185
2010-03-10 20:58:25 +00:00
Jim Grosbach f0a7e8e77d Make sure the LR gets pushed in functions that use vaargs. This fixes
400.perlbench for the nightly tests.

llvm-svn: 98183
2010-03-10 20:01:30 +00:00
Jim Grosbach 77f781405d comment why we use custom epilogue for t1 functions using vaargs.
llvm-svn: 98182
2010-03-10 19:59:47 +00:00
Dale Johannesen e9b361b2e6 Fix another place where DEBUG_VALUE affected codegen.
llvm-svn: 98181
2010-03-10 19:57:56 +00:00
Dan Gohman 2734ebd37f Add a DominatorTree argument to isLCSSA so that it doesn't have to
compute a set of reachable blocks for itself each time it is called, which
is fairly frequently.

llvm-svn: 98179
2010-03-10 19:38:49 +00:00
Dan Gohman 474e488c06 Constant-fold GEP-of-GEP into a single GEP.
llvm-svn: 98178
2010-03-10 19:31:51 +00:00
Dan Gohman fc7a25dc36 Fix whitespace.
llvm-svn: 98173
2010-03-10 19:00:54 +00:00
Johnny Chen 9a3e2398ae Factored out the disassembly printing of CPS option, MSR mask, and Negative Zero
operands into their own PrintMethod, in order not to pollute the printOperand()
impl with disassembly only Imm modifiers.

llvm-svn: 98172
2010-03-10 18:59:38 +00:00
Tobias Grosser ab19e1e9b5 Fix make check with cmake/lit
PR6540: Set the newly introduced variables ENABLE_SHARED and
SHLIBPATH_VAR in lit.site.cfg not only in the autoconf build, but also
in a cmake one.

llvm-svn: 98171
2010-03-10 18:41:59 +00:00
Richard Osborne 66839831a7 The backend now makes a reasonable job of targeting lmul / macc
llvm-svn: 98169
2010-03-10 18:14:47 +00:00
Richard Osborne 54a2c32670 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.

llvm-svn: 98168
2010-03-10 18:12:27 +00:00
Daniel Dunbar 7e3283c055 Remove unneeded includes.
llvm-svn: 98167
2010-03-10 17:56:05 +00:00
Bob Wilson dfebf1ffac 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.

llvm-svn: 98166
2010-03-10 17:54:11 +00:00
Richard Osborne c99b9b2193 Fix checking of intermediates having one use in isADDADDMUL
llvm-svn: 98164
2010-03-10 17:16:29 +00:00
Richard Osborne 5a457de4b2 Extract recognition of patterns such as add(add(mul(x,y),a),b)
into a seperate function.

llvm-svn: 98162
2010-03-10 17:10:35 +00:00
Richard Osborne 11ec7ee125 Fix thinko.
llvm-svn: 98158
2010-03-10 16:27:11 +00:00
Richard Osborne 1a396d53ed Fold add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if the intermediate
results are unused elsewhere.

llvm-svn: 98157
2010-03-10 16:19:31 +00:00
Benjamin Kramer 74ca599a73 Remove duplicated code. No functionality change.
llvm-svn: 98156
2010-03-10 16:04:20 +00:00
Dale Johannesen 8340cc0d6c Fix a bug in DEBUG_VALUE handling Devang ran into.
I'll get this loop right yet.

llvm-svn: 98155
2010-03-10 15:06:26 +00:00
Richard Osborne f57aea3d38 Prefer LMUL to MACCU as LMUL has no tied operands.
llvm-svn: 98153
2010-03-10 13:27:10 +00:00
Richard Osborne 0012bc1e41 Custom lower (S|U)MUL_LOHI -> MACC(S|U)
llvm-svn: 98152
2010-03-10 13:20:07 +00:00
Richard Osborne ef00c1bd6f Fix indentation
llvm-svn: 98151
2010-03-10 11:42:05 +00:00
Richard Osborne 54dfa01adc 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.

llvm-svn: 98150
2010-03-10 11:41:08 +00:00
Richard Osborne e35eabdd69 Convert test to FileCheck.
llvm-svn: 98148
2010-03-10 11:24:03 +00:00
Chris Lattner 71c30c164f move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic.  This completes MCization of
darwin/x86[-64]!

llvm-svn: 98145
2010-03-10 07:20:42 +00:00
Evan Cheng 72811e8714 Fix typo.
llvm-svn: 98142
2010-03-10 07:07:55 +00:00
Evan Cheng a3b6739749 Unbreak test on Linux.
llvm-svn: 98141
2010-03-10 07:07:45 +00:00
Dale Johannesen 5ebe0c1e13 This survived a bootstrap, so let's try 98104 again.
llvm-svn: 98137
2010-03-10 05:45:47 +00:00
Evan Cheng 80ad113731 Enable machine cse pass.
llvm-svn: 98132
2010-03-10 03:07:41 +00:00
Chris Lattner eec9bf1198 mcize the rest of EH emission, only one more directive missing
for darwin/x86 to be completely mcized.

llvm-svn: 98130
2010-03-10 02:48:06 +00:00
Chris Lattner a26fbe4d68 add missing filename!
llvm-svn: 98125
2010-03-10 02:29:31 +00:00
Chris Lattner ac2361a9b0 set the temporary bit on MCSymbols correctly.
llvm-svn: 98124
2010-03-10 02:25:11 +00:00
Dan Gohman b7e0b87441 Fix a comment.
llvm-svn: 98122
2010-03-10 02:18:48 +00:00
Evan Cheng 4c5f7a7f5e 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.

llvm-svn: 98121
2010-03-10 02:12:03 +00:00
Daniel Dunbar 46ed804180 MC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly different.
llvm-svn: 98120
2010-03-10 02:10:29 +00:00
Dan Gohman 16c678c8de Clarify the documentation for MachineFunctionPasses.
llvm-svn: 98119
2010-03-10 01:29:39 +00:00
Chris Lattner b973ea88b5 eliminate MCContext::CreateSymbol and CreateTemporarySymbol.
Add a new GetOrCreateTemporarySymbol method and a version that
takes a twine.

llvm-svn: 98118
2010-03-10 01:29:27 +00:00
Chris Lattner b245dfb408 inline away a form of IsPCRelative, eliminating the
dead IsPCRel argument.

llvm-svn: 98117
2010-03-10 01:17:49 +00:00
Chris Lattner 7e998b7363 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.

llvm-svn: 98116
2010-03-10 01:04:13 +00:00
Daniel Dunbar 27b984ac85 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.

llvm-svn: 98115
2010-03-10 00:58:25 +00:00
Jim Grosbach e620178436 Clear up the last (famous last words) frame index value reuse issues for Thumb1.
llvm-svn: 98109
2010-03-10 00:13:42 +00:00
Dale Johannesen bf9a4ad1ce Speculatively revert 98104; could be what's causing crashes
llvm-svn: 98108
2010-03-10 00:11:34 +00:00
Chris Lattner caea64b098 mcize uses of PrintRelDirective and eliminate it.
llvm-svn: 98107
2010-03-10 00:09:21 +00:00
Chris Lattner 1df0cf40ea inline the bool form of PrintRelDirective away, leaving just the unsigned form.
llvm-svn: 98106
2010-03-09 23:54:52 +00:00
Chris Lattner 566cae9086 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.

llvm-svn: 98105
2010-03-09 23:52:58 +00:00