oota-llvm.git
13 years agoThe Neon VCVT (between floating-point and fixed-point, Advanced SIMD)
Chad Rosier [Fri, 24 Jun 2011 19:23:04 +0000 (19:23 +0000)]
The Neon VCVT (between floating-point and fixed-point, Advanced SIMD)
instructions can be used to match combinations of multiply/divide and VCVT
(between floating-point and integer, Advanced SIMD).  Basically the VCVT
immediate operand that specifies the number of fraction bits corresponds to a
floating-point multiply or divide by the corresponding power of 2.

For example, VCVT (floating-point to fixed-point, Advanced SIMD) can replace a
combination of VMUL and VCVT (floating-point to integer) as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vmul.f32        d16, d17, d16
  vcvt.s32.f32    d16, d16
becomes:
  vcvt.s32.f32    d16, d16, #3

Similarly, VCVT (fixed-point to floating-point, Advanced SIMD) can replace a
combinations of VCVT (integer to floating-point) and VDIV as follows:

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>):
  vcvt.f32.s32    d16, d16
  vdiv.f32        d16, d17, d16
becomes:
  vcvt.f32.s32    d16, d16, #3

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

13 years agoPTX: Add preliminary support for outputting debug information in the form of
Justin Holewinski [Fri, 24 Jun 2011 19:19:18 +0000 (19:19 +0000)]
PTX: Add preliminary support for outputting debug information in the form of
     .file and .loc directives.

Ideally, we would utilize the existing support in AsmPrinter for this, but
I cannot find a way to get .file and .loc directives to print without the
rest of the associated DWARF sections, which ptxas cannot handle.

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

13 years agoChange the chain input of nodes that load the address of a function. This change
Akira Hatanaka [Fri, 24 Jun 2011 19:01:25 +0000 (19:01 +0000)]
Change the chain input of nodes that load the address of a function. This change
 enables SelectionDAG::getLoad at MipsISelLowering.cpp:1914 to return a
pre-existing node instead of redundantly create a new node every time it is
called.

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

13 years agoFixup info for Thumb2 unconditional branch.
Jim Grosbach [Fri, 24 Jun 2011 18:48:32 +0000 (18:48 +0000)]
Fixup info for Thumb2 unconditional branch.

rdar://9667872

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

13 years agoPrevent generation of redundant addiu instructions that compute address of
Akira Hatanaka [Fri, 24 Jun 2011 17:55:19 +0000 (17:55 +0000)]
Prevent generation of redundant addiu instructions that compute address of
static variables or functions.

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

13 years agoPTX: Re-work target sm/compute selection and add some basic GPU
Justin Holewinski [Fri, 24 Jun 2011 16:27:49 +0000 (16:27 +0000)]
PTX: Re-work target sm/compute selection and add some basic GPU
     targets: g80, gt200, gf100(fermi)

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

13 years agoSimplify
Rafael Espindola [Fri, 24 Jun 2011 15:50:56 +0000 (15:50 +0000)]
Simplify

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

13 years agoNow that bb with phis are not considered simple, duplicate them even if
Rafael Espindola [Fri, 24 Jun 2011 15:47:41 +0000 (15:47 +0000)]
Now that bb with phis are not considered simple, duplicate them even if
we cannot duplicate to every predecessor.

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

13 years agoSimplify now that blocks with phis are not considered simple.
Rafael Espindola [Fri, 24 Jun 2011 14:04:13 +0000 (14:04 +0000)]
Simplify now that blocks with phis are not considered simple.

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

13 years agoFix CellSPU CMakeList.txt.
Rafael Espindola [Fri, 24 Jun 2011 13:58:45 +0000 (13:58 +0000)]
Fix CellSPU CMakeList.txt.

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

13 years agoMake the generated InitXXXMCRegisterInfo function "static inline", so it doesn't...
Benjamin Kramer [Fri, 24 Jun 2011 11:03:31 +0000 (11:03 +0000)]
Make the generated InitXXXMCRegisterInfo function "static inline", so it doesn't get emitted into multiple object files.

This caused linker errors when linking both libLLVMX86Desc and libLLVMX86CodeGen
into a single binary (for example when building a monolithic libLLVM shared library).

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

