oota-llvm.git
12 years agoSink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
Evan Cheng [Wed, 29 Jun 2011 01:14:12 +0000 (01:14 +0000)]
Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.

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

12 years agoTrim include
Evan Cheng [Wed, 29 Jun 2011 00:35:31 +0000 (00:35 +0000)]
Trim include

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

12 years agoRewrite RAGreedy::splitAroundRegion, now with cool ASCII art.
Jakob Stoklund Olesen [Wed, 29 Jun 2011 00:24:24 +0000 (00:24 +0000)]
Rewrite RAGreedy::splitAroundRegion, now with cool ASCII art.

This function has to deal with a lot of special cases, and the old
version got it wrong sometimes. In particular, it would sometimes leave
multiple uses in the stack interval in a single block. That causes bad
code with multiple reloads in the same basic block.

The new version handles block entry and exit in a single pass. It first
eliminates all the easy cases, and then goes on to create a local
interval for the blocks with difficult interference. Previously, we
would only create the local interval for completely isolated blocks.

It can happen that the stack interval becomes completely empty because
we could allocate a register in all edge bundles, and the new local
intervals deal with the interference. The empty stack interval is
harmless, but we need to remove a SplitKit assertion that checks for
empty intervals.

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

12 years agobuild/Darwin: Fix epic typo fail.
Daniel Dunbar [Tue, 28 Jun 2011 22:30:17 +0000 (22:30 +0000)]
build/Darwin: Fix epic typo fail.

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

12 years agoFix a CMake warning, following up to r134008.
NAKAMURA Takumi [Tue, 28 Jun 2011 21:46:21 +0000 (21:46 +0000)]
Fix a CMake warning, following up to r134008.

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

12 years agoUnbreak every backend.
Evan Cheng [Tue, 28 Jun 2011 21:33:11 +0000 (21:33 +0000)]
Unbreak every backend.

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

12 years agoMove CallFrameSetupOpcode and CallFrameDestroyOpcode to TargetInstrInfo.
Evan Cheng [Tue, 28 Jun 2011 21:14:33 +0000 (21:14 +0000)]
Move CallFrameSetupOpcode and CallFrameDestroyOpcode to TargetInstrInfo.

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

12 years agoHide more details in tablegen generated MCRegisterInfo ctor function.
Evan Cheng [Tue, 28 Jun 2011 20:44:22 +0000 (20:44 +0000)]
Hide more details in tablegen generated MCRegisterInfo ctor function.

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

12 years agoAdd MCInstrInfo registeration machinery.
Evan Cheng [Tue, 28 Jun 2011 20:29:03 +0000 (20:29 +0000)]
Add MCInstrInfo registeration machinery.

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

12 years agoMerge XXXGenRegisterNames.inc into XXXGenRegisterInfo.inc
Evan Cheng [Tue, 28 Jun 2011 20:07:07 +0000 (20:07 +0000)]
Merge XXXGenRegisterNames.inc into XXXGenRegisterInfo.inc

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

12 years ago- Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and
Evan Cheng [Tue, 28 Jun 2011 19:10:37 +0000 (19:10 +0000)]
- Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and
sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.

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

12 years agoClean up the handling of the x87 fp stack to make it more robust.
Jakob Stoklund Olesen [Tue, 28 Jun 2011 18:32:28 +0000 (18:32 +0000)]
Clean up the handling of the x87 fp stack to make it more robust.

Drop the FpMov instructions, use plain COPY instead.

Drop the FpSET/GET instruction for accessing fixed stack positions.
Instead use normal COPY to/from ST registers around inline assembly, and
provide a single new FpPOP_RETVAL instruction that can access the return
value(s) from a call. This is still necessary since you cannot tell from
the CALL instruction alone if it returns anything on the FP stack. Teach
fast isel to use this.

This provides a much more robust way of handling fixed stack registers -
we can tolerate arbitrary FP stack instructions inserted around calls
and inline assembly. Live range splitting could sometimes break x87 code
by inserting spill code in unfortunate places.

As a bonus we handle floating point inline assembly correctly now.

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

