oota-llvm.git
14 years agoTreat copysignl like the other copysign functions.
Duncan Sands [Mon, 15 Mar 2010 14:01:44 +0000 (14:01 +0000)]
Treat copysignl like the other copysign functions.

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

14 years agoDon't save a temporary string into a StringRef field.
Jeffrey Yasskin [Mon, 15 Mar 2010 06:59:21 +0000 (06:59 +0000)]
Don't save a temporary string into a StringRef field.

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

14 years agofix MCSectionELF to not leak memory, just like I did for MCSymbol.
Chris Lattner [Mon, 15 Mar 2010 06:23:52 +0000 (06:23 +0000)]
fix MCSectionELF to not leak memory, just like I did for MCSymbol.
MCSectionMachO is already fine (yay for fixed size arrays?),
MCSectionCOFF still leaks.

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

14 years agofix a memory leak yjasskin pointed out: MCSymbol is bump pointer
Chris Lattner [Mon, 15 Mar 2010 06:15:35 +0000 (06:15 +0000)]
fix a memory leak yjasskin pointed out: MCSymbol is bump pointer
allocated and thus not freed.  This is cool except that it contains
and std::string so the string data didn't get freed.  In any case
there is no reason to redundantly store the string data in the
MCSymbol anyway, just make the MCSymbol ref the string data in the
MCContext StringMap.

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

14 years agoeliminate some #if 0 code I added in r96905, type inference
Chris Lattner [Mon, 15 Mar 2010 06:03:22 +0000 (06:03 +0000)]
eliminate some #if 0 code I added in r96905, type inference
now enforces that input/output named values have hte same type.

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

14 years agoCompletely rewrite tblgen's type inference mechanism,
Chris Lattner [Mon, 15 Mar 2010 06:00:16 +0000 (06:00 +0000)]
Completely rewrite tblgen's type inference mechanism,
changing the primary datastructure from being a
"std::vector<unsigned char>" to being a new TypeSet class
that actually has (gasp) invariants!

This changes more things than I remember, but one major
innovation here is that it enforces that named input
values agree in type with their output values.

This also eliminates code that transparently assumes (in
some cases) that SDNodeXForm input/output types are the
same, because this is wrong in many case.

This also eliminates a bug which caused a lot of ambiguous
patterns to go undetected, where a register class would
sometimes pick the first possible type, causing an
ambiguous pattern to get arbitrary results.

With all the recent target changes, this causes no
functionality change!

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

14 years agoMachineMove ctor doesn't need to to mutate input, add 'const'
Chris Lattner [Mon, 15 Mar 2010 05:55:35 +0000 (05:55 +0000)]
MachineMove ctor doesn't need to to mutate input, add 'const'

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

14 years agodo some serious surgery on CellSPU to get it back into a world
Chris Lattner [Mon, 15 Mar 2010 05:53:47 +0000 (05:53 +0000)]
do some serious surgery on CellSPU to get it back into a world
where it uses types consistently.

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

14 years agofix a few more ambiguous types.
Chris Lattner [Mon, 15 Mar 2010 05:53:30 +0000 (05:53 +0000)]
fix a few more ambiguous types.

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

14 years agoadd some missing types
Chris Lattner [Mon, 15 Mar 2010 05:35:37 +0000 (05:35 +0000)]
add some missing types

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

14 years agoTell Valgrind when we modify already-executed machine code so it knows
Jeffrey Yasskin [Mon, 15 Mar 2010 04:57:55 +0000 (04:57 +0000)]
Tell Valgrind when we modify already-executed machine code so it knows
to re-instrument the code.  We depend on the system valgrind.h to
avoid adding a new license.

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

14 years agovarious cleanups from daniel
Chris Lattner [Mon, 15 Mar 2010 04:12:21 +0000 (04:12 +0000)]
various cleanups from daniel

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

14 years agofix an ambiguous pattern, contrary to expectations, scalar_to_vector
Chris Lattner [Mon, 15 Mar 2010 00:52:43 +0000 (00:52 +0000)]
fix an ambiguous pattern, contrary to expectations, scalar_to_vector
doesn't have a type constraint on the scalar because we don't have
an 'sAny' type.

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

14 years agoremove dead method.
Chris Lattner [Mon, 15 Mar 2010 00:00:42 +0000 (00:00 +0000)]
remove dead method.

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

