Robert Khasanov [Wed, 29 Oct 2014 15:43:02 +0000 (15:43 +0000)]
[AVX512] Implemented AVX512VL FP bnary packed instructions (VADDP*, VSUBP*, VMULP*, VDIVP*, VMAXP*, VMINP*)
Refactored through AVX512_maskable
Added encoding tests for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220858
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 29 Oct 2014 15:23:11 +0000 (15:23 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220857
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 29 Oct 2014 09:18:49 +0000 (09:18 +0000)]
Fix build with CMake if LLVM_USE_INTEL_JITEVENTS option is enabled
* Added LLVM libraries required for IntelJITEvents to LLVMBuild.txt.
* Removed 'jit' library from llvm-jitlistener.
* Added support for OptionalLibraries to llvm-build cmake files generator.
Patch by aleksey.a.bader@intel.com
Differential Revision: http://reviews.llvm.org/D5646
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220848
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 29 Oct 2014 08:16:18 +0000 (08:16 +0000)]
[OCaml] Expose Llvm.parse_command_line_options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220847
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 29 Oct 2014 08:16:14 +0000 (08:16 +0000)]
[OCaml] Expose Llvm_target.TargetMachine.add_analysis_passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220846
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 29 Oct 2014 08:16:06 +0000 (08:16 +0000)]
[OCaml] If compiled without --enable-shared, hide packages from toplevel.
Pretend they do not exist using exists_if. This is better than
the current situation, which is the error:
Error: The external function `llvm_global_succ' is not available
but still somewhat confusing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220845
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 29 Oct 2014 08:16:01 +0000 (08:16 +0000)]
[OCaml] Expose Llvm_bitwriter.write_bitcode_to_memory_buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220844
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 29 Oct 2014 08:15:54 +0000 (08:15 +0000)]
[OCaml] Drop support for 3.12.1 and earlier.
In practice this means:
* Always using -g flag.
* Embedding -cclib -lstdc++ into the corresponding cma/cmxa file.
This also moves -lstdc++ in a single place.
* Using caml_named_value instead of a homegrown mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220843
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 29 Oct 2014 08:15:21 +0000 (08:15 +0000)]
[OCaml] Synchronize transformations with LLVM-C.
Also, rearrange the functions in a way that allows to quickly
compare C headers and .mli/glue files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220842
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 29 Oct 2014 08:08:21 +0000 (08:08 +0000)]
macho-symbolized-disassembly.test: Don't check C++ demangler unconditionally.
For example, MS PSDK is not expected to have <cxxabi.h>.
You should introduce the new feature in lit.cfg corresponding to HAVE_CXXABI_H if you would like to test demangler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220840
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 29 Oct 2014 06:31:11 +0000 (06:31 +0000)]
test: tweak inlined-allocs test
Remove pointless checks for storage of uninteresting values. Ensure that we
perform basic alias analysis to make the test more correct. Finally, apply a
stylistic change to the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220839
91177308-0d34-0410-b5e6-
96231b3b80d8
Seo Sanghyeon [Wed, 29 Oct 2014 05:20:39 +0000 (05:20 +0000)]
VMCore was renamed to IR long time ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220838
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 28 Oct 2014 23:39:46 +0000 (23:39 +0000)]
Update llvm-objdump’s Mach-O symbolizer code to demangle C++ names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220833
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 23:31:13 +0000 (23:31 +0000)]
[OCaml] PR5595: Pass LDFLAGS to tests via -cclib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220832
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 22:45:25 +0000 (22:45 +0000)]
[OCaml] PR14083, PR9606: Only pick *.odoc files from current build target.
When several build targets, e.g. Debug+Asserts and Release+Asserts
are present, ocamldoc complains of duplicate interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220831
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 22:39:42 +0000 (22:39 +0000)]
[OCaml] Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220829
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 22:39:36 +0000 (22:39 +0000)]
[OCaml] PR9719, PR14727: Make tests run without ocamlopt.
Previously, tests hardcoded ocamlopt and cmxa, which broke builds on
machines without ocamlopt. Instead, they now fall back to ocamlc.
As a side effect this fixes PR14727, which was caused by a crude hack
that replaced gcc with g++ everywhere in the ocamlopt native compiler
path and passes it back using -cc. Now the tests use the same
technique as META, i.e. -cclib -lstdc++. It might be more fragile
than using g++ explicitly, but it will break when the installed
package will also break, which is good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220828
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 19:47:02 +0000 (19:47 +0000)]
[OCaml] PR19859: Add functions to query and modify branches.
Patch by Gabriel Radanne <drupyog@zoho.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220818
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 19:46:56 +0000 (19:46 +0000)]
[C API] PR19859: Add functions to query and modify branches.
Patch by Gabriel Radanne <drupyog@zoho.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220817
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 19:46:52 +0000 (19:46 +0000)]
[OCaml] PR19859: Add tests for reading the values of numeric constants.
Patch by Gabriel Radanne <drupyog@zoho.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220816
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 19:46:48 +0000 (19:46 +0000)]
[OCaml] PR19859: Add Llvm.{fcmp_predicate,float_of_const}.
Patch by Gabriel Radanne <drupyog@zoho.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220815
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 19:46:44 +0000 (19:46 +0000)]
[C API] PR19859: Add LLVMGetFCmpPredicate and LLVMConstRealGetDouble.
Patch by Gabriel Radanne <drupyog@zoho.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220814
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 28 Oct 2014 18:27:37 +0000 (18:27 +0000)]
Transforms: reapply SVN r219899
This restores the commit from SVN r219899 with an additional change to ensure
that the CodeGen is correct for the case that was identified as being incorrect
(originally PR7272).
In the case that during inlining we need to synthesize a value on the stack
(i.e. for passing a value byval), then any function involving that alloca must
be stripped of its tailness as the restriction that it does not access the
parent's stack no longer holds. Unfortunately, a single alloca can cause a
rippling effect through out the inlining as the value may be aliased or may be
mutated through an escaped external call. As such, we simply track if an alloca
has been introduced in the frame during inlining, and strip any tail calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220811
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Tue, 28 Oct 2014 18:22:41 +0000 (18:22 +0000)]
[AVX512] Fix VSQRT packed instructions internal names.
No functional change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220808
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Tue, 28 Oct 2014 18:15:20 +0000 (18:15 +0000)]
[AVX512] Extended avx512_sqrt_packed (sqrt instructions) to VL subset.
Refactored through AVX512_maskable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220806
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Tue, 28 Oct 2014 16:37:13 +0000 (16:37 +0000)]
[AVX-512] Expanded rsqrt/rcp instructions to VL subset.
Refactored multiclass through AVX512_maskable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220783
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Tue, 28 Oct 2014 16:17:14 +0000 (16:17 +0000)]
[AVX512] Removed special case for cmp instructions in getVectorMaskingNode. Now cmp intrinsics lower as other intrinsics through VSELECT, and then VSELECT tranforms to AND in PerformSELECTCombine.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220779
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Tue, 28 Oct 2014 15:59:40 +0000 (15:59 +0000)]
[x86] Simplify vector selection if condition value type matches vselect value type and true value is all ones or false value is all zeros.
This transformation worked if selector is produced by SETCC, however SETCC is needed only if we consider to swap operands. So I replaced SETCC check for this case.
Added tests for vselect of <X x i1> values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220777
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 28 Oct 2014 13:12:13 +0000 (13:12 +0000)]
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220775
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Tue, 28 Oct 2014 12:28:51 +0000 (12:28 +0000)]
[AVX512] Bring back vector-shuffle lowering support through broadcasts
Ffter commit at rev219046 512-bit broadcasts lowering become non-optimal. Most of tests on broadcasting and embedded broadcasting were changed and they doesn’t produce efficient code.
Example below is from commit changes (it’s the first test from test/CodeGen/X86/avx512-vbroadcast.ll):
define <16 x i32> @_inreg16xi32(i32 %a) {
; CHECK-LABEL: _inreg16xi32:
; CHECK: ## BB#0:
-; CHECK-NEXT: vpbroadcastd %edi, %zmm0
+; CHECK-NEXT: vmovd %edi, %xmm0
+; CHECK-NEXT: vpbroadcastd %xmm0, %ymm0
+; CHECK-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
; CHECK-NEXT: retq
%b = insertelement <16 x i32> undef, i32 %a, i32 0
%c = shufflevector <16 x i32> %b, <16 x i32> undef, <16 x i32> zeroinitializer
ret <16 x i32> %c
}
Here, 256-bit broadcast was generated instead of 512-bit one.
In this patch
1) I added vector-shuffle lowering through broadcasts
2) Removed asserts and branches likes because this is incorrect
- assert(Subtarget->hasDQI() && "We can only lower v8i64 with AVX-512-DQI");
3) Fixed lowering tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220774
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 28 Oct 2014 11:54:52 +0000 (11:54 +0000)]
Reformat partially, where I touched for whitespace changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220773
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 28 Oct 2014 11:54:05 +0000 (11:54 +0000)]
LoopRerollPass.cpp: Use range-based loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220772
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 28 Oct 2014 11:53:30 +0000 (11:53 +0000)]
Untabify and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220771
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 06:15:41 +0000 (06:15 +0000)]
[OCaml] Enable -g for debug builds.
We don't care about pre-3.12.1 anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220767
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 28 Oct 2014 06:15:18 +0000 (06:15 +0000)]
[OCaml] Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220766
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 28 Oct 2014 02:57:26 +0000 (02:57 +0000)]
Minimize the scope of some variables, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220759
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 28 Oct 2014 01:29:26 +0000 (01:29 +0000)]
X86: Implement the vectorcall calling convention
This is a Microsoft calling convention that supports both x86 and x86_64
subtargets. It passes vector and floating point arguments in XMM0-XMM5,
and passes them indirectly once they are consumed.
Homogenous vector aggregates of up to four elements can be passed in
sequential vector registers, but this part is not implemented in LLVM
and will be handled in Clang.
On 32-bit x86, it is similar to fastcall in that it uses ecx:edx as
integer register parameters and is callee cleanup. On x86_64, it
delegates to the normal win64 calling convention.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D5943
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220745
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 28 Oct 2014 01:24:32 +0000 (01:24 +0000)]
AArch64: enable Cortex-A57 FP balancing on Cortex-A53.
Benchmarks have shown that it's harmless to the performance there, and having a
unified set of passes between the two cores where possible helps big.LITTLE
deployment.
Patch by Z. Zheng.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220744
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 28 Oct 2014 00:24:16 +0000 (00:24 +0000)]
Remove the PreserveSource linker mode.
I noticed that it was untested, and forcing it on caused some tests to fail:
LLVM :: Linker/metadata-a.ll
LLVM :: Linker/prefixdata.ll
LLVM :: Linker/type-unique-odr-a.ll
LLVM :: Linker/type-unique-simple-a.ll
LLVM :: Linker/type-unique-simple2-a.ll
LLVM :: Linker/type-unique-simple2.ll
LLVM :: Linker/type-unique-type-array-a.ll
LLVM :: Linker/unnamed-addr1-a.ll
LLVM :: Linker/visibility1.ll
If it is to be resurrected, it has to be fixed and we should probably have a
-preserve-source command line option in llvm-mc and run tests with and without
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220741
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 27 Oct 2014 23:29:27 +0000 (23:29 +0000)]
AArch64InstrInfo.h: Fix a warning introduced in clang r220703. [-Winconsistent-missing-override]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220739
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 27 Oct 2014 23:08:40 +0000 (23:08 +0000)]
[AVX512] Add vpermil variable version
This is implemented via a multiclass that derives from the vperm imm
multiclass.
Fixes <rdar://problem/
18426089>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220737
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 27 Oct 2014 23:08:37 +0000 (23:08 +0000)]
[AVX512] Clean up avx512_perm_imm to use X86VectorVTInfo
No functionality change. No change in X86.td.expanded except that we only set
the CD8 attributes for the memory variants. (This shouldn't be used unless we
have a memory operand.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220736
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 27 Oct 2014 23:08:34 +0000 (23:08 +0000)]
[AVX512] Derive vpermil* from avx512_perm_imm
This used to derive from avx512_pshuf_imm which is confusing.
NFC. Compared X86.td.expanded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220735
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 27 Oct 2014 23:08:31 +0000 (23:08 +0000)]
[AVX512] Fix copy-and-paste bugs in vpermil
1) i512mem -> f512mem (this is the packed FP input being permuted)
2) element size is 64 bits in EVEX_CD8 for PD.
(A good illustration why X86VectorVTInfo is useful)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220734
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Oct 2014 23:02:10 +0000 (23:02 +0000)]
Make it easier to pass a custom diagnostic handler to the IR linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220732
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 27 Oct 2014 22:38:45 +0000 (22:38 +0000)]
Fix a stackmap bug introduced in r220710.
For a call to not return in to the stackmap shadow, the shadow must end with the call.
To do this, we must insert any required nops *before* the call, and not after it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220728
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Mon, 27 Oct 2014 21:14:41 +0000 (21:14 +0000)]
[ScalarEvolution] Guard dump() with #if
to be consistent with its definition in ScalarEvolution.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220721
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Oct 2014 20:30:04 +0000 (20:30 +0000)]
Fix bug where sys::Wait could wait on wrong pid.
Setting ChildPid to -1 would cause waitpid to wait for any child process.
Patch by Daniel Reynaud!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220717
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 27 Oct 2014 19:58:36 +0000 (19:58 +0000)]
[FastISel][AArch64] Emit immediate version of icmp (subs) for null pointer check.
This is a minor change to use the immediate version when the operand is a null
value. This should get rid of an unnecessary 'mov' instruction in debug
builds and align the code more with the one generated by SelectionDAG.
This fixes rdar://problem/
18785125.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220713
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 27 Oct 2014 19:46:23 +0000 (19:46 +0000)]
[FastISel][AArch64] Optimize compare-and-branch for i1 to use 'tbz'.
Minor enhancement to use 'tbz' for i1 compare-and-branch to get rid of an 'and'
instruction.
This fixes rdar://problem/
18784953.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220712
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 27 Oct 2014 19:40:35 +0000 (19:40 +0000)]
Stackmap shadows should consider call returns a branch target.
To avoid emitting too many nops, a stackmap shadow can include emitted instructions in the shadow, but these must not include branch targets.
A return from a call should count as a branch target as patching over the instructions after the call would lead to incorrect behaviour for threads currently making that call, when they return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220710
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 27 Oct 2014 19:38:05 +0000 (19:38 +0000)]
[FastISel][AArch64] Use 'cbz' also for null values (pointers).
The pattern matching for a 'ConstantInt' value was too restrictive. Checking for
a 'Constant' with a bull value is sufficient for using an 'cbz/cbnz' instruction.
This fixes rdar://problem/
18784732.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220709
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 27 Oct 2014 19:16:48 +0000 (19:16 +0000)]
[FastISel][AArch64] Don't fold the 'and' instruction into the 'tbz/tbnz' instruction if it is in a different basic block.
This fixes a bug where the input register was not defined for the 'tbz/tbnz'
instruction. This happened, because we folded the 'and' instruction from a
different basic block.
This fixes rdar://problem/
18784013.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220704
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 27 Oct 2014 18:21:58 +0000 (18:21 +0000)]
[FastISel][AArch64] Fix load/store with frame indices.
At higher optimization levels the LLVM IR may contain more complex patterns for
loads/stores from/to frame indices. The 'computeAddress' function wasn't able to
handle this and triggered an assertion.
This fix extends the possible addressing modes for frame indices.
This fixes rdar://problem/
18783298.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220700
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 27 Oct 2014 18:13:56 +0000 (18:13 +0000)]
[asan] experimental tracing for indirect calls, llvm part.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220699
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 27 Oct 2014 17:59:51 +0000 (17:59 +0000)]
[PBQP] Remove a spurious 'typename' keyword. This was causing an error on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220690
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 27 Oct 2014 17:52:05 +0000 (17:52 +0000)]
[PBQP] Clarify ambiguous-looking typedef.
This was causing an error on the hexagon bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220689
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 27 Oct 2014 17:44:25 +0000 (17:44 +0000)]
[PBQP] Unique allowed-sets for nodes in the PBQP graph and use pairs of these
sets as keys into a cache of interference matrice values in the Interference
constraint adder.
Creating interference matrices was one of the large remaining time-sinks in
PBQP. Caching them reduces the total compile time (when using PBQP) on the
nightly test suite by ~10%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220688
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 27 Oct 2014 17:20:53 +0000 (17:20 +0000)]
Add MapVector::rbegin(), MapVector::rend() to completment MapVector::begin(), MapVector::end().
These just delegate to the underlying vector type in the MapVector.
Also just add in some sanity unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220687
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 27 Oct 2014 12:37:26 +0000 (12:37 +0000)]
Prune CRLF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220678
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 27 Oct 2014 09:23:02 +0000 (09:23 +0000)]
[ARM] Select VMAXNM and VMINNM regardless of operand order
Currently, the ARM backend will select the VMAXNM and VMINNM for these C
expressions:
(a < b) ? a : b
(a > b) ? a : b
but not these expressions:
(a > b) ? b : a
(a < b) ? b : a
This patch allows all of these expressions to be matched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220671
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuri Gorshenin [Mon, 27 Oct 2014 08:38:54 +0000 (08:38 +0000)]
[asan-asm-instrumentation] Added comment describing how asm instrumentation works.
Summary: [asan-asm-instrumentation] Added comment describing how asm instrumentation works.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5970
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220670
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 27 Oct 2014 08:16:18 +0000 (08:16 +0000)]
Re-commit r220667.
C++ source given to check_cxx_source_compile should have define "main".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220669
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 27 Oct 2014 08:08:18 +0000 (08:08 +0000)]
Fix unicode chars into ascii in comment lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220668
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 27 Oct 2014 08:03:21 +0000 (08:03 +0000)]
Revert "Include stddef.h before including cxxabi.h" to un-break buildbot
This reverts commit r220665.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220667
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 27 Oct 2014 07:37:57 +0000 (07:37 +0000)]
Include stddef.h before including cxxabi.h
On FreeBSD 10.0, size_t needs to be defined before including cxxabi.h.
Currenty HAVE_CXXABI_H is not defined on FreeBSD because of that reason.
This patch teaches cmake and configure how to include it.
http://reviews.llvm.org/D5940
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220665
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 27 Oct 2014 05:47:49 +0000 (05:47 +0000)]
InstCombine: Fix a combine assuming that icmp operands were integers
An icmp may have pointer arguments, it isn't limited to integers or
vectors of integers.
This fixes PR21388.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220664
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 27 Oct 2014 02:35:46 +0000 (02:35 +0000)]
LinkModules.cpp: don't repeat names in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220662
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 26 Oct 2014 23:37:04 +0000 (23:37 +0000)]
Remove some unnecessary casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220658
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 26 Oct 2014 22:12:02 +0000 (22:12 +0000)]
[PBQP] Tidying up as per Dave Blaikie's suggesions for r220642.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220655
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 26 Oct 2014 21:55:54 +0000 (21:55 +0000)]
[PBQP] Explicitly define copy/move operations for NodeMetadata to keep VS happy.
Hopefully this fixes the bug that was introduced in r220642, and not-quite-fixed
in r220649.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220653
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sun, 26 Oct 2014 21:50:58 +0000 (21:50 +0000)]
Add an option to the LTO code generator to disable vectorization during LTO
We used to always vectorize (slp and loop vectorize) in the LTO pass pipeline.
r220345 changed it so that we used the PassManager's fields 'LoopVectorize' and
'SLPVectorize' out of the desire to be able to disable vectorization using the
cl::opt flags 'vectorize-loops'/'slp-vectorize' which the before mentioned
fields default to.
Unfortunately, this turns off vectorization because those fields
default to false.
This commit adds flags to the LTO library to disable lto vectorization which
reconciles the desire to optionally disable vectorization during LTO and
the desired behavior of defaulting to enabled vectorization.
We really want tools to set PassManager flags directly to enable/disable
vectorization and not go the route via cl::opt flags *in*
PassManagerBuilder.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220652
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 26 Oct 2014 20:57:16 +0000 (20:57 +0000)]
[PBQP] Re-commit r220642 with a workaround for quirky Visual Studio behavior.
Apparently unique_ptr'ifying NodeMetadata exposed an issue in VS where it
occasionally tries to synthesize copy constructors instead of moves. Hopefully
explicitly deleting the copy constructor and defining the move constructor will
fix this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220649
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 26 Oct 2014 20:45:22 +0000 (20:45 +0000)]
[OCaml] Expose existing documentation in ocamldoc.
Patch by Gabriel Radanne <drupyog@zoho.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220648
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sun, 26 Oct 2014 19:50:13 +0000 (19:50 +0000)]
Revert "[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change." (r220642)
It broke the Windows build:
[1/19] Building CXX object lib\CodeGen\CMakeFiles\LLVMCodeGen.dir\RegAllocPBQP.cpp.obj
C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/CodeGen/RegAllocPBQP.h(132) : error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'
with
[
_Ty=unsigned int []
]
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1600) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
with
[
_Ty=unsigned int []
]
This diagnostic occurred in the compiler generated function 'llvm::PBQP::RegAlloc::NodeMetadata::NodeMetadata(const llvm::PBQP::RegAlloc::NodeMetadata &)'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220645
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 26 Oct 2014 18:50:52 +0000 (18:50 +0000)]
[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220642
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 26 Oct 2014 18:16:27 +0000 (18:16 +0000)]
[PBQP] Tidy up CostAllocator.h: fix variable case, rename CostPool to ValuePool.
No functional change. This just brings things more in-line with coding
standards, and makes ValuePool's functionality clearer (it's not tied to pooling
costs, and we may want to use it to hold other things in the future).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220641
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 26 Oct 2014 09:52:24 +0000 (09:52 +0000)]
AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220638
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 25 Oct 2014 19:59:30 +0000 (19:59 +0000)]
LSR: Minor cleanup after Daniel's patch.
Combine the Inserted an Done sets into a Visited set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220623
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 25 Oct 2014 19:42:07 +0000 (19:42 +0000)]
Fix LSR compile time.
This is a simple fix that brings the compilation time from 5min to 5s
on a specific real-world example. It's a large chain of computation in
a crypto routine (always a problem for SCEV). A unit test is not
feasible and there would be no way to check it. The fix is just basic
good practice for dealing with SCEVs, there's no risk of regression.
Patch by Daniel Reynaud!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220622
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sat, 25 Oct 2014 19:01:14 +0000 (19:01 +0000)]
[OCaml] hexagon can't run MCJIT tests, XFAIL it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220621
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sat, 25 Oct 2014 18:50:02 +0000 (18:50 +0000)]
[OCaml] Unbreak Llvm_executionengine.initialize_native_target.
First, return true on success, as it is the OCaml convention.
Second, also initialize the native assembly printer, which is,
despite the name, required for MCJIT operation.
Since this function did not initialize the assembly printer earlier
and no function to initialize native assembly printer was available
elsewhere, it is safe to break its interface: it means that it
simply could not be used successfully before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220620
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sat, 25 Oct 2014 18:49:56 +0000 (18:49 +0000)]
[OCaml] Expose Llvm_executionengine.ExecutionEngine.create_mcjit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220619
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Sat, 25 Oct 2014 18:34:03 +0000 (18:34 +0000)]
[SeparateConstOffsetFromGEP] Fixed a bug related to unsigned modulo
The dividend in "signed % unsigned" is treated as unsigned instead of signed,
causing unexpected behavior such as -64 % (uint64_t)24 == 0.
Added a regression test in split-gep.ll
Patched by Hao Liu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220618
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 25 Oct 2014 18:20:17 +0000 (18:20 +0000)]
Unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220617
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 25 Oct 2014 18:09:01 +0000 (18:09 +0000)]
Clean up assume intrinsic pattern matching, no need to check that the argument is a value.
Also make it const safe and remove superfluous casting. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220616
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Sat, 25 Oct 2014 17:36:21 +0000 (17:36 +0000)]
[SeparateConstOffsetFromGEP] Fixed a bug in rebuilding OR expressions
The two operands of the new OR expression should be NextInChain and TheOther
instead of the two original operands.
Added a regression test in split-gep.ll.
Hao Liu reported this bug, and provded the test case and an initial patch.
Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220615
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 25 Oct 2014 08:11:20 +0000 (08:11 +0000)]
[X86][SSE] Vector integer/float conversion memory folding
Tidied up some entries in the folding tables so that they are under the correct comment section (they were categorised as AVX2 instructions when they're AVX1).
Minor patch agreed with qcolombet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220613
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 25 Oct 2014 07:13:13 +0000 (07:13 +0000)]
InstCombine: Remove overzealous asserts
These asserts can trigger if the worklist iteration order is
sufficiently unlucky. Instead of adding special case logic to handle
these edge conditions, just bail out on trying to transform them:
InstSimplify will get them when it reaches them on the worklist.
This fixes PR21378.
N.B. No test case is included because any test would rely on the
fragile worklist iteration order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220612
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Oct 2014 04:31:08 +0000 (04:31 +0000)]
Allow the C API users to keep relying on the OutMessages parameter.
Should fix the Ocaml tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220611
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Oct 2014 04:07:53 +0000 (04:07 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220610
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Oct 2014 04:06:10 +0000 (04:06 +0000)]
Update the error handling of lib/Linker.
Instead of passing a std::string&, use the new diagnostic infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220608
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Sat, 25 Oct 2014 03:46:16 +0000 (03:46 +0000)]
[NVPTX] aligned byte-buffers for vector return types
Summary:
Fixes PR21100 which is caused by inconsistency between the declared return type
and the expected return type at the call site. The new behavior is consistent
with nvcc and the NVPTXTargetLowering::getPrototype function.
Test Plan: test/Codegen/NVPTX/vector-return.ll
Reviewers: jholewinski
Reviewed By: jholewinski
Subscribers: llvm-commits, meheff, eliben, jholewinski
Differential Revision: http://reviews.llvm.org/D5612
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220607
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 25 Oct 2014 01:14:15 +0000 (01:14 +0000)]
Add a test for the -suppress-warnings option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220603
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 24 Oct 2014 23:34:15 +0000 (23:34 +0000)]
[msan] Make -msan-check-constant-shadow a bit stronger.
Allow (under the experimental flag) non-Instructions to participate in MSan checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220601
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Oct 2014 22:50:48 +0000 (22:50 +0000)]
Modernize the error handling of the Materialize function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220600
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 24 Oct 2014 22:39:40 +0000 (22:39 +0000)]
Fix a Mach-O assembler segfault for a subtraction expression with an undefined symbol.
In a Mach-O object file a relocatable expression of the form
SymbolA - SymbolB + constant is allowed when both symbols are
defined in a section. But when either symbol is undefined it
is an error.
The code was crashing when it had an undefined symbol in this case.
And should have printed a error message using the location information
in the relocation entry.
rdar://
18678402
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220599
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Fri, 24 Oct 2014 21:31:09 +0000 (21:31 +0000)]
Sink DwarfUnit::constructImportedEntityDIE into DwarfCompileUnit.
So that it has access to getOrCreateGlobalVariableDIE. If we ever support
decsribing using directive in C++ classes (thus requiring support in type
units), it will certainly use another mechanism anyway.
Differential Revision: http://reviews.llvm.org/D5975
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220594
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 24 Oct 2014 21:04:41 +0000 (21:04 +0000)]
[X86][SSE] Bitcast assertion in XFormVExtractWithShuffleIntoLoad
Minor patch to fix an issue in XFormVExtractWithShuffleIntoLoad where a load is unary shuffled, then bitcast (to a type with the same number of elements) before extracting an element.
An undef was created for the second shuffle operand using the original (post-bitcasted) vector type instead of the pre-bitcasted type like the rest of the shuffle node - this was then causing an assertion on the different types later on inside SelectionDAG::getVectorShuffle.
Differential Revision: http://reviews.llvm.org/D5917
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220592
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Fri, 24 Oct 2014 19:00:32 +0000 (19:00 +0000)]
[Hexagon] Resubmission of 220427
Modified library structure to deal with circular dependency between HexagonInstPrinter and HexagonMCInst.
Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.
http://reviews.llvm.org/D5624
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220584
91177308-0d34-0410-b5e6-
96231b3b80d8