12 years agoReinstate r133516 "Remove some unnecessary uses of c_str()." A trailing null
Chad Rosier [Tue, 28 Jun 2011 18:26:12 +0000 (18:26 +0000)]
Reinstate r133516 "Remove some unnecessary uses of c_str()."  A trailing null
character in std::string was causing failures for a few ObjC and Obj-C++ tests
when -flto was enabled.  Revision 133999 resolved this issue. Thanks Jay!
rdar://9685235
PR10210

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

12 years agoRemove warning: 'c0' may be used uninitialized in this function.
Chad Rosier [Tue, 28 Jun 2011 17:26:57 +0000 (17:26 +0000)]
Remove warning: 'c0' may be used uninitialized in this function.

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

12 years agoPrint registers by name instead of by number.
Jakob Stoklund Olesen [Tue, 28 Jun 2011 17:24:32 +0000 (17:24 +0000)]
Print registers by name instead of by number.

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

12 years agocleanup: misleading comment.
Andrew Trick [Tue, 28 Jun 2011 16:45:04 +0000 (16:45 +0000)]
cleanup: misleading comment.

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

12 years agocmake: Our MSVC build does not support config-time build mode.
Andrew Trick [Tue, 28 Jun 2011 16:32:01 +0000 (16:32 +0000)]
cmake: Our MSVC build does not support config-time build mode.

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

12 years agoImplement ISD::VAARG lowering on PPC32.
Roman Divacky [Tue, 28 Jun 2011 15:30:42 +0000 (15:30 +0000)]
Implement ISD::VAARG lowering on PPC32.

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

12 years agoPR10210: New method ConstantArray::getAsCString(). Use it in LTO to
Jay Foad [Tue, 28 Jun 2011 08:24:19 +0000 (08:24 +0000)]
PR10210: New method ConstantArray::getAsCString(). Use it in LTO to
avoid getting embedded trailing null bytes in std::strings.

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

12 years agoFileCheckify and prepare for -disable-iv-rewrite.
Andrew Trick [Tue, 28 Jun 2011 06:34:10 +0000 (06:34 +0000)]
FileCheckify and prepare for -disable-iv-rewrite.

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

12 years agoFileCheckize a couple of tests.
Jakob Stoklund Olesen [Tue, 28 Jun 2011 06:25:03 +0000 (06:25 +0000)]
FileCheckize a couple of tests.

Also and add a test for popping dead return values and avoid testing the
spill precision.

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

12 years agoCleanup. Fix a stupid variable name.
Andrew Trick [Tue, 28 Jun 2011 05:44:06 +0000 (05:44 +0000)]
Cleanup. Fix a stupid variable name.

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

12 years agoCleanup. Fix a stupid variable name.
Andrew Trick [Tue, 28 Jun 2011 05:41:52 +0000 (05:41 +0000)]
Cleanup. Fix a stupid variable name.

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

12 years agoSCEVExpander: give new insts a name that identifies the reponsible pass.
Andrew Trick [Tue, 28 Jun 2011 05:07:32 +0000 (05:07 +0000)]
SCEVExpander: give new insts a name that identifies the reponsible pass.

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

12 years agowhitespace
Andrew Trick [Tue, 28 Jun 2011 05:04:16 +0000 (05:04 +0000)]
whitespace

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

12 years agoFix typo in comment.
Nick Lewycky [Tue, 28 Jun 2011 03:57:31 +0000 (03:57 +0000)]
Fix typo in comment.

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

12 years agoFix cmake build.
Rafael Espindola [Tue, 28 Jun 2011 03:17:03 +0000 (03:17 +0000)]
Fix cmake build.

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

12 years agoindvars --disable-iv-rewrite: sever ties with IVUsers.
Andrew Trick [Tue, 28 Jun 2011 03:01:46 +0000 (03:01 +0000)]
indvars --disable-iv-rewrite: sever ties with IVUsers.

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

12 years agoindvars --disable-iv-rewrite: Defer evaluating s/zext until SCEV
Andrew Trick [Tue, 28 Jun 2011 02:49:20 +0000 (02:49 +0000)]
indvars --disable-iv-rewrite: Defer evaluating s/zext until SCEV
evaluates all other IV exprs.

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

12 years agoFix CMake build by removing this now dead file.
Chandler Carruth [Tue, 28 Jun 2011 02:03:12 +0000 (02:03 +0000)]
Fix CMake build by removing this now dead file.

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

