oota-llvm.git
12 years agoUse the correct opcodes: SLLV/SRLV or AND must be used instead of SLL/SRL or
Akira Hatanaka [Tue, 19 Jul 2011 20:34:00 +0000 (20:34 +0000)]
Use the correct opcodes: SLLV/SRLV or AND must be used instead of SLL/SRL or
ANDi, when the instruction does not have any immediate operands.

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

12 years agoMove mr[r]c[2] ARM tests and tidy up a bit.
Jim Grosbach [Tue, 19 Jul 2011 20:28:56 +0000 (20:28 +0000)]
Move mr[r]c[2] ARM tests and tidy up a bit.

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

12 years agoARM testcases for MOVT.
Jim Grosbach [Tue, 19 Jul 2011 20:23:25 +0000 (20:23 +0000)]
ARM testcases for MOVT.

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

12 years agoUse descriptive variable names.
Akira Hatanaka [Tue, 19 Jul 2011 20:11:17 +0000 (20:11 +0000)]
Use descriptive variable names.

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

12 years agoARM assembly parsing for MOV (register).
Jim Grosbach [Tue, 19 Jul 2011 20:10:31 +0000 (20:10 +0000)]
ARM assembly parsing for MOV (register).

Correct the handling of the 's' suffix when parsing ARM mode. It's only a
truly separate opcode in Thumb. Add test cases to make sure we handle
the s and condition suffices correctly, including diagnostics.

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

12 years agoTidy up.
Jim Grosbach [Tue, 19 Jul 2011 19:47:11 +0000 (19:47 +0000)]
Tidy up.

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

12 years agoTighten conditional for 'mov' cc_out.
Jim Grosbach [Tue, 19 Jul 2011 19:45:44 +0000 (19:45 +0000)]
Tighten conditional for 'mov' cc_out.

Make sure we only clobber the cc_out operand if it is indeed a default
non-setting operand.

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

12 years agoReapply r135457. This needs llvm-gcc change, that I forgot to check-in yesterday.
Devang Patel [Tue, 19 Jul 2011 19:41:54 +0000 (19:41 +0000)]
Reapply r135457. This needs llvm-gcc change, that I forgot to check-in yesterday.

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

12 years agoARM assembly parsing for MOV (immediate).
Jim Grosbach [Tue, 19 Jul 2011 19:13:28 +0000 (19:13 +0000)]
ARM assembly parsing for MOV (immediate).

Add range checking for the immediate operand and handle the "mov" mnemonic
choosing between encodings based on the value of the immediate. Add tests
for fixups, encoding choice and values, and diagnostic for out of range values.

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

12 years agoWhitespace.
Jim Grosbach [Tue, 19 Jul 2011 19:02:39 +0000 (19:02 +0000)]
Whitespace.

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

12 years agoRemove unused code.
Jim Grosbach [Tue, 19 Jul 2011 18:32:48 +0000 (18:32 +0000)]
Remove unused code.

cc_out and pred operands are added during parsing via custom C++ now.

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

12 years agoFix comments.
Akira Hatanaka [Tue, 19 Jul 2011 18:19:40 +0000 (18:19 +0000)]
Fix comments.

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

12 years agoRemove redundant instructions.
Akira Hatanaka [Tue, 19 Jul 2011 18:14:26 +0000 (18:14 +0000)]
Remove redundant instructions.
- In EmitAtomicBinaryPartword, mask incr in loopMBB only if atomic.swap is the
  instruction being expanded, instead of masking it in thisMBB.
- Remove redundant Or in EmitAtomicCmpSwap.

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

12 years agoSeparate code that modifies control flow from code that adds instruction to
Akira Hatanaka [Tue, 19 Jul 2011 17:09:53 +0000 (17:09 +0000)]
Separate code that modifies control flow from code that adds instruction to
basic blocks.

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

12 years agoARM range checking for so_imm operands in assembly parsing.
Jim Grosbach [Tue, 19 Jul 2011 16:50:30 +0000 (16:50 +0000)]
ARM range checking for so_imm operands in assembly parsing.

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

