oota-llvm.git
14 years agoAdd variants of VLD2, VLD3 and VLD4 with address register writeback, and
Bob Wilson [Sat, 20 Mar 2010 20:10:51 +0000 (20:10 +0000)]
Add variants of VLD2, VLD3 and VLD4 with address register writeback, and
rewrite the existing VLD3 and VLD4 instructions to use the same classes as
the others.

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

14 years agoTidy some comments and whitespace for consistency.
Bob Wilson [Sat, 20 Mar 2010 19:57:03 +0000 (19:57 +0000)]
Tidy some comments and whitespace for consistency.

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

14 years agoRename some instructions for consistency and sanity: use "_UPD" suffix for
Bob Wilson [Sat, 20 Mar 2010 18:35:24 +0000 (18:35 +0000)]
Rename some instructions for consistency and sanity: use "_UPD" suffix for
load/stores with address register writeback, and use "odd" suffix to distinguish
instructions to access odd numbered registers (instead of "a" and "b").
No functional changes.

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

14 years agoAdd instructions for double-spaced VLD3 and VLD4 without address register
Bob Wilson [Sat, 20 Mar 2010 18:14:26 +0000 (18:14 +0000)]
Add instructions for double-spaced VLD3 and VLD4 without address register
writeback, and refactor the existing double-spaced VLD2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

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

14 years agoAdd VLD1 instructions with address register writeback.
Bob Wilson [Sat, 20 Mar 2010 17:59:03 +0000 (17:59 +0000)]
Add VLD1 instructions with address register writeback.

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

14 years agoPIC16: Simplify code by using a std::set<std::string> instead of a sorted & uniqued...
Benjamin Kramer [Sat, 20 Mar 2010 17:41:18 +0000 (17:41 +0000)]
PIC16: Simplify code by using a std::set<std::string> instead of a sorted & uniqued std::list of leaked char*.

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

14 years agoRevert the rest of 98679.
Bob Wilson [Sat, 20 Mar 2010 06:34:02 +0000 (06:34 +0000)]
Revert the rest of 98679.
--- Reverse-merging r98679 into 'lib/Target/ARM/ARMInstrVFP.td':
U    lib/Target/ARM/ARMInstrVFP.td

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

14 years agoFix a very bad typo. Since the register number was off by one, the ARM
Bob Wilson [Sat, 20 Mar 2010 06:05:13 +0000 (06:05 +0000)]
Fix a very bad typo.  Since the register number was off by one, the ARM
load/store optimizer would incorrectly think that registers D26 and D28
were consecutive and would generate a VLDM instruction to load them.
The assembler was not convinced.

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

14 years agoClear the SCEVExpander's insertion point after making deletions,
Dan Gohman [Sat, 20 Mar 2010 03:53:53 +0000 (03:53 +0000)]
Clear the SCEVExpander's insertion point after making deletions,
so that the SCEVExpander doesn't retain a dangling pointer as its
insert position. The dangling pointer in this case wasn't ever used
to insert new instructions, but it was causing trouble with
SCEVExpander's code for automatically advancing its insert position
past debug intrinsics.

This fixes use-after-free errors that valgrind noticed in
test/Transforms/IndVarSimplify/2007-06-06-DeleteDanglesPtr.ll and
test/Transforms/IndVarSimplify/exit_value_tests.ll.

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

14 years agoStupid svn. Add back to the lost sibcall tests.
Evan Cheng [Sat, 20 Mar 2010 03:17:05 +0000 (03:17 +0000)]
Stupid svn. Add back to the lost sibcall tests.

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

14 years agoIf call result is in ST0 and it is not being passed to the caller's
Evan Cheng [Sat, 20 Mar 2010 02:58:15 +0000 (02:58 +0000)]
If call result is in ST0 and it is not being passed to the caller's
caller, then it is not safe to optimize the call into a sibcall since
the call result has to be popped off the x87 stack.

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

14 years agoBetter fix for r98994, MachObjectWriterImpl wasn't intended to be virtual.
Daniel Dunbar [Sat, 20 Mar 2010 01:58:40 +0000 (01:58 +0000)]
Better fix for r98994, MachObjectWriterImpl wasn't intended to be virtual.

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

14 years agoAdd NLdStFrm Format.
Johnny Chen [Sat, 20 Mar 2010 00:17:00 +0000 (00:17 +0000)]
Add NLdStFrm Format.

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

