1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
Commit Graph

138757 Commits

Author SHA1 Message Date
Piotr Padlewski
41b1b96125 NFC fix class members initialization
llvm-svn: 282951
2016-09-30 21:05:52 +00:00
Piotr Padlewski
40ebe4972e NFC fix doxygen comments
llvm-svn: 282950
2016-09-30 21:05:49 +00:00
Rui Ueyama
d0fef82d91 Do not pass a superblock to PDBFileBuilder.
When we create a PDB file using PDBFileBuilder, the information
in the superblock, such as the size of the resulting file, is not
available.

Previously, PDBFileBuilder::initialize took a superblock assuming
that all the members of the struct are correct. That is useful when
you want to restore the exact information from a YAML file, but
that's probably the only use case in which that is useful.
When we are creating a PDB file on the fly, we have to backfill the
members.

This patch redefines PDBFileBuilder::initialize to take only a
block size. Now all the other members are left as default values,
so that they'll be updated when commit() is called.

Differential Revision: https://reviews.llvm.org/D25108

llvm-svn: 282944
2016-09-30 20:52:12 +00:00
Rui Ueyama
64da81a152 Pass a filename instead of a msf::WritableStream to PDBFileBuilder::commit.
WritableStream needs the exact file size to open a file, but
until we fix the final layout of a PDB file, we don't know the
size of the file.

This patch changes the parameter type of PDBFileBuilder::commit
to solve that chiecken-and-egg problem. Now the function opens
a file after fixing the layout, so it can create a file with the
exact size.

Differential Revision: https://reviews.llvm.org/D25107

llvm-svn: 282940
2016-09-30 20:34:44 +00:00
Joerg Sonnenberger
6d49ecc781 Sort LLVM_VERSION_INFO
llvm-svn: 282939
2016-09-30 20:34:02 +00:00
Joerg Sonnenberger
00b3ff650b GC left-over from workarounds for missing pid_t and size_t
llvm-svn: 282938
2016-09-30 20:32:42 +00:00
Joerg Sonnenberger
1613180421 GC ENABLE_PIC
llvm-svn: 282936
2016-09-30 20:30:25 +00:00
Joerg Sonnenberger
9f26389695 GC HAVE___DSO_HANDLE
llvm-svn: 282935
2016-09-30 20:29:19 +00:00
Joerg Sonnenberger
71a638ab96 Correctly expand HOST_LINK_VERSION.
llvm-svn: 282934
2016-09-30 20:28:42 +00:00
Joerg Sonnenberger
38c1555f13 Fix expansion of HAVE_SYS_MMAN_H
llvm-svn: 282933
2016-09-30 20:27:41 +00:00
Joerg Sonnenberger
6e6867f3cf GC HAVE_LINK_EXPORT_DYNAMIC.
llvm-svn: 282932
2016-09-30 20:26:31 +00:00
Joerg Sonnenberger
3901f9c0f8 GC HAVE_MMAP and HAVE_MMAP_FILE
llvm-svn: 282931
2016-09-30 20:24:54 +00:00
Joerg Sonnenberger
efcaf5ad89 Spell comment consistently with other library comments.
llvm-svn: 282930
2016-09-30 20:24:21 +00:00
Joerg Sonnenberger
21eac1d550 Sort LINK_POLLY_INTO_TOOLS.
llvm-svn: 282929
2016-09-30 20:21:35 +00:00
Joerg Sonnenberger
b5dfdcff7b GC STDC_HEADERS.
llvm-svn: 282928
2016-09-30 20:19:02 +00:00
Joerg Sonnenberger
876dd494c5 Deal with the (historic) MAP_ANONYMOUS vs MAP_ANON directly by using CPP
to check for the former, don't depend on (dangling) HAVE_MMAP_ANONYMOUS.

llvm-svn: 282925
2016-09-30 20:17:23 +00:00
Joerg Sonnenberger
c42de87cd4 Retire NEED_DEV_ZERO_FOR_MMAP. It should be needed only on outdated
systems. It wasn't even hooked up in cmake, so problems on such systems
would be visible with 3.9 release already.

llvm-svn: 282924
2016-09-30 20:16:01 +00:00
Joerg Sonnenberger
9d06fa6416 HAVE_LINK_R is not the only reason why this needs config.h.
llvm-svn: 282923
2016-09-30 20:11:21 +00:00
Joerg Sonnenberger
4d7547a981 GC HAVE_LIBDL, HAVE_LIBM and HAVE_LIBOLE32
llvm-svn: 282922
2016-09-30 20:09:45 +00:00
Joerg Sonnenberger
2f93d5e4ce Sort HAVE_LIBEDIT.
llvm-svn: 282921
2016-09-30 20:08:36 +00:00
Hans Wennborg
a560abffe4 X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)
We can't use Jcc to leave a Win64 function in general, because that
confuses the unwinder. However, for "leaf" functions, that is, functions
where the return address is always on top of the stack and which don't
have unwind info, it's OK.

