oota-llvm.git
9 years agoMC: correct DWARF header for PE/COFF assembly input
Saleem Abdulrasool [Fri, 5 Sep 2014 04:15:00 +0000 (04:15 +0000)]
MC: correct DWARF header for PE/COFF assembly input

The header contains an offset to the DWARF line table for the CU.  The offset
must be section relative for COFF and absolute for others.  The non-assembly
code path for the DWARF header generation already has the correct emission for
the headers.  This corrects the assembly input path.

This was identified by BFD objecting to the LLVM generated DWARF information.

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

9 years ago[AArch64] Add pass to enable additional comparison optimizations by CSE.
Jiangning Liu [Fri, 5 Sep 2014 02:55:24 +0000 (02:55 +0000)]
[AArch64] Add pass to enable additional comparison optimizations by CSE.

Patched by Sergey Dmitrouk.

This pass tries to make consecutive compares of values use same operands to
allow CSE pass to remove duplicated instructions. For this it analyzes
branches and adjusts comparisons with immediate values by converting:

GE -> GT
GT -> GE
LT -> LE
LE -> LT

and adjusting immediate values appropriately. It basically corrects two
immediate values towards each other to make them equal.

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

9 years ago[CMake] Add -fno-sanitize=function to UBSan bootstrap
Alexey Samsonov [Fri, 5 Sep 2014 01:17:30 +0000 (01:17 +0000)]
[CMake] Add -fno-sanitize=function to UBSan bootstrap

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

9 years agoDisable the fix for pr20793 because of a gnu ld bug.
Rafael Espindola [Fri, 5 Sep 2014 00:14:12 +0000 (00:14 +0000)]
Disable the fix for pr20793 because of a gnu ld bug.

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

9 years agoRefactor to avoid code duplication. NFC.
Rafael Espindola [Fri, 5 Sep 2014 00:02:50 +0000 (00:02 +0000)]
Refactor to avoid code duplication. NFC.

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

9 years agoFix pr20793.
Rafael Espindola [Thu, 4 Sep 2014 23:03:58 +0000 (23:03 +0000)]
Fix pr20793.

With this patch the third field of llvm.global_ctors is also used on ELF.

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

9 years agoPost-JIT light cleanup of ExecutionEngine.h: edited comments about the JIT,
Yaron Keren [Thu, 4 Sep 2014 20:37:02 +0000 (20:37 +0000)]
Post-JIT light cleanup of ExecutionEngine.h: edited comments about the JIT,
removed runJITOnFunction and isLazyCompilationDisabled.

Deleted CodeGen\MachineCodeInfo.h which was used by runJITOnFunction() only.

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

9 years ago[ dwarfdump ] Add symbolic dump of known DWARF attribute values.
Frederic Riss [Thu, 4 Sep 2014 19:39:20 +0000 (19:39 +0000)]
[ dwarfdump ] Add symbolic dump of known DWARF attribute values.

Reviewed By: dblaikie

Subscribers: llvm-commits

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

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

9 years agoRevert "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"
Frederic Riss [Thu, 4 Sep 2014 18:55:46 +0000 (18:55 +0000)]
Revert "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"

This reverts commit 93c7e6161e1adbd2c7ac81fa081823183035cb64.

This commit got approved first, but was dependant on another one going in (The one pretty printing attribute values). I'll reapply when the other one is in.

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