14 years agodon't forget to close a FD on an error condition, found by
Chris Lattner [Sun, 14 Mar 2010 23:16:45 +0000 (23:16 +0000)]
don't forget to close a FD on an error condition, found by
cppcheck, PR6617.  Patch by Ettl Martin!

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

14 years agotidy up and expound more on how half-float works.
Chris Lattner [Sun, 14 Mar 2010 23:03:31 +0000 (23:03 +0000)]
tidy up and expound more on how half-float works.

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

14 years agotidy indentation
Chris Lattner [Sun, 14 Mar 2010 22:44:11 +0000 (22:44 +0000)]
tidy indentation

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

14 years agono really, all 64-bit cpu's have cmov support. This should
Chris Lattner [Sun, 14 Mar 2010 22:39:35 +0000 (22:39 +0000)]
no really, all 64-bit cpu's have cmov support. This should
fix the rest of the buildbot failures on non-x86 hosts.

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

14 years agofilecheckize a test and mark these wiht a cpu so it passes
Chris Lattner [Sun, 14 Mar 2010 22:31:16 +0000 (22:31 +0000)]
filecheckize a test and mark these wiht a cpu so it passes
on hosts without cmovs.

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

14 years agoall 64-bit cpus have cmov, this should fix CodeGen/X86/cmov.ll
Chris Lattner [Sun, 14 Mar 2010 22:24:34 +0000 (22:24 +0000)]
all 64-bit cpus have cmov, this should fix CodeGen/X86/cmov.ll
(at least) on non-x86 builders.

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

14 years agoRemove pointless forward declaration, MSVC got confused by this.
Benjamin Kramer [Sun, 14 Mar 2010 22:00:28 +0000 (22:00 +0000)]
Remove pointless forward declaration, MSVC got confused by this.

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

14 years agoTurn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodes
Duncan Sands [Sun, 14 Mar 2010 21:08:40 +0000 (21:08 +0000)]
Turn calls to copysignl into an FCOPYSIGN node.  Handle FCOPYSIGN nodes
with ppc_f128 type by having the type legalizer turn these back into a
call to copysignl.

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

14 years agoRename SDDbgValue.h to SDNodeDbgValue.h for consistency.
Evan Cheng [Sun, 14 Mar 2010 19:56:39 +0000 (19:56 +0000)]
Rename SDDbgValue.h to SDNodeDbgValue.h for consistency.

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

14 years agofix ShrinkDemandedOps to not leave dead nodes around,
Chris Lattner [Sun, 14 Mar 2010 19:46:02 +0000 (19:46 +0000)]
fix ShrinkDemandedOps to not leave dead nodes around,
fixing PR6607

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

14 years agorewrite ShrinkDemandedOps to be faster and indent less,
Chris Lattner [Sun, 14 Mar 2010 19:43:04 +0000 (19:43 +0000)]
rewrite ShrinkDemandedOps to be faster and indent less,
no functionality change.

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

14 years agoFix jit encoding bugs.
Evan Cheng [Sun, 14 Mar 2010 19:28:34 +0000 (19:28 +0000)]
Fix jit encoding bugs.

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

14 years agomake -view-isel-dags print after the 'ShrinkDemandedOps' pass.
Chris Lattner [Sun, 14 Mar 2010 19:27:55 +0000 (19:27 +0000)]
make -view-isel-dags print after the 'ShrinkDemandedOps' pass.

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

14 years agodon't have i386-specific tests in CodeGen/Generic, PR6601.
Chris Lattner [Sun, 14 Mar 2010 18:51:18 +0000 (18:51 +0000)]
don't have i386-specific tests in CodeGen/Generic, PR6601.

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

14 years agofix PR6605, X86ISD::CMP always returns i32 (EFLAGS), not
Chris Lattner [Sun, 14 Mar 2010 18:44:35 +0000 (18:44 +0000)]
fix PR6605, X86ISD::CMP always returns i32 (EFLAGS), not
the operand type.

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

14 years agoFix typo
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:52 +0000 (18:42 +0000)]
Fix typo

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

14 years agoDocument fp16 intrinsics
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:47 +0000 (18:42 +0000)]
Document fp16 intrinsics

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

