oota-llvm.git
10 years agogit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185187 91177308-0d34-0410...
Preston Briggs [Fri, 28 Jun 2013 18:44:48 +0000 (18:44 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185187 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
Lang Hames [Fri, 28 Jun 2013 18:36:42 +0000 (18:36 +0000)]
Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP.

Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to
ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash
during isel.

<rdar://problem/14074644>

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

10 years agoStylistic cleanups, no functional change.
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:33:19 +0000 (18:33 +0000)]
Stylistic cleanups, no functional change.

- Use static functions instead of anonymous namespace.
- Appease the Doxygen lobby.
- Use 0-based induction variable.

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

10 years agoAdd a division operator to BlockFrequency.
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:23:42 +0000 (18:23 +0000)]
Add a division operator to BlockFrequency.

Allow a BlockFrequency to be divided by a non-zero BranchProbability
with saturating arithmetic. This will be used to compute the frequency
of a loop header given the probability of leaving the loop.

Our long division algorithm already saturates on overflow, so that was a
freebie.

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

10 years agoRemove unused variables.
Eric Christopher [Fri, 28 Jun 2013 18:03:54 +0000 (18:03 +0000)]
Remove unused variables.

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

10 years ago[NVPTX] Select -1 instead of 1 when anyextend'ing i1 types
Justin Holewinski [Fri, 28 Jun 2013 17:58:15 +0000 (17:58 +0000)]
[NVPTX] Select -1 instead of 1 when anyextend'ing i1 types

This makes it more consistent with the ZeroOrNegativeOneBooleanContent flag

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

10 years ago[NVPTX] Add (1.0 / sqrt(x)) => rsqrt(x) generation when allowable by FP flags
Justin Holewinski [Fri, 28 Jun 2013 17:58:13 +0000 (17:58 +0000)]
[NVPTX] Add (1.0 / sqrt(x)) => rsqrt(x) generation when allowable by FP flags

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

10 years ago[NVPTX] Calling conventions fix
Justin Holewinski [Fri, 28 Jun 2013 17:58:10 +0000 (17:58 +0000)]
[NVPTX] Calling conventions fix

Fix ABI handling for function
returning bool -- use st.param.b32 to return the value
and use ld.param.b32 in caller to load the return value.

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

10 years ago[NVPTX] Add support for cttz/ctlz/ctpop
Justin Holewinski [Fri, 28 Jun 2013 17:58:07 +0000 (17:58 +0000)]
[NVPTX] Add support for cttz/ctlz/ctpop

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

10 years ago[NVPTX] Clean up comparison/select/convert patterns and factor out PTX instructions...
Justin Holewinski [Fri, 28 Jun 2013 17:58:04 +0000 (17:58 +0000)]
[NVPTX] Clean up comparison/select/convert patterns and factor out PTX instructions from their patterns

Test case is no breakage

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

10 years ago[NVPTX] Remove i8 register class. PTX support for i8 (.b8, .u8, .s8) is rather poor...
Justin Holewinski [Fri, 28 Jun 2013 17:57:59 +0000 (17:57 +0000)]
[NVPTX] Remove i8 register class.  PTX support for i8 (.b8, .u8, .s8) is rather poor and we're better off just ignoring it and letting LLVM expand all i8 ops out to i16.

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

10 years ago[NVPTX] Add support for vectorized function return values
Justin Holewinski [Fri, 28 Jun 2013 17:57:55 +0000 (17:57 +0000)]
[NVPTX] Add support for vectorized function return values

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

10 years ago[NVPTX] Clean up handling of formal arguments and enable generation of vector paramet...
Justin Holewinski [Fri, 28 Jun 2013 17:57:53 +0000 (17:57 +0000)]
[NVPTX] Clean up handling of formal arguments and enable generation of vector parameter loads

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

10 years ago[NVPTX] Add infrastructure for vector loads/stores of parameters
Justin Holewinski [Fri, 28 Jun 2013 17:57:51 +0000 (17:57 +0000)]
[NVPTX] Add infrastructure for vector loads/stores of parameters

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

10 years agoBug 13662: Enable GPRPair for all i64 operands of inline asm on ARM
Weiming Zhao [Fri, 28 Jun 2013 17:26:02 +0000 (17:26 +0000)]
Bug 13662: Enable GPRPair for all i64 operands of inline asm on ARM

