Johnny Chen [Thu, 11 Mar 2010 21:02:50 +0000 (21:02 +0000)]
Set the (Format)F filed of t2Int_MemBarrierV7 & t2Int_SyncBarrierV7 to ThumbFrm,
instead of Pseudo, which helps Thumb decoder to recognize them as Thumb instr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98285
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 11 Mar 2010 20:45:13 +0000 (20:45 +0000)]
stpcpy is so similar to strcpy, it doesn't deserve a complete copy of the __strcpy_chk -> strcpy code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98284
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 11 Mar 2010 19:50:31 +0000 (19:50 +0000)]
revert r98270.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98281
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 11 Mar 2010 19:41:58 +0000 (19:41 +0000)]
rename getSymbolForDwarf* to getExprForDwarf* since it returns
an MCExpr and not an MCSymbol. Change it to take an MCStreamer,
which is currently unused.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98278
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 11 Mar 2010 19:38:18 +0000 (19:38 +0000)]
In case of tail call size of Ins and InVals may not match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98277
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 11 Mar 2010 19:24:34 +0000 (19:24 +0000)]
Lower stpcpy_chk when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98274
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 11 Mar 2010 18:49:14 +0000 (18:49 +0000)]
Bad bad bug. x86 force indirect tail call address into eax when it's meant to force it into a call preserved register instead. Change it to ecx for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98270
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 11 Mar 2010 18:38:59 +0000 (18:38 +0000)]
Remove dead code. (S|U)MUL_LO is now lowered to LMUL or MACC(S|U)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98269
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 11 Mar 2010 18:29:55 +0000 (18:29 +0000)]
Avoid leaking CompileUnits in DwarfDebug.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98268
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 18:22:51 +0000 (18:22 +0000)]
MC/Mach-O: Add MCSymbolData::getAddress() utility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98266
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 11 Mar 2010 17:45:38 +0000 (17:45 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98260
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 11 Mar 2010 16:26:35 +0000 (16:26 +0000)]
Add dag combine to simplify lmul(x, 0, a, b)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98258
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 11 Mar 2010 14:58:56 +0000 (14:58 +0000)]
Switch XCore over to using inline jump table entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98256
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 11 Mar 2010 14:58:16 +0000 (14:58 +0000)]
Add a new jump table encoding to indicate jump tables entries
are inside the function by the target at the point of use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98255
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 11 Mar 2010 08:20:21 +0000 (08:20 +0000)]
The check for coalescing a virtual register to a physical register, e.g.
cl = EXTRACT_SUBREG reg1024, 1, is overly conservative. It should check
for overlaps of vr's live interval with the super registers of the
physical register (ECX in this case) and let JoinIntervals() handle checking
the coalescing feasibility against the physical register (cl in this case).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98251
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 11 Mar 2010 07:51:23 +0000 (07:51 +0000)]
Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98250
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 11 Mar 2010 06:20:22 +0000 (06:20 +0000)]
Have fast-isel understand llvm.objectsize. Update testcase for slightly
different codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98244
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 11 Mar 2010 06:14:32 +0000 (06:14 +0000)]
Make clang bootstrap happier on OSX 10.5 by reducing the number of headers
included when using global symbols to ask the linker for the addresses of
various functions. One of the symbols was actually getting declared by a
header included in DynamicLibrary.cpp, which conflicted with the "extern void*"
declaration in SearchForAddressOfSpecialSymbol().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98243
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 05:53:37 +0000 (05:53 +0000)]
MC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the assembly time value of variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98241
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 05:53:33 +0000 (05:53 +0000)]
MC/Mach-O: Start passing in the basic MCAsmLayout object.
- Also, drop the current location part of AsmLayout, I think I prefer to implement this via explicit symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98240
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 11 Mar 2010 02:41:03 +0000 (02:41 +0000)]
Do some final lowering in CodeGenPrepare of _chk calls similar to
that in InstCombineCalls.
More call lowering needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98228
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 02:28:59 +0000 (02:28 +0000)]
MC: Sketch initial MCAsmLayout class, which encapsulates the current layout of an assembly file. The MCAsmLayout is also available for use by MCExpr::EvaluateAs{Absolute,Relocatable}, to allow target specific hooks and "absolutizing" of symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98227
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 02:28:52 +0000 (02:28 +0000)]
Fix (unused) RegisterAsmBackend template, clang++ isn't happy about this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98226
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 02:28:48 +0000 (02:28 +0000)]
Remove dead include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98225
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 11 Mar 2010 02:10:24 +0000 (02:10 +0000)]
Fix debug_value handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98224
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 01:34:27 +0000 (01:34 +0000)]
MC: Provide MCAssembler with a TargetAsmBackend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98222
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 01:34:21 +0000 (01:34 +0000)]
MC: Sketch some TargetAsmBackend hooks we are going to need.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98221
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 11 Mar 2010 01:34:16 +0000 (01:34 +0000)]
MC: Provide the target triple to AsmBackend constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98220
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 11 Mar 2010 01:25:07 +0000 (01:25 +0000)]
Add strncpy libcall creator. Use it when it should be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98219
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 11 Mar 2010 01:18:13 +0000 (01:18 +0000)]
When outputing a non-lazy pointer for a stub, we may need to fill in the value
for the NLP because the object it's pointing to may be internal to the file.
This seems counter-intuitive, but bear with me. When we place the LSDA into the
TEXT section, the type info pointers need to be indirect and pc-rel. We
accomplish this by using NLPs. However, sometimes the types are local to the
file. GCC gets around this by not using a NLP in this case, but a "regular"
indirection like this:
GCC_except_tbl:
.long Lfoo-.
__ZTIA: @ This is local
...
Lfoo:
.long __ZTIA
LLVM prefers NLPs on Darwin. In fact, it's more optimal for load performance to
use them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98218
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 11 Mar 2010 01:13:36 +0000 (01:13 +0000)]
Added Thumb2 LDRD/STRD pre/post variants for disassembly only.
Plus fixed the encoding of t2LDRDpci such that P = 1 and W = 0 (offset mode).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98217
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 11 Mar 2010 00:52:12 +0000 (00:52 +0000)]
Make sure HasDebugValue is initialized. This should fix
the buildbot running valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98216
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 11 Mar 2010 00:46:22 +0000 (00:46 +0000)]
Fix ARM buildbot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 11 Mar 2010 00:22:57 +0000 (00:22 +0000)]
add support, testcases, and dox for the new GHC calling
convention. Patch by David Terei!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98212
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 11 Mar 2010 00:20:49 +0000 (00:20 +0000)]
Lower small memcpys to load/stores on Thumb2.
Radar
7686922.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98210
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 11 Mar 2010 00:11:33 +0000 (00:11 +0000)]
VirtRegRewriter spring cleaning. No functional change.
Move methods out of line and M-x whitespace-cleanup.
Promote common method arguments to member variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98207
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 11 Mar 2010 00:06:19 +0000 (00:06 +0000)]
Work around a bug in the openbsd assembler on i386,
which doesn't support .quad correctly because it is
"really really old". PR6528.
Yet another reason the mc assembler should take over ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98205
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 10 Mar 2010 23:46:44 +0000 (23:46 +0000)]
fix PR6533 by updating the br(xor) code to remember the case
when it looked past a trunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98203
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 10 Mar 2010 23:37:24 +0000 (23:37 +0000)]
Cosmetic: lengthen names and improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98202
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 10 Mar 2010 22:38:45 +0000 (22:38 +0000)]
Fix an obvious typo in an assert.
Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98200
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 10 Mar 2010 22:34:10 +0000 (22:34 +0000)]
Add a bit along with the MCSymbols stored in the MachineModuleInfo maps that
indicates that an MCSymbol is external or not. (It's true if it's external.)
This will be used to specify the correct information to add to non-lazy
pointers. That will be explained further when this bit is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98199
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 10 Mar 2010 22:13:47 +0000 (22:13 +0000)]
Progress towards shepherding debug info through SelectionDAG.
No functional effect yet. This is still evolving and should
not be viewed as final.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98195
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 10 Mar 2010 21:42:42 +0000 (21:42 +0000)]
move PR6576 here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98194
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 10 Mar 2010 21:27:53 +0000 (21:27 +0000)]
add DESTDIR support for TOOLALIAS, for PR6557, patch by
Matthias Klose!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98193
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 10 Mar 2010 21:04:53 +0000 (21:04 +0000)]
Fix another bitwidth calculation to handle vector types; based on a
patch by Micah Villmow for PR6572.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98188
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 10 Mar 2010 20:58:31 +0000 (20:58 +0000)]
MC/Mach-O: Use the MCAssembler symbol map instead of reconstructing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98187
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 10 Mar 2010 20:58:29 +0000 (20:58 +0000)]
MC: Move the backend section and symbol data maps to MCAssembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98186
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 10 Mar 2010 20:58:25 +0000 (20:58 +0000)]
Remove unneeded declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98185
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 10 Mar 2010 20:01:30 +0000 (20:01 +0000)]
Make sure the LR gets pushed in functions that use vaargs. This fixes
400.perlbench for the nightly tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98183
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 10 Mar 2010 19:59:47 +0000 (19:59 +0000)]
comment why we use custom epilogue for t1 functions using vaargs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98182
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 10 Mar 2010 19:57:56 +0000 (19:57 +0000)]
Fix another place where DEBUG_VALUE affected codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98181
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 10 Mar 2010 19:38:49 +0000 (19:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98179
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 10 Mar 2010 19:31:51 +0000 (19:31 +0000)]
Constant-fold GEP-of-GEP into a single GEP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98178
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 10 Mar 2010 19:00:54 +0000 (19:00 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98173
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 10 Mar 2010 18:59:38 +0000 (18:59 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98172
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Wed, 10 Mar 2010 18:41:59 +0000 (18:41 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98171
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 10 Mar 2010 18:14:47 +0000 (18:14 +0000)]
The backend now makes a reasonable job of targeting lmul / macc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98169
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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