Commit Graph

37093 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 5db5506093 Completely remove Blackfin patterns that thought JustCC was i1.
Thanks, Chris!

llvm-svn: 99183
2010-03-22 16:30:04 +00:00
Jeffrey Yasskin 7d116ce2e3 Don't leak a MachineInstruction from Thumb1InstrInfo::restoreCalleeSavedRegisters.
llvm-svn: 99182
2010-03-22 16:13:21 +00:00
Gabor Greif e1517a084f backing out r99170 because it still fails on clang-x86_64-darwin10-fnt
llvm-svn: 99171
2010-03-22 09:11:00 +00:00
Gabor Greif 7a743e15e3 Now that hopefully all direct accesses to InvokeInst operands are fixed
we can reapply the InvokeInst operand reordering patch. (see r98957).

llvm-svn: 99170
2010-03-22 08:28:00 +00:00
Jeffrey Yasskin a6eedc3c03 Free all Constants in ~LLVMConstantImpl. We avoid assertion failures
by dropping all references from all constants that can use other
constants before trying to destroy any of them.

I also had to free bugpoint's Module in ~BugDriver().

llvm-svn: 99160
2010-03-22 05:23:37 +00:00
Jeffrey Yasskin cd3706cd1c Re-add the Metadata.h include to LLVMContextImpl.h so that MDNode is complete
where FoldingSet<MDNode> is instantiated.  Clang and MSVC complain; gcc
doesn't.

llvm-svn: 99147
2010-03-21 22:08:41 +00:00
Jeffrey Yasskin 4cfb3a7656 Move the LLVMContextImpl implementation into a .cpp file.
llvm-svn: 99146
2010-03-21 21:17:34 +00:00
Jeffrey Yasskin ade270e225 Memoize InlineAsms into the LLVMContext and delete them on shutdown.
Fixes PR803.

llvm-svn: 99143
2010-03-21 20:37:19 +00:00
Jeffrey Yasskin 2e4b02d6c1 Free SavedLI even if SimpleRegisterCoalescing::JoinCopy() returns early.
llvm-svn: 99113
2010-03-21 01:47:49 +00:00
Daniel Dunbar fbd12cc36c MC/X86: Fix an MCOperand link, when we parsing shrld $1,%eax and friends; I believe this fixes the last memory leaks under test/MC.
llvm-svn: 99102
2010-03-20 22:36:38 +00:00
Daniel Dunbar fed917e078 TargetRegistry: Fix create{AsmInfo,MCDisassembler} to return non-const objects.
llvm-svn: 99097
2010-03-20 22:36:22 +00:00
Bob Wilson 162242b63b pr6652: Use LDM to restore PC to the return address on ARMv4.
Patch by John Tytgat!

llvm-svn: 99096
2010-03-20 22:20:40 +00:00
Bob Wilson ae08a736d6 Re-commit r98683 ("remove redundant writeback flag from ARM address mode 6")
with changes to add a separate optional register update argument.  Change all
the NEON instructions with address register writeback to use it.

llvm-svn: 99095
2010-03-20 22:13:40 +00:00
Bob Wilson 59e5141d44 Add instruction variants for VST2, VST3, and VST4 "store-lane" operations with
address register writeback.

llvm-svn: 99094
2010-03-20 21:57:36 +00:00
Bob Wilson b18adef4ad Add variants of VST2, VST3 and VST4 with address register writeback, and
rewrite the existing VST3 and VST4 instructions to use the same classes as
the others.

llvm-svn: 99093
2010-03-20 21:45:18 +00:00
Bob Wilson 89ba42c4ce Add instructions for double-spaced VST3 and VST4 without address register
writeback, and refactor the existing double-spaced VST2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

llvm-svn: 99090
2010-03-20 21:15:48 +00:00
Gabor Greif febf6ab718 Add a setCalledFunction member to InvokeInst (like in CallInst)
and use this (as well as getCalledValue) to access the callee,
instead of {g|s}etOperand(0).

llvm-svn: 99084
2010-03-20 21:00:25 +00:00
Bob Wilson 322cbff3d3 Add VST1 instructions with address register writeback.
llvm-svn: 99083
2010-03-20 20:54:36 +00:00
Bob Wilson 9152d96dfb Add instruction variants for VLD2, VLD3, and VLD4 "load-lane" operations with
address register writeback.

llvm-svn: 99082
2010-03-20 20:47:18 +00:00
Bob Wilson 9b1584245a Tidy some more comments and whitespace.
llvm-svn: 99081
2010-03-20 20:39:53 +00:00
Bob Wilson cf324658f6 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.