This patch assigns paired GPRs  for inline asm with
64-bit data on ARM. It's enabled for both ARM and Thumb to support modifiers
like %H, %Q, %R.

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

10 years agoLoopVectorize: Pull dyn_cast into setDebugLocFromInst
Arnold Schwaighofer [Fri, 28 Jun 2013 17:14:48 +0000 (17:14 +0000)]
LoopVectorize: Pull dyn_cast into setDebugLocFromInst

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

10 years agoFix bugpoint execution/reference output file name
Hal Finkel [Fri, 28 Jun 2013 16:37:52 +0000 (16:37 +0000)]
Fix bugpoint execution/reference output file name

sys::fs::unique_file will now loop infinitely if provided with a file name
without '%' characters and the input file already exists. As a result, bugpoint
cannot use a fixed file name for the execution output (including the reference
output).

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

10 years agoLoopVectorize: Use static function instead of DebugLocSetter class
Arnold Schwaighofer [Fri, 28 Jun 2013 16:26:54 +0000 (16:26 +0000)]
LoopVectorize: Use static function instead of DebugLocSetter class

I used the class to safely reset the state of the builder's debug location.  I
think I have caught all places where we need to set the debug location to a new
one. Therefore, we can replace the class by a function that just sets the debug
location.

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

10 years agoR600: Add local memory support via LDS
Tom Stellard [Fri, 28 Jun 2013 15:47:08 +0000 (15:47 +0000)]
R600: Add local memory support via LDS

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185162 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add support for GROUP_BARRIER instruction
Tom Stellard [Fri, 28 Jun 2013 15:46:59 +0000 (15:46 +0000)]
R600: Add support for GROUP_BARRIER instruction

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185161 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add ALUInst bit to tablegen definitions v2
Tom Stellard [Fri, 28 Jun 2013 15:46:53 +0000 (15:46 +0000)]
R600: Add ALUInst bit to tablegen definitions v2

v2:
  - Remove functions left over from a previous rebase.

Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185160 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: ensure fixed-point conversions have sane types
Tim Northover [Fri, 28 Jun 2013 15:29:25 +0000 (15:29 +0000)]
ARM: ensure fixed-point conversions have sane types

We were generating intrinsics for NEON fixed-point conversions that didn't
exist (e.g. float -> i16). There are two cases to consider:
  + iN is smaller than float. In this case we can do the conversion but need an
    extend or truncate as well.
  + iN is larger than float. In this case using the NEON conversion would be
    incorrect so we don't perform any combining.

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

10 years agoARM: Fix pseudo-instructions for SRS (Store Return State).
Tilmann Scheller [Fri, 28 Jun 2013 15:09:46 +0000 (15:09 +0000)]
ARM: Fix pseudo-instructions for SRS (Store Return State).

The mapping between SRS pseudo-instructions and SRS native instructions was incorrect, the correct mapping is:

srsfa -> srsib
srsea -> srsia
srsfd -> srsdb
srsed -> srsda

This fixes <rdar://problem/14214734>.

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

10 years agollvm-symbolizer: don't leave dangling pointers after flushing LLVMSymbolizer. Add...
Alexey Samsonov [Fri, 28 Jun 2013 15:08:29 +0000 (15:08 +0000)]
llvm-symbolizer: don't leave dangling pointers after flushing LLVMSymbolizer. Add a destructor.

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

10 years agollvm-symbolizer: skip leading underscore in Mach-O symbol table entries
Alexey Samsonov [Fri, 28 Jun 2013 14:25:52 +0000 (14:25 +0000)]
llvm-symbolizer: skip leading underscore in Mach-O symbol table entries

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

10 years agollvm-symbolizer: make name demangling a public static method of LLVMSymbolizer
Alexey Samsonov [Fri, 28 Jun 2013 12:06:25 +0000 (12:06 +0000)]
llvm-symbolizer: make name demangling a public static method of LLVMSymbolizer

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

10 years agoImprove comment.
Rafael Espindola [Fri, 28 Jun 2013 10:55:41 +0000 (10:55 +0000)]
Improve comment.

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