Differential Revision: https://reviews.llvm.org/D24836

llvm-svn: 282920
2016-09-30 20:07:35 +00:00
Joerg Sonnenberger
80aa46d9db Turn ENABLE_CRASH_OVERRIDES into a 0/1 definition.
llvm-svn: 282919
2016-09-30 20:06:19 +00:00
Joerg Sonnenberger
a74d4452a5 Convert ENABLE_BACKTRACES into a 0/1 definition.
llvm-svn: 282918
2016-09-30 20:04:24 +00:00
Joerg Sonnenberger
943a1211b2 GC TIME_WITH_SYS_TIME and TM_IN_SYS_TIME
llvm-svn: 282917
2016-09-30 19:59:58 +00:00
Joerg Sonnenberger
8aae501f9f GC STAT_MACROS_BROKEN.
llvm-svn: 282915
2016-09-30 19:58:44 +00:00
Joerg Sonnenberger
639a3a8055 GC NEED_USCORE.
llvm-svn: 282914
2016-09-30 19:57:54 +00:00
Joerg Sonnenberger
e80a413c56 Turn LLVM_USE_OPROFILE into a 0/1 definition.
llvm-svn: 282909
2016-09-30 19:55:37 +00:00
Joerg Sonnenberger
58fed84cb6 Turn LLVM_USE_INTEL_JITEVENTS into a 0/1 definition.
llvm-svn: 282908
2016-09-30 19:54:25 +00:00
Joerg Sonnenberger
100750a643 Turn LLVM_ENABLE_ABI_BREAKING_CHECKS into a 0/1 definition like
LLVM_ENABLE_THREADS. Include llvm-config.h explicitly in headers to make
sure that the definition is available.

llvm-svn: 282907
2016-09-30 19:52:27 +00:00
Sanjay Patel
6f740e7b76 [InstCombine] allow non-splat folds of select cond (ext X), C
llvm-svn: 282906
2016-09-30 19:49:22 +00:00
Dehao Chen
9a6d19a0c6 Revert test change in r282894 as it's broken in some platforms.
llvm-svn: 282903
2016-09-30 19:25:23 +00:00
Gor Nishanov
f845a3821b [Coroutines] Part15c: Fix coro-split to correctly handle definitions between coro.save and coro.suspend
Summary:
In the case below, %Result.i19 is defined between coro.save and coro.suspend and used after coro.suspend. We need to correctly place such a value into the coroutine frame.

```
  %save = call token @llvm.coro.save(i8* null)
  %Result.i19 = getelementptr inbounds %"struct.lean_future<int>::Awaiter", %"struct.lean_future<int>::Awaiter"* %ref.tmp7, i64 0, i32 0
  %suspend = call i8 @llvm.coro.suspend(token %save, i1 false)
  switch i8 %suspend, label %exit [
    i8 0, label %await.ready
    i8 1, label %exit
  ]
await.ready:
  %val = load i32, i32* %Result.i19

```

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D24418

llvm-svn: 282902
2016-09-30 19:24:19 +00:00
Sanjay Patel
373ee08f45 [InstCombine] add tests for non-splat select(ext)
llvm-svn: 282901
2016-09-30 19:15:41 +00:00
Gor Nishanov
04e0faa3b3 [Coroutines] Part15b: Fix dbg information handling in coro-split.
Summary:
Without the fix, if there was a function inlined into the coroutine with debug information, CloneFunctionInto(NewF, &F, VMap, /*ModuleLevelChanges=*/true, Returns); would duplicate all of the debug information including the DICompileUnit.

We know use VMap to indicate that debug metadata for a File, Unit and FunctionType should not be duplicated when we creating clones that will become f.resume, f.destroy and f.cleanup.

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D24417

llvm-svn: 282899
2016-09-30 19:05:06 +00:00
Gor Nishanov
9f360633cd [Coroutines] Part 15a: Lower coro.subfn.addr in CoroCleanup
Summary: Not all coro.subfn.addr intrinsics can be eliminated in CoroElide through devirtualization. Those that remain need to be lowered in CoroCleanup.

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D24412

llvm-svn: 282897
2016-09-30 18:41:35 +00:00
Sanjay Patel
3cb99ee21f clean up tests and auto-generate checks
llvm-svn: 282896
2016-09-30 18:37:34 +00:00
Michal Gorny
51dd7d27dc cmake: Install the OCaml libraries into a more correct path
Add a OCAML_INSTALL_PATH variable that can be used to control
the install path for OCaml libraries. The new variable defaults to
${OCAML_STDLIB_PATH}, i.e. the OCaml library path obtained from
the OCaml compiler. Install libraries into "llvm" subdirectory.

This fixes two issues:

1. OCaml library directories differ between systems, and 'lib/ocaml' is
incorrect e.g. on amd64 Gentoo where OCaml is installed
in 'lib64/ocaml'. Therefore, obtain the library path from the OCaml
compiler using 'ocamlc -where' (which is already used to set
OCAML_STDLIB_PATH), which is the method used commonly in OCaml packages.

