oota-llvm.git
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

14 years agoeliminate a form of PrintLabelName.
Chris Lattner [Mon, 8 Mar 2010 22:52:49 +0000 (22:52 +0000)]
eliminate a form of PrintLabelName.

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

14 years agoremove another form of EmitReference.
Chris Lattner [Mon, 8 Mar 2010 22:50:36 +0000 (22:50 +0000)]
remove another form of EmitReference.

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

14 years agoeliminate the non-MCSymbol versions of EmitReference.
Chris Lattner [Mon, 8 Mar 2010 22:47:57 +0000 (22:47 +0000)]
eliminate the non-MCSymbol versions of EmitReference.

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

14 years agomc'ize EmitLabel.
Chris Lattner [Mon, 8 Mar 2010 22:44:40 +0000 (22:44 +0000)]
mc'ize EmitLabel.

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

14 years agomerge DIEObjectLabel and DIEDwarfLabel into DIELabel.
Chris Lattner [Mon, 8 Mar 2010 22:31:46 +0000 (22:31 +0000)]
merge DIEObjectLabel and DIEDwarfLabel into DIELabel.

Yes, DIE you fiendish labels, die all of you.

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

14 years agoIntroduce DIFile. This will be used to represent header files and source file(s)...
Devang Patel [Mon, 8 Mar 2010 22:27:22 +0000 (22:27 +0000)]
Introduce DIFile. This will be used to represent header files and source file(s) in debug info.

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

14 years agoelimiante the DWLabel class, using MCSymbol instead. Start
Chris Lattner [Mon, 8 Mar 2010 22:23:36 +0000 (22:23 +0000)]
elimiante the DWLabel class, using MCSymbol instead.  Start
switching some stuff over to passing around MCSymbol* instead
of stem+ID.

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

14 years agoFix the vmxon entry in the X86InstrInfo.td so it has the correct prefix bytes
Kevin Enderby [Mon, 8 Mar 2010 22:17:26 +0000 (22:17 +0000)]
Fix the vmxon entry in the X86InstrInfo.td so it has the correct prefix bytes
for the encoding and is not the same as vmptrld.

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

14 years agoMC/Macho-O: Align the zerofill section itself to the maximum alignment.
Daniel Dunbar [Mon, 8 Mar 2010 22:03:42 +0000 (22:03 +0000)]
MC/Macho-O: Align the zerofill section itself to the maximum alignment.

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

14 years agoDerive DIType from DIScope. This simplifies getContext() where for members the contex...
Devang Patel [Mon, 8 Mar 2010 22:02:50 +0000 (22:02 +0000)]
Derive DIType from DIScope. This simplifies getContext() where for members the context is a type. This also eliminates need of CompileUnitMaps maintained by dwarf writer.

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

14 years agoRemove DbgNode checks in constructor. Debug descriptors are intended to be light...
Devang Patel [Mon, 8 Mar 2010 21:32:10 +0000 (21:32 +0000)]
Remove DbgNode checks in constructor. Debug descriptors are intended to be light weight wrappers.

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

14 years agoMC/Mach-O: Fix address compution for zero fill sections.
Daniel Dunbar [Mon, 8 Mar 2010 21:10:42 +0000 (21:10 +0000)]
MC/Mach-O: Fix address compution for zero fill sections.

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

14 years agoMC/Mach-O: Error out instead of crashing on invalid scattered relocation expressions.
Daniel Dunbar [Mon, 8 Mar 2010 21:10:39 +0000 (21:10 +0000)]
MC/Mach-O: Error out instead of crashing on invalid scattered relocation expressions.

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

14 years agoX86: Fix encoding for TEST{8,16,32}rr.
Daniel Dunbar [Mon, 8 Mar 2010 21:10:36 +0000 (21:10 +0000)]
X86: Fix encoding for TEST{8,16,32}rr.

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

14 years agoAdd documentation on sibling call optimization. Rename tailcall2.ll test to sibcall.ll.
Evan Cheng [Mon, 8 Mar 2010 21:05:02 +0000 (21:05 +0000)]
Add documentation on sibling call optimization. Rename tailcall2.ll test to sibcall.ll.

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

