oota-llvm.git
13 years agoARM parsing and encoding tests for SBC instruction.
Jim Grosbach [Thu, 21 Jul 2011 23:03:59 +0000 (23:03 +0000)]
ARM parsing and encoding tests for SBC instruction.

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

13 years agoInitialize DenseSets lazily.
Benjamin Kramer [Thu, 21 Jul 2011 23:03:59 +0000 (23:03 +0000)]
Initialize DenseSets lazily.

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

13 years agoARM testcases for SADD/SASX parsing and encoding.
Jim Grosbach [Thu, 21 Jul 2011 23:00:49 +0000 (23:00 +0000)]
ARM testcases for SADD/SASX parsing and encoding.

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

13 years agoAdd missing getAnalysisUsage in MachineBlockFrequency.
Jakub Staszak [Thu, 21 Jul 2011 22:59:09 +0000 (22:59 +0000)]
Add missing getAnalysisUsage in MachineBlockFrequency.

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

13 years agoARM assembly parsing support for RSC instruction.
Jim Grosbach [Thu, 21 Jul 2011 22:56:30 +0000 (22:56 +0000)]
ARM assembly parsing support for RSC instruction.

Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.

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

13 years agoARM assembly parsing support for RSB instruction.
Jim Grosbach [Thu, 21 Jul 2011 22:37:43 +0000 (22:37 +0000)]
ARM assembly parsing support for RSB instruction.

Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.

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

13 years agoARM parsing and encoding tests for RBIT, REV, REV16 and REVSH.
Jim Grosbach [Thu, 21 Jul 2011 22:29:23 +0000 (22:29 +0000)]
ARM parsing and encoding tests for RBIT, REV, REV16 and REVSH.

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

13 years agoARM parsing and encodings tests for saturating arithmetic insns.
Jim Grosbach [Thu, 21 Jul 2011 22:18:28 +0000 (22:18 +0000)]
ARM parsing and encodings tests for saturating arithmetic insns.

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

13 years agoTidy up.
Jim Grosbach [Thu, 21 Jul 2011 21:26:05 +0000 (21:26 +0000)]
Tidy up.

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

13 years agoUpdate generated CPP code with the new API on CallInst::Create and ConstantExpr:...
Nicolas Geoffray [Thu, 21 Jul 2011 20:59:21 +0000 (20:59 +0000)]
Update generated CPP code with the new API on CallInst::Create and ConstantExpr::getGetElementPtr.

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

13 years agoARM assembly parsing POP/PUSH mnemonics.
Jim Grosbach [Thu, 21 Jul 2011 19:57:11 +0000 (19:57 +0000)]
ARM assembly parsing POP/PUSH mnemonics.

Aliases for LDM/STM. The single-register versions should encode to LDR/STR
with writeback, but we don't (yet) get that correct. Neither does Darwin's
system assembler, though, so that's not a deal-breaker of a limitation.

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

13 years agoFix CMake build
Oscar Fuentes [Thu, 21 Jul 2011 19:10:57 +0000 (19:10 +0000)]
Fix CMake build

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

13 years agoAdd tests for ARM PKH assembly parsing.
Jim Grosbach [Thu, 21 Jul 2011 19:02:03 +0000 (19:02 +0000)]
Add tests for ARM PKH assembly parsing.

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

13 years agoSplit up the ARM so_reg ComplexPattern into so_reg_reg and so_reg_imm, allowing us...
Owen Anderson [Thu, 21 Jul 2011 18:54:16 +0000 (18:54 +0000)]
Split up the ARM so_reg ComplexPattern into so_reg_reg and so_reg_imm, allowing us to distinguish the encodings that use shifted registers from those that use shifted immediates.  This is necessary to allow the fixed-length decoder to distinguish things like BICS vs LDRH.

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

13 years agoCleanup: make std::pair usage slightly less indecipherable without actually naming...
Andrew Trick [Thu, 21 Jul 2011 17:37:39 +0000 (17:37 +0000)]
Cleanup: make std::pair usage slightly less indecipherable without actually naming variables!

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

13 years agoSink parts of TargetRegisterClass into MCRegisterClass.
Benjamin Kramer [Thu, 21 Jul 2011 17:26:50 +0000 (17:26 +0000)]
Sink parts of TargetRegisterClass into MCRegisterClass.

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