14 years agoFeature test for half precision FP.
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:43 +0000 (18:42 +0000)]
Feature test for half precision FP.

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

14 years agoAdd substarget feature for FP16
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:38 +0000 (18:42 +0000)]
Add substarget feature for FP16

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

14 years agoAdd codegen support for FP16 on ARM
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:31 +0000 (18:42 +0000)]
Add codegen support for FP16 on ARM

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

14 years agoMake default expansion for FP16 <-> FP32 nodes into libcalls
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:24 +0000 (18:42 +0000)]
Make default expansion for FP16 <-> FP32 nodes into libcalls

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

14 years agoAdd DAG nodes to represent FP16 <-> FP32 intrinsics
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:15 +0000 (18:42 +0000)]
Add DAG nodes to represent FP16 <-> FP32 intrinsics

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

14 years agoCleanup
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:08 +0000 (18:42 +0000)]
Cleanup

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

14 years agoThe fp16 <-> fp32 intrinsics are pure, mark them so they can be CSE'd, etc.
Anton Korobeynikov [Sun, 14 Mar 2010 18:42:04 +0000 (18:42 +0000)]
The fp16 <-> fp32 intrinsics are pure, mark them so they can be CSE'd, etc.

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

14 years agoAdd intrinsics to represent fp16 <-> fp32 conversions
Anton Korobeynikov [Sun, 14 Mar 2010 18:41:50 +0000 (18:41 +0000)]
Add intrinsics to represent fp16 <-> fp32 conversions

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

14 years agoadd support for pentium class CPUs which do not have cmov,
Chris Lattner [Sun, 14 Mar 2010 18:31:44 +0000 (18:31 +0000)]
add support for pentium class CPUs which do not have cmov,
PR4841.  Patch by Craig Smith!

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

14 years agofix AsmPrinter::GetBlockAddressSymbol to always return a unique
Chris Lattner [Sun, 14 Mar 2010 17:53:23 +0000 (17:53 +0000)]
fix AsmPrinter::GetBlockAddressSymbol to always return a unique
label instead of trying to form one based on the BB name (which
causes collisions if the name is empty).  This fixes PR6608

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

14 years agocomment fix.
Chris Lattner [Sun, 14 Mar 2010 17:10:52 +0000 (17:10 +0000)]
comment fix.

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

14 years agoshrink 4-byte branches to 1-byte branches when lowering from
Chris Lattner [Sun, 14 Mar 2010 17:04:18 +0000 (17:04 +0000)]
shrink 4-byte branches to 1-byte branches when lowering from
MachineInstr -> MCInst.  This is what the assembler backend wants,
it relaxes from smaller to larger things.  This fixes rdar://7750815

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

14 years agoSkip over debug info when trying to merge two return BBs.
Bill Wendling [Sun, 14 Mar 2010 10:40:55 +0000 (10:40 +0000)]
Skip over debug info when trying to merge two return BBs.

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

14 years agoMake returns more consistent with others.
Bill Wendling [Sun, 14 Mar 2010 10:40:28 +0000 (10:40 +0000)]
Make returns more consistent with others.

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

14 years agoget MMI out of the label uniquing business, just go to MCContext
Chris Lattner [Sun, 14 Mar 2010 08:36:50 +0000 (08:36 +0000)]
get MMI out of the label uniquing business, just go to MCContext
to get unique assembler temporary labels.

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

14 years agofix these two get the mcsymbol operand instead of imm operand.
Chris Lattner [Sun, 14 Mar 2010 08:28:48 +0000 (08:28 +0000)]
fix these two get the mcsymbol operand instead of imm operand.

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

14 years agoadd a new CreateTempSymbol method, the use case for
Chris Lattner [Sun, 14 Mar 2010 08:23:30 +0000 (08:23 +0000)]
add a new CreateTempSymbol method, the use case for
CreateTempSymbol vs GetOrCreateTemporarySymbol are
completely different.

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

14 years agodon't use getDWLabel("label" anymore, always go through MMI.
Chris Lattner [Sun, 14 Mar 2010 08:18:13 +0000 (08:18 +0000)]
don't use getDWLabel("label" anymore, always go through MMI.

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

14 years agoremove now-dead code, all labels use MCSymbols.
Chris Lattner [Sun, 14 Mar 2010 08:17:53 +0000 (08:17 +0000)]
remove now-dead code, all labels use MCSymbols.

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