12 years agoFileCheck-ize a test that had the strangest TCL quote I've seen yet: an
Chandler Carruth [Tue, 28 Jun 2011 02:03:10 +0000 (02:03 +0000)]
FileCheck-ize a test that had the strangest TCL quote I've seen yet: an
opening single quote with no closing single quote, and with {} quotes
"inside" of it. This broke some of our tools that scrape test cases.

Also, while here, make the test actually assert what the comment says it
asserts. This was essentially authored by Nick Lewycky, and merely typed
in by myself. Let me know if this is still missing the mark, but the
previous test only succeeded due to the improper quoting preventing
*anything* from matching the grep -- it had a '4(%...)' sequence in the
output!

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

12 years agoAlternative name enum should go into the enum portion.
Evan Cheng [Tue, 28 Jun 2011 01:36:01 +0000 (01:36 +0000)]
Alternative name enum should go into the enum portion.

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

12 years agoFix a bad iterator dereference that Evan uncovered.
Jakob Stoklund Olesen [Tue, 28 Jun 2011 01:18:58 +0000 (01:18 +0000)]
Fix a bad iterator dereference that Evan uncovered.

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

12 years agoARM Thumb2 asm syntax optional destination operand for binary operators.
Jim Grosbach [Tue, 28 Jun 2011 00:19:13 +0000 (00:19 +0000)]
ARM Thumb2 asm syntax optional destination operand for binary operators.

When the destination operand is the same as the first source register
operand for arithmetic instructions, the destination operand may be omitted.

For example, the following two instructions are equivalent:
and r1, #ff
and r1, r1, #ff

rdar://9672867

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

12 years agoRemove RegClass2VRegMap from MachineRegisterInfo.
Evan Cheng [Mon, 27 Jun 2011 23:54:40 +0000 (23:54 +0000)]
Remove RegClass2VRegMap from MachineRegisterInfo.

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

12 years agoARM Assembly support for Thumb mov-immediate.
Jim Grosbach [Mon, 27 Jun 2011 23:54:06 +0000 (23:54 +0000)]
ARM Assembly support for Thumb mov-immediate.

Correctly parse the forms of the Thumb mov-immediate instruction:
  1. 8-bit immediate 0-255.
  2. 12-bit shifted-immediate.

The 16-bit immediate "movw" form is also legal with just a "mov" mnemonic,
but is not yet supported. More parser logic necessary there due to fixups.

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

12 years agoRemove RCBarriers from TargetInstrDesc.
Evan Cheng [Mon, 27 Jun 2011 23:47:21 +0000 (23:47 +0000)]
Remove RCBarriers from TargetInstrDesc.

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

12 years agoRemove the experimental (and unused) pre-ra splitting pass. Greedy regalloc can split...
Evan Cheng [Mon, 27 Jun 2011 23:40:45 +0000 (23:40 +0000)]
Remove the experimental (and unused) pre-ra splitting pass. Greedy regalloc can split live ranges.

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

12 years agoindvars -disable-iv-rewrite: run RLEV after SimplifyIVUsers for
Andrew Trick [Mon, 27 Jun 2011 23:17:44 +0000 (23:17 +0000)]
indvars -disable-iv-rewrite: run RLEV after SimplifyIVUsers for
a bit more control over the order SCEVs are evaluated.

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

12 years agoRevert r133516 "Remove some unnecessary uses of c_str()."
Chad Rosier [Mon, 27 Jun 2011 22:54:29 +0000 (22:54 +0000)]
Revert r133516 "Remove some unnecessary uses of c_str()."
This was causing compile-time failures for some of the Objc and Obj-C++
benchmarks.  The specific errors were of the form: "ld: duplicate symbol …"
rdar://9660124

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

12 years agoDuring bottom up fast-isel, instructions emitted to materalize registers are at top...
Devang Patel [Mon, 27 Jun 2011 22:32:04 +0000 (22:32 +0000)]
During bottom up fast-isel, instructions emitted to materalize registers are at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases.

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

12 years agoFix this test to actually check something and be able to be compiled.
Eric Christopher [Mon, 27 Jun 2011 22:30:14 +0000 (22:30 +0000)]
Fix this test to actually check something and be able to be compiled.

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

12 years agoCalculate GetBestDestForJumpOnUndef correctly.
Jakub Staszak [Mon, 27 Jun 2011 21:51:12 +0000 (21:51 +0000)]
Calculate GetBestDestForJumpOnUndef correctly.

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