13 years agoFix CellSPU CMakeLists.txt
Evan Cheng [Fri, 24 Jun 2011 05:04:48 +0000 (05:04 +0000)]
Fix CellSPU CMakeLists.txt

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

13 years agoStarting to refactor Target to separate out code that's needed to fully describe
Evan Cheng [Fri, 24 Jun 2011 01:44:41 +0000 (01:44 +0000)]
Starting to refactor Target to separate out code that's needed to fully describe
target machine from those that are only needed by codegen. The goal is to
sink the essential target description into MC layer so we can start building
MC based tools without needing to link in the entire codegen.

First step is to refactor TargetRegisterInfo. This patch added a base class
MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to
separate register description from the rest of the stuff.

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

13 years agoCalculate backedge probability correctly.
Jakub Staszak [Thu, 23 Jun 2011 23:52:11 +0000 (23:52 +0000)]
Calculate backedge probability correctly.

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

13 years agoTidy up.
Jim Grosbach [Thu, 23 Jun 2011 22:29:00 +0000 (22:29 +0000)]
Tidy up.

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

13 years agoMissing files for the BlockFrequency analysis added.
Jakub Staszak [Thu, 23 Jun 2011 21:56:59 +0000 (21:56 +0000)]
Missing files for the BlockFrequency analysis added.

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

13 years agoIntroduce BlockFrequency analysis for BasicBlocks.
Jakub Staszak [Thu, 23 Jun 2011 21:45:20 +0000 (21:45 +0000)]
Introduce BlockFrequency analysis for BasicBlocks.

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

13 years agoAdd support for movntil/movntiq mnemonics. Reported on llvmdev.
Eli Friedman [Thu, 23 Jun 2011 21:07:47 +0000 (21:07 +0000)]
Add support for movntil/movntiq mnemonics.  Reported on llvmdev.

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

13 years agoPR10180: Fix a instcombine crash with FP vectors.
Eli Friedman [Thu, 23 Jun 2011 20:40:23 +0000 (20:40 +0000)]
PR10180: Fix a instcombine crash with FP vectors.

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

13 years agoFix build for (some versions of?) MinGW. Patch by Ruben Van Boxem.
Eli Friedman [Thu, 23 Jun 2011 18:24:27 +0000 (18:24 +0000)]
Fix build for (some versions of?) MinGW.  Patch by Ruben Van Boxem.

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

13 years agoRename TargetOptions::StackAlignment to StackAlignmentOverride.
Evan Cheng [Thu, 23 Jun 2011 18:15:47 +0000 (18:15 +0000)]
Rename TargetOptions::StackAlignment to StackAlignmentOverride.

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

13 years agoRemove TargetOptions.h dependency from ARMSubtarget.
Evan Cheng [Thu, 23 Jun 2011 18:15:17 +0000 (18:15 +0000)]
Remove TargetOptions.h dependency from ARMSubtarget.

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

13 years agoPTX: Always use registers for return values, but use .param space for device
Justin Holewinski [Thu, 23 Jun 2011 18:10:13 +0000 (18:10 +0000)]
PTX: Always use registers for return values, but use .param space for device
     parameters if SM >= 2.0

- Update test cases to be more robust against register allocation changes
- Bump up the number of registers to 128 per type
- Include Python script to re-generate register file with any number of
  registers

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

13 years agoPTX: Fixup test cases for device param changes
Justin Holewinski [Thu, 23 Jun 2011 18:10:08 +0000 (18:10 +0000)]
PTX: Fixup test cases for device param changes

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

13 years agoPTX: Whitespace fixes and remove commented out code
Justin Holewinski [Thu, 23 Jun 2011 18:10:07 +0000 (18:10 +0000)]
PTX: Whitespace fixes and remove commented out code

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

13 years agoPTX: Prevent DCE from eliminating st.param calls, and unify the handling of
Justin Holewinski [Thu, 23 Jun 2011 18:10:05 +0000 (18:10 +0000)]
PTX: Prevent DCE from eliminating st.param calls, and unify the handling of
     st.param and ld.param

FIXME: Test cases still need to be updated

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