14 years agoRevert r98679. The disassembler will be updated to depend on the existence of
Johnny Chen [Fri, 19 Mar 2010 23:50:27 +0000 (23:50 +0000)]
Revert r98679.  The disassembler will be updated to depend on the existence of
IndexModeUpd and then populates the Inst{21}=1 while populating the instructions
for disassembly.

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

14 years agoRevert r99009 temporarily it seems to be breaking the bots.
Eric Christopher [Fri, 19 Mar 2010 23:04:23 +0000 (23:04 +0000)]
Revert r99009 temporarily it seems to be breaking the bots.

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

14 years agoRevert this change, since it was causing ARM performance regressions.
Bob Wilson [Fri, 19 Mar 2010 22:51:32 +0000 (22:51 +0000)]
Revert this change, since it was causing ARM performance regressions.

--- Reverse-merging r98889 into '.':
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/ARMISelLowering.h
U    lib/Target/ARM/ARMInstrInfo.td
U    lib/Target/ARM/ARMInstrVFP.td
U    lib/Target/ARM/ARMISelLowering.cpp
U    lib/Target/ARM/ARMInstrFormats.td

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

14 years agoChange intrinsic result type for void to store it as an empty list
Chris Lattner [Fri, 19 Mar 2010 22:40:56 +0000 (22:40 +0000)]
Change intrinsic result type for void to store it as an empty list
instead of as a single element list with VoidTy.

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

14 years agomake getOperandNum a static function (since it's just used by
Chris Lattner [Fri, 19 Mar 2010 21:56:21 +0000 (21:56 +0000)]
make getOperandNum a static function (since it's just used by
ApplyTypeConstraint) and make it handle multiple result nodes.

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

14 years agoFix more places to more thoroughly ignore debug intrinsics. This fixes
Dan Gohman [Fri, 19 Mar 2010 21:51:03 +0000 (21:51 +0000)]
Fix more places to more thoroughly ignore debug intrinsics. This fixes
use-before-def errors in SCEVExpander-produced code in sqlite3 when debug
info with optimization is enabled, though the testcases for this are
dependent on use-list order.

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

14 years agoremove the patterns that I commented out in r98930, Dan verified
Chris Lattner [Fri, 19 Mar 2010 21:43:36 +0000 (21:43 +0000)]
remove the patterns that I commented out in r98930, Dan verified
that they are dead.

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

14 years agomajor surgery on tblgen: generalize TreePatternNode
Chris Lattner [Fri, 19 Mar 2010 21:37:09 +0000 (21:37 +0000)]
major surgery on tblgen: generalize TreePatternNode
to maintain a list of types (one for each result of
the node) instead of a single type.  There are liberal
hacks added to emulate the old behavior in various
situations, but they can start disolving now.

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

14 years agoForce configuration of some projects before others. In particular, some
John Criswell [Fri, 19 Mar 2010 21:31:39 +0000 (21:31 +0000)]
Force configuration of some projects before others.  In particular, some
projects rely upon llvm-gcc, the LLVM test suite, and poolalloc.  This ensures
that the aforementioned projects have their object trees created first so that
other projects can find their object trees when they themselves are configured.

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

14 years agoFix -Wnon-virtual-dtor warning.
Rafael Espindola [Fri, 19 Mar 2010 21:26:46 +0000 (21:26 +0000)]
Fix -Wnon-virtual-dtor warning.

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

14 years agoRegenerate configure.
Tanya Lattner [Fri, 19 Mar 2010 21:22:13 +0000 (21:22 +0000)]
Regenerate configure.

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

14 years agoBump version number.
Tanya Lattner [Fri, 19 Mar 2010 21:19:10 +0000 (21:19 +0000)]
Bump version number.

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

14 years agoTest commit (removed extra blank line)
Ben Holt [Fri, 19 Mar 2010 21:12:29 +0000 (21:12 +0000)]
Test commit (removed extra blank line)

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

14 years agocall void @llvm.dbg.declare(metadata !{i32* null}, metadata !1)
Devang Patel [Fri, 19 Mar 2010 21:06:24 +0000 (21:06 +0000)]
call void @llvm.dbg.declare(metadata !{i32* null}, metadata !1)
is valid, but not useful, when variable  identified by !1 is optimized away by the optimizer.

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

14 years agoUpdated copyright year to 2010.
John Criswell [Fri, 19 Mar 2010 21:04:16 +0000 (21:04 +0000)]
Updated copyright year to 2010.

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

14 years agoFixed the encoding problems of the crc32 instructions. All had the Operand size
Kevin Enderby [Fri, 19 Mar 2010 20:04:42 +0000 (20:04 +0000)]
Fixed the encoding problems of the crc32 instructions. All had the Operand size
override prefix and only the r/m16 forms should have had that.  Also for variant
one, the AT&T syntax, added suffixes to all forms.  Also added the missing
64-bit form for 'CRC32 r64, r/m8'.  Plus added test cases for all forms and
tweaked one test case to add the needed suffixes.

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

14 years agoStop trying to merge identical jump tables. This had been inadvertently
Bob Wilson [Fri, 19 Mar 2010 19:05:41 +0000 (19:05 +0000)]
Stop trying to merge identical jump tables.  This had been inadvertently
disabled for several months (since svn r88806) and no one noticed.  My fix
for pr6543 yesterday reenabled it, but broke the ARM port's code for using
TBB/TBH.  Rather than adding a target hook to disable merging for Thumb2 only,
I'm just taking this out.  It is not common to have identical jump tables,
the code we used to merge them was O(N^2), and it only helps code size, not
performance.

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

14 years agoMC/Mach-O/x86_64: Add relocation support.
Daniel Dunbar [Fri, 19 Mar 2010 18:07:55 +0000 (18:07 +0000)]
MC/Mach-O/x86_64: Add relocation support.
 - This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information.
 - There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily).
 - 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :)

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

