oota-llvm.git
14 years agoremove MAI argument from createAsmStreamer since it
Chris Lattner [Fri, 12 Mar 2010 18:28:53 +0000 (18:28 +0000)]
remove MAI argument from createAsmStreamer since it
can get it from the context now.

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

14 years agofix a bug emitting .secrel32 that I introduced, PR6587, patch
Chris Lattner [Fri, 12 Mar 2010 18:10:35 +0000 (18:10 +0000)]
fix a bug emitting .secrel32 that I introduced, PR6587, patch
by A.Mazur!

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

14 years agoWhen constant folding GEP of GEP, do not crash if an index of
Duncan Sands [Fri, 12 Mar 2010 17:55:20 +0000 (17:55 +0000)]
When constant folding GEP of GEP, do not crash if an index of
the inner GEP is not a ConstantInt.

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

14 years agoFree DbgScopes in DwarfDebug::endFunction(). Also increased the const-ness of
Jeffrey Yasskin [Fri, 12 Mar 2010 17:45:06 +0000 (17:45 +0000)]
Free DbgScopes in DwarfDebug::endFunction().  Also increased the const-ness of
several fields to make it easier to figure out where bugs might be creeping in.

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

14 years agoRevert turning copysignl into a COPYSIGN node for the moment:
Duncan Sands [Fri, 12 Mar 2010 17:41:34 +0000 (17:41 +0000)]
Revert turning copysignl into a COPYSIGN node for the moment:
ppc calls copysignl with a 128 bit ppc long double, resulting
in a node that the type legalizer doesn't know how to expand.

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

14 years agoRemove superfluous NULL assignment
Kovarththanan Rajaratnam [Fri, 12 Mar 2010 14:17:24 +0000 (14:17 +0000)]
Remove superfluous NULL assignment

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

14 years agoUse StringRef::substr instead of std::string::substr to avoid using a free'd
Benjamin Kramer [Fri, 12 Mar 2010 13:54:59 +0000 (13:54 +0000)]
Use StringRef::substr instead of std::string::substr to avoid using a free'd
string temporary. This should fix PR6590.

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

14 years agoNow that it's supported, turn copysignl into a COPYSIGN node.
Duncan Sands [Fri, 12 Mar 2010 12:13:59 +0000 (12:13 +0000)]
Now that it's supported, turn copysignl into a COPYSIGN node.

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