9 years ago[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()
Frederic Riss [Thu, 4 Sep 2014 18:40:23 +0000 (18:40 +0000)]
[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()

Reviewed By: dblaikie

Subscribers: llvm-commits

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

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

9 years agoFix use-after-move introduced in r217065 and caught in post-commit review by Alexey.
David Blaikie [Thu, 4 Sep 2014 18:37:31 +0000 (18:37 +0000)]
Fix use-after-move introduced in r217065 and caught in post-commit review by Alexey.

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

9 years agounique_ptrify RuntimeDyld::Dyld
David Blaikie [Thu, 4 Sep 2014 18:37:29 +0000 (18:37 +0000)]
unique_ptrify RuntimeDyld::Dyld

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

9 years agoMC Win64: Put unwind info for COMDAT code into the same COMDAT group
Reid Kleckner [Thu, 4 Sep 2014 17:42:03 +0000 (17:42 +0000)]
MC Win64: Put unwind info for COMDAT code into the same COMDAT group

Summary:
This fixes a long standing issue where we would emit many little .text
sections and only one .pdata and .xdata section. Now we generate one
.pdata / .xdata pair per .text section and associate them correctly.

Fixes PR19667.

Reviewers: majnemer

Subscribers: llvm-commits

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

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

9 years agoRemoved the ctime printed “time stamp” from macho-private-headers.test to fix the...
Kevin Enderby [Thu, 4 Sep 2014 17:13:44 +0000 (17:13 +0000)]
Removed the ctime printed “time stamp” from macho-private-headers.test to fix the builds.

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

9 years agoX86: cpuid and xgetbv write to 32-bit registers, not 64-bit
Reid Kleckner [Thu, 4 Sep 2014 16:58:25 +0000 (16:58 +0000)]
X86: cpuid and xgetbv write to 32-bit registers, not 64-bit

This fixes an issue where MS inline assembly containing xgetbv wouldn't
be marked as clobbering EAX:EDX. Test for that forthcoming on the Clang
side.

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

9 years agoAdds the next bit of support for llvm-objdump’s -private-headers for executable Mach...
Kevin Enderby [Thu, 4 Sep 2014 16:54:47 +0000 (16:54 +0000)]
Adds the next bit of support for llvm-objdump’s -private-headers for executable Mach-O files.

This adds the printing of more load commands, so that the normal load commands
in a typical X86 Mach-O executable can all be printed.

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

9 years agoFix link to 3.5 release notes.
Nico Weber [Thu, 4 Sep 2014 15:26:10 +0000 (15:26 +0000)]
Fix link to 3.5 release notes.

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

9 years agoAArch64: fix vector-immediate BIC/ORR on big-endian devices.
Tim Northover [Thu, 4 Sep 2014 15:05:24 +0000 (15:05 +0000)]
AArch64: fix vector-immediate BIC/ORR on big-endian devices.

Follow up to r217138, extending the logic to other NEON-immediate instructions.
As before, the instruction already performs the correct operation and we're
just using a different type for convenience, so we want a true nop-cast.

Patch by Asiri Rathnayake.

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

9 years agobuild/cmake: Fix CMP0023 warning with libffi
Jan Vesely [Thu, 4 Sep 2014 14:21:10 +0000 (14:21 +0000)]
build/cmake: Fix CMP0023 warning with libffi

Fixes:
CMake Warning (dev) at lib/ExecutionEngine/Interpreter/CMakeLists.txt:16 (target_link_libraries):
  Policy CMP0023 is not set: Plain and keyword target_link_libraries
  signatures cannot be mixed.  Run "cmake --help-policy CMP0023" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  The keyword signature for target_link_libraries has already been used with
  the target "LLVMInterpreter".  All uses of target_link_libraries with a
  target should be either all-keyword or all-plain.

  The uses of the keyword signature are here:

   * cmake/modules/AddLLVM.cmake:345 (target_link_libraries)

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217154 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Rename MipsAsmParser functions to conform to the LLVM Coding Standards. No...
Toma Tabacu [Thu, 4 Sep 2014 13:23:44 +0000 (13:23 +0000)]
[mips] Rename MipsAsmParser functions to conform to the LLVM Coding Standards. No functional changes.

Summary: There are still some functions which should be renamed, but they are inherited from the generic MC classes.

Reviewers: dsanders

Reviewed By: dsanders

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

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

9 years agoEnable noalias metadata by default and swap the order of the SLP and Loop vectorizers...
James Molloy [Thu, 4 Sep 2014 13:23:08 +0000 (13:23 +0000)]
Enable noalias metadata by default and swap the order of the SLP and Loop vectorizers by default.

After some time maturing, hopefully the flags themselves will be removed.

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

9 years agoSilencing a usually-helpful-but-braindead-silly-in-this-case sign mismatch warning...
Aaron Ballman [Thu, 4 Sep 2014 11:52:24 +0000 (11:52 +0000)]
Silencing a usually-helpful-but-braindead-silly-in-this-case sign mismatch warning with MSVC. NFC.

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

9 years agoAArch64: fix big-endian immediate materialisation
Tim Northover [Thu, 4 Sep 2014 09:46:14 +0000 (09:46 +0000)]
AArch64: fix big-endian immediate materialisation

We were materialising big-endian constants using DAG nodes with types different
from what was requested, followed by a bitcast. This is fine on little-endian
machines where bitcasting is a nop, but we need a slightly different
representation for big-endian. This adds a new set of NVCAST (natural-vector
cast) operations which are always nops.

Patch by Asiri Rathnayake.

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

9 years ago[x86] Teach the new v4i32 shuffle lowering some more tricks to recognize
Chandler Carruth [Thu, 4 Sep 2014 09:26:30 +0000 (09:26 +0000)]
[x86] Teach the new v4i32 shuffle lowering some more tricks to recognize
vzext patterns and insert-element patterns that for SSE4 have dedicated
instructions.

With this we can enable the experimental mode in a regression test that
happens to cover some of the past set of issues. You can see that the
new logic does significantly better here on the floating point cases.

A follow-up to this change and the previous ones will hoist the logic
into helpers so it can be shared across element type sizes as in this
particular case it generalizes cleanly.

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

9 years agoFixed compilation problem on Windows (initialization of non-aggregate type).
Elena Demikhovsky [Thu, 4 Sep 2014 07:20:39 +0000 (07:20 +0000)]
Fixed compilation problem on Windows (initialization of non-aggregate type).
After commit 217131.

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

9 years ago[GVN] Format variable name.
Tilmann Scheller [Thu, 4 Sep 2014 06:38:00 +0000 (06:38 +0000)]
[GVN] Format variable name.

Local variables need to start with an upper case letter.

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

9 years agoFix build faliure introduced by r217129.
Frederic Riss [Thu, 4 Sep 2014 06:35:09 +0000 (06:35 +0000)]
Fix build faliure introduced by r217129.

Looks like one can't put 'const uint8_t' as ArrayRef contained type. It fails to build with libstdc++.

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

9 years agoX86 Intrinsics table - changed to a static table sorted by intrinsic id.
Elena Demikhovsky [Thu, 4 Sep 2014 06:34:34 +0000 (06:34 +0000)]
X86 Intrinsics table - changed to a static table sorted by intrinsic id.
Used binary search over the tables.

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

9 years agoRename DWARFContext::getLineTableForCompileUnit to getLineTableForUnit.
Frederic Riss [Thu, 4 Sep 2014 06:14:40 +0000 (06:14 +0000)]
Rename DWARFContext::getLineTableForCompileUnit to getLineTableForUnit.

All DWARFUnits can have line information. Rename and change arguments' type
accordingly.

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

9 years agoAdd DWARFFormValue::getAsBlock() and add FC_Flag as an acceptable class for an unsign...
Frederic Riss [Thu, 4 Sep 2014 06:14:35 +0000 (06:14 +0000)]
Add DWARFFormValue::getAsBlock() and add FC_Flag as an acceptable class for an unsigned constant.

To be used in further patches that improve the dumpers.

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

9 years agoAdd a DWARFContext& member in DWARFUnit.
Frederic Riss [Thu, 4 Sep 2014 06:14:28 +0000 (06:14 +0000)]
Add a DWARFContext& member in DWARFUnit.

The DWARFContext will be used to pass global 'context' down, like
pointers to related debug info sections or command line options.
The first use will be for the debug_info dumper to be able to access
other debug info section to dump eg. Location Expression inline
in the debug_info dump.

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

9 years ago[MCJIT] Make sure eh-frame fixups use the target's pointer type, not the host's.
Lang Hames [Thu, 4 Sep 2014 04:53:03 +0000 (04:53 +0000)]
[MCJIT] Make sure eh-frame fixups use the target's pointer type, not the host's.

If the wrong pointer type is used it can cause corruption of the frame
description entries.

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

9 years agoUse vector constructor instead of a for loop to initialize entries.
Craig Topper [Thu, 4 Sep 2014 04:49:03 +0000 (04:49 +0000)]
Use vector constructor instead of a for loop to initialize entries.

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

9 years ago[MCJIT] Add command-line argument to llvm-rtdyld to specify target addresses for
Lang Hames [Thu, 4 Sep 2014 04:19:54 +0000 (04:19 +0000)]
[MCJIT] Add command-line argument to llvm-rtdyld to specify target addresses for
sections.

This allows fine-grained control of the memory layout of hypothetical target
processes for testing purposes.

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

9 years agoRevert r216803 "[MachineSinking] Clear kill flag of all operands at all their uses."
Juergen Ributzka [Thu, 4 Sep 2014 02:07:36 +0000 (02:07 +0000)]
Revert r216803 "[MachineSinking] Clear kill flag of all operands at all their uses."

This reverts commit r216803, because it might have broken the buildbot.
The issue is tracked in PR20842.

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

9 years ago[FastISel][AArch64] Cleanup and simplify 'fastSelectInstruction'. NFC.
Juergen Ributzka [Thu, 4 Sep 2014 01:29:21 +0000 (01:29 +0000)]
[FastISel][AArch64] Cleanup and simplify 'fastSelectInstruction'. NFC.

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

9 years ago[FastISel][AArch64] Add target-specific lowering for logical operations.
Juergen Ributzka [Thu, 4 Sep 2014 01:29:18 +0000 (01:29 +0000)]
[FastISel][AArch64] Add target-specific lowering for logical operations.

This change adds support for immediate and shift-left folding into logical
operations.

This fixes rdar://problem/18223183.

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

9 years ago[x86] Teach the new vector shuffle lowering about the zero masking
Chandler Carruth [Thu, 4 Sep 2014 01:13:48 +0000 (01:13 +0000)]
[x86] Teach the new vector shuffle lowering about the zero masking
abilities of INSERTPS which are really powerful and come up in very
important contexts such as forming diagonal matrices, etc.

With this I ended up being able to remove the somewhat weird helper
I added for INSERTPS because we can collapse the entire state to a no-op
mask. Added a bunch of tests for inserting into a zero-ish vector.

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

9 years agoIndVarSimplify: Address review comments for r217102
David Majnemer [Thu, 4 Sep 2014 00:23:13 +0000 (00:23 +0000)]
IndVarSimplify: Address review comments for r217102

No functional change intended, just some cleanups and comments added.

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

9 years agollvm-cov: Don't pointlessly create a unique_ptr (NFC)
Justin Bogner [Thu, 4 Sep 2014 00:04:54 +0000 (00:04 +0000)]
llvm-cov: Don't pointlessly create a unique_ptr (NFC)

There's no ownership going on here, and no reason to heap allocate
this object.

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

9 years agoRevert accidentally committed r217107
Matt Arsenault [Wed, 3 Sep 2014 23:38:05 +0000 (23:38 +0000)]
Revert accidentally committed r217107

"Don't treat 0 as a special value for int attributes."

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

9 years agoR600/SI: Un-move pattern I forgot to remove in last commit
Matt Arsenault [Wed, 3 Sep 2014 23:28:57 +0000 (23:28 +0000)]
R600/SI: Un-move pattern I forgot to remove in last commit

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

9 years agoR600/SI: Try to keep i32 mul on SALU
Matt Arsenault [Wed, 3 Sep 2014 23:24:35 +0000 (23:24 +0000)]
R600/SI: Try to keep i32 mul on SALU

Also fix bug this exposed where when legalizing an immediate
operand, a v_mov_b32 would be created with a VSrc dest register.

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

9 years agoDon't treat 0 as a special value for int attributes.
Matt Arsenault [Wed, 3 Sep 2014 23:24:31 +0000 (23:24 +0000)]
Don't treat 0 as a special value for int attributes.

Split the get() to not use a default value. This way
attributes can be added that have 0 as a legitimate value.

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

9 years ago[asan] fix debug info produced for asan-coverage=2
Kostya Serebryany [Wed, 3 Sep 2014 23:24:18 +0000 (23:24 +0000)]
[asan] fix debug info produced for asan-coverage=2

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

9 years agoEnabling LLVM & Clang to be cross-compiled using CMake from a single configuration...
Chris Bieneman [Wed, 3 Sep 2014 23:21:18 +0000 (23:21 +0000)]
Enabling LLVM & Clang to be cross-compiled using CMake from a single configuration command line

The basic idea is similar to the existing cross compilation support. A directory must be configured to build host versions of tablegen tools and llvm-config. This directory can be user provided (and configured), or it can be created during the build. During a build the native build directory will be configured and built to supply the tablegen tools used during the build. A user could also explicitly provide the tablegen executables to run on the CMake command line.

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

9 years agoIndVarSimplify: Don't let LFTR compare against a poison value
David Majnemer [Wed, 3 Sep 2014 23:03:18 +0000 (23:03 +0000)]
IndVarSimplify: Don't let LFTR compare against a poison value

LinearFunctionTestReplace tries to use the *next* indvar to compare
against when possible.  However, it may be the case that the calculation
for the next indvar has NUW/NSW flags and that it may only be safely
used inside the loop.  Using it in a comparison to calculate the exit
condition could result in observing poison.

This fixes PR20680.

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

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

9 years ago[x86] Teach the new vector shuffle lowering about the simplest of
Chandler Carruth [Wed, 3 Sep 2014 22:48:34 +0000 (22:48 +0000)]
[x86] Teach the new vector shuffle lowering about the simplest of
'insertps' patterns.

This replaces two shuffles with a single insertps in very common cases.
My next patch will extend this to leverage the zeroing capabilities of
insertps which will allow it to be used in a much wider set of cases.

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

9 years ago[x86] Teach the asm comment printing to only print the clarification of
Chandler Carruth [Wed, 3 Sep 2014 22:46:44 +0000 (22:46 +0000)]
[x86] Teach the asm comment printing to only print the clarification of
an immediate operand when we don't have instruction-specific comments.

This ensures that instruction-specific comments are attached to the same
line as the instruction which is important for using them to write
readable and maintainable tests. My next commit will just such a test.

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

9 years ago[asan] add -asan-coverage=3: instrument all blocks and critical edges.
Kostya Serebryany [Wed, 3 Sep 2014 22:37:37 +0000 (22:37 +0000)]
[asan] add -asan-coverage=3: instrument all blocks and critical edges.

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

9 years agounique_ptrify RuntimeDyldImpl::loadObject
David Blaikie [Wed, 3 Sep 2014 21:34:34 +0000 (21:34 +0000)]
unique_ptrify RuntimeDyldImpl::loadObject

I'm not sure this is a particularly helpful API (to pass ownership and
then return it unconditionally) rather than just pass the underlying
object by non-const reference, but this was the original API so I'll
just make it more safe/stable and anyone else is free to adjust that at
their whim, of course.

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

9 years agoRefactor AtomicExpandPass and add a generic isAtomic() method to Instruction
Robin Morisset [Wed, 3 Sep 2014 21:29:59 +0000 (21:29 +0000)]
Refactor AtomicExpandPass and add a generic isAtomic() method to Instruction

Summary:
Split shouldExpandAtomicInIR() into different versions for Stores/Loads/RMWs/CmpXchgs.
Makes runOnFunction cleaner (no more redundant checking/casting), and will help moving
the X86 backend to this pass.

This requires a way of easily detecting which instructions are atomic.
I followed the pattern of mayReadFromMemory, mayWriteOrReadMemory, etc.. in making
isAtomic() a method of Instruction implemented by a switch on the opcodes.

Test Plan: make check

Reviewers: jfb

Subscribers: mcrosier, llvm-commits

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

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

9 years agoMake some helpers static or move into the llvm namespace.
Benjamin Kramer [Wed, 3 Sep 2014 21:04:12 +0000 (21:04 +0000)]
Make some helpers static or move into the llvm namespace.

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

9 years agoUse target-dependent emitLeading/TrailingFence instead of the target-independent...
Robin Morisset [Wed, 3 Sep 2014 21:01:03 +0000 (21:01 +0000)]
Use target-dependent emitLeading/TrailingFence instead of the target-independent insertLeading/TrailingFence (in AtomicExpandPass)

Fixes two latent bugs:
- There was no fence inserted before expanded seq_cst load (unsound on Power)
- There was only a fence release before seq_cst stores (again unsound, in particular on Power)
    It is not even clear if this is correct on ARM swift processors (where release fences are
    DMB ishst instead of DMB ish). This behaviour is currently preserved on ARM Swift
    as it is not clear whether it is incorrect. I would love to get documentation stating
    whether it is correct or not.
These two bugs were not triggered because Power is not (yet) using this pass, and these
behaviours happen to be (mostly?) working on ARM
(although they completely butchered the semantics of the llvm IR).

See:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075821.html
for an example of the problems that can be caused by the second of these bugs.

I couldn't see a way of fixing these in a completely target-independent way without
adding lots of unnecessary fences on ARM, hence the target-dependent parts of this
patch.

This patch implements the new target-dependent parts only for ARM (the default
of not doing anything is enough for AArch64), other architectures will use this
infrastructure in later patches.

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

9 years ago[FastISel][tblgen] Rename tblgen generated FastISel functions. NFC.
Juergen Ributzka [Wed, 3 Sep 2014 20:56:59 +0000 (20:56 +0000)]
[FastISel][tblgen] Rename tblgen generated FastISel functions. NFC.

This is the final round of renaming. This changes tblgen to emit lower-case
function names for FastEmitInst_* and FastEmit_*, and updates all its uses
in the source code.

Reviewed by Eric

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

9 years ago[FastISel] Rename public visible FastISel functions. NFC.
Juergen Ributzka [Wed, 3 Sep 2014 20:56:52 +0000 (20:56 +0000)]
[FastISel] Rename public visible FastISel functions. NFC.

This commit renames the following public FastISel functions:
LowerArguments -> lowerArguments
SelectInstruction -> selectInstruction
TargetSelectInstruction -> fastSelectInstruction
FastLowerArguments -> fastLowerArguments
FastLowerCall -> fastLowerCall
FastLowerIntrinsicCall -> fastLowerIntrinsicCall
FastEmitZExtFromI1 -> fastEmitZExtFromI1
FastEmitBranch -> fastEmitBranch
UpdateValueMap -> updateValueMap
TargetMaterializeConstant -> fastMaterializeConstant
TargetMaterializeAlloca -> fastMaterializeAlloca
TargetMaterializeFloatZero -> fastMaterializeFloatZero
LowerCallTo -> lowerCallTo

Reviewed by Eric

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

9 years ago[JIT] Add an out-of-line definition for the virtual destructor in
Chandler Carruth [Wed, 3 Sep 2014 20:39:10 +0000 (20:39 +0000)]
[JIT] Add an out-of-line definition for the virtual destructor in
JITEventListener. This used to be in the old JIT (last line of the file)
and everyone just "happened" to pick it up from there. =/ Doh.

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

9 years ago[x86] Add an SSE4.1 mode to this test.
Chandler Carruth [Wed, 3 Sep 2014 20:39:06 +0000 (20:39 +0000)]
[x86] Add an SSE4.1 mode to this test.

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

9 years agoRemove resetSubtargetFeatures as it is unused.
Eric Christopher [Wed, 3 Sep 2014 20:36:31 +0000 (20:36 +0000)]
Remove resetSubtargetFeatures as it is unused.

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

9 years agoRemove unnecessary getTarget call now that the subtarget is cached
Eric Christopher [Wed, 3 Sep 2014 20:36:26 +0000 (20:36 +0000)]
Remove unnecessary getTarget call now that the subtarget is cached
on the machine function.

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

9 years agohouse cleaning: "Don’t duplicate function or class name at the beginning of the comment."
Sanjay Patel [Wed, 3 Sep 2014 20:08:51 +0000 (20:08 +0000)]
house cleaning: "Don’t duplicate function or class name at the beginning of the comment."

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

9 years agoAdd writeFileWithSystemEncoding to LibLLVMSuppor.
Rafael Espindola [Wed, 3 Sep 2014 20:02:00 +0000 (20:02 +0000)]
Add writeFileWithSystemEncoding to LibLLVMSuppor.

This patch adds to LLVMSupport the capability of writing files with
international characters encoded in the current system encoding. This
is relevant for Windows, where we can either use UTF16 or the current
code page (the legacy Windows international characters). On UNIX, the
file is always saved in UTF8.

This will be used in a patch for clang to thoroughly support response
files creation when calling other tools, addressing PR15171. On
Windows, to correctly support internationalization, we need the
ability to write response files both in UTF16 or the current code
page, depending on the tool we will call. GCC for mingw, for instance,
requires files to be encoded in the current code page. MSVC tools
requires files to be encoded in UTF16.

Patch by Rafael Auler!

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

9 years agounique_ptrify MCJIT::emitObject
David Blaikie [Wed, 3 Sep 2014 19:57:35 +0000 (19:57 +0000)]
unique_ptrify MCJIT::emitObject

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

9 years agounique_ptrify a bunch of stuff through RuntimeDyld::loadObject
David Blaikie [Wed, 3 Sep 2014 19:48:09 +0000 (19:48 +0000)]
unique_ptrify a bunch of stuff through RuntimeDyld::loadObject

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

9 years ago[x86] Make this test check everything for both SSE2 and AVX1 modes,
Chandler Carruth [Wed, 3 Sep 2014 19:39:10 +0000 (19:39 +0000)]
[x86] Make this test check everything for both SSE2 and AVX1 modes,
using a common 'all' prefix for the common test output.

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

9 years ago[FastISel] Some long overdue spring cleaning of FastISel.
Juergen Ributzka [Wed, 3 Sep 2014 18:46:45 +0000 (18:46 +0000)]
[FastISel] Some long overdue spring cleaning of FastISel.

Things got a little bit messy over the years and it is time for a little bit
spring cleaning.

This first commit is focused on the FastISel base class itself. It doxyfies all
comments, C++11fies the code where it makes sense, renames internal methods to
adhere to the coding standard, and clang-formats the files.

Reviewed by Eric

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

9 years agoFix downcasts of unaligned empty/tombstone DenseMap keys for DenseMap<AssertVH<T...
Alexey Samsonov [Wed, 3 Sep 2014 18:11:48 +0000 (18:11 +0000)]
Fix downcasts of unaligned empty/tombstone DenseMap keys for DenseMap<AssertVH<T>, Foo>.

Test Plan: llvm regression test suite

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: llvm-commits

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

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

9 years agoAdd a regression test to sanity check the PBQP allocator.
Lang Hames [Wed, 3 Sep 2014 18:04:10 +0000 (18:04 +0000)]
Add a regression test to sanity check the PBQP allocator.

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

9 years agounique_ptrify IRObjectFile::createIRObjectFile
David Blaikie [Wed, 3 Sep 2014 17:59:23 +0000 (17:59 +0000)]
unique_ptrify IRObjectFile::createIRObjectFile

I took a guess at the changes to the gold plugin, because that doesn't
seem to build by default for me. Not sure what dependencies I might be
missing for that.

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

9 years ago[FastISel][AArch64] Move unconditional branch handling into 'SelectBranch'. NFC.
Juergen Ributzka [Wed, 3 Sep 2014 17:58:10 +0000 (17:58 +0000)]
[FastISel][AArch64] Move unconditional branch handling into 'SelectBranch'. NFC.

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

9 years agoRemoving static initializer from Debug.cpp by converting to a ManagedStatic.
Chris Bieneman [Wed, 3 Sep 2014 17:50:14 +0000 (17:50 +0000)]
Removing static initializer from Debug.cpp by converting to a ManagedStatic.

This is part of our larger effort to remove static initializers from LLVM libraries.

Reviewed by: chandlerc

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

9 years agounique_ptrify MachOUniversalBinary::create
David Blaikie [Wed, 3 Sep 2014 17:41:05 +0000 (17:41 +0000)]
unique_ptrify MachOUniversalBinary::create

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

9 years agoPreserve IR flags (nsw, nuw, exact, fast-math) in SLP vectorizer (PR20802).
Sanjay Patel [Wed, 3 Sep 2014 17:40:30 +0000 (17:40 +0000)]
Preserve IR flags (nsw, nuw, exact, fast-math) in SLP vectorizer (PR20802).

The SLP vectorizer should propagate IR-level optimization hints/flags (nsw, nuw, exact, fast-math)
when converting scalar instructions into vectors. But this isn't a simple copy - we need to take
the intersection (the logical 'and') of the sets of flags on the scalars.

The solution is further complicated because we can have non-uniform (non-SIMD) vector ops after:
http://reviews.llvm.org/D4015
http://llvm.org/viewvc/llvm-project?view=revision&revision=211339

The vast majority of changed files are existing tests that were not propagating IR flags, but I've
also added a new test file for focused testing of IR flag possibilities.

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

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

9 years agoPass a && to getLazyBitcodeModule.
Rafael Espindola [Wed, 3 Sep 2014 17:31:46 +0000 (17:31 +0000)]
Pass a && to getLazyBitcodeModule.

This forces callers to use std::move when calling it. It is somewhat odd to have
code with std::move that doesn't always move, but it is also odd to have code
without std::move that sometimes moves.

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

9 years agoEnsure ErrorOr cannot implicitly invoke explicit ctors of the underlying type.
David Blaikie [Wed, 3 Sep 2014 17:31:25 +0000 (17:31 +0000)]
Ensure ErrorOr cannot implicitly invoke explicit ctors of the underlying type.

An unpleasant surprise while migrating unique_ptrs (see changes in
lib/Object): ErrorOr<int*> was implicitly convertible to
ErrorOr<std::unique_ptr<int>>.

Keep the explicit conversions otherwise it's a pain to convert
ErrorOr<int*> to ErrorOr<std::unique_ptr<int>>.

I'm not sure if there should be more SFINAE on those explicit ctors (I
could check if !is_convertible && is_constructible, but since the ctor
has to be called explicitly I don't think there's any need to disable
them when !is_constructible - they'll just fail anyway. It's the
converting ctors that can create interesting ambiguities without proper
SFINAE). I had to SFINAE the explicit ones because otherwise they'd be
ambiguous with the implicit ones in an explicit context, so far as I
could tell.