12 years agoARM Asm parsing of Thumb2 move immediate.
Jim Grosbach [Mon, 27 Jun 2011 21:38:03 +0000 (21:38 +0000)]
ARM Asm parsing of Thumb2 move immediate.

Thumb2 MOV mnemonic can accept both cc_out and predication. We don't (yet)
encode the instruction properly, but this gets the parsing part.

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

12 years agoMore refactoring. Move getRegClass from TargetOperandInfo to TargetInstrInfo.
Evan Cheng [Mon, 27 Jun 2011 21:26:13 +0000 (21:26 +0000)]
More refactoring. Move getRegClass from TargetOperandInfo to TargetInstrInfo.

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

12 years agoAdd support for alternative register names, useful for instructions whose operands...
Owen Anderson [Mon, 27 Jun 2011 21:06:21 +0000 (21:06 +0000)]
Add support for alternative register names, useful for instructions whose operands are logically equivalent to existing registers, but happen to be printed specially.  For example, an instruciton that prints d0[0] instead of s0.
Patch by Jim Grosbach.

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

12 years agoAdd exception necessitated by 133938.
Jim Grosbach [Mon, 27 Jun 2011 20:59:10 +0000 (20:59 +0000)]
Add exception necessitated by 133938.

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

12 years agoARM assembly carry set/clear condition code aliases for 'hi/lo'
Jim Grosbach [Mon, 27 Jun 2011 20:40:29 +0000 (20:40 +0000)]
ARM assembly carry set/clear condition code aliases for 'hi/lo'

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

12 years agoARM assembler support for ldmfd/stmfd mnemonics.
Jim Grosbach [Mon, 27 Jun 2011 20:32:18 +0000 (20:32 +0000)]
ARM assembler support for ldmfd/stmfd mnemonics.

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

12 years agoAllow lr in the register options here.
Eric Christopher [Mon, 27 Jun 2011 20:31:01 +0000 (20:31 +0000)]
Allow lr in the register options here.

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

12 years agoARM assembler support for vpush/vpop.
Jim Grosbach [Mon, 27 Jun 2011 20:00:07 +0000 (20:00 +0000)]
ARM assembler support for vpush/vpop.

Add aliases for the vpush/vpop mnemonics to the VFP load/store multiple
writeback instructions w/ SP as the base pointer.

rdar://9683231

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

12 years agoRename unnecessary forward declaration.
Evan Cheng [Mon, 27 Jun 2011 19:41:39 +0000 (19:41 +0000)]
Rename unnecessary forward declaration.

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

12 years agoMore refactoring. MC doesn't need know about subreg indices.
Evan Cheng [Mon, 27 Jun 2011 19:24:13 +0000 (19:24 +0000)]
More refactoring. MC doesn't need know about subreg indices.

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

12 years agoARM Assembly syntax support for arithmetic implied dest operand.
Jim Grosbach [Mon, 27 Jun 2011 19:09:15 +0000 (19:09 +0000)]
ARM Assembly syntax support for arithmetic implied dest operand.

When the destination operand is the same as the first source register
operand for arithmetic instructions, the destination operand may be omitted.

For example, the following two instructions are equivalent:
  sub r2, r2, #6
  sub r2, #6

rdar://9682597

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

12 years agoThe index stored in the RegDefIter is one after the current index. When getting...
Owen Anderson [Mon, 27 Jun 2011 18:34:12 +0000 (18:34 +0000)]
The index stored in the RegDefIter is one after the current index.  When getting the index, decrement it so that it points to the current element.  Fixes an off-by-one bug encountered when trying to make use of MVT::untyped.

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

12 years agoMerge XXXGenRegisterDesc.inc XXXGenRegisterNames.inc XXXGenRegisterInfo.h.inc
Evan Cheng [Mon, 27 Jun 2011 18:32:37 +0000 (18:32 +0000)]
Merge XXXGenRegisterDesc.inc XXXGenRegisterNames.inc XXXGenRegisterInfo.h.inc
into XXXGenRegisterInfo.inc.

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

12 years agopre-RA-sched: Cleanup register pressure tracking.
Andrew Trick [Mon, 27 Jun 2011 18:01:20 +0000 (18:01 +0000)]
pre-RA-sched: Cleanup register pressure tracking.