2. The top-level directory is reserved for the standard library, and has
precedence over local directory in search path. As a result, OCaml
preferred the files installed along with previous LLVM version over the
source tree when building a new version, resulting in two versions being
mixed during the build. The new layout is used commonly by other OCaml
packages, and findlib is able to find the LLVM libraries successfully.

Bug: https://bugs.gentoo.org/559134
Bug: https://bugs.gentoo.org/559624

Differential Revision: https://reviews.llvm.org/D24354

llvm-svn: 282895
2016-09-30 18:34:23 +00:00
Dehao Chen
766ad13bec Update loop unroller cost model to make sure debug info does not affect optimization decisions.
Summary: Debug info should *not* affect optimization decisions. This patch updates loop unroller cost model to make it not affected by debug info.

Reviewers: davidxl, mzolotukhin

Subscribers: haicheng, llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D25098

llvm-svn: 282894
2016-09-30 18:30:04 +00:00
Kostya Serebryany
179ff532fb [libFuzzer] add a fuzzer test that finds CVE-2015-3193
llvm-svn: 282892
2016-09-30 18:16:16 +00:00
Sanjay Patel
6e0052ca56 [InstCombine] add tests for select X, (ext X), C
llvm-svn: 282891
2016-09-30 18:10:14 +00:00
Derek Schuff
cc1cf3d580 [WebAssembly] Make register stackification more conservative
Register stackification currently checks VNInfo for changes. Make that
more accurate by testing each intervening instruction for any other defs
to the same virtual register.

Patch by Jacob Gravelle

Differential Revision: https://reviews.llvm.org/D24942

llvm-svn: 282886
2016-09-30 18:02:54 +00:00
Rui Ueyama
ccedd4414b [Object] Define Archive::isEmpty().
llvm-svn: 282884
2016-09-30 17:54:31 +00:00
Etienne Bergeron
a6c64717ba [asan] Support dynamic shadow address instrumentation
Summary:
This patch is adding the support for a shadow memory with
dynamically allocated address range.

The compiler-rt needs to export a symbol containing the shadow
memory range.

This is required to support ASAN on windows 64-bits.

Reviewers: kcc, rnk, vitalybuka

Subscribers: zaks.anna, kubabrecka, dberris, llvm-commits, chrisha

Differential Revision: https://reviews.llvm.org/D23354

llvm-svn: 282881
2016-09-30 17:46:32 +00:00
Konstantin Zhuravlyov
0d3cafde5b [AMDGPU] Choose VMCNT, EXPCNT, LGKMCNT masks and shifts based on the isa version
Differential Revision: https://reviews.llvm.org/D24973

llvm-svn: 282877
2016-09-30 17:01:40 +00:00
Konstantin Zhuravlyov
bbe6c88c7e [AMDGPU] Ask subtarget if waitcnt instruction is needed before barrier instruction
Differential Revision: https://reviews.llvm.org/D24985

llvm-svn: 282875
2016-09-30 16:50:36 +00:00
Konstantin Zhuravlyov
ef884dccde [AMDGPU] Do not run scalar optimization passes at "-O0"
Differential Revision: https://reviews.llvm.org/D25055

llvm-svn: 282873
2016-09-30 16:39:24 +00:00
Artur Pilipenko
af3e8db88d CVP. Turn marking adds as no wrap on by default (was turned off by 279082)
With 282650 in tree extra no wrap on adds doesn't cause regressions anymore. Reenable the optimzation.

llvm-svn: 282872
2016-09-30 16:20:08 +00:00
Zachary Turner
afdf5e3940 Resubmit "Add llvm::enumerate() to STLExtras."
The CL was originally failing due to the use of some C++14
specific features, so I've removed those.  Hopefully this will
satisfy the bots.

llvm-svn: 282867
2016-09-30 15:43:59 +00:00
Matthew Simpson
f6e1d8dedb [LV] Build all scalar steps for non-uniform induction variables
When building the steps for scalar induction variables, we previously attempted
to determine if all the scalar users of the induction variable were uniform. If
they were, we would only emit the step corresponding to vector lane zero. This
optimization was too aggressive. We generally don't know the entire set of
induction variable users that will be scalar. We have
isScalarAfterVectorization, but this is only a conservative estimate of the
instructions that will be scalarized. Thus, an induction variable may have
scalar users that aren't already known to be scalar. To avoid emitting unused
steps, we can only check that the induction variable is uniform. This should
fix PR30542.

Reference: https://llvm.org/bugs/show_bug.cgi?id=30542
llvm-svn: 282863
2016-09-30 15:13:52 +00:00
Dylan McKay
cdace906da [AVR] Add the ELF object file writer
Summary: This adds the ELF32 writer for AVR.

Reviewers: kparzysz

Subscribers: beanz, mgorny

Differential Revision: https://reviews.llvm.org/D25031

llvm-svn: 282856
2016-09-30 14:09:20 +00:00