12 years agoRevert "Make a provision to encode inline location in a variable. This will enable...
Bob Wilson [Tue, 19 Jul 2011 16:32:50 +0000 (16:32 +0000)]
Revert "Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block."

This reverts commit 9fec5e346efdf744b151ae6604f912908315fa7a.

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

12 years agoRevert "Update docs to reflect r135457."
Bob Wilson [Tue, 19 Jul 2011 16:31:58 +0000 (16:31 +0000)]
Revert "Update docs to reflect r135457."

This reverts commit ba034c0a2e71303c7cf3f43ca8e69dc8436b32e2.

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

12 years agoConvert ConstantFoldGetElementPtr to use ArrayRef.
Jay Foad [Tue, 19 Jul 2011 15:30:30 +0000 (15:30 +0000)]
Convert ConstantFoldGetElementPtr to use ArrayRef.

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

12 years agoConvert SimplifyGEPInst to use ArrayRef.
Jay Foad [Tue, 19 Jul 2011 15:07:52 +0000 (15:07 +0000)]
Convert SimplifyGEPInst to use ArrayRef.

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

12 years agoConvert gep_type_begin and gep_type_end to use ArrayRef.
Jay Foad [Tue, 19 Jul 2011 14:42:50 +0000 (14:42 +0000)]
Convert gep_type_begin and gep_type_end to use ArrayRef.

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

12 years agoConvert TargetData::getIndexedOffset to use ArrayRef.
Jay Foad [Tue, 19 Jul 2011 14:01:37 +0000 (14:01 +0000)]
Convert TargetData::getIndexedOffset to use ArrayRef.

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

12 years agoUse ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
Jay Foad [Tue, 19 Jul 2011 13:32:40 +0000 (13:32 +0000)]
Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.

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

12 years agoAdd intrinsics for the zext / sext instructions.
Richard Osborne [Tue, 19 Jul 2011 13:28:50 +0000 (13:28 +0000)]
Add intrinsics for the zext / sext instructions.

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

12 years agoAdd intrinsics for the testct, testwct instructions.
Richard Osborne [Tue, 19 Jul 2011 13:00:40 +0000 (13:00 +0000)]
Add intrinsics for the testct, testwct instructions.

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

12 years agoAdd intrinsics for the peek and endin instructions.
Richard Osborne [Tue, 19 Jul 2011 12:50:25 +0000 (12:50 +0000)]
Add intrinsics for the peek and endin instructions.

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

12 years agoRemove bogus test: for all possible inputs of %X, the 'sub nsw' is guaranteed
Nick Lewycky [Tue, 19 Jul 2011 08:22:57 +0000 (08:22 +0000)]
Remove bogus test: for all possible inputs of %X, the 'sub nsw' is guaranteed
to perform a signed wrap. Don't rely on any particular handling of that case.

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

12 years agoIntroduce MCCodeGenInfo, which keeps information that can affect codegen
Evan Cheng [Tue, 19 Jul 2011 06:37:02 +0000 (06:37 +0000)]
Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.

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

12 years agoMake EmitAtomic functions return the correct MachineBasicBlocks so that
Akira Hatanaka [Tue, 19 Jul 2011 03:42:13 +0000 (03:42 +0000)]
Make EmitAtomic functions return the correct MachineBasicBlocks so that
ExpandISelPseudos::runOnMachineFunction does not visit instructions that have
just been added.

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

12 years agoDo not insert instructions in reverse order.
Akira Hatanaka [Tue, 19 Jul 2011 03:14:58 +0000 (03:14 +0000)]
Do not insert instructions in reverse order.

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

12 years agoMake isLoadExtLegal and isTruncStoreLegal check what the name says. :) This might...
Eli Friedman [Tue, 19 Jul 2011 02:24:07 +0000 (02:24 +0000)]
Make isLoadExtLegal and isTruncStoreLegal check what the name says. :)  This might have some minor effect on CellSPU, but all other targets should be unaffected.  Fixing per report from Damien Vincent on llvmdev.

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