13 years agoARM assembly parsing and encoding for PKHBT and PKHTB instructions.
Jim Grosbach [Thu, 21 Jul 2011 17:23:04 +0000 (17:23 +0000)]
ARM assembly parsing and encoding for PKHBT and PKHTB instructions.

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

13 years agoAdded the infrastructute necessary for MIPS JIT support. Patch by Vladimir
Bruno Cardoso Lopes [Thu, 21 Jul 2011 16:28:51 +0000 (16:28 +0000)]
Added the infrastructute necessary for MIPS JIT support. Patch by Vladimir
Stefanovic. I removed the part that actually emits the instructions cause
I want that to get in better shape first and in incremental steps. This
also makes it easier to review the upcoming parts.

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

13 years agoMake better use of ConstantExpr::getGetElementPtr's InBounds parameter.
Jay Foad [Thu, 21 Jul 2011 15:15:37 +0000 (15:15 +0000)]
Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.

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

13 years agoSort case-insensitively.
Jay Foad [Thu, 21 Jul 2011 14:42:51 +0000 (14:42 +0000)]
Sort case-insensitively.

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

13 years agoConvert ConstantExpr::getGetElementPtr and
Jay Foad [Thu, 21 Jul 2011 14:31:17 +0000 (14:31 +0000)]
Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.

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

13 years agoUpdate llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
Jay Foad [Thu, 21 Jul 2011 09:19:11 +0000 (09:19 +0000)]
Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
to use ArrayRef.

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

13 years agoConvert ConstantFolder APIs to use ArrayRef.
Jay Foad [Thu, 21 Jul 2011 07:52:17 +0000 (07:52 +0000)]
Convert ConstantFolder APIs to use ArrayRef.

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

13 years agomove tier out of an anonymous namespace, it doesn't make sense
Chris Lattner [Thu, 21 Jul 2011 06:21:31 +0000 (06:21 +0000)]
move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header.

Eliminate some extraenous uses of tie.

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

13 years ago- Register v16i16 as valid VR256 register class
Bruno Cardoso Lopes [Thu, 21 Jul 2011 02:24:08 +0000 (02:24 +0000)]
- Register v16i16 as valid VR256 register class
- Add more bitcasts for v16i16
- Since 135661 and 135662 already added the splat logic,
just add one more splat test for v16i16

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

13 years agoAdd support for 256-bit versions of VPERMIL instruction. This is a new
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:47 +0000 (01:55 +0000)]
Add support for 256-bit versions of VPERMIL instruction. This is a new
instruction introduced in AVX, which can operate on 128 and 256-bit vectors.
It considers a 256-bit vector as two independent 128-bit lanes. It can permute
any 32 or 64 elements inside a lane, and restricts the second lane to
have the same permutation of the first one. With the improved splat support
introduced early today, adding codegen for this instruction enable more
efficient 256-bit code:

Instead of:
  vextractf128  $0, %ymm0, %xmm0
  punpcklbw %xmm0, %xmm0
  punpckhbw %xmm0, %xmm0
  vinsertf128 $0, %xmm0, %ymm0, %ymm1
  vinsertf128 $1, %xmm0, %ymm1, %ymm0
  vextractf128  $1, %ymm0, %xmm1
  shufps  $1, %xmm1, %xmm1
  movss %xmm1, 28(%rsp)
  movss %xmm1, 24(%rsp)
  movss %xmm1, 20(%rsp)
  movss %xmm1, 16(%rsp)
  vextractf128  $0, %ymm0, %xmm0
  shufps  $1, %xmm0, %xmm0
  movss %xmm0, 12(%rsp)
  movss %xmm0, 8(%rsp)
  movss %xmm0, 4(%rsp)
  movss %xmm0, (%rsp)
  vmovaps (%rsp), %ymm0
We get:
  vextractf128  $0, %ymm0, %xmm0
  punpcklbw %xmm0, %xmm0
  punpckhbw %xmm0, %xmm0
  vinsertf128 $0, %xmm0, %ymm0, %ymm1
  vinsertf128 $1, %xmm0, %ymm1, %ymm0
  vpermilps $85, %ymm0, %ymm0

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