The converting assignment operators seemed unnecessary (and similarly
buggy/dangerous) - just rely on the converting ctors to convert to the
right type for assignment instead.

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

9 years agoUpdate to not depend on "llvm-objdump -d -symbolize".
Rafael Espindola [Wed, 3 Sep 2014 16:16:02 +0000 (16:16 +0000)]
Update to not depend on "llvm-objdump -d -symbolize".

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

9 years agoR600/SI: Add a pattern for i64 and in a branch
Tom Stellard [Wed, 3 Sep 2014 15:22:41 +0000 (15:22 +0000)]
R600/SI: Add a pattern for i64 and in a branch

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

9 years agoR600/SI: Fix typos in SIInstrInfo::areLoadsFromSameBasePtr()
Tom Stellard [Wed, 3 Sep 2014 15:22:39 +0000 (15:22 +0000)]
R600/SI: Fix typos in SIInstrInfo::areLoadsFromSameBasePtr()

This fixes a crash in the OpenCV test:
ImgprocWarpResizeArea/Resize.Mat/16

There is no test case for this, because this failure depends on a
specific ordering of the loads, which could easily change.

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

9 years agoCheck-label a bit more specific
Renato Golin [Wed, 3 Sep 2014 13:32:08 +0000 (13:32 +0000)]
Check-label a bit more specific

