oota-llvm.git
15 years agotests: Use %abs_tmp instead of ./%t to make these tests portable to 'lit'.
Daniel Dunbar [Sun, 13 Sep 2009 01:40:48 +0000 (01:40 +0000)]
tests: Use %abs_tmp instead of ./%t to make these tests portable to 'lit'.

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

15 years agotests: Add a %abs_tmp substitution which is guaranteed to be a full path.
Daniel Dunbar [Sun, 13 Sep 2009 01:39:50 +0000 (01:39 +0000)]
tests: Add a %abs_tmp substitution which is guaranteed to be a full path.

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

15 years agoSink llvm-gcc dependent tests into distinct subdirs.
Daniel Dunbar [Sun, 13 Sep 2009 01:39:08 +0000 (01:39 +0000)]
Sink llvm-gcc dependent tests into distinct subdirs.

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

15 years agoRewrite tests to not use Tcl substitution.
Daniel Dunbar [Sun, 13 Sep 2009 01:37:07 +0000 (01:37 +0000)]
Rewrite tests to not use Tcl substitution.

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

15 years agoSimplify LLVMC tests.
Daniel Dunbar [Sun, 13 Sep 2009 01:36:19 +0000 (01:36 +0000)]
Simplify LLVMC tests.

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

15 years agoFix merge problem
Anton Korobeynikov [Sun, 13 Sep 2009 01:12:15 +0000 (01:12 +0000)]
Fix merge problem

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

15 years agoDefine proper subreg sets for arm - this should fix bunch of subtle problems
Anton Korobeynikov [Sun, 13 Sep 2009 00:59:43 +0000 (00:59 +0000)]
Define proper subreg sets for arm - this should fix bunch of subtle problems
with subreg - superreg mapping and also fix PR4965.

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

15 years agoAdd -mattr=+sse2 to the -march=x86 version of this test. Without
Dan Gohman [Sat, 12 Sep 2009 23:45:47 +0000 (23:45 +0000)]
Add -mattr=+sse2 to the -march=x86 version of this test. Without
sse, this code falls back to SelectionDAG isel which uses an x87
instruction, which is fine, but not what this test is testing for.

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

15 years agoExperimental fix for PR4960.
Daniel Dunbar [Sat, 12 Sep 2009 23:29:02 +0000 (23:29 +0000)]
Experimental fix for PR4960.
 - Could we just always implement this as __clear_cache for __GNUC__?

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

15 years agodevirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.
Chris Lattner [Sat, 12 Sep 2009 23:02:08 +0000 (23:02 +0000)]
devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.
Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that
we only have one place that decides what to name bb labels.  Hopefully various
clients of printBasicBlockLabel can start using GetMBBSymbol instead.

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

15 years agowe don't want people to override printBasicBlockLabel.
Chris Lattner [Sat, 12 Sep 2009 22:57:37 +0000 (22:57 +0000)]
we don't want people to override printBasicBlockLabel.

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

15 years agoRemove unnecessary #include.
Dan Gohman [Sat, 12 Sep 2009 22:24:25 +0000 (22:24 +0000)]
Remove unnecessary #include.

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

15 years agoAdd QPR_VFP2 regclass and add copy_to_regclass nodes, where needed to
Anton Korobeynikov [Sat, 12 Sep 2009 22:21:08 +0000 (22:21 +0000)]
Add QPR_VFP2 regclass and add copy_to_regclass nodes, where needed to
constraint the register usage.

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

15 years agoPreserve the inbounds flag, so that the constant folder doesn't
Dan Gohman [Sat, 12 Sep 2009 22:02:17 +0000 (22:02 +0000)]
Preserve the inbounds flag, so that the constant folder doesn't
recompute it.

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

15 years agoFix the build when DEBUG_SYMBOL_TABLE is set.
Dan Gohman [Sat, 12 Sep 2009 21:56:48 +0000 (21:56 +0000)]
Fix the build when DEBUG_SYMBOL_TABLE is set.

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

15 years agoConvert llvm-link to IRReader.
Dan Gohman [Sat, 12 Sep 2009 21:55:12 +0000 (21:55 +0000)]
Convert llvm-link to IRReader.

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

15 years agofactor MBB label lowering better
Chris Lattner [Sat, 12 Sep 2009 21:06:08 +0000 (21:06 +0000)]
factor MBB label lowering better

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