14 years agochange SrcLineInfo to contain a label instead of a label ID.
Chris Lattner [Sun, 14 Mar 2010 08:15:55 +0000 (08:15 +0000)]
change SrcLineInfo to contain a label instead of a label ID.

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

14 years agoNow that DBG_LABEL is updated, we can finally make MachineMove
Chris Lattner [Sun, 14 Mar 2010 08:12:40 +0000 (08:12 +0000)]
Now that DBG_LABEL is updated, we can finally make MachineMove
contain an MCSymbol instead of a label index.

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

14 years agochange the DBG_LABEL MachineInstr to always be created
Chris Lattner [Sun, 14 Mar 2010 07:56:48 +0000 (07:56 +0000)]
change the DBG_LABEL MachineInstr to always be created
with an MCSymbol instead of an immediate.

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

14 years agoxfail properly
Chris Lattner [Sun, 14 Mar 2010 07:55:34 +0000 (07:55 +0000)]
xfail properly

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

14 years agounbreak the build, grr symlinks.
Chris Lattner [Sun, 14 Mar 2010 07:36:49 +0000 (07:36 +0000)]
unbreak the build, grr symlinks.

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

14 years agoxfail these tests temporarily to get teh buildbots back to happy land.
Chris Lattner [Sun, 14 Mar 2010 07:32:48 +0000 (07:32 +0000)]
xfail these tests temporarily to get teh buildbots back to happy land.

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

14 years agoChange this code to allocate temporary labels from mccontext,
Chris Lattner [Sun, 14 Mar 2010 07:29:45 +0000 (07:29 +0000)]
Change this code to allocate temporary labels from mccontext,
not from MMI.

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

14 years agoswitch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
Chris Lattner [Sun, 14 Mar 2010 07:27:07 +0000 (07:27 +0000)]
switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.

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

14 years agoFix some EH failures on NNT I introduced in r98461
Chris Lattner [Sun, 14 Mar 2010 07:02:50 +0000 (07:02 +0000)]
Fix some EH failures on NNT I introduced in r98461

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

14 years agofix a bug I introduced in r98459, causing some NNT failures.
Chris Lattner [Sun, 14 Mar 2010 06:50:56 +0000 (06:50 +0000)]
fix a bug I introduced in r98459, causing some NNT failures.

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

14 years agoCheck in tablegen changes to fix disassembler related failures caused by r98465.
Evan Cheng [Sun, 14 Mar 2010 05:15:39 +0000 (05:15 +0000)]
Check in tablegen changes to fix disassembler related failures caused by r98465.

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

14 years agoDo not force indirect tailcall through fixed registers: eax, r11. Add support to...
Evan Cheng [Sun, 14 Mar 2010 03:48:46 +0000 (03:48 +0000)]
Do not force indirect tailcall through fixed registers: eax, r11. Add support to allow loads to be folded to tail call instructions.

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

14 years agoMC: Fix a crash on invalid, attempting to evaluate undefined symbols.
Daniel Dunbar [Sun, 14 Mar 2010 03:10:40 +0000 (03:10 +0000)]
MC: Fix a crash on invalid, attempting to evaluate undefined symbols.

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

14 years agochange the LabelSDNode to be EHLabelSDNode and make it hold
Chris Lattner [Sun, 14 Mar 2010 02:33:54 +0000 (02:33 +0000)]
change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol.  Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID.  Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".

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

14 years agoeliminate InvalidateLabel and LabelIDList from MMI and replace
Chris Lattner [Sun, 14 Mar 2010 02:24:55 +0000 (02:24 +0000)]
eliminate InvalidateLabel and LabelIDList from MMI and replace
them with a counter.

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

14 years agouse Label->isDefined() instead of isLabelDeleted() now that we
Chris Lattner [Sun, 14 Mar 2010 02:20:58 +0000 (02:20 +0000)]
use Label->isDefined() instead of isLabelDeleted() now that we
consistently use MCSymbol and only call this predicate after
they should have been emitted.

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

14 years agofix some pointless layering violations.
Chris Lattner [Sun, 14 Mar 2010 01:56:06 +0000 (01:56 +0000)]
fix some pointless layering violations.

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