13 years agoPTX: Use .param space for parameters in device functions for SM >= 2.0
Justin Holewinski [Thu, 23 Jun 2011 18:10:03 +0000 (18:10 +0000)]
PTX: Use .param space for parameters in device functions for SM >= 2.0

FIXME: DCE is eliminating the final st.param.x calls, figure out why

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

13 years agocmake+lit: final cleanup related to the recent churn
Andrew Trick [Thu, 23 Jun 2011 18:00:32 +0000 (18:00 +0000)]
cmake+lit: final cleanup related to the recent churn

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

13 years agoRemove TargetOptions.h dependency from X86Subtarget.
Evan Cheng [Thu, 23 Jun 2011 17:54:54 +0000 (17:54 +0000)]
Remove TargetOptions.h dependency from X86Subtarget.

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

13 years agocmake+lit: handle ENABLE_ASSERTIONS feature properly.
Andrew Trick [Thu, 23 Jun 2011 17:52:36 +0000 (17:52 +0000)]
cmake+lit: handle ENABLE_ASSERTIONS feature properly.

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

13 years agoRevert "revert 133714"
Rafael Espindola [Thu, 23 Jun 2011 14:19:39 +0000 (14:19 +0000)]
Revert "revert 133714"

This reverts commit e8e00f5efb4a22238f2407bf813de4606f30c5aa.

The cmake build on OS X is still broken.

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

13 years agoAdd missing file.
Rafael Espindola [Thu, 23 Jun 2011 14:02:13 +0000 (14:02 +0000)]
Add missing file.

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

13 years agorevert 133714
Dylan Noblesmith [Thu, 23 Jun 2011 13:56:01 +0000 (13:56 +0000)]
revert 133714

It broke the build worse.

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

13 years ago133713 broke the build, revert it.
Rafael Espindola [Thu, 23 Jun 2011 13:37:38 +0000 (13:37 +0000)]
133713 broke the build, revert it.

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

13 years agoSupport: make floating-exception header private
Dylan Noblesmith [Thu, 23 Jun 2011 12:45:54 +0000 (12:45 +0000)]
Support: make floating-exception header private

It has only one user. This eliminates the last include of
config.h from the public headers -- ideally, config.h
shouldn't even be installed by `make install` anymore.

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

13 years agoDon't include config.h in public headers
Dylan Noblesmith [Thu, 23 Jun 2011 12:34:31 +0000 (12:34 +0000)]
Don't include config.h in public headers

Replace it with llvm-config.h, which defines a subset of
config.h's macros "so that they can be in exported headers
and won't override package specific directives", e.g.,
PACKAGE_NAME.

Endian.h wasn't using any macros at all though, so just delete
the include there instead.

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

13 years agoremove CMake mode_t define
Dylan Noblesmith [Thu, 23 Jun 2011 12:21:33 +0000 (12:21 +0000)]
remove CMake mode_t define

It's now replaced with a simple ifdef _MSC_VER in the one
place it's needed (clang's FileManager.h header).

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

13 years agoCppBackend: fixup for api change
Dylan Noblesmith [Thu, 23 Jun 2011 12:11:37 +0000 (12:11 +0000)]
CppBackend: fixup for api change

This broke after r133364.

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

13 years agoReinstate r133513 (reverted in r133700) with an additional fix for a
Jay Foad [Thu, 23 Jun 2011 09:09:15 +0000 (09:09 +0000)]
Reinstate r133513 (reverted in r133700) with an additional fix for a
-Wshorten-64-to-32 warning in Instructions.h.

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

13 years agoUse a reference. Don't make a useless copy of the vector.
Bill Wendling [Thu, 23 Jun 2011 07:55:41 +0000 (07:55 +0000)]
Use a reference. Don't make a useless copy of the vector.

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

13 years agoFormatting changes. No functionality change.
Bill Wendling [Thu, 23 Jun 2011 07:44:54 +0000 (07:44 +0000)]
Formatting changes. No functionality change.

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

13 years agoRevert r133513:
Eric Christopher [Thu, 23 Jun 2011 06:24:52 +0000 (06:24 +0000)]
Revert r133513:

"Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512)."

Due to some additional warnings.

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

13 years agoUse the presence of the __compact_unwind section to indicate that a target
Bill Wendling [Thu, 23 Jun 2011 05:13:28 +0000 (05:13 +0000)]
Use the presence of the __compact_unwind section to indicate that a target
supports compact unwind info instead of having a separate flag indicating this.

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

13 years agoMove more logic to shouldTailDuplicate and only duplicate regular bb before
Rafael Espindola [Thu, 23 Jun 2011 03:41:29 +0000 (03:41 +0000)]
Move more logic to shouldTailDuplicate and only duplicate regular bb before
register allocation if it has a indirectbr or if we can duplicate it to
every predecessor.

This fixes the SingleSource/Benchmarks/Shootout-C++/matrix.cpp regression but
keeps the previous improvements to sunspider.

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

13 years agoGet rid of one getStackAlignment(). RegisterInfo shouldn't need to know about stack...
Evan Cheng [Thu, 23 Jun 2011 01:53:43 +0000 (01:53 +0000)]
Get rid of one getStackAlignment(). RegisterInfo shouldn't need to know about stack alignment.

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

13 years agoSome skeleton code to emit the compact unwind. If the information is unable to
Bill Wendling [Thu, 23 Jun 2011 01:06:23 +0000 (01:06 +0000)]
Some skeleton code to emit the compact unwind. If the information is unable to
be emitted in a compact way, we then default to emitting a CIE and FDE.

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

13 years agoAllow the AsmInfo to query for the compact unwind section.
Bill Wendling [Thu, 23 Jun 2011 00:23:04 +0000 (00:23 +0000)]
Allow the AsmInfo to query for the compact unwind section.

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

13 years agoAllow the AsmInfo to query the TLOF to see if it supports compact unwind.
Bill Wendling [Thu, 23 Jun 2011 00:12:58 +0000 (00:12 +0000)]
Allow the AsmInfo to query the TLOF to see if it supports compact unwind.

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

13 years ago80-column violations.
Bill Wendling [Thu, 23 Jun 2011 00:09:43 +0000 (00:09 +0000)]
80-column violations.

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

13 years agolit support for REQUIRES: asserts.
Andrew Trick [Wed, 22 Jun 2011 23:23:19 +0000 (23:23 +0000)]
lit support for REQUIRES: asserts.

Take #2. Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.

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

13 years agoAdd a flag that indicates whether a target supports compact unwind info or not.
Bill Wendling [Wed, 22 Jun 2011 23:16:51 +0000 (23:16 +0000)]
Add a flag that indicates whether a target supports compact unwind info or not.

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

13 years agoReenable tail duplication of bb with just an unconditional jump, but
Rafael Espindola [Wed, 22 Jun 2011 22:31:57 +0000 (22:31 +0000)]
Reenable tail duplication of bb with just an unconditional jump, but
don't remove blocks that have their address taken.

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

13 years agoAdd a __LD,__compact_unwind section.
Bill Wendling [Wed, 22 Jun 2011 22:22:24 +0000 (22:22 +0000)]
Add a __LD,__compact_unwind section.

If the linker supports it, this will hold the CIE and FDE information in a
compact format. The implementation of the compact unwinding emission is coming
soon.

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

13 years agoFix the implementation of ConstantRange::sub(ConstantRange). Patch by Xi Wang!
Nick Lewycky [Wed, 22 Jun 2011 21:13:46 +0000 (21:13 +0000)]
Fix the implementation of ConstantRange::sub(ConstantRange). Patch by Xi Wang!

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

13 years agoRevert r133607. This is causing failures in the Clang gccTestSuite.
Chad Rosier [Wed, 22 Jun 2011 21:13:23 +0000 (21:13 +0000)]
Revert r133607.  This is causing failures in the Clang gccTestSuite.
Specifically, gcc.c-torture/compile/pr21356.c.

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

13 years agoMove class methods out-of-line. This reduces the indentation, and is more in
Bill Wendling [Wed, 22 Jun 2011 21:07:27 +0000 (21:07 +0000)]
Move class methods out-of-line. This reduces the indentation, and is more in
line with LLVM's general coding style.
No functionality change.

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