14 years agoFix PR6522: implement copysign expansion for x86 long double
Duncan Sands [Fri, 12 Mar 2010 11:45:06 +0000 (11:45 +0000)]
Fix PR6522: implement copysign expansion for x86 long double
(it seems that FreeBSD doesn't have copysignl).  Done by
removing a bunch of assumptions from the code.  This may also
help with sparc 128 bit floats.

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

14 years agoFactor checked library call optimization into a common helper class and use it
Benjamin Kramer [Fri, 12 Mar 2010 09:27:41 +0000 (09:27 +0000)]
Factor checked library call optimization into a common helper class and use it
to unify the almost identical code in CodeGenPrepare and InstCombineCalls.

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

14 years agofix PR6577, a bug in sdbuilder lowering select instructions
Chris Lattner [Fri, 12 Mar 2010 07:15:36 +0000 (07:15 +0000)]
fix PR6577, a bug in sdbuilder lowering select instructions
whose true value was not Val#0.

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

14 years agoupdate mkpatch for MC, patch by Aaron Gray
Chris Lattner [Fri, 12 Mar 2010 06:32:12 +0000 (06:32 +0000)]
update mkpatch for MC, patch by Aaron Gray

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

14 years agoThe same situation that effected ARM effects PPC with regards to placing the
Bill Wendling [Fri, 12 Mar 2010 02:00:43 +0000 (02:00 +0000)]
The same situation that effected ARM effects PPC with regards to placing the
LSDA into the TEXT section. We need to generate non-lazy pointers to it on
Mach-O. However, the object the NLP points to may be local to the translation
unit. If so, then the NLP needs to have the value of that object specified
instead of "0", which the linker interprets as "external".

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

14 years agomake TargetLoweringObjectFile::getExprForDwarfReference
Chris Lattner [Fri, 12 Mar 2010 01:56:43 +0000 (01:56 +0000)]
make TargetLoweringObjectFile::getExprForDwarfReference
just make unnamed temp symbols instead of having to come
up with its own names.

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

14 years agoThere is no need to create specification DIE for definitions at DIFile level.
Devang Patel [Thu, 11 Mar 2010 23:44:52 +0000 (23:44 +0000)]
There is no need to create specification DIE for definitions at DIFile level.

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

14 years agoMC-ize PPC's asm printing of stubs.
Bill Wendling [Thu, 11 Mar 2010 23:39:44 +0000 (23:39 +0000)]
MC-ize PPC's asm printing of stubs.

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

14 years agoWhoops this already existed.
Nate Begeman [Thu, 11 Mar 2010 23:21:19 +0000 (23:21 +0000)]
Whoops this already existed.

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

14 years agoAdd a handful of additional useful pass manager things to the C API
Nate Begeman [Thu, 11 Mar 2010 23:06:07 +0000 (23:06 +0000)]
Add a handful of additional useful pass manager things to the C API

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

14 years agoExtract methods from LocalRewriter::RewriteMBB bringing it down to 666 lines.
Jakob Stoklund Olesen [Thu, 11 Mar 2010 23:04:34 +0000 (23:04 +0000)]
Extract methods from LocalRewriter::RewriteMBB bringing it down to 666 lines.

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

14 years agoenhance MCContext::GetOrCreateTemporarySymbol() to create a new symbol
Chris Lattner [Thu, 11 Mar 2010 22:56:10 +0000 (22:56 +0000)]
enhance MCContext::GetOrCreateTemporarySymbol() to create a new symbol
with an arbitrary unique name.

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

14 years agochange MCContext to always have an MCAsmInfo.
Chris Lattner [Thu, 11 Mar 2010 22:53:35 +0000 (22:53 +0000)]
change MCContext to always have an MCAsmInfo.

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

14 years agofix a fixme in TargetLoweringObjectFile::getExprForDwarfReference
Chris Lattner [Thu, 11 Mar 2010 21:55:20 +0000 (21:55 +0000)]
fix a fixme in TargetLoweringObjectFile::getExprForDwarfReference
where we used ot create an MCSymbol for ".".  Now emit an assembler
temporary label and reference it instead of "." textually.

rdar://7739457

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

14 years agoRemove getWidenVectorType, which is no longer used.
Dan Gohman [Thu, 11 Mar 2010 21:39:57 +0000 (21:39 +0000)]
Remove getWidenVectorType, which is no longer used.

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

14 years agoempty symbols aren't possible, the mcsymbol ctor aborts on them.
Chris Lattner [Thu, 11 Mar 2010 21:38:58 +0000 (21:38 +0000)]
empty symbols aren't possible, the mcsymbol ctor aborts on them.

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

14 years agoSet the (Format)F filed of t2Int_MemBarrierV7 & t2Int_SyncBarrierV7 to ThumbFrm,
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

14 years agostpcpy is so similar to strcpy, it doesn't deserve a complete copy of the __strcpy_ch...
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

14 years agorevert r98270.
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

14 years agorename getSymbolForDwarf* to getExprForDwarf* since it returns
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

14 years agoIn case of tail call size of Ins and InVals may not match.
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

14 years agoLower stpcpy_chk when possible.
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

14 years agoBad bad bug. x86 force indirect tail call address into eax when it's meant to force...
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

14 years agoRemove dead code. (S|U)MUL_LO is now lowered to LMUL or MACC(S|U)
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

14 years agoAvoid leaking CompileUnits in DwarfDebug.cpp.
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

14 years agoMC/Mach-O: Add MCSymbolData::getAddress() utility.
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

14 years agoFix typo.
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

14 years agoAdd dag combine to simplify lmul(x, 0, a, b)
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

14 years agoSwitch XCore over to using inline jump table entries.
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

14 years agoAdd a new jump table encoding to indicate jump tables entries
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

14 years agoThe check for coalescing a virtual register to a physical register, e.g.
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

14 years agoUpdate CMake build.
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

14 years agoHave fast-isel understand llvm.objectsize. Update testcase for slightly
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

14 years agoMake clang bootstrap happier on OSX 10.5 by reducing the number of headers
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

14 years agoMC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the assembly...
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

14 years agoMC/Mach-O: Start passing in the basic MCAsmLayout object.
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

14 years agoDo some final lowering in CodeGenPrepare of _chk calls similar to
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

14 years agoMC: Sketch initial MCAsmLayout class, which encapsulates the current layout of an...
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

14 years agoFix (unused) RegisterAsmBackend template, clang++ isn't happy about this.
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

14 years agoRemove dead include.
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

14 years agoFix debug_value handling.
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

14 years agoMC: Provide MCAssembler with a TargetAsmBackend.
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

14 years agoMC: Sketch some TargetAsmBackend hooks we are going to need.
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

14 years agoMC: Provide the target triple to AsmBackend constructors.
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

14 years agoAdd strncpy libcall creator. Use it when it should be used.
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

14 years agoWhen outputing a non-lazy pointer for a stub, we may need to fill in the value
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

14 years agoAdded Thumb2 LDRD/STRD pre/post variants for disassembly only.
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

14 years agoMake sure HasDebugValue is initialized. This should fix
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

14 years agoFix ARM buildbot breakage.
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

14 years agoadd support, testcases, and dox for the new GHC calling
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

14 years agoLower small memcpys to load/stores on Thumb2.
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

14 years agoVirtRegRewriter spring cleaning. No functional change.
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

14 years agoWork around a bug in the openbsd assembler on i386,
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

14 years agofix PR6533 by updating the br(xor) code to remember the case
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

14 years agoCosmetic: lengthen names and improve comments.
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

14 years agoFix an obvious typo in an assert.
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

14 years agoAdd a bit along with the MCSymbols stored in the MachineModuleInfo maps that
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

14 years agoProgress towards shepherding debug info through SelectionDAG.
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

14 years agomove PR6576 here.
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

14 years agoadd DESTDIR support for TOOLALIAS, for PR6557, patch by
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

14 years agoFix another bitwidth calculation to handle vector types; based on a
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

14 years agoMC/Mach-O: Use the MCAssembler symbol map instead of reconstructing.
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

14 years agoMC: Move the backend section and symbol data maps to MCAssembler.
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

14 years agoRemove unneeded declarations.
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

14 years agoMake sure the LR gets pushed in functions that use vaargs. This fixes
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

14 years agocomment why we use custom epilogue for t1 functions using vaargs.
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

14 years agoFix another place where DEBUG_VALUE affected codegen.
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

14 years agoAdd a DominatorTree argument to isLCSSA so that it doesn't have to
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

14 years agoConstant-fold GEP-of-GEP into a single GEP.
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

14 years agoFix whitespace.
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

14 years agoFactored out the disassembly printing of CPS option, MSR mask, and Negative Zero
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

14 years agoFix make check with cmake/lit
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

14 years agoThe backend now makes a reasonable job of targeting lmul / macc
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

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