14 years agochange EH related stuff (other than EH_LABEL) to use MCSymbol
Chris Lattner [Sun, 14 Mar 2010 01:41:15 +0000 (01:41 +0000)]
change EH related stuff (other than EH_LABEL) to use MCSymbol
instead of label ID's.  This cleans up and regularizes a bunch
of code and makes way for future progress.

Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places.  This is very sad and disturbing. :(

One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction.  There should not be any
functionality change from doing this, but I'm not an EH expert.

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

14 years agoX86_64: Fix encoding for the rest of the 64i32 instructions too.
Daniel Dunbar [Sat, 13 Mar 2010 22:57:53 +0000 (22:57 +0000)]
X86_64: Fix encoding for the rest of the 64i32 instructions too.

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

14 years agoX86: Fix ADD64i32 encoding.
Daniel Dunbar [Sat, 13 Mar 2010 22:49:39 +0000 (22:49 +0000)]
X86: Fix ADD64i32 encoding.

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

14 years agoMC/X86_64: Symbol support.
Daniel Dunbar [Sat, 13 Mar 2010 22:49:35 +0000 (22:49 +0000)]
MC/X86_64: Symbol support.

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

14 years agoMC/Mach-O: Initial x86_64 support.
Daniel Dunbar [Sat, 13 Mar 2010 22:10:17 +0000 (22:10 +0000)]
MC/Mach-O: Initial x86_64 support.

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

14 years agomacho-dump: Basic Mach 64 support.
Daniel Dunbar [Sat, 13 Mar 2010 22:10:11 +0000 (22:10 +0000)]
macho-dump: Basic Mach 64 support.

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

14 years agoeliminate the now-unneeded context argument of MBB::getSymbol()
Chris Lattner [Sat, 13 Mar 2010 21:04:28 +0000 (21:04 +0000)]
eliminate the now-unneeded context argument of MBB::getSymbol()

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

14 years agorearrange MCContext ownership. Before LLVMTargetMachine created it
Chris Lattner [Sat, 13 Mar 2010 20:55:24 +0000 (20:55 +0000)]
rearrange MCContext ownership.  Before LLVMTargetMachine created it
and passing off ownership to AsmPrinter.  Now MachineModuleInfo
creates it and owns it by value.  This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code.  This also allows MachineFunction to
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.

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

14 years agoMake lit pay attention to --vg for unittests too.
Jeffrey Yasskin [Sat, 13 Mar 2010 20:45:41 +0000 (20:45 +0000)]
Make lit pay attention to --vg for unittests too.

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

14 years agoAllow types that have been forwarded to to be freed.
Jeffrey Yasskin [Sat, 13 Mar 2010 20:09:55 +0000 (20:09 +0000)]
Allow types that have been forwarded to to be freed.

Tested: make check-lit && valgrind --dsymutil=yes --leak-check=full unittests/ExecutionEngine/JIT/Debug/JITTests

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

14 years agoTeach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.
Nick Lewycky [Sat, 13 Mar 2010 19:58:26 +0000 (19:58 +0000)]
Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.

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

14 years agollvm-mc: Delete output files on error.
Daniel Dunbar [Sat, 13 Mar 2010 19:31:47 +0000 (19:31 +0000)]
llvm-mc: Delete output files on error.

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

14 years agoMC/X86_64: Fix matching of leaq.
Daniel Dunbar [Sat, 13 Mar 2010 19:31:44 +0000 (19:31 +0000)]
MC/X86_64: Fix matching of leaq.

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

14 years agoMC/X86_64: Fix matching of callq.
Daniel Dunbar [Sat, 13 Mar 2010 19:31:38 +0000 (19:31 +0000)]
MC/X86_64: Fix matching of callq.

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

14 years agoadd a hack to allow parsing negative minint. rdar://7751341
Chris Lattner [Sat, 13 Mar 2010 19:25:13 +0000 (19:25 +0000)]
add a hack to allow parsing negative minint. rdar://7751341

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

14 years agoadd builder support for mcsymbol operands.
Chris Lattner [Sat, 13 Mar 2010 08:16:25 +0000 (08:16 +0000)]
add builder support for mcsymbol operands.

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

14 years agoadd support for MCSymbols as operands to MachineInstrs.
Chris Lattner [Sat, 13 Mar 2010 08:14:18 +0000 (08:14 +0000)]
add support for MCSymbols as operands to MachineInstrs.

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

14 years agosimplify EmitFrameMoves to take BaseLabel in as a symbol
Chris Lattner [Sat, 13 Mar 2010 08:05:25 +0000 (08:05 +0000)]
simplify EmitFrameMoves to take BaseLabel in as a symbol
instead of as a stem+idx pair, simplify the "is a new
location" check to use symbol comparison.

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

14 years agosimplify some overly general code. The stack always grows down on x86.
Chris Lattner [Sat, 13 Mar 2010 08:04:35 +0000 (08:04 +0000)]
simplify some overly general code.  The stack always grows down on x86.

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

14 years agoFix another warning. There is a functionality change but I believe it's correct.
Benjamin Kramer [Sat, 13 Mar 2010 07:50:22 +0000 (07:50 +0000)]
Fix another warning. There is a functionality change but I believe it's correct.

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

14 years agofactor some labels, simplify some code.
Chris Lattner [Sat, 13 Mar 2010 07:40:56 +0000 (07:40 +0000)]
factor some labels, simplify some code.

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

14 years agoAdd some parens and silence a warning.
Benjamin Kramer [Sat, 13 Mar 2010 07:40:34 +0000 (07:40 +0000)]
Add some parens and silence a warning.

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

14 years agoAttempt to appease the arm-linux buildbot by fixing the JIT encodings for new
Bob Wilson [Sat, 13 Mar 2010 07:34:35 +0000 (07:34 +0000)]
Attempt to appease the arm-linux buildbot by fixing the JIT encodings for new
base register updating load/store-multiple instructions.

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

14 years agovarious cleanups.
Chris Lattner [Sat, 13 Mar 2010 07:26:18 +0000 (07:26 +0000)]
various cleanups.

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

14 years agoMC/Mach-O: PCrel relocations weren't using the right base address, they are
Daniel Dunbar [Sat, 13 Mar 2010 02:38:00 +0000 (02:38 +0000)]
MC/Mach-O: PCrel relocations weren't using the right base address, they are
relative to the fragment address, not its offset. This was masked by the text
section normally being at address 0.

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

14 years agollvm-mc: Support -n, useful for comparing -integrated-as output since the
Daniel Dunbar [Sat, 13 Mar 2010 02:20:57 +0000 (02:20 +0000)]
llvm-mc: Support -n, useful for comparing -integrated-as output since the
compiler may not lead with the text section.

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

14 years agollvm-mc: Support -arch as a simplified form of -triple.
Daniel Dunbar [Sat, 13 Mar 2010 02:20:38 +0000 (02:20 +0000)]
llvm-mc: Support -arch as a simplified form of -triple.

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

14 years agoFix a typo in ValueTracking that's causing instcombine to delete needed shift instruc...
Evan Cheng [Sat, 13 Mar 2010 02:20:29 +0000 (02:20 +0000)]
Fix a typo in ValueTracking that's causing instcombine to delete needed shift instructions.

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

14 years agoreimplement the string pool used for inlined function
Chris Lattner [Sat, 13 Mar 2010 02:17:42 +0000 (02:17 +0000)]
reimplement the string pool used for inlined function
entries to not thrash std::strings and MCSymbols.

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

14 years agoRemove the last memory leak from the VMCore unit tests.
Jeffrey Yasskin [Sat, 13 Mar 2010 02:15:08 +0000 (02:15 +0000)]
Remove the last memory leak from the VMCore unit tests.

Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests

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

14 years agoswitch to the text section at the start of the .s file for darwin/x86
Chris Lattner [Sat, 13 Mar 2010 02:10:00 +0000 (02:10 +0000)]
switch to the text section at the start of the .s file for darwin/x86
targets.  This is a temporary hack for the .o file writer that Daniel
wants :)

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

14 years agoRemove a memory leak from MetadataTest.
Jeffrey Yasskin [Sat, 13 Mar 2010 01:39:20 +0000 (01:39 +0000)]
Remove a memory leak from MetadataTest.

Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests

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

14 years agoRemove a memory leak from VerifierTest.
Jeffrey Yasskin [Sat, 13 Mar 2010 01:34:56 +0000 (01:34 +0000)]
Remove a memory leak from VerifierTest.

Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests

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