Commit Graph

30425 Commits

Author SHA1 Message Date
Chris Lattner
97ee12755d remove the Xcore implementation of SelectSectionForGlobal. While you have
to twist your brain to see it, I believe it is the same as ELFTargetAsmInfo::SelectSectionForGlobal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 22:36:53 +00:00
Chris Lattner
449e379bd7 simplify based on the fact that darwin always uses L/l.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76662 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 22:32:55 +00:00
Chris Lattner
939a8907ed make some stuff private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 22:30:39 +00:00
Chris Lattner
e1abeb478a Remove the XCore custom implementation of MergeableConstSection, relying on
the generic ELF version instead.  This will result in its mergable constant
sections getting named ".rodata.cst4" instead of ".cp.const4", but the
linker looks at the section flags, not the name of the section AFAICT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76659 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 22:25:52 +00:00
Chris Lattner
7886ae9e3c inline a trivial method into its only call site and fix indentation of cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:29:08 +00:00
Chris Lattner
42b6418cc0 Remove some overridden functions in XCoreTargetAsmInfo that are
implemented exactly the same way as its ELFTargetAsmInfo subclass 
has them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:26:32 +00:00
Chris Lattner
3380d5c4aa revert r76602, 76603, and r76615, pending design discussions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:12:58 +00:00
Chris Lattner
7558f11849 minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76645 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:09:35 +00:00
Owen Anderson
822ccd9974 Privatize the ConstantArray table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:55:28 +00:00
Eli Friedman
e748285e1b Missed a piece of the commit to remove the shift flavor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:15:24 +00:00
Owen Anderson
16e298f980 Privatize the first of the value maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:13:12 +00:00
Eli Friedman
b3e7171926 Remove shift amount flavor. It isn't actually complete enough to
be useful, and it's currently unused.  (Some issues: it isn't actually 
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:12:16 +00:00
Eli Friedman
58bb61ae94 Remove a couple of already-implemented notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76631 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:05:43 +00:00
David Greene
a358c1db5c Prefix IR dumps with LiveInterval indices when possible. This turns
this:

	%ESI<def> = MOV32rr %EDI<kill>
	ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
	%reg1027<def> = MOVZX64rr32 %ESI
	%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
	%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
	%RDI<def> = MOV64rr %RSP
	%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
	%RSP<def> = MOV64rr %RDI

into this:

4	%reg1024<def> = MOV32rr %EDI<kill>
12	ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20	%reg1025<def> = MOVZX64rr32 %reg1024
28	%reg1026<def> = MOV64rr %reg1025<kill>
36	%reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44	%reg1027<def> = MOV64rr %reg1026<kill>
52	%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60	%reg1028<def> = MOV64rr %RSP
68	%reg1029<def> = MOV64rr %reg1028<kill>
76	%reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84	%RSP<def> = MOV64rr %reg1029

This helps greatly when debugging register allocation and coalescing
problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:56:32 +00:00
Evan Cheng
6762d91c05 Add fake v7 itineraries for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76612 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:54:14 +00:00
Chris Lattner
40bbebde9d make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:38:57 +00:00
David Greene
4b938958bc Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock.  We'll use these shortly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:27:05 +00:00
Evan Cheng
3ecadc816d Do not select tSXTB / tSXTH in thumb2 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:15:26 +00:00
Owen Anderson
b3056faa55 Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:03:38 +00:00
Chris Lattner
e4d8408c57 reduce indentation by using an early exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:59:36 +00:00
Ted Kremenek
c55db82cd0 Update CMake files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:43:20 +00:00
Chris Lattner
b34e3a9b6b whitespace cleanups, make the MipsAsmPrinter::doInitialization
chain to the super class instead of initializing mangler directly.
This gives it .file and module level inline asm support among other
things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76593 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:39:48 +00:00
Chris Lattner
d3ffc06174 fix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
This eliminates redundancy setting up the mangler and adds support to them
for module-level inline asm and a .file directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:37:35 +00:00
Chris Lattner
90f8b7073d Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
LLVM IR concept.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:30:51 +00:00
Chris Lattner
1010c21e4e fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76587 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:25:13 +00:00
Chris Lattner
da6c240423 remove an unneeded override.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:23:41 +00:00
Chris Lattner
a46cb523ca more random whitespace cleanup, eliminate #define, avoid copying
vectors needlessly, doxygenify comments, improve constness, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:20:18 +00:00
Chris Lattner
dc47146a25 some simple whitespace cleanup, avoid copying vectors for no reason
as much, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 16:44:47 +00:00
Evan Cheng
5d885023fe Another rewriter bug exposed by recent coalescer changes. ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 09:15:00 +00:00
Daniel Dunbar
92645acd33 Add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 08:58:44 +00:00
Daniel Dunbar
bda9653f5b Switch this API to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 08:57:31 +00:00
Daniel Dunbar
fbee579ed4 Simplify / normalize some uses of Value::getName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 08:54:24 +00:00
Daniel Dunbar
a8f0af5e0e Remove some unused code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 07:08:59 +00:00
Bruno Cardoso Lopes
68491c1217 Support adding relocations for data sections, handling the cases where
global declared symbols are initialized with references from other global
symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 06:51:32 +00:00
Evan Cheng
77159e39a6 Add jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 06:00:18 +00:00
Evan Cheng
d101a72d79 Fix a dagga combiner bug: avoid creating illegal constant.
Is this really a winning transformation?
fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or                                                                              
                              (srl (and x, (shl -1, c1)), (sub c1, c2))


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 05:40:15 +00:00
Owen Anderson
f53c371983 Move a bit more state over to the LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 02:47:59 +00:00
Bill Wendling
7239b51694 Add the following functions:
- SYSCALL (normal fast system call instruction) [0f 05]
- SYSENTER (system call entry instruction) [0f 34]
- SYSEXIT (system call exit instruction) [0f 35]
- SYSEXIT64 (system call exit instruction to 64-bit user code) [REX.W 0f 35]
- SYSRET (system call return instruction) [0f 07]

