1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

109301 Commits

Author SHA1 Message Date
NAKAMURA Takumi
cc0ddb87d3 [CMake] llvm/examples: Update libdeps for unoptimized builds.
llvm-svn: 220962
2014-10-31 15:27:16 +00:00
Chad Rosier
9bc5bd5f9a [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>!

llvm-svn: 220961
2014-10-31 15:17:36 +00:00
Bradley Smith
3e03fb9d20 [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);
 }

llvm-svn: 220960
2014-10-31 11:40:32 +00:00
Ulrich Weigand
5b86d1f937 [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.

llvm-svn: 220959
2014-10-31 10:33:14 +00:00
Peter Zotov
c92484316f [OCaml] Ensure consistent naming.
Specifically:
  * Directories match module names.
  * Test names match module names.
  * The language is called "OCaml", not "Ocaml".

llvm-svn: 220958
2014-10-31 09:19:03 +00:00
Peter Zotov
5dda7d9855 [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.

llvm-svn: 220957
2014-10-31 09:05:36 +00:00
Rafael Espindola
563de331d9 Move an input file to Inputs instead of using RUN: true.
llvm-svn: 220953
2014-10-31 05:54:15 +00:00
David Majnemer
709c1327d3 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.

llvm-svn: 220952
2014-10-31 05:07:00 +00:00
Rafael Espindola
533544ad95 merge tests for constant linking.
llvm-svn: 220951
2014-10-31 05:04:16 +00:00
Rafael Espindola
24d875a2a5 Move definition closer to use. NFC.
llvm-svn: 220949
2014-10-31 04:46:38 +00:00
Hao Liu
6cc87eb119 PR20557: Fix the bug that bogus cpu parameter crashes llc on AArch64 backend.
Initial patch by Oleg Ranevskyy.

llvm-svn: 220945
2014-10-31 02:35:34 +00:00
NAKAMURA Takumi
1369de85df Threading.h: Give named parameters to llvm::call_once(flag,UserFn). [-Wdocumentation]
llvm-svn: 220941
2014-10-31 00:54:20 +00:00
Ahmed Bougacha
38c0bf429c [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.

llvm-svn: 220937
2014-10-30 23:46:50 +00:00
Hans Wennborg
2d821f95ed Speculative fix for Windows build after r220932
llvm-svn: 220936
2014-10-30 23:10:01 +00:00
Chris Bieneman
052298786b 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

llvm-svn: 220935
2014-10-30 22:37:58 +00:00
NAKAMURA Takumi
ac71504fe6 llvm/test/Transforms/SampleProfile/syntax.ll: Relax MISSING-FILE not to
check locale-aware message catalog.

llvm-svn: 220934
2014-10-30 22:28:46 +00:00
Louis Gerbarg
6f92b8978d 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

llvm-svn: 220933
2014-10-30 22:21:03 +00:00
Chris Bieneman
6184f87702 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

llvm-svn: 220932
2014-10-30 22:07:09 +00:00
Justin Bogner
e8fc87ab82 llvm-cov: Follow LLVM naming conventions
This renames a few things that are using an unusual naming convention.

llvm-svn: 220929
2014-10-30 20:57:49 +00:00
Justin Bogner
a65f2cf59b 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.

llvm-svn: 220928
2014-10-30 20:51:24 +00:00
Rafael Espindola
10c046a373 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.

llvm-svn: 220927
2014-10-30 20:50:23 +00:00
Justin Bogner
a5264f6d37 llvm-cov: Very basic top level help
llvm-svn: 220926
2014-10-30 20:29:48 +00:00
Philip Reames
d5ee9ddca8 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

llvm-svn: 220925
2014-10-30 20:25:19 +00:00
Rafael Espindola
7f00ad4741 Update test to pass .ll to llvm-link and use Inputs.
llvm-svn: 220924
2014-10-30 20:23:59 +00:00
David Blaikie
dc51b0f8dd PR21408: Workaround the appearance of duplicate variables due to problems when inlining two calls to the same function from the same call site.
llvm-svn: 220923
2014-10-30 20:20:11 +00:00
Diego Novillo
cf4c21ac5d Fix comment spelling and tidy diagnostic call in profile reader.
No functional changes.

llvm-svn: 220922
2014-10-30 20:19:19 +00:00
Peter Zotov
15e605a3a7 lit: PR21417: don't try to update OCAMLPATH if LibDir is empty.
llvm-svn: 220919
2014-10-30 19:26:42 +00:00
Diego Novillo
83d52f4c02 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.

llvm-svn: 220918
2014-10-30 18:48:41 +00:00
Diego Novillo
a5ff3524ec 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

llvm-svn: 220915
2014-10-30 18:00:06 +00:00
Tim Northover
d587e3a983 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.

llvm-svn: 220912
2014-10-30 17:05:44 +00:00
Simon Atanasyan
d26bbbb35c [Mips] Add new Mips specific e_flags.
No functional changes.

llvm-svn: 220910
2014-10-30 14:56:02 +00:00
Robert Khasanov
3e398a3800 [AVX512] Added VBROADCAST{SS/SD} encoding for VL subset.
Refactored through AVX512_maskable
        

llvm-svn: 220908
2014-10-30 14:21:47 +00:00
Peter Collingbourne
a5ac850672 [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

llvm-svn: 220906
2014-10-30 13:22:57 +00:00
Peter Zotov
6107c0888e [OCaml] Expose LLVMCloneModule.
llvm-svn: 220903
2014-10-30 08:30:12 +00:00
Peter Zotov
63938c8558 [OCaml] Expose LLVM{Get,Set}DLLStorageClass.
llvm-svn: 220902
2014-10-30 08:30:08 +00:00
Peter Zotov
861f5be11b [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.

llvm-svn: 220901
2014-10-30 08:30:01 +00:00
Peter Zotov
a82eb3aeff [OCaml] Enable backtraces in tests.
llvm-svn: 220900
2014-10-30 08:29:57 +00:00
Peter Zotov
c22ad454f5 [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.

llvm-svn: 220899
2014-10-30 08:29:45 +00:00
Peter Zotov
c758afd8d3 [OCaml] De-duplicate llvm_raise and llvm_string_of_message.
llvm-svn: 220898
2014-10-30 08:29:29 +00:00
Rafael Espindola
4c2829a415 Enable the slp vectorizer in the gold plugin.
llvm-svn: 220887
2014-10-30 00:38:54 +00:00
Rafael Espindola
dd4a731a5e Enable the loop vectorizer in the gold plugin.
llvm-svn: 220886
2014-10-30 00:11:24 +00:00
Rafael Espindola
3652fa83cf 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.

llvm-svn: 220885
2014-10-29 23:54:45 +00:00
NAKAMURA Takumi
aa3b216e2e Untabify.
llvm-svn: 220884
2014-10-29 23:44:35 +00:00
NAKAMURA Takumi
932e0422ce llvm/test/Transforms/LoopRotate/nosimplifylatch.ll: Fix possibly mis-repeatedly-pasted test.
llvm-svn: 220880
2014-10-29 23:05:12 +00:00
Kevin Enderby
8ff59cef22 Run clang-format on tools/llvm-objdump/MachODump.cpp . No functional change.
llvm-svn: 220875
2014-10-29 21:28:24 +00:00
Yi Jiang
c49814e669 Test Case for r220872:Do not simplifyLatch for loops where hoisting increments couldresult in extra live range interferance
llvm-svn: 220873
2014-10-29 20:20:33 +00:00
Yi Jiang
4dba23a59c Do not simplifyLatch for loops where hoisting increments couldresult in extra live range interferance
llvm-svn: 220872
2014-10-29 20:19:47 +00:00
Jan Wen Voung
3652526aa9 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

llvm-svn: 220866
2014-10-29 18:37:13 +00:00
Alexander Kornienko
8236d72ffd Enable display of compiler diagnostics in clang-tidy by default.
llvm-svn: 220863
2014-10-29 17:29:38 +00:00
Robert Khasanov
b26f057244 [AVX512] Implemented AVX512VL FP bnary packed instructions (VADDP*, VSUBP*, VMULP*, VDIVP*, VMAXP*, VMINP*)
Refactored through AVX512_maskable
Added encoding tests for them.

llvm-svn: 220858
2014-10-29 15:43:02 +00:00