13 years agoNew binops need debug loc.
Devang Patel [Wed, 22 Jun 2011 20:56:56 +0000 (20:56 +0000)]
New binops need debug loc.

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

13 years agotest/Unit: Fix enable shared test to follow check that we have actually loaded
Daniel Dunbar [Wed, 22 Jun 2011 20:41:53 +0000 (20:41 +0000)]
test/Unit: Fix enable shared test to follow check that we have actually loaded
the site config.

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

13 years agoAdd missing header.
Jim Grosbach [Wed, 22 Jun 2011 20:40:30 +0000 (20:40 +0000)]
Add missing header.

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

13 years agoMove ARMMachObjectWriter to its own file.
Jim Grosbach [Wed, 22 Jun 2011 20:14:52 +0000 (20:14 +0000)]
Move ARMMachObjectWriter to its own file.

Just tidy up a bit. No functional change.

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

13 years agoSet debug loc.
Devang Patel [Wed, 22 Jun 2011 19:52:36 +0000 (19:52 +0000)]
Set debug loc.

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

13 years agoNeeds a triple.
Nick Lewycky [Wed, 22 Jun 2011 19:42:14 +0000 (19:42 +0000)]
Needs a triple.

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

13 years agoEmit trailing padding on constant vectors when TargetData says that the vector
Nick Lewycky [Wed, 22 Jun 2011 18:55:03 +0000 (18:55 +0000)]
Emit trailing padding on constant vectors when TargetData says that the vector
is larger than the sum of the elements (including per-element padding).

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

13 years agoPTX: Fix FrameIndex mapping bug
Justin Holewinski [Wed, 22 Jun 2011 16:07:03 +0000 (16:07 +0000)]
PTX: Fix FrameIndex mapping bug

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

13 years agoReplace the existing forms of ConstantArray::get() with a single form
Jay Foad [Wed, 22 Jun 2011 09:24:39 +0000 (09:24 +0000)]
Replace the existing forms of ConstantArray::get() with a single form
that takes an ArrayRef.

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

13 years agoMake ConstantVector::get() always take an ArrayRef, never a std::vector.
Jay Foad [Wed, 22 Jun 2011 09:10:19 +0000 (09:10 +0000)]
Make ConstantVector::get() always take an ArrayRef, never a std::vector.

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

13 years agoTest Commit.
Dan Bailey [Wed, 22 Jun 2011 09:04:30 +0000 (09:04 +0000)]
Test Commit.

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

13 years agoEliminate a temporary std::vector in ConstantStruct::get().
Jay Foad [Wed, 22 Jun 2011 08:55:11 +0000 (08:55 +0000)]
Eliminate a temporary std::vector in ConstantStruct::get().

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

13 years agoExtend ConstantUniqueMap with a new template parameter ValRefType,
Jay Foad [Wed, 22 Jun 2011 08:50:06 +0000 (08:50 +0000)]
Extend ConstantUniqueMap with a new template parameter ValRefType,
representing a constant reference to ValType. Normally this is just
"const ValType &", but when ValType is a std::vector we want to use
ArrayRef as the reference type.

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

13 years agoOnly do config-time substitution of LLVM_BUILD_MODE in
Andrew Trick [Wed, 22 Jun 2011 05:43:36 +0000 (05:43 +0000)]
Only do config-time substitution of LLVM_BUILD_MODE in
test/lit.site.cfg, not Unit/test/lit.site.cfg.

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

13 years agoReenable the optimization added in 133415, but change the definition of a "simple...
Rafael Espindola [Wed, 22 Jun 2011 04:01:58 +0000 (04:01 +0000)]
Reenable the optimization added in 133415, but change the definition of a "simple" bb to
be one with only one unconditional branch and no phis. Duplicating the phis in this case
is possible, but requeres liveness analysis or breaking edges.

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

13 years agoPTX: Add signed integer comparisons
Justin Holewinski [Wed, 22 Jun 2011 02:09:50 +0000 (02:09 +0000)]
PTX: Add signed integer comparisons

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