Patch by Sean Callanan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 01:07:24 +00:00
Dan Gohman
a16b5764e3 Make the range calculations for addrecs to be more conservative,
as they aren't currently prepared to handle complicated overflow
cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:42:47 +00:00
Dan Gohman
c2b015e4c0 Whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:38:55 +00:00
Dan Gohman
c268e7c51e Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:37:45 +00:00
Evan Cheng
af9e7a7c20 Fix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:31:12 +00:00
Evan Cheng
c95be59371 Cross RC coalescing is now on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:22:59 +00:00
Dale Johannesen
60b3ba0472 revert 76503 while I figure out what's going on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:12:29 +00:00
Dan Gohman
f117ed462c Add a comment to clarify why there isn't any code in this spot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76505 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:54:43 +00:00
Dan Gohman
4500e9eb80 Remove the code that tried to evaluate whether (A pred B) is known
by determining if (B pred (B-A)) is known, as it doesn't handle
overflow correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:53:35 +00:00
Dale Johannesen
71bbebdac9 Make sure a global matching asm 'i' constraint gets its
flags set properly.  (hasMemory is clearly irrelevant
when matching 'i', I don't understand what this was
supposed to be doing.)
gcc.apple/asm-block-25.c (test passed before by
accident, but generated code was wrong)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:39:13 +00:00
Dale Johannesen
5339c551b5 Move stripping of bitcasts in inline asm arguments
to a place where it affects everything.  Occurs
only on calls AFAIK.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 23:27:39 +00:00
Dan Gohman
0d5bae41fb Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:41:51 +00:00
Dan Gohman
746f3b1a9b The upper argument of ConstantRange is exclusive, not inclusive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76492 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:34:18 +00:00
Chris Lattner
b3e7189353 clean up some formatting, indent by 2 instead of 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:23:48 +00:00
David Goodwin
c27a4547a3 CMP and TST define CPSR, not use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:13:31 +00:00
David Greene
76081c4ef7 Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes
next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:02:59 +00:00
Bill Wendling
ecc2da8efd Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that humans can understand it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:38:26 +00:00
Bill Wendling
4cef584860 Pass in the unfortunately named "LessPrivatePrefix" for the
"LinkerPrivatePrefix". It seems to have been used in only one place before I
started this "linker_private" business. I'm thinking that a rename is in
order...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:30:28 +00:00
Dan Gohman
1224c38698 Assembly and Bitcode support for unsigned/signed overflow flags and
exact sdiv flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76475 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:19:07 +00:00
Evan Cheng
33d0474bf5 Use TII->findCommutedOpIndices to find the commute operands (rather than guessing).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:16:08 +00:00
Bill Wendling
4aebcb4f5f Change the casting of linkage types into a map. This makes this much more robust
as it no longer depends upon two different enums being kept in sync with each
other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76465 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:34:46 +00:00
Kevin Enderby
5026ae4514 Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
the parsing of the .dump and .load should be done in the assembly parser and
not have any need for an MCStreamer API.  Changed the code for now so these
just produce an error saying these specific directives are not yet implemented
since they are likely no longer used and may never need to be implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:25:37 +00:00
Daniel Dunbar
dbd692a66e Add MCAsmLexer interface.
- This provides the AsmLexer interface to the target specific assembly parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:01:54 +00:00
Evan Cheng
753480ad20 Fix some sub-reg coalescing bugs where the coalescer wasn't updating the resulting interval's register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 19:47:55 +00:00
Bill Wendling
5c0ba804c0 Rename Mangler linkage enums to something less gross.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 19:41:27 +00:00
Devang Patel
256be96457 Refactor metadata parsing routines into separate functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76455 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 19:00:08 +00:00
Daniel Dunbar
a3af370dc1 Add MCAsmParser interface.
- This provides the AsmParser interface to the target specific assembly
   parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76453 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 18:55:04 +00:00