14 years agollvm-mc: Fix target selection for --disassemble to use GetTarget.
Daniel Dunbar [Fri, 19 Mar 2010 18:07:50 +0000 (18:07 +0000)]
llvm-mc: Fix target selection for --disassemble to use GetTarget.

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

14 years agoMC/X86: Rename alternate spellings of {ADD64,CMP64} and mark as "code gen only" so...
Daniel Dunbar [Fri, 19 Mar 2010 18:07:48 +0000 (18:07 +0000)]
MC/X86: Rename alternate spellings of {ADD64,CMP64} and mark as "code gen only" so they don't get selected by the asm matcher.

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

14 years agoFileCheck: Don't print "possibly intended match" line if it would match the
Daniel Dunbar [Fri, 19 Mar 2010 18:07:43 +0000 (18:07 +0000)]
FileCheck: Don't print "possibly intended match" line if it would match the
"scanning from here" one.

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

14 years agoSet numThreads to 1 by default when Python is older than 2.5.2.
Torok Edwin [Fri, 19 Mar 2010 17:54:21 +0000 (17:54 +0000)]
Set numThreads to 1 by default when Python is older than 2.5.2.

Python 2.4 always hits this bug: http://bugs.python.org/issue1731717
when running check-lit on multi-core systems.
Setting numThreads to 1 makes it slower, but at least the results reported are
correct.

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

14 years agomake FillWithPossibleTypes take a predicate to filter types so that
Chris Lattner [Fri, 19 Mar 2010 17:41:26 +0000 (17:41 +0000)]
make FillWithPossibleTypes take a predicate to filter types so that
we don't blow the smallvector as often.  No functionality change.

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

14 years agoRenumber LdStExFrm from 28 to 11 and shift the existing format values to make
Johnny Chen [Fri, 19 Mar 2010 17:39:00 +0000 (17:39 +0000)]
Renumber LdStExFrm from 28 to 11 and shift the existing format values to make
room for it.  This is in preparation for another patch which is adding NEON
subformats to facilitate disassembly.

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

14 years agoAcccess control is lame
Douglas Gregor [Fri, 19 Mar 2010 15:36:58 +0000 (15:36 +0000)]
Acccess control is lame

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

14 years agostruct -> class, to silence a Clang warning
Douglas Gregor [Fri, 19 Mar 2010 15:31:09 +0000 (15:31 +0000)]
struct -> class, to silence a Clang warning

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

14 years agoback out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwi...
Gabor Greif [Fri, 19 Mar 2010 13:50:02 +0000 (13:50 +0000)]
back out r98957, it broke smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite

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

14 years agoRecommit r80858 again (which has been backed out in r80871).
Gabor Greif [Fri, 19 Mar 2010 11:55:53 +0000 (11:55 +0000)]
Recommit r80858 again (which has been backed out in r80871).

