oota-llvm.git
10 years agoDebug info: Further simplify the implementation of buildLocationList by
Adrian Prantl [Mon, 11 Aug 2014 21:05:57 +0000 (21:05 +0000)]
Debug info: Further simplify the implementation of buildLocationList by
getting rid of the redundant DIVariable in the OpenRanges pair.

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

10 years agoDebug Info: Move the sorting and uniqueing of pieces from emitLocPieces()
Adrian Prantl [Mon, 11 Aug 2014 21:05:55 +0000 (21:05 +0000)]
Debug Info: Move the sorting and uniqueing of pieces from emitLocPieces()
into buildLocationList(). By keeping the list of Values sorted,
DebugLocEntry::Merge can also merge multi-piece entries.

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

10 years agoDebug info: Refactor DebugLocEntry's Merge function to make
Adrian Prantl [Mon, 11 Aug 2014 20:59:28 +0000 (20:59 +0000)]
Debug info: Refactor DebugLocEntry's Merge function to make
buildLocationLists easier to read.

The previous implementation conflated the merging of individual pieces
and the merging of entire DebugLocEntries.

By splitting this functionality into two separate functions the intention
of the code should be clearer.

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

10 years agoARM: try harder to detect non-IT eligible instructions
Saleem Abdulrasool [Mon, 11 Aug 2014 20:13:25 +0000 (20:13 +0000)]
ARM: try harder to detect non-IT eligible instructions

For many Thumb-1 register register instructions, setting the CPSR is not
permitted inside an IT block.  We would not correctly flag those instructions.
The previous change to identify this scenario was insufficient as it did not
actually catch all the instances.  The current list is formed by manual
inspection of the ARMv6M ARM.

The change to the Thumb2 IT block test is due to the fact that the new more
stringent checking of the MIs results in the If Conversion pass being prevented
from executing (since not all the instructions in the BB are predicable).  This
results in code gen changes.

Thanks to Tim Northover for pointing out that the previous patch was
insufficient and hinting that the use of the v6M ARM would be much easier to use
than the v7 or v8!

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

10 years agoFix using -plugin-opt=apiflie when also using -plugin-opt=emit-llvm.
Rafael Espindola [Mon, 11 Aug 2014 19:06:54 +0000 (19:06 +0000)]
Fix using -plugin-opt=apiflie when also using -plugin-opt=emit-llvm.

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

10 years agoCorrect a missing RUN line in the ARM codegen test for fneg ops. We should also expli...
Sanjay Patel [Mon, 11 Aug 2014 19:04:28 +0000 (19:04 +0000)]
Correct a missing RUN line in the ARM codegen test for fneg ops. We should also explicitly specify +/-neonfp.

The bug was introduced at r99570 when use of "-arm-use-neon-fp" was removed.

Differential Revision: http://reviews.llvm.org/D4846

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

10 years agoAdd missing test for r215031
Reid Kleckner [Mon, 11 Aug 2014 18:34:54 +0000 (18:34 +0000)]
Add missing test for r215031

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

10 years agoMC: Diagnose an unexpected token in COFF .section instead of asserting
Reid Kleckner [Mon, 11 Aug 2014 18:34:43 +0000 (18:34 +0000)]
MC: Diagnose an unexpected token in COFF .section instead of asserting

This can easily arise when trying to assemble and ELF style .section
directive for a COFF object file.

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

10 years agoFix typos:
Sylvestre Ledru [Mon, 11 Aug 2014 18:04:46 +0000 (18:04 +0000)]
Fix typos:
* libaries => libraries
* avaiable => available

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

10 years agoFix use of uninitialized variable.
Rafael Espindola [Mon, 11 Aug 2014 17:07:34 +0000 (17:07 +0000)]
Fix use of uninitialized variable.

Fixes linking bitcode files that use the new style comdats for constructors
with ones that don't.

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

10 years agoUse an early return. NFC.
Rafael Espindola [Mon, 11 Aug 2014 16:55:42 +0000 (16:55 +0000)]
Use an early return. NFC.

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

10 years agoRevert r215359 - [mips] Implement .ent, .end, .frame, .mask and .fmask assembler...
Daniel Sanders [Mon, 11 Aug 2014 16:10:19 +0000 (16:10 +0000)]
Revert r215359 - [mips] Implement .ent, .end, .frame, .mask and .fmask assembler directives