10 years agoMake a switch in createBinary fully-covered. Add forgotten macho_dsym_companion case.
Alexey Samsonov [Fri, 28 Jun 2013 09:44:05 +0000 (09:44 +0000)]
Make a switch in createBinary fully-covered. Add forgotten macho_dsym_companion case.

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

10 years agollvm-symbolizer: add support for Mach-O universal binaries
Alexey Samsonov [Fri, 28 Jun 2013 08:15:40 +0000 (08:15 +0000)]
llvm-symbolizer: add support for Mach-O universal binaries

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

10 years agoSuppress GCC "control reaches end of non-void function" warning.
Patrik Hagglund [Fri, 28 Jun 2013 06:54:05 +0000 (06:54 +0000)]
Suppress GCC "control reaches end of non-void function" warning.

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

10 years agoDebug Info: clean up usage of Verify.
Manman Ren [Fri, 28 Jun 2013 05:43:10 +0000 (05:43 +0000)]
Debug Info: clean up usage of Verify.

No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.

Also update testing cases to make them conform to the format of DI classes.

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

10 years agoIntegrate Assembler: Support X86_64_DTPOFF64 relocations
David Blaikie [Fri, 28 Jun 2013 04:24:32 +0000 (04:24 +0000)]
Integrate Assembler: Support X86_64_DTPOFF64 relocations

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

10 years agoImprovements to unique_file and createUniqueDirectory.
Rafael Espindola [Fri, 28 Jun 2013 03:48:47 +0000 (03:48 +0000)]
Improvements to unique_file and createUniqueDirectory.

* Don't try to create parent directories in unique_file. It had two problem:
   * It violates the contract that it is atomic. If the directory creation
     success and the file creation fails, we would return an error but the
     file system was modified.
   * When creating a temporary file clang would have to first check if the
     parent directory existed or not to avoid creating one when it was not
     supposed to.

* More efficient implementations of createUniqueDirectory and the unique_file
  that produces only the file name. Now all 3 just call into a static
  function passing what they want (name, file or directory).

Clang also has to be updated, so tests might fail if a bot picks up this commit
and not the corresponding clang one.

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

10 years agoConvert tests to FileCheck
Matt Arsenault [Fri, 28 Jun 2013 01:29:35 +0000 (01:29 +0000)]
Convert tests to FileCheck

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

10 years agoDon't ask for a mode when we are not keeping the file.
Rafael Espindola [Fri, 28 Jun 2013 01:05:47 +0000 (01:05 +0000)]
Don't ask for a mode when we are not keeping the file.

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

10 years agoLoopVectorize: Preserve debug location info
Arnold Schwaighofer [Fri, 28 Jun 2013 00:38:54 +0000 (00:38 +0000)]
LoopVectorize: Preserve debug location info

radar://14169017

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

10 years agoFix using arg_end() - arg_begin() instead of arg_size()
Matt Arsenault [Fri, 28 Jun 2013 00:25:40 +0000 (00:25 +0000)]
Fix using arg_end() - arg_begin() instead of arg_size()

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

10 years agoFix typo
Matt Arsenault [Fri, 28 Jun 2013 00:25:36 +0000 (00:25 +0000)]
Fix typo

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

10 years agoRename DIBuilder::createNullPtrType to createUnspecifiedType and introduce
Peter Collingbourne [Thu, 27 Jun 2013 22:50:59 +0000 (22:50 +0000)]
Rename DIBuilder::createNullPtrType to createUnspecifiedType and introduce
a zero-argument createNullPtrType function for creating the canonical
nullptr type.

Differential Revision: http://llvm-reviews.chandlerc.com/D1050

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

10 years agoAt the request of Richard Smith, swapped the order of cold/builtin so it is in alphab...
Michael Gottesman [Thu, 27 Jun 2013 22:48:08 +0000 (22:48 +0000)]
At the request of Richard Smith, swapped the order of cold/builtin so it is in alphabetical order.

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

10 years agoRevert "Revert "[APFloat] Removed APFloat constructor which initialized to either...
Michael Gottesman [Thu, 27 Jun 2013 21:58:19 +0000 (21:58 +0000)]
Revert "Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.""

This reverts commit r185099.