This time I did a self-hosted bootstrap on Linux x86-64,
with no problems. Let's see how darwin 64-bit self-hosting
goes. At the first sign of failure I'll back this out.

Maybe the valgrind bots give me a hint of what may be wrong
(it at all).

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

14 years agoMC: Add TargetAsmBackend::createObjectWriter.
Daniel Dunbar [Fri, 19 Mar 2010 10:43:26 +0000 (10:43 +0000)]
MC: Add TargetAsmBackend::createObjectWriter.
 - MCAssembler is now object-file independent, although we will surely need more work to fully support ELF/COFF.

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

14 years agoMCCodeEmitter: Add target independent fixup flag for is-pc-relative.
Daniel Dunbar [Fri, 19 Mar 2010 10:43:23 +0000 (10:43 +0000)]
MCCodeEmitter: Add target independent fixup flag for is-pc-relative.

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

14 years agoMC: Sink code emitter into MCAssembler.
Daniel Dunbar [Fri, 19 Mar 2010 10:43:18 +0000 (10:43 +0000)]
MC: Sink code emitter into MCAssembler.

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

14 years agoMC/Mach-O: Move to MachObjectWriter.{h,cpp}.
Daniel Dunbar [Fri, 19 Mar 2010 10:43:15 +0000 (10:43 +0000)]
MC/Mach-O: Move to MachObjectWriter.{h,cpp}.

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

14 years agoMC: Add TargetAsmBackend::isVirtualSection hook.
Daniel Dunbar [Fri, 19 Mar 2010 09:29:03 +0000 (09:29 +0000)]
MC: Add TargetAsmBackend::isVirtualSection hook.

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

14 years agoMC: Split MCObjectWriter out of MCAssembler.cpp.
Daniel Dunbar [Fri, 19 Mar 2010 09:28:59 +0000 (09:28 +0000)]
MC: Split MCObjectWriter out of MCAssembler.cpp.

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

14 years agoMCAssembler: Pull out MCObjectWriter class.
Daniel Dunbar [Fri, 19 Mar 2010 09:28:55 +0000 (09:28 +0000)]
MCAssembler: Pull out MCObjectWriter class.

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

14 years agoMCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target specific not...
Daniel Dunbar [Fri, 19 Mar 2010 09:28:12 +0000 (09:28 +0000)]
MCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target specific not object writer specific task.

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

14 years agoMC/Mach-O: Lift the fixup evaluation and application up (to the same place), and...
Daniel Dunbar [Fri, 19 Mar 2010 07:09:47 +0000 (07:09 +0000)]
MC/Mach-O: Lift the fixup evaluation and application up (to the same place), and eliminate MCAsmFixup::FixedValue.

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

14 years agoMC/Mach-O: Factor out ExecutePostLayoutBinding, to separate the post-layout changes...
Daniel Dunbar [Fri, 19 Mar 2010 07:09:33 +0000 (07:09 +0000)]
MC/Mach-O: Factor out ExecutePostLayoutBinding, to separate the post-layout changes the object writer may need to make to the assembler from the actual .o writing.

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

14 years agoMC/Mach-O: Lift relocation emission logic a bit higher to separate evaluation / reloc...
Daniel Dunbar [Fri, 19 Mar 2010 07:09:18 +0000 (07:09 +0000)]
MC/Mach-O: Lift relocation emission logic a bit higher to separate evaluation / relocation handling from the actual .o writing.

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

14 years agoRemove a memory leak from the CBackend.
Jeffrey Yasskin [Fri, 19 Mar 2010 07:06:46 +0000 (07:06 +0000)]
Remove a memory leak from the CBackend.

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

14 years agofix an MCInstPrinter leak that jyasskin pointed out:
Chris Lattner [Fri, 19 Mar 2010 05:48:53 +0000 (05:48 +0000)]
fix an MCInstPrinter leak that jyasskin pointed out:
createAsmStreamer now takes ownership of the instprinter.

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

14 years agoresolve fixme: we now infer the instruction-level 'isvariadic' bit
Chris Lattner [Fri, 19 Mar 2010 05:34:15 +0000 (05:34 +0000)]
resolve fixme: we now infer the instruction-level 'isvariadic' bit
from the pattern if present, and we use it instead of the bit.

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

14 years agoset SDNPVariadic on nodes throughout the rest of the targets that
Chris Lattner [Fri, 19 Mar 2010 05:33:51 +0000 (05:33 +0000)]
set SDNPVariadic on nodes throughout the rest of the targets that
need them.

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