12 years agoUpdate docs to reflect r135457.
Devang Patel [Tue, 19 Jul 2011 01:04:39 +0000 (01:04 +0000)]
Update docs to reflect r135457.

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

12 years agoMake a provision to encode inline location in a variable. This will enable dwarf...
Devang Patel [Tue, 19 Jul 2011 01:03:32 +0000 (01:03 +0000)]
Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block.

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

12 years agoRevert r135423.
Devang Patel [Tue, 19 Jul 2011 00:28:24 +0000 (00:28 +0000)]
Revert r135423.

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

12 years agoDocument how to maintain a git-svn clone of the LLVM git repositories.
Jeffrey Yasskin [Tue, 19 Jul 2011 00:20:54 +0000 (00:20 +0000)]
Document how to maintain a git-svn clone of the LLVM git repositories.

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

12 years agoMicro-opt: Only emit compact unwind if there is a compact unwind encoding to emit.
Bill Wendling [Tue, 19 Jul 2011 00:09:25 +0000 (00:09 +0000)]
Micro-opt: Only emit compact unwind if there is a compact unwind encoding to emit.

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

12 years agoUse the CompactUnwindEncoding from the Frame, if it's defined.
Bill Wendling [Tue, 19 Jul 2011 00:06:12 +0000 (00:06 +0000)]
Use the CompactUnwindEncoding from the Frame, if it's defined.

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

12 years agoAdd a frame with the compact unwind encoding if it exists.
Bill Wendling [Tue, 19 Jul 2011 00:02:51 +0000 (00:02 +0000)]
Add a frame with the compact unwind encoding if it exists.

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

12 years agoAdd a method to set compact unwind encoding information in a frame.
Bill Wendling [Tue, 19 Jul 2011 00:01:42 +0000 (00:01 +0000)]
Add a method to set compact unwind encoding information in a frame.

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

12 years agoRename CompactEncoding to CompactUnwindEncoding.
Bill Wendling [Tue, 19 Jul 2011 00:00:58 +0000 (00:00 +0000)]
Rename CompactEncoding to CompactUnwindEncoding.

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

12 years agoFixed a bug where the MC subtarget information
Sean Callanan [Tue, 19 Jul 2011 00:00:41 +0000 (00:00 +0000)]
Fixed a bug where the MC subtarget information
wasn't being initialized by the enhanced disassembler,
leading to assertion failures.

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

12 years agoAdd a field for the compact unwind encoding.
Bill Wendling [Tue, 19 Jul 2011 00:00:05 +0000 (00:00 +0000)]
Add a field for the compact unwind encoding.

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

12 years agoMove the compact encoding from the target-specific library to the code-gen
Bill Wendling [Mon, 18 Jul 2011 23:38:40 +0000 (23:38 +0000)]
Move the compact encoding from the target-specific library to the code-gen
library.

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

12 years agoRevamp our handling of tLDMIA[_UPD] and tSTMIA[_UPD] to avoid having multiple instruc...
Owen Anderson [Mon, 18 Jul 2011 23:25:34 +0000 (23:25 +0000)]
Revamp our handling of tLDMIA[_UPD] and tSTMIA[_UPD] to avoid having multiple instructions with the same encoding.  This resolves another conflict when bringing up the new-style disassembler.

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

12 years agoEliminate TargetAsmInfo::getCompactUnwindEncoding. This get rid of the
Evan Cheng [Mon, 18 Jul 2011 22:32:12 +0000 (22:32 +0000)]
Eliminate TargetAsmInfo::getCompactUnwindEncoding. This get rid of the
use of TargetFrameLowering in TargetAsmInfo.

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

12 years agoMove getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
Evan Cheng [Mon, 18 Jul 2011 22:29:13 +0000 (22:29 +0000)]
Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
better location welcome).

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

12 years agoMark the Darwin assembler workout as isCodeGenOnly, so that it doesn't cause decoding...
Owen Anderson [Mon, 18 Jul 2011 22:14:02 +0000 (22:14 +0000)]
Mark the Darwin assembler workout as isCodeGenOnly, so that it doesn't cause decoding conflicts in the new-style disassembler.

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

