OSDN Git Service
Rafael Espindola [Fri, 31 Oct 2014 16:08:17 +0000 (16:08 +0000)]
Mark a few variables const. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220964
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 31 Oct 2014 15:27:16 +0000 (15:27 +0000)]
[CMake] llvm/examples: Update libdeps for unoptimized builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220962
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 31 Oct 2014 15:17:36 +0000 (15:17 +0000)]
[AArch64] CondOpt pass is missing FCMP instructions when searching backward for
a CMP which defines the flags used by B.CC.
http://reviews.llvm.org/D6047
Patch by Zhaoshi Zheng <zhaoshiz@codeaurora.org>!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220961
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Fri, 31 Oct 2014 11:40:32 +0000 (11:40 +0000)]
[SCEV] Improve Scalar Evolution's use of no {un,}signed wrap flags
In a case where we have a no {un,}signed wrap flag on the increment, if
RHS - Start is constant then we can avoid inserting a max operation bewteen
the two, since we can statically determine which is greater.
This allows us to unroll loops such as:
void testcase3(int v) {
for (int i=v; i<=v+1; ++i)
f(i);
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220960
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 31 Oct 2014 10:33:14 +0000 (10:33 +0000)]
[PowerPC] Load BlockAddress values from the TOC in 64-bit SVR4 code
Since block address values can be larger than 2GB in 64-bit code, they
cannot be loaded simply using an @l / @ha pair, but instead must be
loaded from the TOC, just like GlobalAddress, ConstantPool, and
JumpTable values are.
The commit also fixes a bug in PPCLinuxAsmPrinter::doFinalization where
temporary labels could not be used as TOC values, since code would
attempt (and fail) to use GetOrCreateSymbol to create a symbol of the
same name as the temporary label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220959
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Fri, 31 Oct 2014 09:19:03 +0000 (09:19 +0000)]
[OCaml] Ensure consistent naming.
Specifically:
* Directories match module names.
* Test names match module names.
* The language is called "OCaml", not "Ocaml".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220958
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Fri, 31 Oct 2014 09:05:36 +0000 (09:05 +0000)]
[OCaml] Rework Llvm_executionengine using ctypes.
Since JIT->MCJIT migration, most of the ExecutionEngine interface
became deprecated and/or broken. This especially affected the OCaml
bindings, as runFunction is no longer available, and unlike in C,
it is not possible to coerce a pointer to a function and call it
in OCaml.
In practice, LLVM 3.5 shipped completely unusable
Llvm_executionengine.
The GenericValue interface and runFunction were essentially
a poor man's FFI. As such, this interface was removed and instead
a dependency on ctypes >=0.3 added, which handled platform-specific
aspects of accessing data and calling functions.
The new interface does not expose JIT (which is a shim around MCJIT),
as well as the interpreter (which can't handle a lot of valid IR).
Llvm_executionengine.add_global_mapping is currently unusable
due to PR20656.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220957
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 Oct 2014 05:54:15 +0000 (05:54 +0000)]
Move an input file to Inputs instead of using RUN: true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220953
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 31 Oct 2014 05:07:00 +0000 (05:07 +0000)]
Object, COFF: Cleanup symbol type code, improve binutils compatibility
Do a better job classifying symbols. This increases the consistency
between the COFF handling code and the ELF side of things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220952
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 Oct 2014 05:04:16 +0000 (05:04 +0000)]
merge tests for constant linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220951
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 31 Oct 2014 04:46:38 +0000 (04:46 +0000)]
Move definition closer to use. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220949
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Fri, 31 Oct 2014 02:35:34 +0000 (02:35 +0000)]
PR20557: Fix the bug that bogus cpu parameter crashes llc on AArch64 backend.
Initial patch by Oleg Ranevskyy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220945
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 31 Oct 2014 00:54:20 +0000 (00:54 +0000)]
Threading.h: Give named parameters to llvm::call_once(flag,UserFn). [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220941
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 30 Oct 2014 23:46:50 +0000 (23:46 +0000)]
[SelectionDAG] When scalarizing trunc, don't assert for legal operands.
r212242 introduced a legalizer hook, originally to let AArch64 widen
v1i{32,16,8} rather than scalarize, because the legalizer expected, when
scalarizing the result of a conversion operation, to already have
scalarized the operands. On AArch64, v1i64 is legal, so that commit
ensured operations such as v1i32 = trunc v1i64 wouldn't assert.
It did that by choosing to widen v1 types whenever possible. However,
v1i1 types, for which there's no legal widened type, would still trigger
the assert.
This commit fixes that, by only scalarizing a trunc's result when the
operand has already been scalarized, and introducing an extract_elt
otherwise.
This is similar to r205625.
Fixes PR20777.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220937
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 30 Oct 2014 23:10:01 +0000 (23:10 +0000)]
Speculative fix for Windows build after r220932
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220936
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 30 Oct 2014 22:37:58 +0000 (22:37 +0000)]
EXPORTED_SYMBOL_FILE using mingw and cmake
Summary: This is a fix for the command line syntax error while building LTO when using MinGW.
Patch By: jsroemer
Reviewers: rnk
Reviewed By: rnk
Subscribers: rnk, beanz, llvm-commits
Differential Revision: http://reviews.llvm.org/D5476
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220935
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 30 Oct 2014 22:28:46 +0000 (22:28 +0000)]
llvm/test/Transforms/SampleProfile/syntax.ll: Relax MISSING-FILE not to
check locale-aware message catalog.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220934
91177308-0d34-0410-b5e6-
96231b3b80d8
Louis Gerbarg [Thu, 30 Oct 2014 22:21:03 +0000 (22:21 +0000)]
Fix incorrect invariant check in DAG Combine
Earlier this summer I fixed an issue where we were incorrectly combining
multiple loads that had different constraints such alignment, invariance,
temporality, etc. Apparently in one case I made copt paste error and swapped
alignment and invariance.
Tests included.
rdar://
18816719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220933
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 30 Oct 2014 22:07:09 +0000 (22:07 +0000)]
Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex.
Summary:
This patch adds an llvm_call_once which is a wrapper around std::call_once on platforms where it is available and devoid of bugs. The patch also migrates the ManagedStatic mutex to be allocated using llvm_call_once.
These changes are philosophically equivalent to the changes added in r219638, which were reverted due to a hang on Win32 which was the result of a bug in the Windows implementation of std::call_once.
Reviewers: aaron.ballman, chapuni, chandlerc, rnk
Reviewed By: rnk
Subscribers: majnemer, llvm-commits
Differential Revision: http://reviews.llvm.org/D5922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220932
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 30 Oct 2014 20:57:49 +0000 (20:57 +0000)]
llvm-cov: Follow LLVM naming conventions
This renames a few things that are using an unusual naming convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220929
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 30 Oct 2014 20:51:24 +0000 (20:51 +0000)]
llvm-cov: Don't manually parse an option for no reason
We're using cl::opt here, but for some reason we're reading out one
particular option by hand instead. This makes -help and the like
behave rather poorly, so let's not do it this way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220928
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 Oct 2014 20:50:23 +0000 (20:50 +0000)]
Fix the merging of the constantness of declarations.
The langref says:
LLVM explicitly allows declarations of global variables to be marked
constant, even if the final definition of the global is not. This
capability can be used to enable slightly better optimization of the
program, but requires the language definition to guarantee that
optimizations based on the ‘constantness’ are valid for the
translation units that do not include the definition.
Given that definition, when merging two declarations, we have to drop
constantness if of of them is not marked contant, since the Module
without the constant marker might not have the necessary guarantees.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220927
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 30 Oct 2014 20:29:48 +0000 (20:29 +0000)]
llvm-cov: Very basic top level help
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220926
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 30 Oct 2014 20:25:19 +0000 (20:25 +0000)]
Add handling for range metadata in ValueTracking isKnownNonZero
If we load from a location with range metadata, we can use information about the ranges of the loaded value for optimization purposes. This helps to remove redundant checks and canonicalize checks for other optimization passes. This particular patch checks whether a value is known to be non-zero from the range metadata.
Currently, these tests are against InstCombine. In theory, all of these should be InstSimplify since we're not inserting any new instructions. Moving the code may follow in a separate change.
Reviewed by: Hal
Differential Revision: http://reviews.llvm.org/D5947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220925
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 30 Oct 2014 20:23:59 +0000 (20:23 +0000)]
Update test to pass .ll to llvm-link and use Inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220924
91177308-0d34-0410-b5e6-
96231b3b80d8
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