15 years agoX86MCInstLower::Lower should only not emit anything to OutStreamer,
Chris Lattner [Sat, 12 Sep 2009 21:01:20 +0000 (21:01 +0000)]
X86MCInstLower::Lower should only not emit anything to OutStreamer,
this means that it can only lower one MachineInstr to one MCInst.  To
make this fly, we need to pull out handling of MO_GOT_ABSOLUTE_ADDRESS
(which generates an implicit label) out of X86MCInstLower.

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

15 years agoeliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
Chris Lattner [Sat, 12 Sep 2009 20:45:03 +0000 (20:45 +0000)]
eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
MBB labels like everything else.

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

15 years agosplit MachineInstr -> MCInst lowering into its own class (not
Chris Lattner [Sat, 12 Sep 2009 20:34:57 +0000 (20:34 +0000)]
split MachineInstr -> MCInst lowering into its own class (not
being embedded into X86ATTAsmPrinter).  This still depends heavily
on X86ATTAsmPrinter, but this is a step in the right direction.

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

15 years agoremove the "old" at&t style asmprinter. Unfortunately, most of the
Chris Lattner [Sat, 12 Sep 2009 20:01:36 +0000 (20:01 +0000)]
remove the "old" at&t style asmprinter.  Unfortunately, most of the
operand printing crapola cannot be removed yet because it is used by
the inline asm print stuff.

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

15 years agoWhoops. Committed the headers for r81605 - 'Moved some more index operations over...
Lang Hames [Sat, 12 Sep 2009 04:54:18 +0000 (04:54 +0000)]
Whoops. Committed the headers for r81605 - 'Moved some more index operations over to LiveIntervals.'

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

15 years agoMoved some more index operations over to LiveIntervals.
Lang Hames [Sat, 12 Sep 2009 03:34:03 +0000 (03:34 +0000)]
Moved some more index operations over to LiveIntervals.

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

15 years agoAdded the WAIT instruction to the Intel tables,
Sean Callanan [Sat, 12 Sep 2009 02:52:41 +0000 (02:52 +0000)]
Added the WAIT instruction to the Intel tables,
for the purposes of the disassembler.

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

15 years agoAdded CMPS (string comparison) instructions for all
Sean Callanan [Sat, 12 Sep 2009 02:25:20 +0000 (02:25 +0000)]
Added CMPS (string comparison) instructions for all
operand widths to the Intel instruction tables, for
the purposes of the disassembler.

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

15 years agoRemove -new-coalescer-heuristic. It's not useful.
Evan Cheng [Sat, 12 Sep 2009 02:14:41 +0000 (02:14 +0000)]
Remove -new-coalescer-heuristic. It's not useful.

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

15 years ago80 col violations.
Evan Cheng [Sat, 12 Sep 2009 02:01:07 +0000 (02:01 +0000)]
80 col violations.

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

15 years agofix another GCC bootstrap problem, which manifested as things
Chris Lattner [Sat, 12 Sep 2009 01:11:50 +0000 (01:11 +0000)]
fix another GCC bootstrap problem, which manifested as things
like:
foo.s:2412:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb"

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

15 years agofix an embarassing typo that resulted in llvm-gcc bootstrap miscompare
Chris Lattner [Sat, 12 Sep 2009 00:49:00 +0000 (00:49 +0000)]
fix an embarassing typo that resulted in llvm-gcc bootstrap miscompare
because the sorting wasn't sorting.

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

15 years agoAdded SCAS instructions in their 8, 16, 32, and
Sean Callanan [Sat, 12 Sep 2009 00:37:19 +0000 (00:37 +0000)]
Added SCAS instructions in their 8, 16, 32, and
64-bit variants for the disassembler.

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

15 years agoFix -Asserts warning.
Daniel Dunbar [Fri, 11 Sep 2009 22:07:31 +0000 (22:07 +0000)]
Fix -Asserts warning.

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

15 years agoUpdate CMake files.
Ted Kremenek [Fri, 11 Sep 2009 21:49:45 +0000 (21:49 +0000)]
Update CMake files.

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

15 years agoDe-bork CMake build. llvm-extract depends on asmparser
Douglas Gregor [Fri, 11 Sep 2009 21:26:24 +0000 (21:26 +0000)]
De-bork CMake build. llvm-extract depends on asmparser

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

15 years agoFix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
Dan Gohman [Fri, 11 Sep 2009 20:46:33 +0000 (20:46 +0000)]
Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
working. To support this, add an is_displayed() function to raw_ostream,
and generalize Process::StandardOutIsDisplayed and friends in order to
support it.

Also, call RemoveFileOnSignal before creating a file instead of after, so
that the file isn't left behind if the program is interrupted between when
the file is created and RemoveFileOnSignal is called.

While here, add a -S to llvm-extract and port it to IRReader so that it
supports assembly input.

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

15 years agoRevert array initialization regclass change so that the initialization stays static...
Jim Grosbach [Fri, 11 Sep 2009 20:13:17 +0000 (20:13 +0000)]
Revert array initialization regclass change so that the initialization stays static, not runtime.

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

15 years agoUpdate register class references to use the global constant ARM::*RegisterClass names.
Jim Grosbach [Fri, 11 Sep 2009 19:49:06 +0000 (19:49 +0000)]
Update register class references to use the global constant ARM::*RegisterClass names.

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

15 years agoAdded ADC, SUB, SBB, and OR instructions that operate
Sean Callanan [Fri, 11 Sep 2009 19:01:56 +0000 (19:01 +0000)]
Added ADC, SUB, SBB, and OR instructions that operate
on rAX and an immediate.

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

15 years agoFix pr4820: Don't run llvm-config during "make clean" since it may have
Bob Wilson [Fri, 11 Sep 2009 18:42:18 +0000 (18:42 +0000)]
Fix pr4820: Don't run llvm-config during "make clean" since it may have
already been removed.

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

15 years agoRemove an unnecessary -f.
Dan Gohman [Fri, 11 Sep 2009 18:41:06 +0000 (18:41 +0000)]
Remove an unnecessary -f.

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

15 years agoConvert more tests to avoid llvm-as.
Dan Gohman [Fri, 11 Sep 2009 18:36:27 +0000 (18:36 +0000)]
Convert more tests to avoid llvm-as.

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

15 years agofix pasto
Chris Lattner [Fri, 11 Sep 2009 18:33:44 +0000 (18:33 +0000)]
fix pasto

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

15 years agoDon't generate Dwarf line table entries for source line 0.
Caroline Tice [Fri, 11 Sep 2009 18:25:54 +0000 (18:25 +0000)]
Don't generate Dwarf line table entries for source line 0.

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

15 years agofix some fixmes: emit stubs in sorted order.
Chris Lattner [Fri, 11 Sep 2009 18:20:26 +0000 (18:20 +0000)]
fix some fixmes: emit stubs in sorted order.

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

15 years agoEliminate more redundant llvm-as calls.
Dan Gohman [Fri, 11 Sep 2009 18:17:12 +0000 (18:17 +0000)]
Eliminate more redundant llvm-as calls.

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

15 years agoFix this test to test what it was originally intended to test.
Dan Gohman [Fri, 11 Sep 2009 18:16:43 +0000 (18:16 +0000)]
Fix this test to test what it was originally intended to test.

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

15 years agogive densemap iterators real iterator traits.
Chris Lattner [Fri, 11 Sep 2009 18:15:46 +0000 (18:15 +0000)]
give densemap iterators real iterator traits.

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

15 years agoChange tests from "opt %s" to "opt < %s" so that opt doesn't see the
Dan Gohman [Fri, 11 Sep 2009 18:01:28 +0000 (18:01 +0000)]
Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.

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

15 years agoFix PR4948 (and a leak): by not destroying the DwarfException
Duncan Sands [Fri, 11 Sep 2009 17:24:29 +0000 (17:24 +0000)]
Fix PR4948 (and a leak): by not destroying the DwarfException
object, the timer it creates was not being deleted.  Since the
timer belonged to a static timer group, the timer group would
be destroyed on shutdown, and would notice and complain that
not all timers it contained were destroyed.

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

15 years agoturn on -experimental-asm-printer for x86 / AT&T by default.
Chris Lattner [Fri, 11 Sep 2009 17:07:27 +0000 (17:07 +0000)]
turn on -experimental-asm-printer for x86 / AT&T by default.

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

15 years agoanother random update
Chris Lattner [Fri, 11 Sep 2009 17:07:01 +0000 (17:07 +0000)]
another random update

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

15 years agoreject attempts to take the address of an intrinsic, PR4949.
Chris Lattner [Fri, 11 Sep 2009 17:05:29 +0000 (17:05 +0000)]
reject attempts to take the address of an intrinsic, PR4949.

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

15 years agofix a bunch of spurious failures for people whose home directory
Chris Lattner [Fri, 11 Sep 2009 17:02:12 +0000 (17:02 +0000)]
fix a bunch of spurious failures for people whose home directory
is sabre.

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

15 years agothis test is using invalid "intrinsics".
Chris Lattner [Fri, 11 Sep 2009 16:49:18 +0000 (16:49 +0000)]
this test is using invalid "intrinsics".

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

15 years agofix test to not get a moduleid that matches 'br'
Chris Lattner [Fri, 11 Sep 2009 16:47:41 +0000 (16:47 +0000)]
fix test to not get a moduleid that matches 'br'

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

15 years agodefault construct MCInst's ctor to 0, which is "PHI" which is invalid for MCInsts.
Chris Lattner [Fri, 11 Sep 2009 16:33:58 +0000 (16:33 +0000)]
default construct MCInst's ctor to 0, which is "PHI" which is invalid for MCInsts.

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

15 years ago... and fix the REQUIRES_RTTI condition.
Daniel Dunbar [Fri, 11 Sep 2009 15:47:24 +0000 (15:47 +0000)]
... and fix the REQUIRES_RTTI condition.

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

15 years agoFix REQUIRES_RTTI while awake.
Daniel Dunbar [Fri, 11 Sep 2009 15:45:13 +0000 (15:45 +0000)]
Fix REQUIRES_RTTI while awake.

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

15 years agoMake REQUIRES_RTTI work.
Daniel Dunbar [Fri, 11 Sep 2009 15:39:39 +0000 (15:39 +0000)]
Make REQUIRES_RTTI work.

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

15 years agoEliminate some unnecessary implicit constructors in generated DAG ISel code.
Owen Anderson [Fri, 11 Sep 2009 09:01:57 +0000 (09:01 +0000)]
Eliminate some unnecessary implicit constructors in generated DAG ISel code.

Partial fix for PR4946.

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

15 years agoBugfix. Sorry.
Andreas Neustifter [Fri, 11 Sep 2009 08:43:15 +0000 (08:43 +0000)]
Bugfix. Sorry.

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

15 years agoMake ProfileEstimator even more robust on general CFGs.
Andreas Neustifter [Fri, 11 Sep 2009 08:39:33 +0000 (08:39 +0000)]
Make ProfileEstimator even more robust on general CFGs.

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

15 years agoswitch HiddenGVStubs to be a DenseMap instead of a string map, mirroring FnStubs...
Chris Lattner [Fri, 11 Sep 2009 07:03:20 +0000 (07:03 +0000)]
switch HiddenGVStubs to be a DenseMap instead of a string map, mirroring FnStubs and GVStubs.

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

15 years agoFix a bug I introduced in FnStubs generation, switch GVStubs to be a
Chris Lattner [Fri, 11 Sep 2009 06:59:18 +0000 (06:59 +0000)]
Fix a bug I introduced in FnStubs generation, switch GVStubs to be a
densemap instead of StringMap to match FnStubs.

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

15 years agochange FnStubs from being a StringMap<std::string> to being a much
Chris Lattner [Fri, 11 Sep 2009 06:36:33 +0000 (06:36 +0000)]
change FnStubs from being a StringMap<std::string> to being a much
more efficient SmallPtrSet<MCSymbol*>.  This eliminates string
craziness and fixes CodeGen/X86/darwin-quote.ll with the new asmprinter.

Codegen is producing stubs in a nondeterminstic order, but it was doing
this before anyway.

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

15 years agoprintInstruction() no longer prints a \n after itself, do it
Chris Lattner [Fri, 11 Sep 2009 05:59:55 +0000 (05:59 +0000)]
printInstruction() no longer prints a \n after itself, do it
for the two instruction MOVPC32r sequence.

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

15 years agoreimplement X86ATTAsmPrinter::GetGlobalAddressSymbol in terms of
Chris Lattner [Fri, 11 Sep 2009 05:58:44 +0000 (05:58 +0000)]
reimplement X86ATTAsmPrinter::GetGlobalAddressSymbol in terms of
Mangler::getNameWithPrefix.  In addition to avoiding some over
quoting, this also is more efficient because it uses smallvector
instead of std::string thrashing.

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

15 years agofix prefix ordering, it's L_foo not _Lfoo
Chris Lattner [Fri, 11 Sep 2009 05:51:29 +0000 (05:51 +0000)]
fix prefix ordering, it's L_foo not _Lfoo

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

15 years agoadd a new Mangler::getNameWithPrefix API which returns the
Chris Lattner [Fri, 11 Sep 2009 05:40:42 +0000 (05:40 +0000)]
add a new Mangler::getNameWithPrefix API which returns the
(uniqued if unnamed) global variable name with the prefix that
it is supposed to get.  It doesn't do "mangling" in the sense of
adding quotes and hacking on bad characters.

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

15 years agoconvert X86ATTAsmPrinter::GetExternalSymbolSymbol to use SmallString
Chris Lattner [Fri, 11 Sep 2009 04:36:43 +0000 (04:36 +0000)]
convert X86ATTAsmPrinter::GetExternalSymbolSymbol to use SmallString
instead of std::string and Mangler.

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

15 years agorearrange some code, export a SmallString version of DecorateCygMingName.
Chris Lattner [Fri, 11 Sep 2009 04:28:13 +0000 (04:28 +0000)]
rearrange some code, export a SmallString version of DecorateCygMingName.

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

15 years agomore typos
Chris Lattner [Fri, 11 Sep 2009 01:49:31 +0000 (01:49 +0000)]
more typos

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

15 years agoFollow up to 81494. When the folded reload is narrowed to a 32-bit load then change...
Evan Cheng [Fri, 11 Sep 2009 01:01:31 +0000 (01:01 +0000)]
Follow up to 81494. When the folded reload is narrowed to a 32-bit load then change the destination register to a 32-bit one or add a sub-register index.

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

15 years agoPHI nodes can never reach the asmprinter, assert and die instead of printing
Chris Lattner [Fri, 11 Sep 2009 00:41:15 +0000 (00:41 +0000)]
PHI nodes can never reach the asmprinter, assert and die instead of printing
out an illegal "PHINODE" instruction.

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

15 years agoIt's not legal to fold a load from a narrower stack slot into a wider instruction...
Evan Cheng [Fri, 11 Sep 2009 00:39:26 +0000 (00:39 +0000)]
It's not legal to fold a load from a narrower stack slot into a wider instruction. If done, the instruction does a 64-bit load and that's not
safe. This can happen we a subreg_to_reg 0 has been coalesced. One
exception is when the instruction that folds the load is a move, then we
can simply turn it into a 32-bit load from the stack slot.

rdar://7170444

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

15 years agoMake fast-isel try ISD::FNEG before resorting to bitcasts and xors.
Dan Gohman [Fri, 11 Sep 2009 00:36:43 +0000 (00:36 +0000)]
Make fast-isel try ISD::FNEG before resorting to bitcasts and xors.

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

15 years agoReapply r81171 with a fix: don't try to use i64 when it
Dan Gohman [Fri, 11 Sep 2009 00:34:46 +0000 (00:34 +0000)]
Reapply r81171 with a fix: don't try to use i64 when it
isn't legal.

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

15 years agoFix indentation.
Dan Gohman [Fri, 11 Sep 2009 00:05:10 +0000 (00:05 +0000)]
Fix indentation.

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

15 years agoTeach lib/VMCore/ConstantFold.cpp how to set the inbounds keyword and
Dan Gohman [Fri, 11 Sep 2009 00:04:14 +0000 (00:04 +0000)]
Teach lib/VMCore/ConstantFold.cpp how to set the inbounds keyword and
how to fold notionally-out-of-bounds array getelementptr indices instead
of just doing these in lib/Analysis/ConstantFolding.cpp, because it can
be done in a fairly general way without TargetData, and because not all
constants are visited by lib/Analysis/ConstantFolding.cpp. This enables
more constant folding.

Also, set the "inbounds" flag when the getelementptr indices are
one-past-the-end.

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

15 years agoFactor out the code for checking that all indices in a getelementptr are
Dan Gohman [Thu, 10 Sep 2009 23:37:55 +0000 (23:37 +0000)]
Factor out the code for checking that all indices in a getelementptr are
within the notional bounds of the static type of the getelementptr (which
is not the same as "inbounds") from GlobalOpt into a utility routine,
and use it in ConstantFold.cpp to check whether there are any mis-behaved
indices.

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

15 years agoGive these files top-level comments that describe the current code.
Dan Gohman [Thu, 10 Sep 2009 23:07:18 +0000 (23:07 +0000)]
Give these files top-level comments that describe the current code.

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

15 years agoFix whitespaces.
Devang Patel [Thu, 10 Sep 2009 22:36:12 +0000 (22:36 +0000)]
Fix whitespaces.

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

15 years agoFix validation errors.
Bill Wendling [Thu, 10 Sep 2009 22:14:16 +0000 (22:14 +0000)]
Fix validation errors.

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

15 years agoFix validation errors.
Bill Wendling [Thu, 10 Sep 2009 22:12:50 +0000 (22:12 +0000)]
Fix validation errors.

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

15 years agoDon't swap the operands of a subtraction when trying to create a
Bob Wilson [Thu, 10 Sep 2009 22:09:31 +0000 (22:09 +0000)]
Don't swap the operands of a subtraction when trying to create a
post-decrement load/store.

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

15 years agoFix uppercaseo.
Dale Johannesen [Thu, 10 Sep 2009 22:01:32 +0000 (22:01 +0000)]
Fix uppercaseo.

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

15 years agoAdded the ParseInstruction() hook for target specific assembler directives so
Kevin Enderby [Thu, 10 Sep 2009 20:51:44 +0000 (20:51 +0000)]
Added the ParseInstruction() hook for target specific assembler directives so
that things like .word can be parsed as target specific.  Moved parsing .word
out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes
for other targets that support the .word directive.

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

15 years agoFit code within 80 columns
Victor Hernandez [Thu, 10 Sep 2009 20:18:57 +0000 (20:18 +0000)]
Fit code within 80 columns

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

15 years agoAdded XOR instructions for rAX and immediates of
Sean Callanan [Thu, 10 Sep 2009 19:52:26 +0000 (19:52 +0000)]
Added XOR instructions for rAX and immediates of
various widths.

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

15 years agoAdded MOV instructions between rAX and memory offsets,
Sean Callanan [Thu, 10 Sep 2009 18:33:42 +0000 (18:33 +0000)]
Added MOV instructions between rAX and memory offsets,
including segment offsets and (for 8-bit operands)
absolute offsets.

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

15 years agoAdded a variety of PUSH and POP instructions, including
Sean Callanan [Thu, 10 Sep 2009 18:29:13 +0000 (18:29 +0000)]
Added a variety of PUSH and POP instructions, including
ones capable of accessing R/M operands instead of just
registers.

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

15 years agoExit early if exception handling isn't supported.
Bill Wendling [Thu, 10 Sep 2009 18:28:06 +0000 (18:28 +0000)]
Exit early if exception handling isn't supported.

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

15 years agoAllow llvmc to take .bc files as input.
Mikhail Glushenkov [Thu, 10 Sep 2009 17:04:32 +0000 (17:04 +0000)]
Allow llvmc to take .bc files as input.

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

15 years agoMake ProfileEstimator more robust on general CFGs.
Andreas Neustifter [Thu, 10 Sep 2009 16:30:38 +0000 (16:30 +0000)]
Make ProfileEstimator more robust on general CFGs.

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

15 years agoadd another broken version of gcc, thanks to Niels Moller for pointing this out.
Chris Lattner [Thu, 10 Sep 2009 16:25:02 +0000 (16:25 +0000)]
add another broken version of gcc, thanks to Niels Moller for pointing this out.

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

15 years agoDistinguish between 'empty' and empty DAG marker.
Mikhail Glushenkov [Thu, 10 Sep 2009 16:22:02 +0000 (16:22 +0000)]
Distinguish between 'empty' and empty DAG marker.

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

15 years agoAdd a logical 'not' operator to llvmc's TableGen dialect.
Mikhail Glushenkov [Thu, 10 Sep 2009 16:21:38 +0000 (16:21 +0000)]
Add a logical 'not' operator to llvmc's TableGen dialect.

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

15 years agofix leakage of Module
Nuno Lopes [Thu, 10 Sep 2009 14:56:31 +0000 (14:56 +0000)]
fix leakage of Module

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

15 years agoAdd some braces to make newer GCCs happy and update CMakeLists.
Benjamin Kramer [Thu, 10 Sep 2009 11:31:39 +0000 (11:31 +0000)]
Add some braces to make newer GCCs happy and update CMakeLists.

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

15 years agoCleaned up code by factoring out common portions of edge loading into function.
Andreas Neustifter [Thu, 10 Sep 2009 07:12:35 +0000 (07:12 +0000)]
Cleaned up code by factoring out common portions of edge loading into function.

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

15 years agoCorrectly handle the case where a comparison is created in one BasicBlock and
Nick Lewycky [Thu, 10 Sep 2009 07:02:09 +0000 (07:02 +0000)]
Correctly handle the case where a comparison is created in one BasicBlock and
used by a terminator in another.

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