Chris Lattner
1902fd9605 remove TargetAsmInfo::ExpandInlineAsm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:59:32 +00:00
Chris Lattner
8850b36d0f use ExpandInlineAsm on TargetLowering instead of TargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76442 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:52:52 +00:00
Chris Lattner
b810565152 Copy ExpandInlineAsm to TargetLowering from TargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76441 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:51:36 +00:00
Dan Gohman
13c5e35222 Update this comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:44:17 +00:00
Dan Gohman
f241174421 Revert the addition of hasNoPointerOverflow to GEPOperator.
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.

Remove a few optimizations that depended on this flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:43:30 +00:00
Chris Lattner
83757c7fb5 rename TargetAsmInfo::getASDirective -> getDataASDirective
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76431 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:12:46 +00:00
David Greene
3c9509f82a Hide the DOUT static variable behind a function interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76425 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 16:16:06 +00:00
David Goodwin
31e7eba06f Use t2LDRri12 for frame index loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76424 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 15:55:39 +00:00
Bruno Cardoso Lopes
0a38dc5fda For PC relative relocations where symbols are defined in the same section they
are referenced, ignore the relocation entry and patch the relocatable field with
the computed symbol offset directly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 08:52:02 +00:00
Evan Cheng
f6fe957950 Fix PR4567. Thumb1 target was using the wrong instruction to handle sp = sub fp, #c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76401 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 06:59:32 +00:00
Chris Lattner
401e10c4fb implement a new magic global "llvm.compiler.used" which is like llvm.used, but
doesn't cause ".no_dead_strip" to be emitted on darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 06:14:25 +00:00
Chris Lattner
1d5c49327b use stripPointerCasts to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76397 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 06:05:50 +00:00
Evan Cheng
91449a883d Model fpscr to prevent fcmped / fcmpezs etc from being deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76390 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 02:12:31 +00:00
Bill Wendling
3d10a5a757 Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 01:03:30 +00:00
Daniel Dunbar
3f189a3eb4 CMake support for SystemZ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 00:24:17 +00:00
Eli Friedman
a786c7b90c Don't override LowerArguments in the SPARC backend. In addition to
being more consistent with other backends, this makes the SPARC backend 
deal with functions with arguments with illegal types correctly, which 
fixes some tests in test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 19:53:46 +00:00
Evan Cheng
b46aaa3874 Fix a regression from 76124. Thumb1 instructions default to S bit being true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76374 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 19:16:46 +00:00
Jakob Stoklund Olesen
45d34fe358 Fix http://llvm.org/bugs/show_bug.cgi?id=4583
Inline asm instructions may have additional <imp-def,kill> register operands.
These operands are not marked with a flag like the normal asm operands, so we
must not assert that there is a flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 19:09:59 +00:00
Nick Lewycky
7e7dc45eb1 Fix ConstantRange::unionWith. Also make it work a little hard in some cases to
return the smallest union of two ranges instead of just any range that happens
to contain the union.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 03:44:35 +00:00
Daniel Dunbar
cfb8a1bea1 Fix some minor MSVC compiler warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 01:38:38 +00:00
Daniel Dunbar
c6465511d1 Unbreak build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76354 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 01:33:04 +00:00
Eli Friedman
796492dc4b Switch Alpha over to the new call lowering style. New code mostly
copied from the SystemZ target.  I don't think this causes any 
significant changes to the output (I compared the assembly, and the 
results appeared to be essentially unchanged), although I don't actually 
have an Alpha to test on.

I would appreciate if anyone with the appropriate hardware could test 
this. I'm not sure if that includes anyone subscribed to llvm-commits, 
though.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76353 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 01:11:32 +00:00
Daniel Dunbar
10b547c638 SystemZ *does* have a CodeGen/AsmPrinter split.
- What it doesn't have is the rest of its cmake files...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 00:46:44 +00:00
Daniel Dunbar
07598d72f0 Tweak cmake files for the four targets that don't split CodeGen out.
- We should canonicalize this and get rid of the cmake and llvm-config hacks to
   support both variants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76350 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 00:26:46 +00:00
Daniel Dunbar
b384c85877 Add dependencies from TargetInfo onto .td generation.
- Shouldn't really be necessary, but currently .inc files get included into
   some main target headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76349 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 00:21:12 +00:00
Bruno Cardoso Lopes
e2b0ecd8be Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI usage inside getSection* functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 23:24:01 +00:00
Daniel Dunbar
edcb540496 Add some missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 23:22:46 +00:00
Eli Friedman
2451a64687 Canonicalize bitcasts between types like <1 x i64> and i64 to
insertelement/extractelement.