Removed the check that peeks past EXTRA_SUBREG, which I don't think
makes sense any more. Intead treat it as a normal register def. No
significant affect on x86 or ARM benchmarks.

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

12 years agoMove all inline-asm-fpstack tests to a single file.
Jakob Stoklund Olesen [Mon, 27 Jun 2011 17:27:37 +0000 (17:27 +0000)]
Move all inline-asm-fpstack tests to a single file.

Also fix some of the tests that were actually testing wrong behavior -
An input operand in {st} is only popped by the inline asm when {st} is
also in the clobber list.

The original bug reports all had ~{st} clobbers as they should.

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

12 years agoTrack live-out physical registers in MachineDCE.
Jakob Stoklund Olesen [Mon, 27 Jun 2011 15:00:36 +0000 (15:00 +0000)]
Track live-out physical registers in MachineDCE.

Patch by Sanjoy Das!

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

12 years agoTeach one piece of scalarrepl to handle lifetime markers. When transforming an
Nick Lewycky [Mon, 27 Jun 2011 05:40:02 +0000 (05:40 +0000)]
Teach one piece of scalarrepl to handle lifetime markers. When transforming an
alloca that only holds a copy of a global and we're going to replace the users
of the alloca with that global, just nuke the lifetime intrinsics. Part of
PR10121.

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

12 years agoMove onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by other
Nick Lewycky [Mon, 27 Jun 2011 04:20:45 +0000 (04:20 +0000)]
Move onlyUsedByLifetimeMarkers to ValueTracking so that it can be used by other
passes as well.

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

12 years agoGrow the X86FloatingPoint register map to hold 16 registers.
Jakob Stoklund Olesen [Mon, 27 Jun 2011 04:08:36 +0000 (04:08 +0000)]
Grow the X86FloatingPoint register map to hold 16 registers.

This allows for more live scratch registers which is needed to handle
live ST registers before return and inline asm instructions.

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

12 years agoDistinguish early clobber output operands from clobbered registers.
Jakob Stoklund Olesen [Mon, 27 Jun 2011 04:08:33 +0000 (04:08 +0000)]
Distinguish early clobber output operands from clobbered registers.

Both become <earlyclobber> defs on the INLINEASM MachineInstr, but we
now use two different asm operand kinds.

The new Kind_Clobber is treated identically to the old
Kind_RegDefEarlyClobber for now, but x87 floating point stack inline
assembly does care about the difference.

This will pop a register off the stack:

  asm("fstp %st" : : "t"(x) : "st");

While this will pop the input and push an output:

  asm("fst %st" : "=&t"(r) : "t"(x));

We need to know if ST0 was a clobber or an output operand, and we can't
depend on <dead> flags for that.

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

12 years agoDecode and pretty print inline asm operand descriptors.
Jakob Stoklund Olesen [Mon, 27 Jun 2011 04:08:29 +0000 (04:08 +0000)]
Decode and pretty print inline asm operand descriptors.

The INLINEASM MachineInstrs have an immediate operand describing each
original inline asm operand. Decode the bits in MachineInstr::print() so
it is easier to read:

  INLINEASM <es:rorq $1,$0>, $0:[regdef], %vreg0<def>, %vreg1<def>, $1:[imm], 1, $2:[reguse] [tiedto:$0], %vreg2, %vreg3, $3:[regdef-ec], %EFLAGS<earlyclobber,imp-def>

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

12 years agoRemove unused methods.
Rafael Espindola [Sun, 26 Jun 2011 22:44:34 +0000 (22:44 +0000)]
Remove unused methods.

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

12 years agoThere is only one register coalescer. Merge it into the base class and
Rafael Espindola [Sun, 26 Jun 2011 22:34:10 +0000 (22:34 +0000)]
There is only one register coalescer. Merge it into the base class and
remove the analysis group.

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

12 years agoMerge SimpleRegisterCoalescing.cpp into RegisterCoalescer.cpp.
Rafael Espindola [Sun, 26 Jun 2011 22:06:36 +0000 (22:06 +0000)]
Merge SimpleRegisterCoalescing.cpp into RegisterCoalescer.cpp.

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