14 years agoRemove a memory leak from ThumbTargetMachine.
Jeffrey Yasskin [Fri, 19 Mar 2010 05:25:28 +0000 (05:25 +0000)]
Remove a memory leak from ThumbTargetMachine.

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

14 years agoadd a new SDNPVariadic SDNP node flag, and use it in
Chris Lattner [Fri, 19 Mar 2010 05:07:09 +0000 (05:07 +0000)]
add a new SDNPVariadic SDNP node flag, and use it in
dag isel gen instead of instruction properties.  This
allows the oh-so-useful behavior of matching a variadic
non-root node.

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

14 years agorewrite EnforceSmallerThan to be less bone headed.
Chris Lattner [Fri, 19 Mar 2010 04:54:36 +0000 (04:54 +0000)]
rewrite EnforceSmallerThan to be less bone headed.

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

14 years agoremove some damaged sign extend patterns that can never match.
Chris Lattner [Fri, 19 Mar 2010 04:53:47 +0000 (04:53 +0000)]
remove some damaged sign extend patterns that can never match.

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

14 years agodisable some illegal blackfin patterns. sext from i32 to i32 can never
Chris Lattner [Fri, 19 Mar 2010 04:53:21 +0000 (04:53 +0000)]
disable some illegal blackfin patterns.  sext from i32 to i32 can never
match.  Jakob, please take a look when you get a chance.

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

14 years agocomment out a bunch of parallel store patterns that apparently
Chris Lattner [Fri, 19 Mar 2010 04:14:21 +0000 (04:14 +0000)]
comment out a bunch of parallel store patterns that apparently
can't match or just have no testcases.  Will remove after
confirmation from dan that they really are dead.

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

14 years agoFix -Asserts warnings.
Daniel Dunbar [Fri, 19 Mar 2010 03:18:23 +0000 (03:18 +0000)]
Fix -Asserts warnings.

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

14 years agoFix -Asserts warning.
Daniel Dunbar [Fri, 19 Mar 2010 03:18:20 +0000 (03:18 +0000)]
Fix -Asserts warning.

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