Sometimes, the .file could be reordered and it'd identify the ldr in the filename as a bad match.

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

9 years agoDocument !and. Fix !shl and friends -- they provide binary operations.
Joerg Sonnenberger [Wed, 3 Sep 2014 13:17:03 +0000 (13:17 +0000)]
Document !and. Fix !shl and friends -- they provide binary operations.

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

9 years agoFix configure and make build of llvm examples.
Iain Sandoe [Wed, 3 Sep 2014 13:12:16 +0000 (13:12 +0000)]
Fix configure and make build of llvm examples.

Replaced link component 'jit' with 'mcjit'.

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

9 years agoAdd override to overriden virtual methods, remove virtual keywords.
Benjamin Kramer [Wed, 3 Sep 2014 11:41:21 +0000 (11:41 +0000)]
Add override to overriden virtual methods, remove virtual keywords.

No functionality change. Changes made by clang-tidy + some manual cleanup.

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

9 years agoFix ambiguous call to make_unique and clang-format.
Yaron Keren [Wed, 3 Sep 2014 08:22:30 +0000 (08:22 +0000)]
Fix ambiguous call to make_unique and clang-format.

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

9 years agoFollow-up for r217020: actually commit the fix for PR20800,
Alexander Potapenko [Wed, 3 Sep 2014 07:37:20 +0000 (07:37 +0000)]
Follow-up for r217020: actually commit the fix for PR20800,
revert the accidentally committed changes to LLVMSymbolize.cpp

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