I'm not entirely sure this is precisely what we want to do: should we 
prefer bitcast(insertelement) or insertelement(bitcast)?  Similarly. should we 
prefer extractelement(bitcast) or bitcast(extractelement)?



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76345 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 23:06:53 +00:00
Daniel Dunbar
4cb1e13769 Put Target definitions inside Target specific header, and llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 23:03:22 +00:00
Mikhail Glushenkov
3140619c63 Remove duplication in Program::Execute{And,No}Wait.
Implemented by moving the code out of static functions into methods of Program
class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76340 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 21:43:12 +00:00
Bruno Cardoso Lopes
617dd7baa6 Use a better name for the label relocations while emitting them for Jump Tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 20:52:11 +00:00
Bruno Cardoso Lopes
171375f73a Add support to properly reference private symbols on relocation entries.
Use proper relocation type to build relocations for JumpTables (rodata
sections).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 19:30:09 +00:00
Eli Friedman
76e7ba893f Back out 76300; apparently the preference is to canonicalize the other
way (bitcast -> insert/extractelement).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 19:04:16 +00:00
Chris Lattner
93f2491cf8 add a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76324 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 18:49:04 +00:00
Anton Korobeynikov
b1f61e24d1 Add carry producing / using versions of add / sub
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76316 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 14:16:06 +00:00
Anton Korobeynikov
6323a83e2c Expand frem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 13:44:25 +00:00
Anton Korobeynikov
6d94eff354 Turn abort() into unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76314 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 13:34:59 +00:00
Anton Korobeynikov
31e874490a Turn few asserts into errors / unreachable's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76313 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 13:33:17 +00:00
Anton Korobeynikov
87e412b921 Handle vector returns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76312 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 12:51:06 +00:00
Anton Korobeynikov
0cca06905b Provide expansion for ct* intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 12:26:13 +00:00
Anton Korobeynikov
e37a37de77 Expand sext_inreg for i1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 12:20:36 +00:00
Eli Friedman
8be17397c0 Add combine: X sdiv (1 << Y) -> X udiv (1 << Y) when X doesn't have the
sign bit set.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 09:53:21 +00:00
Eli Friedman
191a0aee4f Remove no-op check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76302 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 09:21:25 +00:00
Eli Friedman
1694e095c0 Remove dead check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76301 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 09:12:15 +00:00
Eli Friedman
fc21f8ff14 Canonicalize insert/extractelement from single-element vectors into
bitcasts.

It would also be possible to canonicalize the other way; does anyone 
have a preference?



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 09:07:47 +00:00
Eli Friedman
62bb413435 Fix simplifylibcalls memset recognition to work on 64-bit platforms
where int is 32 bits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76293 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 08:34:51 +00:00
Nick Lewycky
3a4a884c16 Replace intersectWith with maximalIntersectWith. The latter guarantees that
all values belonging to the intersection will belong to the resulting range.
The former was inconsistent about that point (either way is fine, just pick
one.) This is part of PR4545.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76289 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 06:34:42 +00:00
Eli Friedman
4612e59779 Fix the inline cost calculation to take into account instructions
which cannot be folded even if they have constant operands. Significantly
helps if_spppsubr.c attached to PR4573.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 05:26:06 +00:00
Eli Friedman
ef6ab66bcf Add line breaks to make the debug output a bit more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 05:12:58 +00:00
Evan Cheng
438d9900c0 Catch more coalescing opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76282 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 04:52:23 +00:00
Evan Cheng
5248468473 Enable cross register class coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 02:10:10 +00:00
Dan Gohman
5a206ee7ed Make GetElementPtr ConstantExprs default to having no pointer overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76280 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 01:49:22 +00:00
Evan Cheng
3837b64f41 Revert 76177 for now. It's messing up ARM asm printing. Also this significant debate about its efficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 01:43:53 +00:00
Dan Gohman
8fdedc0918 Fix this accidentally inverted condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76278 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 00:58:38 +00:00
Reid Kleckner
4b1511b027 Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 00:42:18 +00:00
Dan Gohman
016de81177 Convert more code to use Operator instead of explicitly handling both
ConstantExpr and Instruction. This involves duplicating some code
between GetElementPtrInst and GEPOperator, but it's not a lot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 23:55:56 +00:00
Ted Kremenek
5918304c4c Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 23:50:26 +00:00
Evan Cheng
59959cd966 Fix pr4552. Stack slot coloring with register must take care not to generate illegal ams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:42:51 +00:00
Daniel Dunbar
b4b53e5c13 llvm-mc: Add -triple, and start fetching the target asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:38:58 +00:00
Dan Gohman
3a7a68c108 Make BasicAliasAnalysis and Value::getUnderlyingObject use
GEPOperator's hasNoPointer0verflow(), and make a few places in instcombine
that create GEPs that may overflow clear the NoOverflow value. Among
other things, this partially addresses PR2831.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:25:10 +00:00
Dan Gohman
8f080f0233 Fix some typos in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:16:21 +00:00
Evan Cheng
47e9fab158 Fix x86 inline ams 'q' constraint support. In 32-bit mode, it's just like 'Q', i.e. EAX, EDX, ECX, EBX. In 64-bit mode, it just means all the i64r registers. Yeah, that makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:13:25 +00:00
Chris Lattner
16fe990e56 remove AsmPrinter::findGlobalValue, just use Value::stripPointerCasts instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:00:23 +00:00
Dan Gohman
5c2cb324d8 Add a GEPOperator class, and move the hasNoPointerOverflow
accessors into it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:33:58 +00:00
Evan Cheng
0768f0eb7f Simplify some more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:06:58 +00:00
Chris Lattner
3e0f60be46 Use more terse and precise linkage checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76237 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:00:50 +00:00
Dan Gohman
8906f95006 Eliminate yet another copy of getOpcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:58:59 +00:00
Chris Lattner
a4ff5e48fc these two pieces of code are the same because we always
emit the EHFrame label next to the section_eh_frame and
eh_frame_common labels.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76234 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:53:51 +00:00
Dan Gohman
ff141c2062 Fix a typo that Duncan spotted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:51:47 +00:00
Dan Gohman
ca178908c8 Add a new Operator class, for handling Instructions and ConstantExprs
in a convenient manner, factoring out some common code from
InstructionCombining and ValueTracking. Move the contents of
BinaryOperators.h into Operator.h and use Operator to generalize them
to support ConstantExprs as well as Instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:47:02 +00:00
Chris Lattner
e2cf37b88c Untangle a snarl that I discovered when updating the mangler,
starting in getCurrentFunctionEHName.  Among other problems,
we would try to privative a "foo.eh" label, but end up emitting
the label as _Lfoo.eh instead of L_foo.eh on darwin.  This is really
bad, and the linker has always tolerated these labels existing.
For now, just emit them as _foo.eh.