14 years agoMC/Mach-O: Add isScatteredFixupFullyResolved, which implements the correct algorithm...
Daniel Dunbar [Fri, 19 Mar 2010 03:18:18 +0000 (03:18 +0000)]
MC/Mach-O: Add isScatteredFixupFullyResolved, which implements the correct algorithm (used on x86_64) for determining whether an evaluated fixup is fully resolved (doesn't need relocation).
 - Test cases will follow, once we have x86_64 relocation support.

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

14 years agoMC/Mach-O/x86_64: Add getAtom[ForAddress].
Daniel Dunbar [Fri, 19 Mar 2010 03:18:15 +0000 (03:18 +0000)]
MC/Mach-O/x86_64: Add getAtom[ForAddress].
 - These find the defining symbol which identifies the containing atom for a symbol or address. They are currently very slow, but will be eliminated eventually.

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

14 years agoMC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix some...
Daniel Dunbar [Fri, 19 Mar 2010 03:18:12 +0000 (03:18 +0000)]
MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix some corner cases.

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

14 years agoMC/Mach-O: Factor out isSymbolLinkerVisible method; "linker visible" is a made up...
Daniel Dunbar [Fri, 19 Mar 2010 03:18:09 +0000 (03:18 +0000)]
MC/Mach-O: Factor out isSymbolLinkerVisible method; "linker visible" is a made up term to refer to non-temporary labels + temporary labels in sections-which-require symbols. For Darwin, it corresponds to symbols which effectively define an atom.

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

14 years agoDrop KLEE blurb, we don't have anything new.
Daniel Dunbar [Fri, 19 Mar 2010 03:18:05 +0000 (03:18 +0000)]
Drop KLEE blurb, we don't have anything new.

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

14 years agoFixed a widening bug where we were not using the correct size for the load
Mon P Wang [Fri, 19 Mar 2010 01:19:52 +0000 (01:19 +0000)]
Fixed a widening bug where we were not using the correct size for the load

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

14 years agoX86: Fix encoding for TEST64rr.
Daniel Dunbar [Fri, 19 Mar 2010 01:15:03 +0000 (01:15 +0000)]
X86: Fix encoding for TEST64rr.

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

14 years agoeliminate the last use of EEVT::isUnknown
Chris Lattner [Fri, 19 Mar 2010 01:14:27 +0000 (01:14 +0000)]
eliminate the last use of EEVT::isUnknown

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

14 years agoRemove `ignore` from LLVMC/TestWarnings.td. This avoids
Jeffrey Yasskin [Fri, 19 Mar 2010 01:10:41 +0000 (01:10 +0000)]
Remove `ignore` from LLVMC/TestWarnings.td.  This avoids
https://bugs.kde.org/show_bug.cgi?id=231257 and seems not to have been
needed in the first place.

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

14 years agoFinally change the instruction looking map to be a densemap from
Chris Lattner [Fri, 19 Mar 2010 01:07:44 +0000 (01:07 +0000)]
Finally change the instruction looking map to be a densemap from
record* -> instrinfo instead of std::string -> instrinfo.

This speeds up tblgen on cellcpu from 7.28 -> 5.98s with a debug
build (20%).

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

14 years agomake inst_begin/inst_end iterate over InstructionsByEnumValue.
Chris Lattner [Fri, 19 Mar 2010 01:00:55 +0000 (01:00 +0000)]
make inst_begin/inst_end iterate over InstructionsByEnumValue.
Use CodeGenTarget::getInstNamespace in one place and fix it.

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

14 years agorevert 98912
Chris Lattner [Fri, 19 Mar 2010 00:50:47 +0000 (00:50 +0000)]
revert 98912

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

14 years agomake inst_begin/inst_end iterate over InstructionsByEnumValue.
Chris Lattner [Fri, 19 Mar 2010 00:40:22 +0000 (00:40 +0000)]
make inst_begin/inst_end iterate over InstructionsByEnumValue.

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

14 years agoFP16 constfolding
Anton Korobeynikov [Fri, 19 Mar 2010 00:36:35 +0000 (00:36 +0000)]
FP16 constfolding

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

14 years agochange Target.getInstructionsByEnumValue to return a reference
Chris Lattner [Fri, 19 Mar 2010 00:34:35 +0000 (00:34 +0000)]
change Target.getInstructionsByEnumValue to return a reference
to a vector that CGT stores instead of synthesizing it on every
call.

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

14 years agoRevert r98892. BSD systems may not have bash installed at all.
Jeffrey Yasskin [Fri, 19 Mar 2010 00:32:11 +0000 (00:32 +0000)]
Revert r98892. BSD systems may not have bash installed at all.

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

14 years agofactor copy and paste code.
Chris Lattner [Fri, 19 Mar 2010 00:23:20 +0000 (00:23 +0000)]
factor copy and paste code.

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

14 years agodon't go through getInstructions().
Chris Lattner [Fri, 19 Mar 2010 00:18:23 +0000 (00:18 +0000)]
don't go through getInstructions().

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

14 years agoBugpoint's default memory limit (100MB) was too low for valgrind, so
Jeffrey Yasskin [Fri, 19 Mar 2010 00:09:28 +0000 (00:09 +0000)]
Bugpoint's default memory limit (100MB) was too low for valgrind, so
this patch raises the default to 800MB when valgrind's active.  800
was chosen semi-arbitrarily.

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

14 years agolook up instructions by record, not by name.
Chris Lattner [Fri, 19 Mar 2010 00:07:20 +0000 (00:07 +0000)]
look up instructions by record, not by name.

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

14 years agoNow that tblgen can handle matching implicit defs of instructions
Chris Lattner [Fri, 19 Mar 2010 00:01:11 +0000 (00:01 +0000)]
Now that tblgen can handle matching implicit defs of instructions
to input patterns, we can fix X86ISD::CMP and X86ISD::BT as taking
two inputs (which have to be the same type) and *returning an i32*.
This is how the SDNodes get made in the graph, but we weren't able
to model it this way due to deficiencies in the pattern language.

Now we can change things like this:

 def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP,
-                  [(X86cmp RFP80:$lhs, RFP80:$rhs),
-                   (implicit EFLAGS)]>; // CC = ST(0) cmp ST(i)
+                  [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>;

and fix terrible crimes like this:

-def : Pat<(parallel (X86cmp GR8:$src1, 0), (implicit EFLAGS)),
+def : Pat<(X86cmp GR8:$src1, 0),
           (TEST8rr GR8:$src1, GR8:$src1)>;

This relies on matching the result of TEST8rr (which is EFLAGS, which is
an implicit def) to the result of X86cmp, an i32.

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

14 years agoUpdate comment to refer to the right filename.
Bob Wilson [Thu, 18 Mar 2010 23:57:57 +0000 (23:57 +0000)]
Update comment to refer to the right filename.

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

14 years agotidy up
Chris Lattner [Thu, 18 Mar 2010 23:57:57 +0000 (23:57 +0000)]
tidy up

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

14 years agoexpand tblgen's support for instructions with implicit defs.
Chris Lattner [Thu, 18 Mar 2010 23:57:40 +0000 (23:57 +0000)]
expand tblgen's  support for instructions with implicit defs.

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

14 years agoinfer results of a pattern from implicit defs. This allows you to do something
Chris Lattner [Thu, 18 Mar 2010 23:15:10 +0000 (23:15 +0000)]
infer results of a pattern from implicit defs.  This allows you to do something
like this:

 def : Pat<(add ...),
           (FOOINST)>;

When fooinst only has a single implicit def (e.g. to R1).  This will be handled
as if written as (set R1, (FOOINST ...))

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

14 years agoWork around a valgrind oddity where it doesn't pass the full path of a
Jeffrey Yasskin [Thu, 18 Mar 2010 22:56:02 +0000 (22:56 +0000)]
Work around a valgrind oddity where it doesn't pass the full path of a
script to the #! command by using bash instead of /bin/sh.  Bash
searches $PATH for its script argument, but dash, which /bin/sh
resolves to on some systems, does not.
https://bugs.kde.org/show_bug.cgi?id=231257 tracks the valgrind
problem.

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

14 years agoGet rid of target-specific fp <-> int nodes when still I'm here.
Anton Korobeynikov [Thu, 18 Mar 2010 22:35:45 +0000 (22:35 +0000)]
Get rid of target-specific fp <-> int nodes when still I'm here.

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

14 years agoGet rid of target-specific nodes for fp16 <-> fp32 conversion.
Anton Korobeynikov [Thu, 18 Mar 2010 22:35:37 +0000 (22:35 +0000)]
Get rid of target-specific nodes for fp16 <-> fp32 conversion.

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

14 years agoRefactor Reg-Reg copy emission routine for ARM. This makes cross-regclass copies...
Anton Korobeynikov [Thu, 18 Mar 2010 22:35:02 +0000 (22:35 +0000)]
Refactor Reg-Reg copy emission routine for ARM. This makes cross-regclass copies weirdness more straightforward. Also, add GPR <-> SPR copy support.

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

14 years agoCouple of changes that Dan mentioned for llvm.stackprotector fast-isel.
Eric Christopher [Thu, 18 Mar 2010 21:58:33 +0000 (21:58 +0000)]
Couple of changes that Dan mentioned for llvm.stackprotector fast-isel.

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

14 years agoX86MCCodeEmitter: Fix two minor issues with reloc_riprel_4byte_movq_load, we
Daniel Dunbar [Thu, 18 Mar 2010 21:53:54 +0000 (21:53 +0000)]
X86MCCodeEmitter: Fix two minor issues with reloc_riprel_4byte_movq_load, we
were missing it on some movq instructions and were not including the appropriate
PCrel bias.

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

14 years agocapture implicit uses and defs in CodeGenInstruction
Chris Lattner [Thu, 18 Mar 2010 21:42:03 +0000 (21:42 +0000)]
capture implicit uses and defs in CodeGenInstruction

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

14 years agosimplify this code, the # of sets in the pattern for an instruction
Chris Lattner [Thu, 18 Mar 2010 21:15:05 +0000 (21:15 +0000)]
simplify this code, the # of sets in the pattern for an instruction
shouldn't change this.

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

14 years agodisallow concatenation of two dags with different operators.
Chris Lattner [Thu, 18 Mar 2010 21:07:51 +0000 (21:07 +0000)]
disallow concatenation of two dags with different operators.

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

14 years agorewrite this to not artificially force concat the ins/outs list.
Chris Lattner [Thu, 18 Mar 2010 21:07:39 +0000 (21:07 +0000)]
rewrite this to not artificially force concat the ins/outs list.

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

14 years agofix some buggy ops concatentation
Chris Lattner [Thu, 18 Mar 2010 21:06:54 +0000 (21:06 +0000)]
fix some buggy ops concatentation

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