13 years agoImprove splat promotion to handle AVX types: v32i8 and v16i16. Also
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:42 +0000 (01:55 +0000)]
Improve splat promotion to handle AVX types: v32i8 and v16i16. Also
refactor the code and add a bunch of comments. The final shuffle
emitted by handling 256-bit types is suitable for the VPERM shuffle
instruction which is going to be introduced in a next commit (with
a testcase which cover this commit)

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

13 years agoAdd aditional patterns for vextractf128 instruction
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:39 +0000 (01:55 +0000)]
Add aditional patterns for vextractf128 instruction

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

13 years agoAdd aditional patterns for vinsertf128 instruction
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:36 +0000 (01:55 +0000)]
Add aditional patterns for vinsertf128 instruction

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

13 years agoAdd v16i16 type to VR256 class
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:33 +0000 (01:55 +0000)]
Add v16i16 type to VR256 class

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

13 years agoMove code around. No functionality changes
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:30 +0000 (01:55 +0000)]
Move code around. No functionality changes

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

13 years agoTidy up code
Bruno Cardoso Lopes [Thu, 21 Jul 2011 01:55:27 +0000 (01:55 +0000)]
Tidy up code

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

13 years agoLSR, correct fix for rdar://9786536. Silly casting bug.
Andrew Trick [Thu, 21 Jul 2011 01:45:54 +0000 (01:45 +0000)]
LSR, correct fix for rdar://9786536. Silly casting bug.

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

13 years agoLSR must sometimes sign-extend before generating double constants.
Andrew Trick [Thu, 21 Jul 2011 01:05:01 +0000 (01:05 +0000)]
LSR must sometimes sign-extend before generating double constants.

rdar://9786536

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

13 years agoMark instructions which are part of the frame setup with the MachineInstr::FrameSetup...
Bill Wendling [Thu, 21 Jul 2011 00:44:56 +0000 (00:44 +0000)]
Mark instructions which are part of the frame setup with the MachineInstr::FrameSetup flag.

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

13 years agoLSR crashes on an empty IVUsers list.
Andrew Trick [Thu, 21 Jul 2011 00:40:04 +0000 (00:40 +0000)]
LSR crashes on an empty IVUsers list.

rdar://9786536

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

13 years agoX86 is the only target that uses coff format. This should fixes test failures running...
Evan Cheng [Wed, 20 Jul 2011 23:53:54 +0000 (23:53 +0000)]
X86 is the only target that uses coff format. This should fixes test failures running on Windows, Cygwin, or MingW hosts.

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

13 years agodocs/GettingStarted.html: Tweak style.
NAKAMURA Takumi [Wed, 20 Jul 2011 23:37:51 +0000 (23:37 +0000)]
docs/GettingStarted.html: Tweak style.

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

13 years agoSink ARMMCExpr and ARMAddressingModes into MC layer. First step to separate ARM MC...
Evan Cheng [Wed, 20 Jul 2011 23:34:39 +0000 (23:34 +0000)]
Sink ARMMCExpr and ARMAddressingModes into MC layer. First step to separate ARM MC code from target.

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

13 years agoRemove unused function.
Bill Wendling [Wed, 20 Jul 2011 23:07:42 +0000 (23:07 +0000)]
Remove unused function.

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

13 years agoRemove the now defunct getCompactUnwindEncoding method from the frame lowering code.
Bill Wendling [Wed, 20 Jul 2011 23:04:09 +0000 (23:04 +0000)]
Remove the now defunct getCompactUnwindEncoding method from the frame lowering code.

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

13 years agoRefactor.
Devang Patel [Wed, 20 Jul 2011 23:00:27 +0000 (23:00 +0000)]
Refactor.

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

13 years agodocs/GettingStarted.html: Fix a typo and tweak a command line.
NAKAMURA Takumi [Wed, 20 Jul 2011 22:58:28 +0000 (22:58 +0000)]
docs/GettingStarted.html: Fix a typo and tweak a command line.

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

13 years agoThere are two ways to map a variable to its lexical scope. Lexical scope information...
Devang Patel [Wed, 20 Jul 2011 22:18:50 +0000 (22:18 +0000)]
There are two ways to map a variable to its lexical scope. Lexical scope information is embedded in MDNode describing the variable. It is also available as a part of DebugLoc attached with DBG_VALUE instruction. DebugLoc attached with an instruction is less reliable in optimized code so use information embedded in the MDNode.

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