This patch also fixes problems with ".eh" labels on unnamed
functions and eliminates two strangely defined TargetAsmInfo
hooks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76231 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:46:40 +00:00
Daniel Dunbar
092a9dda2d Sketch support for target specific assembly parser.
- Not fully enabled yet, need a configure regeneration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:42:00 +00:00
Mikhail Glushenkov
234f6893a2 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:38:17 +00:00
Chris Lattner
6f37f8f9c3 fix include guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76228 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:32:07 +00:00
Evan Cheng
d129d73b72 Simplify the coalescer (finally!) by making LiveIntervals::processImplicitDefs a little more aggressive and teaching liveintervals to make use of isUndef marker on MachineOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 19:43:40 +00:00
Dan Gohman
1bd9f58d6d GetElementPtr instructions default to having no overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 19:23:21 +00:00
Daniel Dunbar
4b9e165904 Start generating AsmMatcher.inc for X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76213 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:55:26 +00:00
Jeffrey Yasskin
75402822d6 r76102 added the MachineCodeEmitter::processDebugLoc call and called it from
the X86 Emitter.  This patch extends that to the rest of the targets that can
write to a MachineCodeEmitter: ARM, Alpha, and PPC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76211 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:49:39 +00:00
Daniel Dunbar
d75ec23ab7 Fix compile warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:33:52 +00:00
Anton Korobeynikov
bb496a358e Add missed return
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:28:59 +00:00
Anton Korobeynikov
c5ec8a78ea Add support for naked functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:07:26 +00:00
Bruno Cardoso Lopes
b674dbe656 revert one of the loops to use indicies over iterators because there are vector insertions inside the loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:02:30 +00:00
Dan Gohman
9491c16e14 Add a SubclassOptionalData field to Value. See the doxygen comment for
details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 17:16:59 +00:00
Daniel Dunbar
ff8ac551a7 Initialize another Context, in the hopes of unbreaking CBE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 16:20:23 +00:00
Daniel Dunbar
7df0c07dbc Provide slightly more refined error message when trying to lookup a target, and
none are registered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 15:50:49 +00:00
David Greene
ab9238e876 Add logic to align instruction operands to columns for pretty-printing.
No target uses this currently.  This patch only adds the mechanism so
that local installations can choose to enable this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 14:24:46 +00:00
Duncan Sands
3e11988c42 Avoid a compiler warning when assertions are turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 12:25:14 +00:00
Eli Friedman
d8f7a36270 Oops, accidentally set a legal operation to expand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:34:23 +00:00
Eli Friedman
e4ce880dfa Expand misc operations from test/CodeGen/Generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:28:06 +00:00
Eli Friedman
ed224949ed Handle void in XCoreTargetLowering::isLegalAddressingMode. Triggers in
test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:16:38 +00:00
Eli Friedman
e91bf2c993 Remove some unnecessary expansion markings. Add a few expansion
markings that show up in test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:03:00 +00:00
Eli Friedman
5427d71be8 Add operation expansion/promotion for a bunch of operations, many of
which show up in test/CodeGen/Generic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 06:36:24 +00:00
Evan Cheng
a6e4322ccc Fix tSUBspi operand definition. It reads and writes sp, which is a high register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 05:43:12 +00:00
Eli Friedman
18d643abe5 Set an operation expansion, noticed while running
llc over test/CodeGen/Generic with -march=alpha.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 05:23:03 +00:00
Eli Friedman
a64eb92fe3 Make promotion in operation legalization for SETCC work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 05:16:04 +00:00
Eli Friedman
0b79a7727d Replace isTrapping with a new, similar method called
isSafeToSpeculativelyExecute. The new method is a bit closer to what 
the callers actually care about in that it rejects more things callers 
don't want.  It also adds more precise handling for integer 
division, and unifies code for analyzing the legality of a speculative 
load.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 04:28:42 +00:00
Eli Friedman
6055a6adb7 One more operation expansion for MIPS, from test/CodeGen/Generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 04:07:24 +00:00
Daniel Dunbar
53448652e4 Make sure CWriter's Context get's initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 03:43:21 +00:00
Eli Friedman
10a3659101 Expand a bunch of illegal operations on MIPS (found by
inspection and running over CodeGen/Generic).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 02:28:12 +00:00
Daniel Dunbar
19c29f53f2 Fix 'may be used uninitialized' warning.
- Anton, please review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 02:19:26 +00:00
Evan Cheng
c1b46f91f5 Fix my brain cramp by inverting the assertion condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 00:32:06 +00:00
Jeffrey Yasskin
28ebfcf7de Fix "no newline at end of file" warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:58:14 +00:00
Owen Anderson
ce032b483c Privatize the MDNode uniquing table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:44:30 +00:00
Anton Korobeynikov
b8e9ac834a Emit cross regclass register moves for thumb2.
Minor code duplication cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:26:06 +00:00
Daniel Dunbar
2df5e554e2 Disable this assert for now, it is firing on an llvm-gcc bootstrap. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76123 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:02:46 +00:00
Evan Cheng
a82b22c667 GV with ghost linkage (module being lazily streamed in in JIT lazy compilation mode) do not require extra load from stub. This fixes ExecutionEngine/2005-12-02-TailCallBug.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76121 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:53:10 +00:00
Dale Johannesen
423ccfe51d Assume an inline asm might be a call, so we get
stack alignment right when it is.  This is not
ideal but conservatively correct.  Adjust a test
to compensate for changed stack offset value.
gcc.apple/asm-block-57.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:34:45 +00:00
David Greene
3ac1ab835c Emit line numbers in asm comments when available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:24:20 +00:00
Owen Anderson
aad3fb7362 Privatize the MDString uniquing table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:11:26 +00:00
Daniel Dunbar
24cd3c4711 Fix inverted preprocessor conditional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:08:25 +00:00
Daniel Dunbar
efd280b4ca Fix compiler warning (for -Asserts).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:06:22 +00:00
Jakob Stoklund Olesen
93e55deeba Silence warning in Linux builds:
X86InstrInfo.cpp:2272: warning: suggest explicit braces to avoid ambiguous 'else'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:24:13 +00:00
Daniel Dunbar
34ccf037fe Add raw_null_ostream and llvm::nulls(), a raw_ostream that discards output.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:17:53 +00:00
Jeffrey Yasskin
32360a7e21 Add line numbers to OProfile. To do this, I added a processDebugLoc()
call to the MachineCodeEmitter interface and made copying the start
line of a function not conditional on whether we're emitting Dwarf
debug information. I'll propagate the processDebugLoc() calls to the
non-X86 targets in a followup patch.