14 years agoisNull() is not used any more.
Devang Patel [Mon, 8 Mar 2010 21:00:27 +0000 (21:00 +0000)]
isNull() is not used any more.

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

14 years agoAvoid using DIDescriptor.isNull().
Devang Patel [Mon, 8 Mar 2010 20:52:55 +0000 (20:52 +0000)]
Avoid using DIDescriptor.isNull().
This is a first step towards eliminating checks in Descriptor constructors.

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

14 years agoIterator traits and swap. closes PR6548 and PR6549
Andrew Lenharth [Mon, 8 Mar 2010 20:45:52 +0000 (20:45 +0000)]
Iterator traits and swap.  closes PR6548 and PR6549

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

14 years agoDon't always run the ocaml kaleidoscope tutorials.
Erick Tryzelaar [Mon, 8 Mar 2010 20:07:32 +0000 (20:07 +0000)]
Don't always run the ocaml kaleidoscope tutorials.

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

14 years agoRevert r97726 and r97728 at ddunbar's request; we want to solve this
John McCall [Mon, 8 Mar 2010 20:02:05 +0000 (20:02 +0000)]
Revert r97726 and r97728 at ddunbar's request; we want to solve this
some other way when it comes to be necessary.

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

14 years agoAdd OCaml tutorial to the examples.
Erick Tryzelaar [Mon, 8 Mar 2010 19:32:27 +0000 (19:32 +0000)]
Add OCaml tutorial to the examples.

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

14 years agoUpdate the OCaml Kaleidoscope tutorial.
Erick Tryzelaar [Mon, 8 Mar 2010 19:32:18 +0000 (19:32 +0000)]
Update the OCaml Kaleidoscope tutorial.

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

14 years agoRevert r97947.
Devang Patel [Mon, 8 Mar 2010 19:20:38 +0000 (19:20 +0000)]
Revert r97947.

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

14 years agodisambiguate some types, add a fixme about some
Chris Lattner [Mon, 8 Mar 2010 18:59:49 +0000 (18:59 +0000)]
disambiguate some types, add a fixme about some
inconsistent intrinsics.

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

14 years agofix some more ambiguous patterns, remove another nontemporalstore
Chris Lattner [Mon, 8 Mar 2010 18:57:56 +0000 (18:57 +0000)]
fix some more ambiguous patterns, remove another nontemporalstore
pattern which is broken (source and address swapped).

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

14 years agoCorrect immediate sizes.
Chris Lattner [Mon, 8 Mar 2010 18:55:15 +0000 (18:55 +0000)]
Correct immediate sizes.

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

14 years agofix a type compatibility bug. imm is i32 in the input
Chris Lattner [Mon, 8 Mar 2010 18:52:55 +0000 (18:52 +0000)]
fix a type compatibility bug.  imm is i32 in the input
pattern, not i64.

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

14 years agofix a bunch of partially ambiguous patterns on ARM. As an
Chris Lattner [Mon, 8 Mar 2010 18:51:21 +0000 (18:51 +0000)]
fix a bunch of partially ambiguous patterns on ARM.  As an
example, this:

(set DPR:$dst, (fsub (fneg (fmul DPR:$a, DPR:$b)), DPR:$dstin))

is ambiguous because DPR contains both f64 and v2f32.  tblgen
currently accidentally picks f64 because it's first in the
regclass.

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

14 years agoFix a bunch of ambiguous patterns which tblgen happens to infer types
Chris Lattner [Mon, 8 Mar 2010 18:44:04 +0000 (18:44 +0000)]
Fix a bunch of ambiguous patterns which tblgen happens to infer types
for, due to a bug.

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