It seems to cause an lld test (elf/Mips/hilo16-3.test) to fail. Reverted while we investigate.

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

10 years ago[mips] Implement .ent, .end, .frame, .mask and .fmask assembler directives
Daniel Sanders [Mon, 11 Aug 2014 15:28:56 +0000 (15:28 +0000)]
[mips] Implement .ent, .end, .frame, .mask and .fmask assembler directives

Patch by Matheus Almeida and Toma Tabacu

Differential Revision: http://reviews.llvm.org/D4179

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

10 years agoPeepholeOptimizer: make parameter ref to SmallPtrSetImpl
Hans Wennborg [Mon, 11 Aug 2014 13:52:46 +0000 (13:52 +0000)]
PeepholeOptimizer: make parameter ref to SmallPtrSetImpl

This makes the function type independent of the in-line size
of LocalMIs.

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

10 years agoMake this SmallVector size a power of two as suggested by Chandler
Hans Wennborg [Mon, 11 Aug 2014 13:47:57 +0000 (13:47 +0000)]
Make this SmallVector size a power of two as suggested by Chandler

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

10 years agoAArch64: add support for dynamic-loader relocations
Tim Northover [Mon, 11 Aug 2014 10:10:27 +0000 (10:10 +0000)]
AArch64: add support for dynamic-loader relocations

LLD needs them, and it's good to be able to print them properly when
our object dumpers encounter them.

Patch by Daniel Stewart.

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

10 years agoAVX-512: added a missing bitcast from v16f32 to v16i32
Elena Demikhovsky [Mon, 11 Aug 2014 09:59:08 +0000 (09:59 +0000)]
AVX-512: added a missing bitcast from v16f32 to v16i32

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

10 years agollvm-readobj: zero out timestamp in COFF auto-generated test files.
Tim Northover [Mon, 11 Aug 2014 09:53:07 +0000 (09:53 +0000)]
llvm-readobj: zero out timestamp in COFF auto-generated test files.

The timestamp meant these files changed with each invocation of
relocs.py, confusing matters when we add relocations and need to
update the tests.

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

10 years agollvm-objdump: fix remaining use of %x format specifier for 64-bit values
Tim Northover [Mon, 11 Aug 2014 09:14:06 +0000 (09:14 +0000)]
llvm-objdump: fix remaining use of %x format specifier for 64-bit values

Third time lucky. This should finally fix the ARM (& MIPS, I think) bots.

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

10 years agoARM: __gnu_h2f_ieee and __gnu_f2h_ieee always use the soft-float calling convention
Oliver Stannard [Mon, 11 Aug 2014 09:12:32 +0000 (09:12 +0000)]
ARM: __gnu_h2f_ieee and __gnu_f2h_ieee always use the soft-float calling convention

By default, LLVM uses the "C" calling convention for all runtime
library functions. The half-precision FP conversion functions use the
soft-float calling convention, and are needed for some targets which
use the hard-float convention by default, so must have their calling
convention explicitly set.

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

10 years agoIn Machine CSE pass, the source register of a COPY machine instruction can
Jiangning Liu [Mon, 11 Aug 2014 05:17:19 +0000 (05:17 +0000)]
In Machine CSE pass, the source register of a COPY machine instruction can
be propagated to all its users, and this propagation could increase the
probability of finding common subexpressions. If the COPY has only one user,
the COPY itself can be removed.

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

10 years agoIn LVI(Lazy Value Info), originally value on a BB can only be caculated once,
Jiangning Liu [Mon, 11 Aug 2014 05:02:04 +0000 (05:02 +0000)]
In LVI(Lazy Value Info), originally value on a BB can only be caculated once,
and the lattice will be updated to be a state other than "undefined". This
limiation could miss some opportunities of lowering "overdefined" to be an
even accurate value. So this patch ask the algorithm to try to lower the
lattice value again even if the value has been lowered to be "overdefined".

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

10 years agoRe-commit "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)
Hans Wennborg [Mon, 11 Aug 2014 02:50:43 +0000 (02:50 +0000)]
Re-commit "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)

This time, also update the function that receives a reference to the SmallPtrSet as
a parameter.

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

10 years agoRevert "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)
Hans Wennborg [Mon, 11 Aug 2014 02:34:52 +0000 (02:34 +0000)]
Revert "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)

That broke the build:

/data/buildslave/clang-amd64-freebsd/src-llvm/lib/CodeGen/PeepholeOptimizer.cpp:729:46: error: non-const lvalue reference to type 'SmallPtrSet<[...], 8>' cannot bind to a value of unrelated type 'SmallPtrSet<[...], 16>'
        Changed |= optimizeExtInstr(MI, MBB, LocalMIs);
                                             ^~~~~~~~
/data/buildslave/clang-amd64-freebsd/src-llvm/lib/CodeGen/PeepholeOptimizer.cpp:265:49: note: passing argument to parameter 'LocalMIs' here
                 SmallPtrSet<MachineInstr*, 8> &LocalMIs) {
                                                ^

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

10 years agoIncrease the size of this SmallVector in PeepholeOptimizer.
Hans Wennborg [Mon, 11 Aug 2014 02:21:34 +0000 (02:21 +0000)]
Increase the size of this SmallVector in PeepholeOptimizer.

During a Clang build, the median size of this was 9

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

10 years agoSubTargetFeature.cpp: it seems the size of this SmallVector should be 3
Hans Wennborg [Mon, 11 Aug 2014 02:21:32 +0000 (02:21 +0000)]
SubTargetFeature.cpp: it seems the size of this SmallVector should be 3

because some subtarget feature strings have three components.

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

10 years agoIncrease the size of SpillPlacement::BlockFrequencies.
Hans Wennborg [Mon, 11 Aug 2014 02:21:30 +0000 (02:21 +0000)]
Increase the size of SpillPlacement::BlockFrequencies.

This SmallVector's median size during a Clang build was 7.

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

10 years agoLegacyPassManagers.h: increase the size of PMDataManager::HigherLevelAnalysis.
Hans Wennborg [Mon, 11 Aug 2014 02:21:25 +0000 (02:21 +0000)]
LegacyPassManagers.h: increase the size of PMDataManager::HigherLevelAnalysis.

In a Clang bootstrap, the median and max size was 9.

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

10 years agoIncrease the size of these SmallVectors in X86ISelLowering.cpp.
Hans Wennborg [Mon, 11 Aug 2014 02:21:22 +0000 (02:21 +0000)]
Increase the size of these SmallVectors in X86ISelLowering.cpp.

In a Clang bootstrap, their sizes were always 12, 16 and 16, respectively.

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

10 years agoIncrease the size of this SmallVector in CloneNodeWithValues.
Hans Wennborg [Mon, 11 Aug 2014 02:21:19 +0000 (02:21 +0000)]
Increase the size of this SmallVector in CloneNodeWithValues.

In a Clang bootstrap, the size of this vector was always 6.

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

10 years agoIncrease the size of DwarfAccelTable::TableHeaderData::Atoms.
Hans Wennborg [Mon, 11 Aug 2014 02:18:15 +0000 (02:18 +0000)]
Increase the size of DwarfAccelTable::TableHeaderData::Atoms.

During a Clang bootstrap, it seems this SmallVector always contains 3 elements.

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

10 years agoIncrease the size of PMTopLevelManager::ImmutablePasses from 8 to 16.
Hans Wennborg [Mon, 11 Aug 2014 02:17:15 +0000 (02:17 +0000)]
Increase the size of PMTopLevelManager::ImmutablePasses from 8 to 16.

During a bootstrap build of Clang, this SmallVector always held 14 elements.

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

10 years agoAdd support for scalarizing cttz_zero_undef
Petar Jovanovic [Sun, 10 Aug 2014 22:49:54 +0000 (22:49 +0000)]
Add support for scalarizing cttz_zero_undef

Follow up to r214266. Add missing case in ScalarizeVectorResult() for
cttz_zero_undef.

Differential Revision: http://reviews.llvm.org/D4813

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

10 years agoARM: correct isPredicable for MULS in ThHUMB mode
Saleem Abdulrasool [Sun, 10 Aug 2014 22:20:37 +0000 (22:20 +0000)]
ARM: correct isPredicable for MULS in ThHUMB mode

The ARM ARM states that CPSR may not be updated by a MUL in thumb mode.  Due to
an ordering of Thumb 2 Size Reduction and If Conversion, we would end up
generating a THUMB MULS inside an IT block.

The If Conversion pass uses the TTI isPredicable method to ensure that it can
transform a Basic Block.  However, because we only check for IT handling on
Thumb2 functions, we may miss some cases.  Even then, it only validates that the
CPSR is not *live* rather than it is not accessed.  This corrects the handling
for that particular case since the same restriction does not hold on the vast
majority of the instructions.

This does prevent the IfConversion optimization from kicking in in certain
cases, but generating correct code is more valuable.  Addresses PR20555.

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

10 years ago@l and friends adjust their value depending the context used in.
Joerg Sonnenberger [Sun, 10 Aug 2014 12:41:50 +0000 (12:41 +0000)]
@l and friends adjust their value depending the context used in.
For ori, they are unsigned, for addi, signed. Create a new target
expression type to handle this and evaluate Fixups accordingly.

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

10 years agoFix tabs.
Joerg Sonnenberger [Sun, 10 Aug 2014 11:37:07 +0000 (11:37 +0000)]
Fix tabs.

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

10 years agoIf available, pass down the Fixup object to EvaluateAsRelocatable.
Joerg Sonnenberger [Sun, 10 Aug 2014 11:35:12 +0000 (11:35 +0000)]
If available, pass down the Fixup object to EvaluateAsRelocatable.
At least on PowerPC, the interpretation of certain modifiers depends on
the context they appear in.

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

10 years agoADT: remove MinGW32 and Cygwin OSType enum
Saleem Abdulrasool [Sat, 9 Aug 2014 23:12:20 +0000 (23:12 +0000)]
ADT: remove MinGW32 and Cygwin OSType enum

Remove the MinGW32 and Cygwin types from the OSType enumeration.  These values
are represented via environments of Windows.  It is a source of confusion and
needlessly clutters the code.  The cost of doing this is that we must sink the
check for them into the normalization code path along with the spelling.

Addresses PR20592.

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

10 years agofixed typos
Sanjay Patel [Sat, 9 Aug 2014 22:23:02 +0000 (22:23 +0000)]
fixed typos

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

10 years agoResolving some type truncation warnings in MSVC (enum to bool in this case). No funct...
Aaron Ballman [Sat, 9 Aug 2014 19:53:34 +0000 (19:53 +0000)]
Resolving some type truncation warnings in MSVC (enum to bool in this case). No functional changes intended.

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

10 years agoMC: remove duplicated code
Saleem Abdulrasool [Sat, 9 Aug 2014 17:21:36 +0000 (17:21 +0000)]
MC: remove duplicated code

This removes the duplicate definition of GetXDataSection.  This function is
available as a static method and is identical to the previous implementation.
This just cleans up the unnecessary duplication.

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

10 years agoMC: cleanup includes
Saleem Abdulrasool [Sat, 9 Aug 2014 17:21:33 +0000 (17:21 +0000)]
MC: cleanup includes

Cleanup Win64EH header inclusion.  NFC.

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

10 years agoCodeGen: switch to a range based for loop
Saleem Abdulrasool [Sat, 9 Aug 2014 17:21:29 +0000 (17:21 +0000)]
CodeGen: switch to a range based for loop

Use a range based for loop instead of manual iteration.  NFC.

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

10 years agoAllow the third argument for the subi family to be an expression.
Joerg Sonnenberger [Sat, 9 Aug 2014 17:10:26 +0000 (17:10 +0000)]
Allow the third argument for the subi family to be an expression.

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

10 years agoTest commit access
Roman Kashitsyn [Sat, 9 Aug 2014 16:05:23 +0000 (16:05 +0000)]
Test commit access

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

10 years agoUpdate disassembler test to check the full dccci/iccci form.
Joerg Sonnenberger [Sat, 9 Aug 2014 14:01:10 +0000 (14:01 +0000)]
Update disassembler test to check the full dccci/iccci form.

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

10 years agoUse the full form of dccci and iccci from the early PPC 405 documents,
Joerg Sonnenberger [Sat, 9 Aug 2014 13:58:31 +0000 (13:58 +0000)]
Use the full form of dccci and iccci from the early PPC 405 documents,
since the operands are actually used on those cores. Provide aliases for
the only documented case in the newer Power ISA speec.

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

10 years agoInitialize PPC DataLayout based on the Triple only.
Eric Christopher [Sat, 9 Aug 2014 04:53:17 +0000 (04:53 +0000)]
Initialize PPC DataLayout based on the Triple only.

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

10 years agoRemove extraneous 64-bit argument to the PPC TargetMachine constructor
Eric Christopher [Sat, 9 Aug 2014 04:38:56 +0000 (04:38 +0000)]
Remove extraneous 64-bit argument to the PPC TargetMachine constructor
and update initialization.

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

10 years agoInitialize X86 DataLayout based on the Triple only.
Eric Christopher [Sat, 9 Aug 2014 04:38:53 +0000 (04:38 +0000)]
Initialize X86 DataLayout based on the Triple only.

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

10 years agoR600: Disable FP exceptions.
Matt Arsenault [Sat, 9 Aug 2014 03:46:58 +0000 (03:46 +0000)]
R600: Disable FP exceptions.

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

10 years agoMove some X86 subtarget configuration onto the subtarget that's being
Eric Christopher [Sat, 9 Aug 2014 01:07:25 +0000 (01:07 +0000)]
Move some X86 subtarget configuration onto the subtarget that's being
created.

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

10 years agoR600/SI: Custom lower CONCAT_VECTORS
Tom Stellard [Sat, 9 Aug 2014 01:06:56 +0000 (01:06 +0000)]
R600/SI: Custom lower CONCAT_VECTORS

This will lower them using register copies rather than loads and stores
to the stack.

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

10 years agoR600/SI: Update concat_vectors.ll to check for scratch usage
Tom Stellard [Sat, 9 Aug 2014 01:06:53 +0000 (01:06 +0000)]
R600/SI: Update concat_vectors.ll to check for scratch usage

These tests were using SI-NOT: MOVREL to make sure concat vectors
weren't being lowered to stack loads and stores, but we are using
scratch buffers for the stack now instead of registers, so we need
to add an additional SI-NOT check for scratch buffers.

With this change I was able to uncover one broken test which will
be fixed in a future commit.

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

10 years agoFix expected windows result.
Rafael Espindola [Sat, 9 Aug 2014 00:37:05 +0000 (00:37 +0000)]
Fix expected windows result.

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

10 years agoFix typo.
Eric Christopher [Sat, 9 Aug 2014 00:26:27 +0000 (00:26 +0000)]
Fix typo.

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

10 years ago[MCJIT] Simplify immediate decoding code in the RuntimeDyldMachO hierarchy.
Lang Hames [Fri, 8 Aug 2014 23:12:22 +0000 (23:12 +0000)]
[MCJIT] Simplify immediate decoding code in the RuntimeDyldMachO hierarchy.

Cleanup only: no functional change.

This patch makes RuntimeDyldMachO targets directly responsible for decoding
immediates, rather than letting them implement catch a callback from generic
code. Since this is a very target specific operation, it makes sense to let the
target-specific code drive it.

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

10 years ago[FastISel][X86] Silence -Wenum-compare warning
Rui Ueyama [Fri, 8 Aug 2014 22:47:49 +0000 (22:47 +0000)]
[FastISel][X86] Silence -Wenum-compare warning

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

10 years agoFix the windows build.
Rafael Espindola [Fri, 8 Aug 2014 22:09:31 +0000 (22:09 +0000)]
Fix the windows build.

Sorry for the noise.

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

10 years agoReword comment slightly.
Eric Christopher [Fri, 8 Aug 2014 22:09:00 +0000 (22:09 +0000)]
Reword comment slightly.

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

10 years agoRemove dead code. Fixes pr20544.
Rafael Espindola [Fri, 8 Aug 2014 21:35:52 +0000 (21:35 +0000)]
Remove dead code. Fixes pr20544.

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

10 years agoConvert from Windows to Unix paths in sys::path::native.
Rafael Espindola [Fri, 8 Aug 2014 21:29:34 +0000 (21:29 +0000)]
Convert from Windows to Unix paths in sys::path::native.

Part of pr20544. Test to follow in a second.

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

10 years agoAllow large immediates for branch instructions in 32bit mode.
Joerg Sonnenberger [Fri, 8 Aug 2014 20:57:58 +0000 (20:57 +0000)]
Allow large immediates for branch instructions in 32bit mode.

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

10 years agoProvide an implementation of getNoopForMachoTarget for PPC, otherwise
Joerg Sonnenberger [Fri, 8 Aug 2014 19:13:23 +0000 (19:13 +0000)]
Provide an implementation of getNoopForMachoTarget for PPC, otherwise
empty functions will assert in the MC object writer.

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

10 years ago[FastISel][X86] Fix INC/DEC optimization (r215230)
Juergen Ributzka [Fri, 8 Aug 2014 18:47:04 +0000 (18:47 +0000)]
[FastISel][X86] Fix INC/DEC optimization (r215230)

I accidentally also used INC/DEC for unsigned arithmetic which doesn't work,
because INC/DEC don't set the required flag which is used for the overflow
check.

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

10 years agoAArch64: avoid deleting the current iterator in a loop.
Tim Northover [Fri, 8 Aug 2014 17:31:52 +0000 (17:31 +0000)]
AArch64: avoid deleting the current iterator in a loop.

std::map invalidates the iterator to any element that gets deleted, which means
we can't increment it correctly afterwards. This was causing Darwin test
failures.

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

10 years ago[FastISel][AArch64] Attach MachineMemOperands to load and store instructions.
Juergen Ributzka [Fri, 8 Aug 2014 17:24:10 +0000 (17:24 +0000)]
[FastISel][AArch64] Attach MachineMemOperands to load and store instructions.

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

10 years ago[FastISel][X86] Use INC/DEC when possible for {sadd|ssub}.with.overflow intrinsics.
Juergen Ributzka [Fri, 8 Aug 2014 17:21:37 +0000 (17:21 +0000)]
[FastISel][X86] Use INC/DEC when possible for {sadd|ssub}.with.overflow intrinsics.

This is a small peephole optimization to emit INC/DEC when possible.

Fixes <rdar://problem/17952308>.

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

10 years agoDebugInfo: Recommit (reverted in r215217, originally committed in r215157) the assert...
David Blaikie [Fri, 8 Aug 2014 17:12:35 +0000 (17:12 +0000)]
DebugInfo: Recommit (reverted in r215217, originally committed in r215157) the assertion that no argument variable is overwritten by subsequent argument variables.

This turned up a bug in clang where arguments were emitted with
duplicate argument numbers (see r215227).

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

10 years agoAArch64A57FPLoadBalancing.cpp: Define ColorNames in !NDEBUG.
NAKAMURA Takumi [Fri, 8 Aug 2014 17:00:59 +0000 (17:00 +0000)]
AArch64A57FPLoadBalancing.cpp: Define ColorNames in !NDEBUG.

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

10 years agoDataTypes.h.cmake: Define PRIx32 &c for !HAVE_INTTYPES_H hosts.
NAKAMURA Takumi [Fri, 8 Aug 2014 17:00:47 +0000 (17:00 +0000)]
DataTypes.h.cmake: Define PRIx32 &c for !HAVE_INTTYPES_H hosts.

I supposed PRIx32 might be unused in the tree.

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

10 years agoDelete dead code. NFC.
Rafael Espindola [Fri, 8 Aug 2014 16:49:35 +0000 (16:49 +0000)]
Delete dead code. NFC.

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

10 years agoAdded a TLI hook to signal that the target does not have or does not care about
Pedro Artigas [Fri, 8 Aug 2014 16:46:53 +0000 (16:46 +0000)]
Added a TLI hook to signal that the target does not have or does not care about
floating point exceptions, added use of flag to fold potentially exception
raising floating point math in selection DAG. No functionality change, as
targets have to explicitly ask for this behavior and none does today.

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

10 years agoAdd low-level option for avoiding float stores from va_start until
Joerg Sonnenberger [Fri, 8 Aug 2014 16:46:10 +0000 (16:46 +0000)]
Add low-level option for avoiding float stores from va_start until
soft-float is properly supported.

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

10 years agoAdd support for SPE load/store from memory.
Joerg Sonnenberger [Fri, 8 Aug 2014 16:43:49 +0000 (16:43 +0000)]
Add support for SPE load/store from memory.

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

10 years agogetLoadName is only implemented for ELF, make it ELF only.
Rafael Espindola [Fri, 8 Aug 2014 16:39:22 +0000 (16:39 +0000)]
getLoadName is only implemented for ELF, make it ELF only.

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

10 years agoUse a simpler predicate. NFC.
Rafael Espindola [Fri, 8 Aug 2014 16:30:17 +0000 (16:30 +0000)]
Use a simpler predicate. NFC.

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

10 years agoDebugInfo: Remove assertion (added in r215157) that's firing on a blocks
David Blaikie [Fri, 8 Aug 2014 16:21:50 +0000 (16:21 +0000)]
DebugInfo: Remove assertion (added in r215157) that's firing on a blocks
test in the test-suite while I investigate further.

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

10 years agopr20589: Fix duplicated arch flag.
Rafael Espindola [Fri, 8 Aug 2014 16:18:29 +0000 (16:18 +0000)]
pr20589: Fix duplicated arch flag.

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

10 years agopr20588: add missing calls to va_end.
Rafael Espindola [Fri, 8 Aug 2014 15:57:37 +0000 (15:57 +0000)]
pr20588: add missing calls to va_end.

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

10 years ago[mips] Invert the abicalls feature bit to be noabicalls so that it's possible for...
Daniel Sanders [Fri, 8 Aug 2014 15:47:17 +0000 (15:47 +0000)]
[mips] Invert the abicalls feature bit to be noabicalls so that it's possible for -mno-abicalls to take effect.

Also added the testcase that should have been in r215194.

This behaviour has surprised me a few times now. The problem is that the
generated MipsSubtarget::ParseSubtargetFeatures() contains code like this:

   if ((Bits & Mips::FeatureABICalls) != 0) IsABICalls = true;

so '-abicalls' means 'leave it at the default' and '+abicalls' means 'set it to
true'. In this case, (and the similar -modd-spreg case) I'd like the code to be

  IsABICalls = (Bits & Mips::FeatureABICalls) != 0;

or possibly:

   if ((Bits & Mips::FeatureABICalls) != 0)
     IsABICalls = true;
   else
     IsABICalls = false;

and preferably arrange for 'Bits & Mips::FeatureABICalls' to be true by default
(on some triples).

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

10 years agoAdd missing Interpreter intrinsic lowering for sin, cos and ceil
Josh Klontz [Fri, 8 Aug 2014 15:00:12 +0000 (15:00 +0000)]
Add missing Interpreter intrinsic lowering for sin, cos and ceil

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

10 years agoFix for #20408 - CMake LLVM_ENABLE_FFI=ON build fails on reconfigure
Josh Klontz [Fri, 8 Aug 2014 14:32:56 +0000 (14:32 +0000)]
Fix for #20408 - CMake LLVM_ENABLE_FFI=ON build fails on reconfigure

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

10 years ago[AArch64] Fix a type conversion bug for anlyzing compare.
Jiangning Liu [Fri, 8 Aug 2014 14:19:29 +0000 (14:19 +0000)]
[AArch64] Fix a type conversion bug for anlyzing compare.

The bug can cause spec2006/483.xalancbmk failure.

Patched by David Xu.

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

10 years agoFix bug 20125 - clang-format segfaults on bad config.
Rafael Espindola [Fri, 8 Aug 2014 13:58:00 +0000 (13:58 +0000)]
Fix bug 20125 - clang-format segfaults on bad config.

The problem was in unchecked dyn_cast inside of Input::createHNodes.
Patch by Roman Kashitsyn!

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

10 years ago[mips] Remove reason for XFAIL from a test that isn't actually XFAILed.
Daniel Sanders [Fri, 8 Aug 2014 12:58:17 +0000 (12:58 +0000)]
[mips] Remove reason for XFAIL from a test that isn't actually XFAILed.

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

10 years ago[LoopVectorizer] Enable support for floating-point subtraction reductions
James Molloy [Fri, 8 Aug 2014 12:41:08 +0000 (12:41 +0000)]
[LoopVectorizer] Enable support for floating-point subtraction reductions

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

10 years ago[AArch64] Add an FP load balancing pass for Cortex-A57
James Molloy [Fri, 8 Aug 2014 12:33:21 +0000 (12:33 +0000)]
[AArch64] Add an FP load balancing pass for Cortex-A57

For best-case performance on Cortex-A57, we should try to use a balanced mix of odd and even D-registers when performing a critical sequence of independent, non-quadword FP/ASIMD floating-point multiply or multiply-accumulate operations.

This pass attempts to detect situations where the register allocation may adversely affect this load balancing and to change the registers used so as to better utilize the CPU.

Ideally we'd just take each multiply or multiply-accumulate in turn and allocate it alternating even or odd registers. However, multiply-accumulates are most efficiently performed in the same functional unit as their accumulation operand. Therefore this pass tries to find maximal sequences ("Chains") of multiply-accumulates linked via their accumulation operand, and assign them all the same "color" (oddness/evenness).

This optimization affects S-register and D-register floating point multiplies and FMADD/FMAs, as well as vector (floating point only) muls and FMADD/FMA. Q register instructions (and 128-bit vector instructions) are not affected.

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

10 years agollvm-objdump: add missing % in format specifier.
Tim Northover [Fri, 8 Aug 2014 12:08:51 +0000 (12:08 +0000)]
llvm-objdump: add missing % in format specifier.

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

10 years agollvm-objdump: use portable format specifiers for info.
Tim Northover [Fri, 8 Aug 2014 12:00:09 +0000 (12:00 +0000)]
llvm-objdump: use portable format specifiers for info.

ARM bots (& others, I think, now that I look) were failing because we
were using incorrect printf-style format specifiers. They were wrong
on almost any platform, actually, just mostly harmlessly so.

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

10 years ago[mips] Initial implementation of -mabicalls/-mno-abicalls.
Daniel Sanders [Fri, 8 Aug 2014 10:01:29 +0000 (10:01 +0000)]
[mips] Initial implementation of -mabicalls/-mno-abicalls.

This patch implements the main rules for -mno-abicalls such as reserving $gp,
and emitting the correct .option directive.

Patch by Matheus Almeida and Toma Tabacu

Differential Revision: http://reviews.llvm.org/D4231

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

10 years agoAArch64: stop trying to take control of all UnknownArch triples.
Tim Northover [Fri, 8 Aug 2014 08:27:44 +0000 (08:27 +0000)]
AArch64: stop trying to take control of all UnknownArch triples.

This short-circuited our error reporting for incorrectly specified
target triples (you'd get AArch64 code instead).

Should fix PR20567.

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

10 years ago[pr19635] Revert most of r170537, and add new testcase.
Patrik Hagglund [Fri, 8 Aug 2014 08:21:19 +0000 (08:21 +0000)]
[pr19635] Revert most of r170537, and add new testcase.

Patch provided by Andrey Kuharev.

Sorry, r170537 was obviously wrong.

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

10 years agoGlobalOpt: Optimize in the face of insertvalue/extractvalue
David Majnemer [Fri, 8 Aug 2014 05:50:43 +0000 (05:50 +0000)]
GlobalOpt: Optimize in the face of insertvalue/extractvalue

GlobalOpt didn't know how to simulate InsertValueInst or
ExtractValueInst.  Optimizing these is pretty straightforward.

N.B. This came up when looking at clang's IRGen for MS ABI member
pointers; they are represented as aggregates.

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

10 years agoFix llvm/test/DebugInfo/X86/recursive_inlining.ll to use %llc_dwarf.
NAKAMURA Takumi [Fri, 8 Aug 2014 02:24:05 +0000 (02:24 +0000)]
Fix llvm/test/DebugInfo/X86/recursive_inlining.ll to use %llc_dwarf.

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

10 years agoAArch64InstrInfo.cpp: Fix \param(s). [-Wdocumentation]
NAKAMURA Takumi [Fri, 8 Aug 2014 02:04:18 +0000 (02:04 +0000)]
AArch64InstrInfo.cpp: Fix \param(s). [-Wdocumentation]

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

10 years ago[tablegen] - Eliminate memory leaks in TGParser.cpp
Anton Yartsev [Fri, 8 Aug 2014 00:29:54 +0000 (00:29 +0000)]
[tablegen] - Eliminate memory leaks in TGParser.cpp

Ugly solution indicating that a refactoring is necessary to get the ownership under control.

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

10 years ago[AVX512] Add zero-masking variant to AVX512_masking multiclass
Adam Nemet [Thu, 7 Aug 2014 23:53:38 +0000 (23:53 +0000)]
[AVX512] Add zero-masking variant to AVX512_masking multiclass

This completes one item from the todo-list of r215125 "Generate masking
instruction variants with tablegen".

The AddedComplexity is needed just like for the k variant.

Added a codegen test based on valignq.

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

10 years agoFix for multi-line comment warning
Gerolf Hoflehner [Thu, 7 Aug 2014 23:19:55 +0000 (23:19 +0000)]
Fix for multi-line comment warning

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

10 years ago[AVX512] Add codegen test for the masking variant of valign
Adam Nemet [Thu, 7 Aug 2014 23:18:18 +0000 (23:18 +0000)]
[AVX512] Add codegen test for the masking variant of valign

The AddedComplexity is needed just like in avx512_perm_3src.  There may be a
bug in the complexity computation...

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