In the long run, it'll probably be better to gather this information
through the DwarfWriter, but the DwarfWriter currently depends on the
AsmPrinter and TargetAsmInfo, and fixing that would be out of the way
for this patch.

There's a bug in OProfile 0.9.4 that makes it ignore line numbers for
addresses above 4G, and a patch fixing it at
http://thread.gmane.org/gmane.linux.oprofile/7634

Sample output:

$ sudo opcontrol --reset; sudo opcontrol --start-daemon; sudo opcontrol --start; `pwd`/Debug/bin/lli fib.bc; sudo opcontrol --stop
Signalling daemon... done
Profiler running.
fib(40) == 165580141
Stopping profiling.

$ opreport -g -d -l `pwd`/Debug/bin/lli|head -60
Overflow stats not available
CPU: Core 2, speed 1998 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
vma      samples  %        linenr info                 image name               symbol name
00007f67a30370b0 25489    61.2554  fib.c:24                    10946.jo                 fib_left
  00007f67a30370b0 1634      6.4106  fib.c:24
  00007f67a30370b1 83        0.3256  fib.c:24
  00007f67a30370b9 1997      7.8348  fib.c:24
  00007f67a30370c6 2080      8.1604  fib.c:27
  00007f67a30370c8 988       3.8762  fib.c:27
  00007f67a30370cd 1315      5.1591  fib.c:27
  00007f67a30370cf 251       0.9847  fib.c:27
  00007f67a30370d3 1191      4.6726  fib.c:27
  00007f67a30370d6 975       3.8252  fib.c:27
  00007f67a30370db 1010      3.9625  fib.c:27
  00007f67a30370dd 242       0.9494  fib.c:27
  00007f67a30370e1 2782     10.9145  fib.c:28
  00007f67a30370e5 3768     14.7828  fib.c:28
  00007f67a30370eb 615       2.4128  (no location information)
  00007f67a30370f3 6558     25.7287  (no location information)