llvm-svn: 99080
2010-03-20 20:10:51 +00:00
Bob Wilson 7ee900da22 Tidy some comments and whitespace for consistency.
llvm-svn: 99078
2010-03-20 19:57:03 +00:00
Bob Wilson c0795f8b87 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.

llvm-svn: 99066
2010-03-20 18:35:24 +00:00
Bob Wilson d092669b48 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.

llvm-svn: 99065
2010-03-20 18:14:26 +00:00
Bob Wilson 496766cb56 Add VLD1 instructions with address register writeback.
llvm-svn: 99062
2010-03-20 17:59:03 +00:00
Benjamin Kramer 73fc06f60f PIC16: Simplify code by using a std::set<std::string> instead of a sorted & uniqued std::list of leaked char*.
llvm-svn: 99061
2010-03-20 17:41:18 +00:00
Bob Wilson 2497d85c9e Revert the rest of 98679.
--- Reverse-merging r98679 into 'lib/Target/ARM/ARMInstrVFP.td':
U    lib/Target/ARM/ARMInstrVFP.td

llvm-svn: 99049
2010-03-20 06:34:02 +00:00
Bob Wilson 614d1fdfc3 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.

llvm-svn: 99043
2010-03-20 06:05:13 +00:00
Dan Gohman 1a2abe5580 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.

llvm-svn: 99036
2010-03-20 03:53:53 +00:00
Evan Cheng 3f6f769c4f 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.

llvm-svn: 99032
2010-03-20 02:58:15 +00:00
Daniel Dunbar 5ea5fab22b Better fix for r98994, MachObjectWriterImpl wasn't intended to be virtual.
llvm-svn: 99031
2010-03-20 01:58:40 +00:00
Johnny Chen f833fad813 Add NLdStFrm Format.
llvm-svn: 99014
2010-03-20 00:17:00 +00:00
Johnny Chen 053e3510a3 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.

llvm-svn: 99013
2010-03-19 23:50:27 +00:00
Bob Wilson e4191e719b 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

llvm-svn: 99010
2010-03-19 22:51:32 +00:00
Dan Gohman 89d4e3c3fd 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.

llvm-svn: 99001
2010-03-19 21:51:03 +00:00
Chris Lattner 8352941b34 remove the patterns that I commented out in r98930, Dan verified
that they are dead.

llvm-svn: 99000
2010-03-19 21:43:36 +00:00
Rafael Espindola 07b4f8cd4b Fix -Wnon-virtual-dtor warning.
llvm-svn: 98994
2010-03-19 21:26:46 +00:00
Devang Patel 5002454d2a 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.

llvm-svn: 98986
2010-03-19 21:06:24 +00:00
Kevin Enderby cf0843ed93 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.

llvm-svn: 98980
2010-03-19 20:04:42 +00:00
Bob Wilson bc5af98f42 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.

llvm-svn: 98977
2010-03-19 19:05:41 +00:00
Daniel Dunbar 1a81ad3559 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. :)

llvm-svn: 98974
2010-03-19 18:07:55 +00:00
Daniel Dunbar c532697372 MC/X86: Rename alternate spellings of {ADD64,CMP64} and mark as "code gen only" so they don't get selected by the asm matcher.
llvm-svn: 98972
2010-03-19 18:07:48 +00:00
Johnny Chen 0dab68f3d0 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.

llvm-svn: 98967
2010-03-19 17:39:00 +00:00
Gabor Greif 6c56ed847e back out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite
llvm-svn: 98958
2010-03-19 13:50:02 +00:00
Gabor Greif 8335f9c0bf 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).

llvm-svn: 98957
2010-03-19 11:55:53 +00:00
Daniel Dunbar 4d7c8645fd MC: Add TargetAsmBackend::createObjectWriter.
- MCAssembler is now object-file independent, although we will surely need more work to fully support ELF/COFF.

llvm-svn: 98955
2010-03-19 10:43:26 +00:00
Daniel Dunbar eaa367f5ae MCCodeEmitter: Add target independent fixup flag for is-pc-relative.
llvm-svn: 98954
2010-03-19 10:43:23 +00:00
Daniel Dunbar 1bd7171c95 MC: Sink code emitter into MCAssembler.
llvm-svn: 98953
2010-03-19 10:43:18 +00:00
Daniel Dunbar 79e0e5a631 MC/Mach-O: Move to MachObjectWriter.{h,cpp}.
llvm-svn: 98952
2010-03-19 10:43:15 +00:00
Daniel Dunbar c5084cccc8 MC: Add TargetAsmBackend::isVirtualSection hook.
llvm-svn: 98950
2010-03-19 09:29:03 +00:00