12 years agomerge SimpleRegisterCoalescing.h into RegisterCoalescer.h.
Rafael Espindola [Sun, 26 Jun 2011 21:54:28 +0000 (21:54 +0000)]
merge SimpleRegisterCoalescing.h into RegisterCoalescer.h.

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

12 years agoMove RegisterCoalescer.h to lib/CodeGen.
Rafael Espindola [Sun, 26 Jun 2011 21:41:06 +0000 (21:41 +0000)]
Move RegisterCoalescer.h to lib/CodeGen.

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

12 years agoRemove unnecessary wrapper.
Rafael Espindola [Sun, 26 Jun 2011 19:47:36 +0000 (19:47 +0000)]
Remove unnecessary wrapper.

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

12 years agoPTX: corrected tests that were failing
Dan Bailey [Sat, 25 Jun 2011 19:41:17 +0000 (19:41 +0000)]
PTX: corrected tests that were failing

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

12 years agoReplace dyn_cast<> with cast<> since the cast is already guarded by the necessary...
Chad Rosier [Sat, 25 Jun 2011 18:51:28 +0000 (18:51 +0000)]
Replace dyn_cast<> with cast<> since the cast is already guarded by the necessary check.

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

12 years agoPTX: Reverting implementation of i8.
Dan Bailey [Sat, 25 Jun 2011 18:16:28 +0000 (18:16 +0000)]
PTX: Reverting implementation of i8.

The .b8 operations in PTX are far more limiting than I first thought. The mov operation isn't even supported, so there's no way of converting a .pred value into a .b8 without going via .b16, which is
not sensible. An improved implementation needs to use the fact that loads and stores automatically extend and truncate to implement support for EXTLOAD and TRUNCSTORE in order to correctly support
boolean values.

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

12 years agoObject: Add proper error handling.
Michael J. Spencer [Sat, 25 Jun 2011 17:55:23 +0000 (17:55 +0000)]
Object: Add proper error handling.

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

12 years agoModify llvm-nm to use new Binary creation method.
Michael J. Spencer [Sat, 25 Jun 2011 17:54:59 +0000 (17:54 +0000)]
Modify llvm-nm to use new Binary creation method.

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

12 years agoMake Binary the parent of ObjectFile and update children to new interface.
Michael J. Spencer [Sat, 25 Jun 2011 17:54:50 +0000 (17:54 +0000)]
Make Binary the parent of ObjectFile and update children to new interface.

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

12 years agoAdd Binary class. This is a cleaner parent than ObjectFile.
Michael J. Spencer [Sat, 25 Jun 2011 17:54:29 +0000 (17:54 +0000)]
Add Binary class. This is a cleaner parent than ObjectFile.

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

12 years agoAdd Object/Error.
Michael J. Spencer [Sat, 25 Jun 2011 17:42:56 +0000 (17:42 +0000)]
Add Object/Error.

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

12 years agoEnhance the sanity check for block sizes; check that the resulting pointer is
Nick Lewycky [Sat, 25 Jun 2011 17:08:50 +0000 (17:08 +0000)]
Enhance the sanity check for block sizes; check that the resulting pointer is
pointing to the range [first character, last character] instead of just not
after the last character. Patch by Yan Ivnitskiy!

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

12 years agoTest case for r133858 (tail call optimize in the presence of byval).
Chad Rosier [Sat, 25 Jun 2011 02:44:56 +0000 (02:44 +0000)]
Test case for r133858 (tail call optimize in the presence of byval).

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

12 years agoUpdate CMake library dependencies.
Oscar Fuentes [Sat, 25 Jun 2011 02:10:19 +0000 (02:10 +0000)]
Update CMake library dependencies.

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

12 years agoEnable tail call optimization in the presence of a byval (x86-32 and x86-64).
Chad Rosier [Sat, 25 Jun 2011 02:04:56 +0000 (02:04 +0000)]
Enable tail call optimization in the presence of a byval (x86-32 and x86-64).
<rdar://problem/9483883>

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

12 years agoMove ARM-specific test to ARM directory.
Jim Grosbach [Sat, 25 Jun 2011 01:53:17 +0000 (01:53 +0000)]
Move ARM-specific test to ARM directory.

Hopefully make the x86-target-only Windows bots happy.

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

12 years agoUnbreak CMake build
Douglas Gregor [Sat, 25 Jun 2011 00:51:50 +0000 (00:51 +0000)]
Unbreak CMake build

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