00007f67a3037100 15603    37.4973  fib.c:29                    10946.jo                 fib_right
  00007f67a3037100 1646     10.5493  fib.c:29
  00007f67a3037101 45        0.2884  fib.c:29
  00007f67a3037109 2372     15.2022  fib.c:29
  00007f67a3037116 2234     14.3178  fib.c:32
  00007f67a3037118 612       3.9223  fib.c:32
  00007f67a303711d 622       3.9864  fib.c:32
  00007f67a303711f 385       2.4675  fib.c:32
  00007f67a3037123 404       2.5892  fib.c:32
  00007f67a3037126 634       4.0633  fib.c:32
  00007f67a303712b 870       5.5759  fib.c:32
  00007f67a303712d 62        0.3974  fib.c:32
  00007f67a3037131 1848     11.8439  fib.c:33
  00007f67a3037135 2840     18.2016  fib.c:33
  00007f67a303713a 1         0.0064  fib.c:33
  00007f67a303713b 1023      6.5564  (no location information)
  00007f67a3037143 5         0.0320  (no location information)
000000000080c1e4 15        0.0360  MachineOperand.h:150        lli                      llvm::MachineOperand::isReg() const
  000000000080c1e4 6        40.0000  MachineOperand.h:150
  000000000080c1ec 2        13.3333  MachineOperand.h:150