9 years agoFix PR20800: correctly calculate the offset of the subq instruction when generating...
Alexander Potapenko [Wed, 3 Sep 2014 07:11:34 +0000 (07:11 +0000)]
Fix PR20800: correctly calculate the offset of the subq instruction when generating compact unwind info.

This CL replaces the constant DarwinX86AsmBackend.PushInstrSize with a method
that lets the backend account for different sizes of "push %reg" instruction
sizes.

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

9 years agoReapply r216805 "[MachineCombiner][AArch64] Use the correct register class for MADD...
Juergen Ributzka [Wed, 3 Sep 2014 07:07:10 +0000 (07:07 +0000)]
Reapply r216805 "[MachineCombiner][AArch64] Use the correct register class for MADD, SUB, and OR.""

This reapplies r216805 with a fix to a copy-past error, which resulted in an
incorrect register class.

Original commit message:
Select the correct register class for the various instructions that are
generated when combining instructions and constrain the registers to the
appropriate register class.

This fixes rdar://problem/18183707.

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

9 years agoRecommit "Use unique_ptr to manager FilterChooser ownership."
Craig Topper [Wed, 3 Sep 2014 06:07:54 +0000 (06:07 +0000)]
Recommit "Use unique_ptr to manager FilterChooser ownership."

Just using insert of a pair this time instead of emplace.

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