13 years agoPTX: Add .address_size directive if PTX version >= 2.3
Justin Holewinski [Wed, 22 Jun 2011 00:43:56 +0000 (00:43 +0000)]
PTX: Add .address_size directive if PTX version >= 2.3

Patch by Wei-Ren Chen

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

13 years agoTest case for r133560.
Devang Patel [Wed, 22 Jun 2011 00:03:42 +0000 (00:03 +0000)]
Test case for r133560.

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

13 years agoUnbreak the CMake build
Francois Pichet [Tue, 21 Jun 2011 23:19:23 +0000 (23:19 +0000)]
Unbreak the CMake build

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

13 years agoAfter register is spilled there should not be any DBG_VALUE referring the same register.
Devang Patel [Tue, 21 Jun 2011 23:02:36 +0000 (23:02 +0000)]
After register is spilled there should not be any DBG_VALUE referring the same register.

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

13 years agoConsolidate some TableGen diagnostic helper functions.
Jim Grosbach [Tue, 21 Jun 2011 22:55:50 +0000 (22:55 +0000)]
Consolidate some TableGen diagnostic helper functions.

TableGen had diagnostic printers sprinkled about in a few places. Pull them
together into a single location in Error.cpp.

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

13 years agoFix some trailing issues from my introduction of MVT::untyped and its use for REGISTE...
Owen Anderson [Tue, 21 Jun 2011 22:54:23 +0000 (22:54 +0000)]
Fix some trailing issues from my introduction of MVT::untyped and its use for REGISTER_SEQUENCE.

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

13 years agoAdd support for assembling "movq" when it's correct to do so, while continuing
Nick Lewycky [Tue, 21 Jun 2011 22:45:41 +0000 (22:45 +0000)]
Add support for assembling "movq" when it's correct to do so, while continuing
to emit "movd" across the board to continue supporting a Darwin assembler bug.
This is the reincarnation of r133452.

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

13 years agoAdd verbose EH table printing to SjLj exception tables.
Bill Wendling [Tue, 21 Jun 2011 22:40:24 +0000 (22:40 +0000)]
Add verbose EH table printing to SjLj exception tables.

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

13 years agoThere could be more than one DBG_VALUE instructions for variables where all of them...
Devang Patel [Tue, 21 Jun 2011 22:36:03 +0000 (22:36 +0000)]
There could be more than one DBG_VALUE instructions for variables where all of them have offset based on one register.

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

13 years agoImprove the comment printing for the EH table. This gives a much more detailed
Bill Wendling [Tue, 21 Jun 2011 22:30:20 +0000 (22:30 +0000)]
Improve the comment printing for the EH table. This gives a much more detailed
explanation of what the EH table describes.

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

13 years agoHandle the memory-ness of all U+ ARM constraints.
Eric Christopher [Tue, 21 Jun 2011 22:10:57 +0000 (22:10 +0000)]
Handle the memory-ness of all U+ ARM constraints.

Noticed on inspection.

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

13 years agoRemove r130409, as requested by Chris.
Devang Patel [Tue, 21 Jun 2011 19:46:09 +0000 (19:46 +0000)]
Remove r130409, as requested by Chris.

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

13 years agoReorg. No functionality change.
Evan Cheng [Tue, 21 Jun 2011 19:00:54 +0000 (19:00 +0000)]
Reorg. No functionality change.

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

13 years agoRevert r133452: "Emit movq for 64-bit register to XMM register moves..."
Bob Wilson [Tue, 21 Jun 2011 17:35:13 +0000 (17:35 +0000)]
Revert r133452: "Emit movq for 64-bit register to XMM register moves..."

This is breaking compiler-rt and llvm-gcc builds on MacOSX when not using
the integrated assembler.

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

13 years agoAdd support for sadd.with.overflow and uadd.with.overflow intrinsics to the CBackend...
Anna Zaks [Tue, 21 Jun 2011 17:18:15 +0000 (17:18 +0000)]
Add support for sadd.with.overflow and uadd.with.overflow intrinsics to the CBackend by emitting definitions for each intrinsic that occurs in the module.

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

13 years agoIVUsers no longer needs to record the phis.
Andrew Trick [Tue, 21 Jun 2011 15:43:52 +0000 (15:43 +0000)]
IVUsers no longer needs to record the phis.

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