13 years agoClean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's...
Eli Friedman [Wed, 20 Jul 2011 21:57:23 +0000 (21:57 +0000)]
Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's used and not included where it isn't.

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

13 years agoWhile emitting constant value, look through derived type and use underlying basic...
Devang Patel [Wed, 20 Jul 2011 21:57:04 +0000 (21:57 +0000)]
While emitting constant value, look through derived type and use underlying basic type to determine size and signness of the constant value.

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

13 years agoARM PKH shift ammount operand printing tweaks.
Jim Grosbach [Wed, 20 Jul 2011 21:40:26 +0000 (21:40 +0000)]
ARM PKH shift ammount operand printing tweaks.

Move the shift operator and special value (32 encoded as 0 for PKHTB) handling
into the instruction printer. This cleans up a bit of the disassembler
special casing for these instructions, more easily handles not printing the
operand at all for "lsl #0" and prepares for correct asm parsing of these
operands.

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

13 years agoBring LICM into compliance with the new "Memory Model for Concurrent Operations"...
Eli Friedman [Wed, 20 Jul 2011 21:37:47 +0000 (21:37 +0000)]
Bring LICM into compliance with the new "Memory Model for Concurrent Operations" in LangRef.

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

13 years agoCommit LangRef changes for LLVM concurrency model. Start of supporting C++0x memory...
Eli Friedman [Wed, 20 Jul 2011 21:35:53 +0000 (21:35 +0000)]
Commit LangRef changes for LLVM concurrency model.  Start of supporting C++0x memory model and atomics.  See thread on llvmdev titled "Reviving the new LLVM concurrency model".

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

13 years agoUnbreak the MSVC build. Since the "next" function already exists in the MSVC headers...
Francois Pichet [Wed, 20 Jul 2011 21:35:29 +0000 (21:35 +0000)]
Unbreak the MSVC build. Since the "next" function already exists in the MSVC headers, we need the explicit llvm:: qualifier to prevent a conflict.

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

13 years agoTidy up a bit.
Jim Grosbach [Wed, 20 Jul 2011 20:49:03 +0000 (20:49 +0000)]
Tidy up a bit.

Move common definitions for ARM and Thumb2 into ARMInstrFormats.td and rename
them to be a bit more descriptive that they're for the PKH instructions.

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

13 years agoARM: Tidy up representation of PKH instruction.
Jim Grosbach [Wed, 20 Jul 2011 20:32:09 +0000 (20:32 +0000)]
ARM: Tidy up representation of PKH instruction.

The shift type is implied by the instruction (PKHBT vs. PKHTB) and so shouldn't
be also encoded as part of the shift value immediate. Otherwise we're able to
represent invalid instructions, plus it needlessly complicates the
representation. Preparatory work for asm parsing of these instructions.

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

13 years agoFix cmake again :)
Benjamin Kramer [Wed, 20 Jul 2011 20:00:06 +0000 (20:00 +0000)]
Fix cmake again :)

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

13 years agoGoodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.
Evan Cheng [Wed, 20 Jul 2011 19:50:42 +0000 (19:50 +0000)]
Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.

There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.

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

13 years agoFix cmake.
Benjamin Kramer [Wed, 20 Jul 2011 19:43:38 +0000 (19:43 +0000)]
Fix cmake.

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

13 years agoSketch out an CFG reconstruction mode for llvm-objdump.
Benjamin Kramer [Wed, 20 Jul 2011 19:37:35 +0000 (19:37 +0000)]
Sketch out an CFG reconstruction mode for llvm-objdump.