14 years agoNode arguments to type casts can have names too. This code
Chris Lattner [Mon, 8 Mar 2010 18:36:19 +0000 (18:36 +0000)]
Node arguments to type casts can have names too.  This code
needs to be majorly refactored, but this spot bugfix allows
things like:

 def vmrghw_shuffle : PatFrag<(ops node:$lhs, node:$rhs),
                             (vector_shuffle (v4i32 node:$lhs), node:$rhs), [{
...

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

14 years agotidy up
Chris Lattner [Mon, 8 Mar 2010 18:29:38 +0000 (18:29 +0000)]
tidy up

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

14 years agoAvoid using DIDescriptor.isNull().
Devang Patel [Mon, 8 Mar 2010 18:25:48 +0000 (18:25 +0000)]
Avoid using DIDescriptor.isNull().
This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.

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

14 years agoAdd Order to SDDbgValue
Dale Johannesen [Mon, 8 Mar 2010 05:39:50 +0000 (05:39 +0000)]
Add Order to SDDbgValue

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

14 years agoFix dbg value handling in tail merging.
Dale Johannesen [Mon, 8 Mar 2010 05:38:13 +0000 (05:38 +0000)]
Fix dbg value handling in tail merging.

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

14 years agoremove a non-temporal store pattern which is not tested and
Chris Lattner [Mon, 8 Mar 2010 03:18:28 +0000 (03:18 +0000)]
remove a non-temporal store pattern which is not tested and
could never have matched because the operand list was backwards.

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

14 years agoRevert r97917, which was causing Clang Debug self-host failures.
Douglas Gregor [Mon, 8 Mar 2010 02:58:37 +0000 (02:58 +0000)]
Revert r97917, which was causing Clang Debug self-host failures.

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

14 years agoRoll back r97918 again. Just configuring against llvm-gcc wasn't enough to run
Jeffrey Yasskin [Sun, 7 Mar 2010 19:26:40 +0000 (19:26 +0000)]
Roll back r97918 again.  Just configuring against llvm-gcc wasn't enough to run
the FrontendC* tests. :(

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

14 years agoReapply r97788 to free MDNodes when the LLVMContext is destroyed. It
Jeffrey Yasskin [Sun, 7 Mar 2010 18:46:57 +0000 (18:46 +0000)]
Reapply r97788 to free MDNodes when the LLVMContext is destroyed.  It
bootstraps llvm-gcc this time.

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

14 years agoRoll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
Jeffrey Yasskin [Sun, 7 Mar 2010 17:10:13 +0000 (17:10 +0000)]
Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.

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

14 years agoAdd findNearestCommonDominator() for PostDominators.
Tobias Grosser [Sun, 7 Mar 2010 11:15:04 +0000 (11:15 +0000)]
Add findNearestCommonDominator() for PostDominators.

Add a missing interface to be able to call findNearestCommonDominator
for a PostDominanceTree. The function itself is already implemented in
DominatorTreeBase. The interface however was only added to the
DominatorTree class, but not the PostDominatorClass.

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

14 years agoUse Other as a sentinel instead of iAny.
Chris Lattner [Sun, 7 Mar 2010 07:45:08 +0000 (07:45 +0000)]
Use Other as a sentinel instead of iAny.

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

14 years agoturn off debug spew
Chris Lattner [Sun, 7 Mar 2010 07:21:24 +0000 (07:21 +0000)]
turn off debug spew

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

14 years agomore factoring.
Chris Lattner [Sun, 7 Mar 2010 07:20:49 +0000 (07:20 +0000)]
more factoring.

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

14 years ago_2_ gcc crashes, ah, ah, ah...
Jeffrey Yasskin [Sun, 7 Mar 2010 07:16:49 +0000 (07:16 +0000)]
_2_ gcc crashes, ah, ah, ah...

(Rolling back r97906.)

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

14 years agoteach tblgen to be more aggressive when factoring CheckType nodes.
Chris Lattner [Sun, 7 Mar 2010 07:01:28 +0000 (07:01 +0000)]
teach tblgen to be more aggressive when factoring CheckType nodes.
Now it will factor things like this:

CheckType i32
  ...
CheckOpcode ISD::AND
  CheckType i64
  ...

into:

SwitchType:
  i32: ...
  i64:
    CheckOpcode ISD::AND
    ...

This shrinks hte table by a few bytes, nothing spectacular.

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

14 years agoAvoid leaking CompileUnits and DbgScopes from DwarfDebug. Leaks found by Valgrind!
Jeffrey Yasskin [Sun, 7 Mar 2010 06:55:35 +0000 (06:55 +0000)]
Avoid leaking CompileUnits and DbgScopes from DwarfDebug.  Leaks found by Valgrind!

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

14 years agoadd some helper functions and implement isContradictory
Chris Lattner [Sun, 7 Mar 2010 06:29:26 +0000 (06:29 +0000)]
add some helper functions and implement isContradictory
for CheckValueTypeMatcher.  The isContradictory implementation
helps us factor better, shrinking x86 table from 79144 -> 78896
bytes.

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

14 years agotidy up
Chris Lattner [Sun, 7 Mar 2010 04:28:09 +0000 (04:28 +0000)]
tidy up

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

14 years agoRe-committing the failed r97807 commit with changes to eliminate warnings.
Wesley Peck [Sat, 6 Mar 2010 23:23:12 +0000 (23:23 +0000)]
Re-committing the failed r97807 commit with changes to eliminate warnings.

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

14 years agoAdd verification of union types.
Nick Lewycky [Sat, 6 Mar 2010 20:26:48 +0000 (20:26 +0000)]
Add verification of union types.

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

14 years agoDescribe what's going on with mingw alloca and why do we need separate instruction.
Anton Korobeynikov [Sat, 6 Mar 2010 20:07:32 +0000 (20:07 +0000)]
Describe what's going on with mingw alloca and why do we need separate instruction.

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

14 years agoInitial bits of ARMv4-only support.
Anton Korobeynikov [Sat, 6 Mar 2010 19:39:36 +0000 (19:39 +0000)]
Initial bits of ARMv4-only support.
Patch by John Tytgat!

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

14 years agoLower dynamic stack allocation on mingw32 to separate instruction.
Anton Korobeynikov [Sat, 6 Mar 2010 19:32:29 +0000 (19:32 +0000)]
Lower dynamic stack allocation on mingw32 to separate instruction.
We cannot use a normal call here since it has extra unmodelled side
effects (it changes stack pointer). This should fix PR5292.

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

14 years agomake APFloat::toString be const.
Chris Lattner [Sat, 6 Mar 2010 19:20:13 +0000 (19:20 +0000)]
make APFloat::toString be const.

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

14 years agodisable this for mingw as well, we really need a 'has no dynamic linking' predicate.
Chris Lattner [Sat, 6 Mar 2010 18:54:37 +0000 (18:54 +0000)]
disable this for mingw as well, we really need a 'has no dynamic linking' predicate.

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

14 years agoDo not use '&' prefix for globals when register base field is non-zero, otherwise...
Anton Korobeynikov [Sat, 6 Mar 2010 11:41:12 +0000 (11:41 +0000)]
Do not use '&' prefix for globals when register base field is non-zero, otherwise msp430-as will silently miscompile the code (TI's assembler report an error though).

This fixes PR6349

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

14 years agoLet the fallthrough handle whether or not we've changed anything
Eric Christopher [Sat, 6 Mar 2010 10:59:25 +0000 (10:59 +0000)]
Let the fallthrough handle whether or not we've changed anything
before we try to optimize.

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

14 years agoMigrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
Eric Christopher [Sat, 6 Mar 2010 10:50:38 +0000 (10:50 +0000)]
Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.

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

14 years agoAdd static methods to handle Linkage Types.
Rafael Espindola [Sat, 6 Mar 2010 07:22:39 +0000 (07:22 +0000)]
Add static methods to handle Linkage Types.

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

14 years agoclean this up.
Chris Lattner [Sat, 6 Mar 2010 07:02:28 +0000 (07:02 +0000)]
clean this up.

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

14 years agorevert r97807, it introduced build warnings.
Chris Lattner [Sat, 6 Mar 2010 04:32:46 +0000 (04:32 +0000)]
revert r97807, it introduced build warnings.

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