13 years agoRemove deprecated forms of StringMap::GetOrCreateValue().
Jay Foad [Tue, 21 Jun 2011 15:37:05 +0000 (15:37 +0000)]
Remove deprecated forms of StringMap::GetOrCreateValue().

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

13 years agoRemove some unnecessary uses of c_str().
Jay Foad [Tue, 21 Jun 2011 15:36:24 +0000 (15:36 +0000)]
Remove some unnecessary uses of c_str().

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

13 years agoRemove unused variables.
Benjamin Kramer [Tue, 21 Jun 2011 14:58:30 +0000 (14:58 +0000)]
Remove unused variables.

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

13 years agoReinstate r133435 and r133449 (reverted in r133499) now that the clang
Jay Foad [Tue, 21 Jun 2011 10:33:19 +0000 (10:33 +0000)]
Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512).

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

13 years agoDon't use PN->replaceUsesOfWith() to change a PHINode's incoming blocks,
Jay Foad [Tue, 21 Jun 2011 10:02:43 +0000 (10:02 +0000)]
Don't use PN->replaceUsesOfWith() to change a PHINode's incoming blocks,
because it won't work after my phi operand changes, because the incoming
blocks will no longer be Uses.

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

13 years agoAdd a reduced test case for the buildbot failure (clang self-hosted
Jay Foad [Tue, 21 Jun 2011 08:33:49 +0000 (08:33 +0000)]
Add a reduced test case for the buildbot failure (clang self-hosted
build) caused by r133435.

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

13 years agouse the MapEntryTy typedef instead of writing it out long form,
Chris Lattner [Tue, 21 Jun 2011 06:22:33 +0000 (06:22 +0000)]
use the MapEntryTy typedef instead of writing it out long form,
add some fixme's about methods that should be removed.

Merged from type-system-rewrite.

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

13 years agoTeach dag combine to match halfword byteswap patterns.
Evan Cheng [Tue, 21 Jun 2011 06:01:08 +0000 (06:01 +0000)]
Teach dag combine to match halfword byteswap patterns.
1. (((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8)
   => (bswap x) >> 16
2. ((x&0xff)<<8)|((x&0xff00)>>8)|((x&0xff000000)>>8)|((x&0x00ff0000)<<8))
   => (rotl (bswap x) 16)

This allows us to eliminate most of the def : Pat patterns for ARM rev16
revsh instructions. It catches many more cases for ARM and x86.

rdar://9609108

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

13 years agoindvars -disable-iv-rewrite: Adds support for eliminating identity
Andrew Trick [Tue, 21 Jun 2011 03:22:38 +0000 (03:22 +0000)]
indvars -disable-iv-rewrite: Adds support for eliminating identity
ops.

This is a rewrite of the IV simplification algorithm used by
-disable-iv-rewrite. To avoid perturbing the default mode, I
temporarily split the driver and created SimplifyIVUsersNoRewrite. The
idea is to avoid doing opcode/pattern matching inside
IndVarSimplify. SCEV already does it. We want to optimize with the
full generality of SCEV, but optimize def-use chains top down on-demand rather
than rewriting the entire expression bottom-up. This was easy to do
for operations that SCEV can prove are identity function. So we're now
eliminating bitmasks and zero extends this way.

A result of this rewrite is that indvars -disable-iv-rewrite no longer
requires IVUsers.

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

13 years agoRevert r133435 and r133449 to appease buildbots.
Chad Rosier [Tue, 21 Jun 2011 02:09:03 +0000 (02:09 +0000)]
Revert r133435 and r133449 to appease buildbots.

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

13 years agoAdd A0 and A1 to the list of registers used for returning a value in order to
Akira Hatanaka [Tue, 21 Jun 2011 01:28:11 +0000 (01:28 +0000)]
Add A0 and A1 to the list of registers used for returning a value in order to
handle functions with return type Complex long long.

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

13 years agoCoding style fixes.
Akira Hatanaka [Tue, 21 Jun 2011 01:02:03 +0000 (01:02 +0000)]
Coding style fixes.

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