- Not great yet, but it's a start.
- Requires an object file with a symbol table. (I really want to fix this, but it'll need a whole new algorithm)
- ELF and COFF won't work at the moment due to libObject shortcomings.

To try it out run
$ llvm-objdump -d --cfg foo.o

This will create a graphviz file for every symbol in the object file's text section containing a CFG.

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

13 years agoExtend the hack for _GLOBAL_OFFSET_TABLE_ slightly; PR10389.
Eli Friedman [Wed, 20 Jul 2011 19:36:11 +0000 (19:36 +0000)]
Extend the hack for _GLOBAL_OFFSET_TABLE_ slightly; PR10389.

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

13 years agoAdd parsing/encoding tests for ARM ORR instruction.
Jim Grosbach [Wed, 20 Jul 2011 18:48:53 +0000 (18:48 +0000)]
Add parsing/encoding tests for ARM ORR instruction.

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

13 years agoConsolidate ARM NOP encoding test.
Jim Grosbach [Wed, 20 Jul 2011 18:39:38 +0000 (18:39 +0000)]
Consolidate ARM NOP encoding test.

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

13 years agoARM parsing and encoding tests for MVN
Jim Grosbach [Wed, 20 Jul 2011 18:37:08 +0000 (18:37 +0000)]
ARM parsing and encoding tests for MVN

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

13 years agoARM assembly parsing of MUL instruction.
Jim Grosbach [Wed, 20 Jul 2011 18:20:31 +0000 (18:20 +0000)]
ARM assembly parsing of MUL instruction.

Correctly handle 's' bit and predication suffices. Add parsing and encoding
tests.

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

13 years agoPR10421: Fix a straightforward bug in the widening logic for CONCAT_VECTORS.
Eli Friedman [Wed, 20 Jul 2011 18:14:33 +0000 (18:14 +0000)]
PR10421: Fix a straightforward bug in the widening logic for CONCAT_VECTORS.

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

13 years agoInitialize the EHFrameSection pointer to zero.
Benjamin Kramer [Wed, 20 Jul 2011 18:13:23 +0000 (18:13 +0000)]
Initialize the EHFrameSection pointer to zero.

This should fix the spurious buildbot errors.

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

13 years agoRegenerate configure and friends for Chad.
Eric Christopher [Wed, 20 Jul 2011 17:04:49 +0000 (17:04 +0000)]
Regenerate configure and friends for Chad.

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

13 years agoFix a GCC warning.
Jay Foad [Wed, 20 Jul 2011 08:15:21 +0000 (08:15 +0000)]
Fix a GCC warning.

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

13 years ago- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
Evan Cheng [Wed, 20 Jul 2011 07:51:56 +0000 (07:51 +0000)]
- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
- Introduce JITDefault code model. This tells targets to set different default
  code model for JIT. This eliminates the ugly hack in TargetMachine where
  code model is changed after construction.

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

13 years agoInclude MCRegisterInfo to eliminate a compilation warning.
Evan Cheng [Wed, 20 Jul 2011 06:54:19 +0000 (06:54 +0000)]
Include MCRegisterInfo to eliminate a compilation warning.

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

13 years agoFix the CMake build.
Francois Pichet [Wed, 20 Jul 2011 06:35:24 +0000 (06:35 +0000)]
Fix the CMake build.

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

13 years agoAdd MCObjectFileInfo and sink the MCSections initialization code from
Evan Cheng [Wed, 20 Jul 2011 05:58:47 +0000 (05:58 +0000)]
Add MCObjectFileInfo and sink the MCSections initialization code from
TargetLoweringObjectFileImpl down to MCObjectFileInfo.

TargetAsmInfo is done to one last method. It's *almost* gone!

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

13 years agoindvars: Added getInsertPointForUses to find a valid place to truncate the IV.
Andrew Trick [Wed, 20 Jul 2011 05:32:06 +0000 (05:32 +0000)]
indvars: Added getInsertPointForUses to find a valid place to truncate the IV.

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

13 years agoindvars -disable-iv-rewrite: Add NarrowIVDefUse to cache def-use
Andrew Trick [Wed, 20 Jul 2011 04:39:24 +0000 (04:39 +0000)]
indvars -disable-iv-rewrite: Add NarrowIVDefUse to cache def-use
info. Holding Use* pointers is bad form even though it happened to
work in this case.

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

13 years agoX86Subtarget.h: Assume "x86_64-cygwin", though it has not been released yet, to appea...
NAKAMURA Takumi [Wed, 20 Jul 2011 04:02:20 +0000 (04:02 +0000)]
X86Subtarget.h: Assume "x86_64-cygwin", though it has not been released yet, to appease test/CodeGen/X86 on cygwin.

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

13 years agoNew pointer rotate test.
Eric Christopher [Wed, 20 Jul 2011 03:09:11 +0000 (03:09 +0000)]
New pointer rotate test.

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

13 years agoExtra semi-colon.
Eric Christopher [Wed, 20 Jul 2011 02:44:39 +0000 (02:44 +0000)]
Extra semi-colon.

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

13 years agoindvars test case for r135558.
Andrew Trick [Wed, 20 Jul 2011 02:14:37 +0000 (02:14 +0000)]
indvars test case for r135558.

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

13 years agoindvars -disable-iv-rewrite fix: derived GEP IVs
Andrew Trick [Wed, 20 Jul 2011 02:08:58 +0000 (02:08 +0000)]
indvars -disable-iv-rewrite fix: derived GEP IVs

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

13 years agoDon't leak CodeGenInfos.
Benjamin Kramer [Wed, 20 Jul 2011 01:27:58 +0000 (01:27 +0000)]
Don't leak CodeGenInfos.

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

13 years agoChange name of class.
Akira Hatanaka [Wed, 20 Jul 2011 00:53:09 +0000 (00:53 +0000)]
Change name of class.

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

13 years agoDefine classes for definitions of atomic instructions.
Akira Hatanaka [Wed, 20 Jul 2011 00:23:01 +0000 (00:23 +0000)]
Define classes for definitions of atomic instructions.

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

13 years agoBuild and install the archive when building the Apple way.
Bill Wendling [Tue, 19 Jul 2011 23:33:42 +0000 (23:33 +0000)]
Build and install the archive when building the Apple way.

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

13 years agoLower memory barriers to sync instructions.
Akira Hatanaka [Tue, 19 Jul 2011 23:30:50 +0000 (23:30 +0000)]
Lower memory barriers to sync instructions.

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

13 years agoFix an obvious typo that's preventing x86 (32-bit) from using .literal16.
Evan Cheng [Tue, 19 Jul 2011 23:14:32 +0000 (23:14 +0000)]
Fix an obvious typo that's preventing x86 (32-bit) from using .literal16.

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

13 years agoPR10386: Don't try to split an edge from an indirectbr.
Eli Friedman [Tue, 19 Jul 2011 22:59:41 +0000 (22:59 +0000)]
PR10386: Don't try to split an edge from an indirectbr.

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

13 years agoFix off-by-one.
Benjamin Kramer [Tue, 19 Jul 2011 22:59:25 +0000 (22:59 +0000)]
Fix off-by-one.

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

13 years agoTweak ARM assembly parsing and printing of MSR instruction.
Jim Grosbach [Tue, 19 Jul 2011 22:45:10 +0000 (22:45 +0000)]
Tweak ARM assembly parsing and printing of MSR instruction.

The system register spec should be case insensitive. The preferred form for
output with mask values of 4, 8, and 12 references APSR rather than CPSR.
Update and tidy up tests accordingly.

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

13 years agoDistinguish between two copies of one inlined variable.
Devang Patel [Tue, 19 Jul 2011 22:31:15 +0000 (22:31 +0000)]
Distinguish between two copies of one inlined variable.

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

13 years agoARM assembly parsing of MRS instruction.
Jim Grosbach [Tue, 19 Jul 2011 21:59:29 +0000 (21:59 +0000)]
ARM assembly parsing of MRS instruction.

Teach the parser to recognize the APSR and SPSR system register names. Add
and update tests accordingly.

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

13 years agoEnhance the FixedLengthDecoder to be able to generate plausible-looking decoders...
Owen Anderson [Tue, 19 Jul 2011 21:06:00 +0000 (21:06 +0000)]
Enhance the FixedLengthDecoder to be able to generate plausible-looking decoders for ARM.

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

13 years agoChange variable name.
Akira Hatanaka [Tue, 19 Jul 2011 20:56:53 +0000 (20:56 +0000)]
Change variable name.

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

13 years agoARM assembly parsing for MRC/MRC2/MRRC/MRRC2.
Jim Grosbach [Tue, 19 Jul 2011 20:35:35 +0000 (20:35 +0000)]
ARM assembly parsing for MRC/MRC2/MRRC/MRRC2.

Add range checking to the immediate operands. Update tests accordingly.

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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