OSDN Git Service
David Blaikie [Thu, 30 Oct 2014 20:20:11 +0000 (20:20 +0000)]
PR21408: Workaround the appearance of duplicate variables due to problems when inlining two calls to the same function from the same call site.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220923
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Thu, 30 Oct 2014 20:19:19 +0000 (20:19 +0000)]
Fix comment spelling and tidy diagnostic call in profile reader.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220922
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 30 Oct 2014 19:26:42 +0000 (19:26 +0000)]
lit: PR21417: don't try to update OCAMLPATH if LibDir is empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220919
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Thu, 30 Oct 2014 18:48:41 +0000 (18:48 +0000)]
Fix Twine corruption problem with diagnostics.
This fixes the autobuilders I broke with a recent patch. Thanks echristo
and dblaikie for beating me with a clue stick.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220918
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Thu, 30 Oct 2014 18:00:06 +0000 (18:00 +0000)]
Add profile writing capabilities for sampling profiles.
Summary:
This patch finishes up support for handling sampling profiles in both
text and binary formats. The new binary format uses uleb128 encoding to
represent numeric values. This makes profiles files about 25% smaller.
The profile writer class can write profiles in the existing text and the
new binary format. In subsequent patches, I will add the capability to
read (and perhaps write) profiles in the gcov format used by GCC.
Additionally, I will be adding support in llvm-profdata to manipulate
sampling profiles.
There was a bit of refactoring needed to separate some code that was in
the reader files, but is actually common to both the reader and writer.
The new test checks that reading the same profile encoded as text or
raw, produces the same results.
Reviewers: bogner, dexonsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6000
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220915
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 Oct 2014 17:05:44 +0000 (17:05 +0000)]
ARM: test default values for TAG_CPU_unaligned_access attribute.
It should be on for every target that supports unaligned accesses (e.g. not
v6m).
Patch by Charlie Turner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220912
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 30 Oct 2014 14:56:02 +0000 (14:56 +0000)]
[Mips] Add new Mips specific e_flags.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220910
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Thu, 30 Oct 2014 14:21:47 +0000 (14:21 +0000)]
[AVX512] Added VBROADCAST{SS/SD} encoding for VL subset.
Refactored through AVX512_maskable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220908
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 30 Oct 2014 13:22:57 +0000 (13:22 +0000)]
[dfsan] New calling convention for custom functions with variadic arguments.
Summary:
The previous calling convention prevented custom functions from being able
to access argument labels unless it knew how many variadic arguments there
were, and of which type. This restriction made it impossible to correctly
model functions in the printf family, as it is legal to pass more arguments
than required to those functions. We now pass arguments in the following order:
non-vararg arguments
labels for non-vararg arguments
[if vararg function, pointer to array of labels for vararg arguments]
[if non-void function, pointer to label for return value]
vararg arguments
Differential Revision: http://reviews.llvm.org/D6028
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220906
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 30 Oct 2014 08:30:12 +0000 (08:30 +0000)]
[OCaml] Expose LLVMCloneModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220903
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 30 Oct 2014 08:30:08 +0000 (08:30 +0000)]
[OCaml] Expose LLVM{Get,Set}DLLStorageClass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220902
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 30 Oct 2014 08:30:01 +0000 (08:30 +0000)]
[OCaml] Test code emission in Llvm_target.
Prior to this commit, the Llvm_target tests (ab)used
the Llvm_executionengine as a mechanism to initialize at least some
target. This needlessly restricted tests to builds which can emit
code for their host architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220901
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 30 Oct 2014 08:29:57 +0000 (08:29 +0000)]
[OCaml] Enable backtraces in tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220900
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 30 Oct 2014 08:29:45 +0000 (08:29 +0000)]
[OCaml] [autoconf] Migrate to ocamlfind.
This commit updates the OCaml bindings and tests to use ocamlfind.
The bindings are migrated in order to use ctypes, which are now
required for MCJIT-backed Llvm_executionengine.
The tests are migrated in order to use OUnit and to verify that
the distributed META.llvm allows to build working executables.
Every OCaml toolchain invocation is now chained through ocamlfind,
which (in theory) allows to cross-compile the OCaml bindings.
The configure script now checks for ctypes (>= 0.2.3) and
OUnit (>= 2). The code depending on these libraries will be added
later. The configure script does not check the package versions
in order to keep changes less invasive.
Additionally, OCaml bindings will now be automatically enabled
if ocamlfind is detected on the system, rather than ocamlc, as it
was before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220899
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Thu, 30 Oct 2014 08:29:29 +0000 (08:29 +0000)]
[OCaml] De-duplicate llvm_raise and llvm_string_of_message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220898
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 Oct 2014 00:38:54 +0000 (00:38 +0000)]
Enable the slp vectorizer in the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220887
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 Oct 2014 00:11:24 +0000 (00:11 +0000)]
Enable the loop vectorizer in the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220886
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 29 Oct 2014 23:54:45 +0000 (23:54 +0000)]
Replace also-emit-llvm with save-temps.
The also-emit-llvm option only supported getting the IR before optimizations.
This patch replaces it with a more generic save-temps option that saves the IR
both before and after optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220885
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 29 Oct 2014 23:44:35 +0000 (23:44 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220884
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 29 Oct 2014 23:05:12 +0000 (23:05 +0000)]
llvm/test/Transforms/LoopRotate/nosimplifylatch.ll: Fix possibly mis-repeatedly-pasted test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220880
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 29 Oct 2014 21:28:24 +0000 (21:28 +0000)]
Run clang-format on tools/llvm-objdump/MachODump.cpp . No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220875
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Wed, 29 Oct 2014 20:20:33 +0000 (20:20 +0000)]
Test Case for r220872:Do not simplifyLatch for loops where hoisting increments couldresult in extra live range interferance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220873
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Wed, 29 Oct 2014 20:19:47 +0000 (20:19 +0000)]
Do not simplifyLatch for loops where hoisting increments couldresult in extra live range interferance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220872
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Wen Voung [Wed, 29 Oct 2014 18:37:13 +0000 (18:37 +0000)]
Fix getRelocationValueString to return the symbol name for EM_386.
Summary: This helps llvm-objdump -r to print out the symbol name along
with the relocation type on x86. Adjust existing tests from checking
for "Unknown" to check for the symbol now.
Test Plan: Adjusted test/Object tests.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5987
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220866
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 29 Oct 2014 17:29:38 +0000 (17:29 +0000)]
Enable display of compiler diagnostics in clang-tidy by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220863
91177308-0d34-0410-b5e6-
96231b3b80d8
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