12 years agoAdd APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
Jeffrey Yasskin [Mon, 18 Jul 2011 21:45:40 +0000 (21:45 +0000)]
Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261.  Migrate all LLVM callers of the old
constructor to the new one.

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

12 years agoFileCheck-ize a couple tests.
Eli Friedman [Mon, 18 Jul 2011 21:23:42 +0000 (21:23 +0000)]
FileCheck-ize a couple tests.

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

12 years agoCompiler warning.
Andrew Trick [Mon, 18 Jul 2011 21:15:03 +0000 (21:15 +0000)]
Compiler warning.

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

12 years agoSink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
Evan Cheng [Mon, 18 Jul 2011 20:57:22 +0000 (20:57 +0000)]
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
to MCRegisterInfo. Also initialize the mapping at construction time.

This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.

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

12 years agoDuring bottom up fast-isel, instructions emitted to materalize registers are at top...
Devang Patel [Mon, 18 Jul 2011 20:55:23 +0000 (20:55 +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.
[take 2]

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

12 years agoindvars: LinearFunctionTestReplace for non-canonical IVs.
Andrew Trick [Mon, 18 Jul 2011 20:32:31 +0000 (20:32 +0000)]
indvars: LinearFunctionTestReplace for non-canonical IVs.

For -disable-iv-rewrite, perform LFTR without generating a new
"canonical" induction variable. Instead find the "best" existing
induction variable for use in the loop exit test and compute the final
value of that IV for use in the new loop exit test. In short,
convert to a simple eq/ne exit test as long as it's cheap to do so.

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

12 years agoDo not treat atomic.load.sub differently than other atomic binary intrinsics.
Akira Hatanaka [Mon, 18 Jul 2011 19:58:59 +0000 (19:58 +0000)]
Do not treat atomic.load.sub differently than other atomic binary intrinsics.

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

12 years agoSet mayLoad or mayStore flags for SC and LL in order to prevent LICM from
Akira Hatanaka [Mon, 18 Jul 2011 18:52:12 +0000 (18:52 +0000)]
Set mayLoad or mayStore flags for SC and LL in order to prevent LICM from
moving them out of the loop. Previously, stores and loads to a stack frame
object were inserted to accomplish this. Remove the code that was needed to do
this. Patch by Sasa Stankovic.

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

12 years agoRe-apply r135319 with a fix for the constant island pass.
Owen Anderson [Mon, 18 Jul 2011 18:50:52 +0000 (18:50 +0000)]
Re-apply r135319 with a fix for the constant island pass.
Original Log: Get rid of the separate opcodes for the Darwin versions of tBL, tBLXi, and tBLXr, using pseudo-instructions to lower to the single final opcode.  Update the ARM disassembler for this change.

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

12 years agoFix a crash when building 177.mesa for armv6.
Jakob Stoklund Olesen [Mon, 18 Jul 2011 18:47:13 +0000 (18:47 +0000)]
Fix a crash when building 177.mesa for armv6.

When splitting a live range immediately before an LDR_POST instruction
that redefines the address register, make sure to use the correct value
number in leaveIntvBefore.

We need the value number entering the instruction.

<rdar://problem/9793765>

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

12 years agoindvars: Added verification that LFTR and other indvars goodness does
Andrew Trick [Mon, 18 Jul 2011 18:44:20 +0000 (18:44 +0000)]
indvars: Added verification that LFTR and other indvars goodness does
not interfere with BackedgeTakenCount computation.

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

12 years agoindvars: Added isHighCostExpansion. Avoid generating extra ops in the
Andrew Trick [Mon, 18 Jul 2011 18:21:35 +0000 (18:21 +0000)]
indvars: Added isHighCostExpansion. Avoid generating extra ops in the
preheader for the sole purpose of LFTR, since LFTR itself is usually not
a clear optimization.

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

12 years agoBe more smart with VCVTSS2SD. Also place the patterns close to the
Bruno Cardoso Lopes [Mon, 18 Jul 2011 18:11:25 +0000 (18:11 +0000)]
Be more smart with VCVTSS2SD. Also place the patterns close to the
definitions.

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

12 years agoAdd AVX 128-bit sqrt versions
Bruno Cardoso Lopes [Mon, 18 Jul 2011 17:51:40 +0000 (17:51 +0000)]
Add AVX 128-bit sqrt versions

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

12 years agoChange destination register operands of SC instructions so that unique
Akira Hatanaka [Mon, 18 Jul 2011 17:44:27 +0000 (17:44 +0000)]
Change destination register operands of SC instructions so that unique
virtual registers are used.

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

12 years agoIntern all RecTy subclass instances to avoid duplicates.
Jakob Stoklund Olesen [Mon, 18 Jul 2011 17:02:57 +0000 (17:02 +0000)]
Intern all RecTy subclass instances to avoid duplicates.

Make all of the RecTy constructors private, and use get() factory
methods instead. Return singleton instances when it makes sense.

ListTy instance pointers are stored in the element RecTy instance.

BitsRecTy instance pointers, one per length, are stored in a static vector.

Also unique DefInit instances. A Record has a unique DefInit which
has a unique RecordRecTy instance.

This saves some 200k-300k RecTy allocations when parsing ARM.td. It
reduces TableGen's heap usage by almost 50%.

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

12 years agovarious cleanups noticed by Frits
Chris Lattner [Mon, 18 Jul 2011 16:35:57 +0000 (16:35 +0000)]
various cleanups noticed by Frits

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

12 years agoremove pasto
Chris Lattner [Mon, 18 Jul 2011 16:04:11 +0000 (16:04 +0000)]
remove pasto

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

12 years agoHopefully fix some GCC-based buildbots. GCC apparently decays the array to a pointer...
Frits van Bommel [Mon, 18 Jul 2011 12:31:03 +0000 (12:31 +0000)]
Hopefully fix some GCC-based buildbots. GCC apparently decays the array to a pointer here before overload resolution, so construct with an explicit length instead.

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

12 years agoMigrate LLVM and Clang to use the new makeArrayRef(...) functions where previously...
Frits van Bommel [Mon, 18 Jul 2011 12:00:32 +0000 (12:00 +0000)]
Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.

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

12 years agoIntroduce the 'makeArrayRef(...)' family of functions, which fills a similar role...
Frits van Bommel [Mon, 18 Jul 2011 11:58:53 +0000 (11:58 +0000)]
Introduce the 'makeArrayRef(...)' family of functions, which fills a similar role for ArrayRef<> as std::make_pair() fills for std::pair<>: they return the right instantiation of ArrayRef<T> based on the types of the parameters.

They mostly mirror the ArrayRef constructors, with two exceptions:
 * There's no function mirroring the default constructor because it wouldn't have any parameters to deduce the right ArrayRef<T> from.
 * There's an explicit SmallVector<T> overload in addition to the SmallVectorImpl<T> overload. Without it, the single-element overload would try to create an ArrayRef<Smallvector<T> > because it's a better match according to the overloading rules. (And both overloads are used in the current tree, so neither is redundant)

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

12 years agoDelete empty unused file.
Nick Lewycky [Mon, 18 Jul 2011 05:54:06 +0000 (05:54 +0000)]
Delete empty unused file.

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

12 years agoFix PR10387.
Jakob Stoklund Olesen [Mon, 18 Jul 2011 05:31:59 +0000 (05:31 +0000)]
Fix PR10387.

When trying to rematerialize a value before an instruction that has an
early-clobber redefine of the virtual register, make sure to look up the
correct value number.

Early-clobber defs are moved one slot back, so getBaseIndex is needed to
find the used value number.

Bugpoint was unable to reduce the test case for this, see PR10388.

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

12 years agodocument this api change.
Chris Lattner [Mon, 18 Jul 2011 04:56:02 +0000 (04:56 +0000)]
document this api change.

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

12 years agoland David Blaikie's patch to de-constify Type, with a few tweaks.
Chris Lattner [Mon, 18 Jul 2011 04:54:35 +0000 (04:54 +0000)]
land David Blaikie's patch to de-constify Type, with a few tweaks.

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

12 years agoupdate for recent api changes. I have a hard time believing that this is actually...
Chris Lattner [Mon, 18 Jul 2011 04:52:58 +0000 (04:52 +0000)]
update for recent api changes.  I have a hard time believing that this is actually a useful example.

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

12 years agoupdate this to build with a recent IRBuilder change and de-constify types.
Chris Lattner [Mon, 18 Jul 2011 04:52:09 +0000 (04:52 +0000)]
update this to build with a recent IRBuilder change and de-constify types.

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

12 years agoLLC doesn't need to create MCInstrInfo's.
Evan Cheng [Mon, 18 Jul 2011 04:16:27 +0000 (04:16 +0000)]
LLC doesn't need to create MCInstrInfo's.

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

12 years agoadd iteration support to TinyPtrVector for clang's use.
Chris Lattner [Mon, 18 Jul 2011 01:53:11 +0000 (01:53 +0000)]
add iteration support to TinyPtrVector for clang's use.

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

12 years agofix a warning in TinyPtrVector, adopt it in SSAUpdater, saving some
Chris Lattner [Mon, 18 Jul 2011 01:43:58 +0000 (01:43 +0000)]
fix a warning in TinyPtrVector, adopt it in SSAUpdater, saving some
mallocs.

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

12 years agointroduce a new TinyPtrVector class.
Chris Lattner [Mon, 18 Jul 2011 01:40:02 +0000 (01:40 +0000)]
introduce a new TinyPtrVector class.

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

12 years agoSimplify & microoptimize code. No intended functionality change.
Benjamin Kramer [Mon, 18 Jul 2011 00:00:20 +0000 (00:00 +0000)]
Simplify & microoptimize code. No intended functionality change.

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

12 years agoMinor code cleanups
Nadav Rotem [Sun, 17 Jul 2011 19:05:00 +0000 (19:05 +0000)]
Minor code cleanups

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

12 years agoFix CMake build on Solaris
Oscar Fuentes [Sun, 17 Jul 2011 17:35:15 +0000 (17:35 +0000)]
Fix CMake build on Solaris

When building LLVM/Clang on Solaris. The generated makefiles would
have an extraneous semi-colon character in them prior to this change
due to the way the 'CMAKE_CXX_FLAGS' variable was defined. Simply
adjusting the definition by moving the current CMAKE_CXX_FLAGS value
within the quotes solves the problem.

Patch by Art Haas!

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

12 years agotidy up
Chris Lattner [Sun, 17 Jul 2011 06:01:30 +0000 (06:01 +0000)]
tidy up

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

12 years agoSilence compiler warnings.
Benjamin Kramer [Sat, 16 Jul 2011 22:26:27 +0000 (22:26 +0000)]
Silence compiler warnings.

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

12 years agoRemove unused LoopRanges from RegAllocGreedy.
Jakub Staszak [Sat, 16 Jul 2011 20:43:00 +0000 (20:43 +0000)]
Remove unused LoopRanges from RegAllocGreedy.

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

12 years agoRemove "LoopInfo.h" include from BranchProbabilityInfo.h.
Jakub Staszak [Sat, 16 Jul 2011 20:31:15 +0000 (20:31 +0000)]
Remove "LoopInfo.h" include from BranchProbabilityInfo.h.

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

12 years agoAdd MachineBlockFrequency analysis.
Jakub Staszak [Sat, 16 Jul 2011 20:23:20 +0000 (20:23 +0000)]
Add MachineBlockFrequency analysis.

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

12 years agoRevert r135319 in an attempt to get to unbreak testers.
Owen Anderson [Sat, 16 Jul 2011 09:17:43 +0000 (09:17 +0000)]
Revert r135319 in an attempt to get to unbreak testers.

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

12 years agoMore minor adjustments.
Eric Christopher [Sat, 16 Jul 2011 07:28:35 +0000 (07:28 +0000)]
More minor adjustments.

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

12 years agoSilence unused variable warning
Matt Beaumont-Gay [Sat, 16 Jul 2011 04:18:47 +0000 (04:18 +0000)]
Silence unused variable warning

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

12 years agoMake the disassembler able to disassemble a bunch of instructions with names in the...
Eli Friedman [Sat, 16 Jul 2011 02:41:28 +0000 (02:41 +0000)]
Make the disassembler able to disassemble a bunch of instructions with names in the TableGen files containing "64" on x86-32.  This includes a bunch of x87 instructions, like fld, and a bunch of SSSE3 instructions on MMX registers like pshufb.  Part of PR8873.

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

12 years agoindvars: fix a pass-sensitivity issue that would hit the SCEVExpander
Andrew Trick [Sat, 16 Jul 2011 01:18:53 +0000 (01:18 +0000)]
indvars: fix a pass-sensitivity issue that would hit the SCEVExpander
assertion I added in r135333. Check for the existence of a preheader
before expanding a recurrence.

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

12 years agoindvars: remove ExprToIVMap because it won't be needed by LFTR.
Andrew Trick [Sat, 16 Jul 2011 01:06:48 +0000 (01:06 +0000)]
indvars: remove ExprToIVMap because it won't be needed by LFTR.

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

12 years agoFix SCEVEXpander to handle arbitrary phi expansion. Includes two
Andrew Trick [Sat, 16 Jul 2011 00:59:39 +0000 (00:59 +0000)]
Fix SCEVEXpander to handle arbitrary phi expansion. Includes two
related bug fixes and corresponding assertions for uninitialized data
and missing NULL check. Test cases will be included with the new LFTR.

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

12 years agoAdd AVX 128-bit patterns for sint_to_fp
Bruno Cardoso Lopes [Sat, 16 Jul 2011 00:50:20 +0000 (00:50 +0000)]
Add AVX 128-bit patterns for sint_to_fp

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

12 years agoFinish propagating %asmtmp->%1 change.
Eric Christopher [Sat, 16 Jul 2011 00:26:07 +0000 (00:26 +0000)]
Finish propagating %asmtmp->%1 change.

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

12 years agoHe said *before* the last split point.
Jakob Stoklund Olesen [Sat, 16 Jul 2011 00:13:30 +0000 (00:13 +0000)]
He said *before* the last split point.

This should unbreak the build-self-4-mingw32 tester. I have a very
complicated test case that I will try to clean up.

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

12 years agofix rdar://9776316 - type remapping needed for inline asm blobs,
Chris Lattner [Fri, 15 Jul 2011 23:18:40 +0000 (23:18 +0000)]
fix rdar://9776316 - type remapping needed for inline asm blobs,
fixing some objc llvm-test crashes with LTO.

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

12 years agodeconstify getType()'s.
Chris Lattner [Fri, 15 Jul 2011 23:15:45 +0000 (23:15 +0000)]
deconstify getType()'s.

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

12 years agoLegalizeDAG doesn't need its own copy of this enum.
Dan Gohman [Fri, 15 Jul 2011 22:51:43 +0000 (22:51 +0000)]
LegalizeDAG doesn't need its own copy of this enum.

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

12 years agoGet rid of the separate opcodes for the Darwin versions of tBL, tBLXi, and tBLXr...
Owen Anderson [Fri, 15 Jul 2011 22:49:31 +0000 (22:49 +0000)]
Get rid of the separate opcodes for the Darwin versions of tBL, tBLXi, and tBLXr, using pseudo-instructions to lower to the single final opcode.  Update the ARM disassembler for this change.

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

12 years agoDelete LegalizeDAG's own version of isTypeLegal and getTypeAction
Dan Gohman [Fri, 15 Jul 2011 22:39:09 +0000 (22:39 +0000)]
Delete LegalizeDAG's own version of isTypeLegal and getTypeAction
and just use the ones from TargetLowering directly.

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