12 years agoRemove dead typedefs.
Evan Cheng [Sat, 25 Jun 2011 00:27:17 +0000 (00:27 +0000)]
Remove dead typedefs.

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

12 years agoAdd include guard.
Evan Cheng [Fri, 24 Jun 2011 23:59:54 +0000 (23:59 +0000)]
Add include guard.

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

12 years agoRename TargetDesc to MCTargetDesc
Evan Cheng [Fri, 24 Jun 2011 23:53:19 +0000 (23:53 +0000)]
Rename TargetDesc to MCTargetDesc

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

12 years agoRename TargetRegisterDesc to MCRegisterDesc
Evan Cheng [Fri, 24 Jun 2011 23:44:48 +0000 (23:44 +0000)]
Rename TargetRegisterDesc to MCRegisterDesc

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

12 years agoRefactor MachO relocation generaration into the Target directories.
Jim Grosbach [Fri, 24 Jun 2011 23:44:37 +0000 (23:44 +0000)]
Refactor MachO relocation generaration into the Target directories.

Move the target-specific RecordRelocation logic out of the generic MC
MachObjectWriter and into the target-specific object writers. This allows
nuking quite a bit of target knowledge from the supposedly target-independent
bits in lib/MC.

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

12 years agoThe scheduler needs to be aware on the existence of untyped nodes when it performs...
Owen Anderson [Fri, 24 Jun 2011 23:02:22 +0000 (23:02 +0000)]
The scheduler needs to be aware on the existence of untyped nodes when it performs type propagation for EXTRACT_SUBREG.

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

12 years agoRevert "Shorten some ARM builtin names by removing unnecessary "neon" prefix."
Bob Wilson [Fri, 24 Jun 2011 22:13:17 +0000 (22:13 +0000)]
Revert "Shorten some ARM builtin names by removing unnecessary "neon" prefix."
Sorry, this was a bad idea.  Within clang these builtins are in a separate
"ARM" namespace, but the actual builtin names should clearly distinguish that
they are target specific.

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

12 years agoFix cmake build.
Rafael Espindola [Fri, 24 Jun 2011 22:01:28 +0000 (22:01 +0000)]
Fix cmake build.

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

12 years agoFix struct member's scope. Patch by Xi Wang.
Devang Patel [Fri, 24 Jun 2011 22:00:39 +0000 (22:00 +0000)]
Fix struct member's scope. Patch by Xi Wang.

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

12 years agoShorten some ARM builtin names by removing unnecessary "neon" prefix.
Bob Wilson [Fri, 24 Jun 2011 21:32:40 +0000 (21:32 +0000)]
Shorten some ARM builtin names by removing unnecessary "neon" prefix.

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

12 years agoHoist simple check above more complex checking to avoid unnecessary
Chad Rosier [Fri, 24 Jun 2011 21:15:36 +0000 (21:15 +0000)]
Hoist simple check above more complex checking to avoid unnecessary
overheads.  No functional change intended.

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

12 years agoTestcase for r133818
Jim Grosbach [Fri, 24 Jun 2011 20:59:01 +0000 (20:59 +0000)]
Testcase for r133818

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

12 years agoRevert unintentional check-in.
Devang Patel [Fri, 24 Jun 2011 20:48:14 +0000 (20:48 +0000)]
Revert unintentional check-in.

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

12 years agoHandle debug info for i128 constants.
Devang Patel [Fri, 24 Jun 2011 20:46:11 +0000 (20:46 +0000)]
Handle debug info for  i128 constants.

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

12 years ago- Add MCRegisterInfo registration machinery. Also added x86 registration routines.
Evan Cheng [Fri, 24 Jun 2011 20:42:09 +0000 (20:42 +0000)]
- Add MCRegisterInfo registration machinery. Also added x86 registration routines.
- Rename TargetRegisterDesc to MCRegisterDesc.

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

12 years agoARM movw/movt fixups need to mask the high bits.
Jim Grosbach [Fri, 24 Jun 2011 20:06:59 +0000 (20:06 +0000)]
ARM movw/movt fixups need to mask the high bits.

The fixup value comes in as the whole 32-bit value, so for the lo16 fixup,
the upper bits need to be masked off. Previously we assumed the masking had
already been done and asserted.

rdar://9635991

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