...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:07:26 +00:00
Jakob Stoklund Olesen
57e599a46b Teach MachineInstr::isRegTiedToDefOperand() to correctly parse inline asm operands.
The inline asm operands must be parsed from the first flag, you cannot assume
that an immediate operand preceeding a register use operand is the flag.
PowerPC "m" operands are represented as (flag, imm, reg) triples.
isRegTiedToDefOperand() would incorrectly interpret the imm as the flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 20:58:34 +00:00
Evan Cheng
5f15992b77 Changed my mind. We now allow remat of instructions whose defs have subreg indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 20:15:00 +00:00
Owen Anderson
914e50c841 Privatize the ConstantFP table. I'm on a roll!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 19:05:41 +00:00
Evan Cheng
2b48ab947c With recent MC changes, RIP base register is explicitly modeled. Make sure we add it when x86 V_SET0 / V_SETALLONES (by transforming it into a constpool load) into the use instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:44:05 +00:00
Ted Kremenek
da24fe265a Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:29:22 +00:00
Owen Anderson
001dbfebcb Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:04:31 +00:00
Kevin Enderby
f96db468fc Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a generic
EmitAssemblerFlag API which takes a value from the added AssemblerFlag
enumerated constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 17:56:39 +00:00
Dan Gohman
850f791abc Fill in some holes in ScalarEvolution's loop iteration condition
analysis. This allows indvars to emit a simpler loop trip count
expression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 17:34:36 +00:00
Dan Gohman
9377386493 Add an isLoopSimplifyForm() predicate, following the example of
isLCSSAForm(), to test whether a loop is in the form guaranteed
by the LoopSimplify pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 16:16:23 +00:00
Dan Gohman
ad60f660c6 Use size_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:24:40 +00:00
Anton Korobeynikov
7df8462038 Unbreak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:36:52 +00:00
Anton Korobeynikov
c975180624 Temporary disable 16 bit bswap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76063 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:35:57 +00:00
Anton Korobeynikov
6d4b270e38 Add instruction formats and few opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:35:20 +00:00
Anton Korobeynikov
6ff3f2c710 Add bswap patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76061 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:34:52 +00:00
Anton Korobeynikov
21ddf779bf Provide crazy pseudos for regpairs spills / reloads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:34:15 +00:00
Anton Korobeynikov
9de2848fac Handle long-disp stuff more consistently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:33:52 +00:00
Anton Korobeynikov
74e2dc446c All FP instructions have 12 bit memory displacement field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:33:27 +00:00
Anton Korobeynikov
f1106c4247 Another predicate routine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:33:01 +00:00
Anton Korobeynikov
27bf677e59 More helpers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:32:41 +00:00
Anton Korobeynikov
ae46db85a9 Add bunch of branch folding stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76055 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:32:19 +00:00
Anton Korobeynikov
27766b548f Add missed opcodes to short => long displacement conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:31:52 +00:00
Anton Korobeynikov
c3e48b06fb Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:31:32 +00:00
Anton Korobeynikov
54681eca69 Fix logic inversion for RI-mode address selection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76052 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:31:14 +00:00
Anton Korobeynikov
bb8a04806d Expand 32-bit bitconverts via memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:30:29 +00:00
Anton Korobeynikov
f2fd8ea1c9 Fix incomin arg stack frame offset in case we need to generate stack frame
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76049 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:29:57 +00:00
Anton Korobeynikov
8b75813687 Fix instruction mnemonics for some fp_to_sint operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76048 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:29:26 +00:00
Anton Korobeynikov
c1a1e4adb7 i32 values are passed extended also on stack. Handle this in generic way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76047 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:29:05 +00:00
Anton Korobeynikov
159ac63ba1 We definitely have 1-0 bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:28:46 +00:00
Anton Korobeynikov
5dd38de2c2 Revert the commit, it just hides the real bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:28:26 +00:00
Anton Korobeynikov
361a78756b Out GR128 regclass is not a 'real' i128 one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:27:53 +00:00
Anton Korobeynikov
628d419520 Add missed condbranch opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:27:26 +00:00
Anton Korobeynikov
05a0b8bc66 Handle bitconverts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:27:01 +00:00
Anton Korobeynikov
b6831cb044 Unbreak mvi and friends - emit only 'significant' part of the operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:26:38 +00:00
Anton Korobeynikov
98db78a28b Expand fp_to_uint too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:26:06 +00:00
Anton Korobeynikov
20d062fcc1 We don't have FP truncstores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:25:46 +00:00
Anton Korobeynikov
a89430e468 Expand uint_to_fp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76038 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:25:30 +00:00
Anton Korobeynikov
4971e1ebb7 Emit proper rounding mode for fp_to_sint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:25:12 +00:00
Anton Korobeynikov
3a9959fd4e f32/f64 regs are stored on stack if we're short in FP regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:24:57 +00:00
Anton Korobeynikov
75eef89ddb Lower anyext to zext, 32-bit stuff does not have any implicit zero-extension side effects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:24:41 +00:00
Anton Korobeynikov
1ada84daaf Make FP zero to be legal FP immediate via LOAD ZERO
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:24:16 +00:00
Anton Korobeynikov
5753f47f5b Loads are not two-address in any way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:24:01 +00:00
Anton Korobeynikov
a61a4f669b Add LOAD NEGATIVE instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:23:44 +00:00
Anton Korobeynikov
03f60001df LOAD COMPLEMENT instruction is not really two-addr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:23:30 +00:00
Anton Korobeynikov
6495063386 Add multiple add/sub instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76030 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:23:16 +00:00
Anton Korobeynikov
1733124507 Handle FP callee-saved regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:23:01 +00:00
Anton Korobeynikov
85c5c3f138 Proper FP extloads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:22:46 +00:00
Anton Korobeynikov
299dc78d67 Add proper PWS impdef's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:22:30 +00:00
Anton Korobeynikov
da723d7d91 Propagate FP select_cc to dag inserters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:22:15 +00:00
Anton Korobeynikov
55e96fb1c6 Implement fp_to_sint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:21:57 +00:00
Anton Korobeynikov
92ac82abb4 Implement FP regs spills / restores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:21:41 +00:00
Anton Korobeynikov
c79465df08 Add fabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:21:27 +00:00
Anton Korobeynikov
f1e82ce480 Add fneg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:21:12 +00:00
Anton Korobeynikov
9b4ae577ce We don't have native sine / cosine instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:20:56 +00:00
Anton Korobeynikov
1d0ec0b4fc More sint_to_fp stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:20:39 +00:00
Anton Korobeynikov
7aa03ac827 Add bunch of FP instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:20:24 +00:00
Anton Korobeynikov
23eff5c75a We don't have any FP extloads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:20:08 +00:00
Anton Korobeynikov
10c086cd77 Implement all comparisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:19:54 +00:00
Anton Korobeynikov
ae53567de1 Add constpool lowering / printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:19:35 +00:00
Anton Korobeynikov
0e31d5cf80 Allow FP arguments pass / return
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:19:16 +00:00
Anton Korobeynikov
2c97ae8826 Register FP regclasses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:19:02 +00:00
Anton Korobeynikov
b13057bafa Add FP regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:18:48 +00:00
Anton Korobeynikov
81d533c76a Fix fallout from prev. patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76012 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:18:31 +00:00
Anton Korobeynikov
8bd0db7615 Provide consistent subreg idx scheme. This (hopefully) fixes remaining divide problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:18:17 +00:00
Anton Korobeynikov
09e39001da Use divide single for 32 bit signed divides
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76010 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:17:52 +00:00
Anton Korobeynikov
cd3dfafef1 Add missed operands types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:17:07 +00:00
Anton Korobeynikov
e1c9aabd77 Missed part of prev. patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76008 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:16:45 +00:00
Anton Korobeynikov
9b812b0131 Another attempt to fix prologue emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76007 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:16:26 +00:00
Anton Korobeynikov
6fe326c713 Implement 'large' PIC model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76006 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:16:05 +00:00
Anton Korobeynikov
48e8b3cc58 Implement shifts properly (hopefilly - finally!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:15:24 +00:00
Anton Korobeynikov
e3a7f7a2b2 Remove redundand register move
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:14:54 +00:00
Anton Korobeynikov
0a42d2b437 Properly handle divides. As a bonus - implement memory versions of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:14:33 +00:00
Anton Korobeynikov
d20af96f5b Fix epic fail: full-width muls are not commutable. This unbreaks bunch of stuff from SingleSource/Benchmarks/Stanford
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 14:14:01 +00:00