9 years agoRevert "Use unique_ptr to manager FilterChooser ownership."
Craig Topper [Wed, 3 Sep 2014 05:59:23 +0000 (05:59 +0000)]
Revert "Use unique_ptr to manager FilterChooser ownership."

std::map::emplace isn't working on some of the bots.

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

9 years agoUse unique_ptr to manager FilterChooser ownership.
Craig Topper [Wed, 3 Sep 2014 05:49:09 +0000 (05:49 +0000)]
Use unique_ptr to manager FilterChooser ownership.

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

9 years agoImplement move constructor and remove copy constructor for Filter objects in FixedLen...
Craig Topper [Wed, 3 Sep 2014 05:49:07 +0000 (05:49 +0000)]
Implement move constructor and remove copy constructor for Filter objects in FixedLenDecoderEmitter. Also remove unused copy constructor of FilterChooser.

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

9 years ago[MCJIT] Make llvm-rtdyld process eh_frame sections in -verify mode (accidentally
Lang Hames [Wed, 3 Sep 2014 05:42:52 +0000 (05:42 +0000)]
[MCJIT] Make llvm-rtdyld process eh_frame sections in -verify mode (accidentally
left out of r217010).

Also remove a crufty debugging output statement that was accidentally left in.

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

9 years ago[MCJIT] Add a 'section_addr' builtin function to RuntimeDyldChecker.
Lang Hames [Wed, 3 Sep 2014 05:01:46 +0000 (05:01 +0000)]
[MCJIT] Add a 'section_addr' builtin function to RuntimeDyldChecker.

The syntax of the new builtin is 'section_addr(<filename>, <section-name>)'
(similar to the stub_addr builtin, but without a symbol name). It returns the
base address of the given section in the given object file. This builtin makes
it possible to refer to the contents of sections that cannot contain symbols,
e.g. sections added by the linker itself, like __eh_frame.

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

9 years ago[FastISel][AArch64] Add target-dependent instruction selection for Add/Sub.
Juergen Ributzka [Wed, 3 Sep 2014 01:38:36 +0000 (01:38 +0000)]
[FastISel][AArch64] Add target-dependent instruction selection for Add/Sub.

There is already target-dependent instruction selection support for Adds/Subs to
support compares and the intrinsics with overflow check. This takes advantage of
the existing infrastructure to also support Add/Sub, which allows the folding of
immediates, sign-/zero-extends, and shifts.

This fixes rdar://problem/18207316.

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

9 years agoFix test case to match correct llvm-objdump output
Nick Kledzik [Wed, 3 Sep 2014 01:34:58 +0000 (01:34 +0000)]
Fix test case to match correct llvm-objdump output

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

9 years agoReplace printf with outs() <<
Nick Kledzik [Wed, 3 Sep 2014 01:12:52 +0000 (01:12 +0000)]
Replace printf with outs() <<

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

9 years agoChange name of copyFlags() to copyIRFlags(). Add convenience method for logical ...
Sanjay Patel [Wed, 3 Sep 2014 01:06:50 +0000 (01:06 +0000)]
Change name of copyFlags() to copyIRFlags(). Add convenience method for logical 'and' of all flags. NFC.

Adding 'IR' to the names in an attempt to be less ambiguous about the flags we're dealing with here.

The 'and' method is needed by the SLPVectorizer (PR20802) and possibly other passes.

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

9 years ago[CFLAA] Remove one final initializer list
Hal Finkel [Wed, 3 Sep 2014 00:06:47 +0000 (00:06 +0000)]
[CFLAA] Remove one final initializer list

Maybe MSVC will be happy now...

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

9 years ago[CFLAA] And even more MSVC fixes
Hal Finkel [Tue, 2 Sep 2014 23:50:01 +0000 (23:50 +0000)]
[CFLAA] And even more MSVC fixes

Remove a couple more initializer lists and constexpr dependencies.

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

9 years agoCleaning up remaining static initializers in Signals.inc
Chris Bieneman [Tue, 2 Sep 2014 23:48:13 +0000 (23:48 +0000)]
Cleaning up remaining static initializers in Signals.inc

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

9 years ago[CFLAA] More cleanup for MSVC
Hal Finkel [Tue, 2 Sep 2014 23:29:48 +0000 (23:29 +0000)]
[CFLAA] More cleanup for MSVC

Remove more initializer lists, etc.

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