Looks like both the ppc-64 and mips bots are still failing after I reverted this
change.

Since:

1. The mips bot always performs a clean build,
2. The ppc64-bot failed again after a clean build (I asked the ppc-64
maintainers to clean the bot which they did... Thanks Will!),

I think it is safe to assume that this change was not the cause of the failures
that said builders were seeing. Thus I am recomitting.

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

10 years agoRevert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN...
Michael Gottesman [Thu, 27 Jun 2013 20:40:11 +0000 (20:40 +0000)]
Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float."

This reverts commit r185095. This is causing a FileCheck failure on
the 3dnow intrinsics on at least the mips/ppc bots but not on the x86
bots.

Reverting while I figure out what is going on.

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

10 years agoLoopVectorize: Cache edge masks created during if-conversion
Arnold Schwaighofer [Thu, 27 Jun 2013 20:31:06 +0000 (20:31 +0000)]
LoopVectorize: Cache edge masks created during if-conversion

Otherwise, we end up with an exponential IR blowup.
Fixes PR16472.

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

10 years agoRemove unnecessary conditional checks.
Chad Rosier [Thu, 27 Jun 2013 20:19:13 +0000 (20:19 +0000)]
Remove unnecessary conditional checks.

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

10 years ago[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowe...
Michael Gottesman [Thu, 27 Jun 2013 19:50:52 +0000 (19:50 +0000)]
[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.

The category which an APFloat belongs to should be dependent on the
actual value that the APFloat has, not be arbitrarily passed in by the
user. This will prevent inconsistency bugs where the category and the
actual value in APFloat differ.

I also fixed up all of the references to this constructor (which were
only in LLVM).

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

10 years agoImprove the compression of the tablegen DiffLists by introducing a new sort
Chad Rosier [Thu, 27 Jun 2013 19:38:13 +0000 (19:38 +0000)]
Improve the compression of the tablegen DiffLists by introducing a new sort
algorithm when assigning EnumValues to the synthesized registers.

The current algorithm, LessRecord, uses the StringRef compare_numeric
function.  This function compares strings, while handling embedded numbers.
For example, the R600 backend registers are sorted as follows:

  T1
  T1_W
  T1_X
  T1_XYZW
  T1_Y
  T1_Z
  T2
  T2_W
  T2_X
  T2_XYZW
  T2_Y
  T2_Z

In this example, the 'scaling factor' is dEnum/dN = 6 because T0, T1, T2
have an EnumValue offset of 6 from one another.  However, in other parts
of the register bank, the scaling factors are different:

dEnum/dN = 5:
  KC0_128_W
  KC0_128_X
  KC0_128_XYZW
  KC0_128_Y
  KC0_128_Z
  KC0_129_W
  KC0_129_X
  KC0_129_XYZW
  KC0_129_Y
  KC0_129_Z

The diff lists do not work correctly because different kinds of registers have
different 'scaling factors'.  This new algorithm, LessRecordRegister, tries to
enforce a scaling factor of 1.  For example, the registers are now sorted as
follows:

  T1
  T2
  T3
  ...
  T0_W
  T1_W
  T2_W
  ...
  T0_X
  T1_X
  T2_X
  ...
  KC0_128_W
  KC0_129_W
  KC0_130_W
  ...

For the Mips and R600 I see a 19% and 6% reduction in size, respectively.  I
did see a few small regressions, but the differences were on the order of a
few bytes (e.g., AArch64 was 16 bytes).  I suspect there will be even
greater wins for targets with larger register files.

Patch reviewed by Jakob.
rdar://14006013

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

10 years ago[Support/Registry.h] Include llvm/Support/Compiler.h.
Argyrios Kyrtzidis [Thu, 27 Jun 2013 17:57:40 +0000 (17:57 +0000)]
[Support/Registry.h] Include llvm/Support/Compiler.h.

Because Registry.h is using the LLVM_DELETED_FUNCTION macro.

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

10 years agoGet rid of the unused class member.
Nadav Rotem [Thu, 27 Jun 2013 17:54:10 +0000 (17:54 +0000)]
Get rid of the unused class member.

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

10 years agoCostModel: improve the cost model for load/store of non power-of-two types such as...
Nadav Rotem [Thu, 27 Jun 2013 17:52:04 +0000 (17:52 +0000)]
CostModel: improve the cost model for load/store of non power-of-two types such as <3 x float>, which are popular in graphics.

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

10 years agoR600: Remove alu-split.ll test
Tom Stellard [Thu, 27 Jun 2013 17:00:38 +0000 (17:00 +0000)]
R600: Remove alu-split.ll test

The purpose of this test was to check boundary conditions for the size
of an ALU clause.  This test is very sensitive to changes to the
optimizer or scheduler, because it requires an exact number of ALU
instructions in order to remain valid.  It's not good to have a test
this sensitive, because it is confusing to developers who implement
optimizations and then 'break' the test.

I'm not sure if there is a good way to test these limits using lit, but
if I can come up with replacement test that isn't as sensitive I'll add
it back to the tree.

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

10 years agoLoopVectorize: Use vectorized loop invariant gep index anchored in loop
Arnold Schwaighofer [Thu, 27 Jun 2013 15:11:55 +0000 (15:11 +0000)]
LoopVectorize: Use vectorized loop invariant gep index anchored in loop

Use vectorized instruction instead of original instruction anchored in the
original loop.

Fixes PR16452 and t2075.c of PR16455.

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

10 years agoUse MCFillFragment for zero-initialized data.
Serge Pavlov [Thu, 27 Jun 2013 14:35:03 +0000 (14:35 +0000)]
Use MCFillFragment for zero-initialized data.
It fixes PR16338 (ICE when compiling very large two-dimensional array).

Differential Revision: http://llvm-reviews.chandlerc.com/D1043

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

10 years agoAdd a Subtarget feature 'v8fp' to the ARM backend.
Joey Gouly [Thu, 27 Jun 2013 11:49:26 +0000 (11:49 +0000)]
Add a Subtarget feature 'v8fp' to the ARM backend.

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

10 years agoRemove unused variable.
Benjamin Kramer [Thu, 27 Jun 2013 11:26:41 +0000 (11:26 +0000)]
Remove unused variable.

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

10 years agoDon't cast away constness.
Benjamin Kramer [Thu, 27 Jun 2013 11:07:42 +0000 (11:07 +0000)]
Don't cast away constness.

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

10 years ago[SystemZ] Fix some embarrassing test typos
Richard Sandiford [Thu, 27 Jun 2013 09:49:34 +0000 (09:49 +0000)]
[SystemZ] Fix some embarrassing test typos

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

10 years ago[SystemZ] Allow LA and LARL to be rematerialized
Richard Sandiford [Thu, 27 Jun 2013 09:42:10 +0000 (09:42 +0000)]
[SystemZ] Allow LA and LARL to be rematerialized

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

10 years ago[SystemZ] Allow immediate moves to be rematerialized
Richard Sandiford [Thu, 27 Jun 2013 09:38:48 +0000 (09:38 +0000)]
[SystemZ] Allow immediate moves to be rematerialized

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

10 years ago[SystemZ] Add conditional store patterns
Richard Sandiford [Thu, 27 Jun 2013 09:27:40 +0000 (09:27 +0000)]
[SystemZ] Add conditional store patterns

Add pseudo conditional store instructions, so that we use:

    branch foo:
    store
foo:

instead of:

    load
    branch foo:
    move
foo:
    store

z196 has real 32-bit and 64-bit conditional stores, but we don't use
any z196 instructions yet.

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

10 years agoAdd more owners to CODE_OWNERS.TXT (Kostya Serebryany: AddressSanitizer and ThreadSan...
Kostya Serebryany [Thu, 27 Jun 2013 08:47:12 +0000 (08:47 +0000)]
Add more owners to CODE_OWNERS.TXT (Kostya Serebryany: AddressSanitizer and ThreadSanitizer; Evgeniy Stepanov: MemorySanitizer)

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

10 years agoUpdate testing case to make DI nodes have the correct format.
Manman Ren [Thu, 27 Jun 2013 06:40:18 +0000 (06:40 +0000)]
Update testing case to make DI nodes have the correct format.

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

10 years agoAdd CXXFLAGS back to the Link command.
Bob Wilson [Thu, 27 Jun 2013 06:09:14 +0000 (06:09 +0000)]
Add CXXFLAGS back to the Link command.

This is essentially reverting one piece of 184793 to try to fix one of Apple's
buildbots.  I will check with Eric to see if this is OK or if we need to find
some other solution.

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

10 years agoAdd a convenience createUniqueDirectory function.
Rafael Espindola [Thu, 27 Jun 2013 03:45:31 +0000 (03:45 +0000)]
Add a convenience createUniqueDirectory function.

There are a few valid situation where we care about the structure inside a
directory, but not about the directory itself. A simple example is for unit
testing directory traversal.

PathV1 had a function like this, add one to V2 and port existing users of the
created temp file and delete it hack to using it.

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

10 years agoFix spelling.
Arnold Schwaighofer [Thu, 27 Jun 2013 01:01:11 +0000 (01:01 +0000)]
Fix spelling.

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

10 years agoLoopVectorize: Don't store a reversed value in the vectorized value map
Arnold Schwaighofer [Thu, 27 Jun 2013 00:45:41 +0000 (00:45 +0000)]
LoopVectorize: Don't store a reversed value in the vectorized value map

When we store values for reversed induction stores we must not store the
reversed value in the vectorized value map. Another instruction might use this
value.

This fixes 3 test cases of PR16455.

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

10 years ago[APFloat] Added unittest for APFloat.divide that checks special cases, result categor...
Michael Gottesman [Thu, 27 Jun 2013 00:42:00 +0000 (00:42 +0000)]
[APFloat] Added unittest for APFloat.divide that checks special cases, result categories, and result statuses.

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

10 years agoAdded support for the Builtin attribute.
Michael Gottesman [Thu, 27 Jun 2013 00:25:01 +0000 (00:25 +0000)]
Added support for the Builtin attribute.

The Builtin attribute is an attribute that can be placed on function call site that signal that even though a function is declared as being a builtin,

rdar://problem/13727199

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

10 years agoNo need to use a Set when a vector would do.
Nadav Rotem [Thu, 27 Jun 2013 00:14:13 +0000 (00:14 +0000)]
No need to use a Set when a vector would do.

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

10 years agoRemoved two logging printf statements from the APFloat tests... = /.
Michael Gottesman [Thu, 27 Jun 2013 00:00:45 +0000 (00:00 +0000)]
Removed two logging printf statements from the APFloat tests... = /.

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

10 years ago[APFloat] Added unittest for APFloat.multiply that checks special cases, result categ...
Michael Gottesman [Wed, 26 Jun 2013 23:55:26 +0000 (23:55 +0000)]
[APFloat] Added unittest for APFloat.multiply that checks special cases, result categories, and result status.

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

10 years ago[APFloat] Added unittest for APFloat.subtract that checks special cases, result categ...
Michael Gottesman [Wed, 26 Jun 2013 23:55:23 +0000 (23:55 +0000)]
[APFloat] Added unittest for APFloat.subtract that checks special cases, result categories, and result status.

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

10 years agoSLP: When searching for vectorization opportunities scan the blocks in post-order...
Nadav Rotem [Wed, 26 Jun 2013 23:44:45 +0000 (23:44 +0000)]
SLP: When searching for vectorization opportunities scan the blocks in post-order because we grow chains upwards.

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

10 years agoSLP: Dont erase instructions during vectorization because it prevents the outerloops...
Nadav Rotem [Wed, 26 Jun 2013 23:43:23 +0000 (23:43 +0000)]
SLP: Dont erase instructions during vectorization because it prevents the outerloops from iterating over the instructions.

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

10 years agoIn InstCombine{AddSub,MulDivRem} convert APFloat.isFiniteNonZero() && !APFloat.isDeno...
Michael Gottesman [Wed, 26 Jun 2013 23:17:31 +0000 (23:17 +0000)]
In InstCombine{AddSub,MulDivRem} convert APFloat.isFiniteNonZero() && !APFloat.isDenormal => APFloat.isNormal.

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

10 years ago[APFloat] Convert all references to fcNormal to references to isFiniteNonZero().
Michael Gottesman [Wed, 26 Jun 2013 23:17:28 +0000 (23:17 +0000)]
[APFloat] Convert all references to fcNormal to references to isFiniteNonZero().

Currently inside APFloat fcNormal still implies the old definition of Normal
(i.e. isFiniteNonZero) instead of the proper IEEE-754R definition that the
external method isNormal() uses.

This patch prepares for the internal switch inside APFloat by converting all
references that check if a category is fcNormal directly with an indirect call
via isFiniteNonZero().

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

10 years agoRevert "Debug Info: clean up usage of Verify." as it's breaking bots.
Eric Christopher [Wed, 26 Jun 2013 22:44:57 +0000 (22:44 +0000)]
Revert "Debug Info: clean up usage of Verify." as it's breaking bots.

This reverts commit r185020

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

10 years agoFix a crash bug in dumping options with groups
Reid Kleckner [Wed, 26 Jun 2013 22:43:37 +0000 (22:43 +0000)]
Fix a crash bug in dumping options with groups

Option groups don't have prefixes.  Option dumping is basically dead
code unless there is something wrong with the option table, so this
isn't an important crasher.

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

10 years agoClarify and doxygen-ify comments
Stephen Lin [Wed, 26 Jun 2013 22:27:50 +0000 (22:27 +0000)]
Clarify and doxygen-ify comments

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

10 years ago[Mips Disassembler] Have the DecodeCCRRegisterClass function use the getReg
Chad Rosier [Wed, 26 Jun 2013 22:23:32 +0000 (22:23 +0000)]
[Mips Disassembler] Have the DecodeCCRRegisterClass function use the getReg
function to lookup the proper tablegen'ed register enumeration.  Previously,
it was using the encoded value directly.

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

10 years agoARM: Proactively ensure that the LowerCallResult hack for 'this'-returns is not used...
Stephen Lin [Wed, 26 Jun 2013 21:42:14 +0000 (21:42 +0000)]
ARM: Proactively ensure that the LowerCallResult hack for 'this'-returns is not used for incompatible calling conventions.

(Currently, ARM 'this'-returns are handled in the standard calling convention case by treating R0 as preserved and doing some extra magic in LowerCallResult; this may not apply to calling conventions added in the future so this patch provides and documents an interface for indicating such)

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

10 years agoDebug Info: clean up usage of Verify.
Manman Ren [Wed, 26 Jun 2013 21:26:10 +0000 (21:26 +0000)]
Debug Info: clean up usage of Verify.

No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify.

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

10 years agoMinor formatting fix to ARMBaseRegisterInfo::getCalleeSavedRegs
Stephen Lin [Wed, 26 Jun 2013 20:19:06 +0000 (20:19 +0000)]
Minor formatting fix to ARMBaseRegisterInfo::getCalleeSavedRegs

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

10 years agoRename PathV2 to just Path now that it is the only one.
Rafael Espindola [Wed, 26 Jun 2013 19:33:03 +0000 (19:33 +0000)]
Rename PathV2 to just Path now that it is the only one.

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

10 years ago[mips] Do not emit ".option pic0" if target is mips64.
Akira Hatanaka [Wed, 26 Jun 2013 19:08:49 +0000 (19:08 +0000)]
[mips] Do not emit ".option pic0" if target is mips64.

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

10 years ago[mips] Improve code generation for constant multiplication using shifts, adds and
Akira Hatanaka [Wed, 26 Jun 2013 18:48:17 +0000 (18:48 +0000)]
[mips] Improve code generation for constant multiplication using shifts, adds and
subs.

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

10 years ago[APFloat] Removed debugging cruft that snuck in.
Michael Gottesman [Wed, 26 Jun 2013 17:59:36 +0000 (17:59 +0000)]
[APFloat] Removed debugging cruft that snuck in.

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

10 years agoThe SLP Vectorizer works across basic blocks. Update the docs.
Nadav Rotem [Wed, 26 Jun 2013 17:59:35 +0000 (17:59 +0000)]
The SLP Vectorizer works across basic blocks. Update the docs.

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

10 years agoUse enums instead of raw octal values.
Rafael Espindola [Wed, 26 Jun 2013 17:28:04 +0000 (17:28 +0000)]
Use enums instead of raw octal values.

Patch by 罗勇刚(Yonggang Luo).

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

10 years agoErase all of the instructions that we RAUWed
Nadav Rotem [Wed, 26 Jun 2013 17:16:09 +0000 (17:16 +0000)]
Erase all of the instructions that we RAUWed

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

10 years agoAdd a subtarget feature 'v8' to the ARM backend.
Joey Gouly [Wed, 26 Jun 2013 16:58:26 +0000 (16:58 +0000)]
Add a subtarget feature 'v8' to the ARM backend.
This allows for targeting the ARMv8 AArch32 variant.

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

10 years agoDo not add cse-ed instructions into the visited map because we dont want to consider...
Nadav Rotem [Wed, 26 Jun 2013 16:54:53 +0000 (16:54 +0000)]
Do not add cse-ed instructions into the visited map because we dont want to consider them as a candidate for replacement of instructions to be visited.

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

10 years agoARM: fix more cases where predication may or may not be allowed
Tim Northover [Wed, 26 Jun 2013 16:52:40 +0000 (16:52 +0000)]
ARM: fix more cases where predication may or may not be allowed

Unfortunately this addresses two issues (by the time I'd disentangled the logic
it wasn't worth putting it back to half-broken):

+ Coprocessor instructions should all be predicable in Thumb mode.
+ BKPT should never be predicable.

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

10 years agoARM: allow predicated barriers in Thumb mode
Tim Northover [Wed, 26 Jun 2013 16:52:32 +0000 (16:52 +0000)]
ARM: allow predicated barriers in Thumb mode

The barrier instructions are only "always-execute" in ARM mode, they can quite
happily sit inside an IT block in Thumb.

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

10 years agoRemove the 'generic' CPU from the ARM eabi attributes printer.
Joey Gouly [Wed, 26 Jun 2013 16:39:06 +0000 (16:39 +0000)]
Remove the 'generic' CPU from the ARM eabi attributes printer.
Make v4 the default ARM architecture attribute, to match CodeGen.

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

10 years agoPathV1 is deprecated since the 18th of Dec 2010. Remove it.
Rafael Espindola [Wed, 26 Jun 2013 16:24:35 +0000 (16:24 +0000)]
PathV1 is deprecated since the 18th of Dec 2010. Remove it.

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

10 years agoAdd a convenience functions that don't return if the directory existed.
Rafael Espindola [Wed, 26 Jun 2013 15:21:13 +0000 (15:21 +0000)]
Add a convenience functions that don't return if the directory existed.

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

10 years agoRemove unused includes.
Rafael Espindola [Wed, 26 Jun 2013 13:54:34 +0000 (13:54 +0000)]
Remove unused includes.

llvm itself is now PathV1 clean.

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

10 years ago[PowerPC] Accept 17-bit signed immediates for addis
Ulrich Weigand [Wed, 26 Jun 2013 13:49:53 +0000 (13:49 +0000)]
[PowerPC] Accept 17-bit signed immediates for addis

The assembler currently strictly verifies that immediates for
s16imm operands are in range (-32768 ... 32767).  This matches
the behaviour of the GNU assembler, with one exception: gas
allows, as a special case, operands in an extended range
(-65536 .. 65535) for the addis instruction only (and its
extended mnemonic lis).

The main reason for this seems to be to allow using unsigned
16-bit operands for lis, e.g. like lis %r1, 0xfedc.

Since this has been supported by gas for a long time, and
assembler source code seen "in the wild" actually exploits
this feature, this patch adds equivalent support to LLVM
for compatibility reasons.

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

10 years ago[PowerPC] Support symbolic u16imm operands
Ulrich Weigand [Wed, 26 Jun 2013 13:49:15 +0000 (13:49 +0000)]
[PowerPC] Support symbolic u16imm operands

Currently, all instructions taking s16imm operands support symbolic
operands.  However, for u16imm operands, we only support actual
immediate integers.  This causes the assembler to reject code like

  ori %r5, %r5, symbol@l

This patch changes the u16imm operand definition to likewise
accept symbolic operands.  In fact, s16imm and u16imm can
share the same encoding routine, now renamed to getImm16Encoding.

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

10 years agoARM: operands should be explicit when disassembled
Amaury de la Vieuville [Wed, 26 Jun 2013 13:39:07 +0000 (13:39 +0000)]
ARM: operands should be explicit when disassembled

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