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

112924 Commits

Author SHA1 Message Date
Simon Pilgrim
a28dacc86e [X86][AVX2] AVX2 integer stack folding tests.
This adds tests for the remaining AVX2 instructions that currently support memory folding.

llvm-svn: 228513
2015-02-07 23:28:16 +00:00
David Blaikie
7042f50113 Rename the 'Extending the Language: Debug Information' to 'Adding Debug Information' since this isn't actually modifying/extending the language.
llvm-svn: 228512
2015-02-07 23:23:43 +00:00
Simon Pilgrim
8cad14c8ba [X86][AVX] Added missing stack folding support + test for vptest ymm instruction
llvm-svn: 228509
2015-02-07 21:44:06 +00:00
Benjamin Kramer
dbe6d1cc4d LoopIdiom: Use utility functions.
The only difference between deleteIfDeadInstruction and
RecursivelyDeleteTriviallyDeadInstructions is that the former also
manually invalidates SCEV. That's unnecessary because SCEV automatically
gets informed when an instruction is deleted via a ValueHandle. NFC.

llvm-svn: 228508
2015-02-07 21:37:08 +00:00
Joerg Sonnenberger
a2eff404d0 Avoid integer overflows around realloc calls resulting in potential
heap. Problem identified by Guido Vranken. Changes differ from original
OpenBSD sources by not depending on non-portable reallocarray.

llvm-svn: 228507
2015-02-07 21:24:06 +00:00
Simon Pilgrim
9af0a10c0c [X86][SSE] Added missing stack folding tests for (v)mpsadbw instruction
llvm-svn: 228506
2015-02-07 21:20:11 +00:00
Benjamin Kramer
3aeb5530c5 ValueTracking: Make isBytewiseValue simpler and more powerful at the same time.
Turns out there is a simpler way of checking that all bytes in a word are equal
than binary decomposition.

llvm-svn: 228503
2015-02-07 19:29:02 +00:00
Bjorn Steinbrink
7de3907fdc Properly update AA metadata when performing call slot optimization
Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7482

llvm-svn: 228500
2015-02-07 17:54:36 +00:00
Jonathan Roelofs
40c3cf941d Fix docs typo regarding lit.local.cfg files
llvm-svn: 228499
2015-02-07 17:18:26 +00:00
Ahmed Bougacha
6b2a6f7419 [BasicAA] Try to disambiguate GEPs through arrays of structs into
different fields.

We can show that two GEPs off of the same (possibly multidimensional)
array of structs, into different fields, can't alias.  Quoting:

For two GEPOperators GEP1 and GEP2, if we find that:
- both GEPs begin indexing from the exact same pointer;
- the last indices in both GEPs are constants, indexing into a struct;
- said indices are different, hence,the pointed-to fields are different;
- and both GEPs only index through arrays prior to that;

this lets us determine that the struct that GEP1 indexes into and the
struct that GEP2 indexes into must either precisely overlap or be
completely disjoint.  Because they cannot partially overlap, indexing
into different non-overlapping fields of the struct will never alias.

The other BasicAA::aliasGEP rules worked in some cases, but not all
(for example, the i32x3 struct in the testcase).
We can add this simple ad-hoc rule to complement them.

rdar://19717375
Differential Revision: http://reviews.llvm.org/D7453

llvm-svn: 228498
2015-02-07 17:04:29 +00:00
Benjamin Kramer
c705a27ee2 SCEV: Compress disposition pairs.
Composing DenseMaps and SmallVectors is still somewhat suboptimal,
but this at least halves the size of the vector elements. NFC.

llvm-svn: 228497
2015-02-07 16:41:12 +00:00
Benjamin Kramer
28fba477c6 SmallVector: Move emplace_back to SmallVectorImpl.
This resolves the strange effect that emplace_back is only available
when the type contained in the vector is not trivially copyable.

llvm-svn: 228496
2015-02-07 16:41:02 +00:00
Simon Pilgrim
7b6313462e [X86] Force fp stack folding tests to keep to specific domain.
General boolean instructions (AND, ANDN, OR, XOR) need to use a specific domain instruction (and not just the default).

llvm-svn: 228495
2015-02-07 16:14:55 +00:00
Simon Pilgrim
87231791d9 [X86][AVX2] More AVX2 integer stack folding tests.
llvm-svn: 228494
2015-02-07 16:07:27 +00:00
Andrea Di Biagio
e07168e780 Fix typos; NFC.
llvm-svn: 228493
2015-02-07 13:56:20 +00:00
Benjamin Kramer
a3a195bd27 Move DebugLocs around instead of copying.
llvm-svn: 228491
2015-02-07 12:28:15 +00:00
David Majnemer
639c882cbe MC: Emit COFF section flags in the "proper" order
COFF section flags are not idempotent:
  'rd' will make a read-write section because 'd' implies write
  'dr' will make a read-only section because 'r' disables write

llvm-svn: 228490
2015-02-07 08:26:40 +00:00
Chandler Carruth
29a4099354 Consistently use override rather than virtual.
This fixes -Winconsistent-missing-override warnings.

llvm-svn: 228489
2015-02-07 08:12:22 +00:00
Hal Finkel
f273c9b6fa [PowerPC] Handle loop predecessor invokes
If a loop predecessor has an invoke as its terminator, and the return value
from that invoke is used to determine the loop iteration space, then we can't
insert a computation based on that value in the loop predecessor prior to the
terminator (oops). If there's such an invoke, or just no predecessor for that
matter, insert a new loop preheader.

llvm-svn: 228488
2015-02-07 07:32:58 +00:00
Bruce Mitchener
efa6e79a0c Add more DWARF 5 language constants.
Differential Revision: http://reviews.llvm.org/D7430

llvm-svn: 228487
2015-02-07 06:35:30 +00:00
Zachary Turner
58559798ed Change RHS-style decltype to LHS-style decltype<declval()>.
Seems some compilers don't like the RHS-style decltype specifier.

This should fix the buildbots.

llvm-svn: 228484
2015-02-07 02:02:23 +00:00
Zachary Turner
2af5383bf3 Resubmit unittests for DebugInfoPDB.
These were originally submitted as part of r228428, but this part
caused a build breakage in LLVMConfig.  The library portion was
resubmitted independently since it was not causing breakage.

There were two reasons this was causing the build to fail.  The
first is that there were no Makefiles added for the PDB tests.  And
the second is that the DebugInfoPDB library was only being built by
CMake behind an "if (MSVC)" check.  This is wrong since this the
library hides platform specific details, and it was causing
LLVM-Config to not find the library when trying to build unittests.

llvm-svn: 228482
2015-02-07 01:47:14 +00:00
Sean Silva
d2940e0dbb [docs][LLVM-style RTTI] Add a mention of multiple inheritance.
llvm-svn: 228479
2015-02-07 01:16:26 +00:00
Duncan P. N. Exon Smith
79a2edfa80 Support: Fix tests for VirtualityString
Since these `dwarf` functions return `const char *`, the tests need to
use `StringRef` for checks.  Should fix, e.g., hexagon [1].

[1]: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/22435

llvm-svn: 228478
2015-02-07 01:07:30 +00:00
Duncan P. N. Exon Smith
408c33af4a Support: Add dwarf::getVirtuality()
llvm-svn: 228474
2015-02-07 00:37:15 +00:00
Duncan P. N. Exon Smith
165b84bee4 Support: Use Dwarf.def for DW_VIRTUALITY, NFC
Use definition file for `DW_VIRTUALITY_*`.  Add a `DW_VIRTUALITY_max`
both for ease of testing and for future use by the `LLParser`.

llvm-svn: 228473
2015-02-07 00:36:23 +00:00
Duncan P. N. Exon Smith
1cb5884cd9 Support: Add dwarf::getAttributeEncoding()
llvm-svn: 228470
2015-02-06 23:46:49 +00:00
Duncan P. N. Exon Smith
ee716fc78e Support: Rewrite AttributeEncodingString(), NFC
llvm-svn: 228469
2015-02-06 23:45:37 +00:00
Duncan P. N. Exon Smith
3a851bb833 Support: Stop stringifying DW_ATE_{lo,hi}_user
llvm-svn: 228468
2015-02-06 23:44:24 +00:00
Hal Finkel
66fa9b5f54 [PowerPC] Fixup incomplete revert of test/CodeGen/PowerPC/tls-pic.ll
llvm-svn: 228467
2015-02-06 23:30:06 +00:00
Lang Hames
ea9398780d [Orc] Add a Kaleidoscope/Orc tutorial demonstrating lazy-irgen.
This tutorial builds on the lazy_codegen kaleidoscope/orc tutorial by making
a small set of changes (~75 lines diff) to defer ir-generation for function
definitions until functions are actually referenced.

llvm-svn: 228466
2015-02-06 23:26:33 +00:00
Kevin Enderby
03d099fa2a Add code to llvm-objdump so the -section option with -macho will dump literal
sections with the Mach-O S_{4,8,16}BYTE_LITERALS section types.

llvm-svn: 228465
2015-02-06 23:25:38 +00:00
Ahmed Bougacha
d006cccbef [AArch64] Use the source location of the IR branch when creating Bcc
from a conditional branch fed by an add/sub/mul-with-overflow node.

We previously used the SDLoc of the overflow node, for no good reason.
In some cases, this led to the Bcc and B terminators having different
source orders, and DBG_VALUEs being inserted between them.

The real issue is with the code that can't handle DBG_VALUEs between
terminators: the few places affected by this will be fixed soon.
In the meantime, fixing the SDLoc is a positive change no matter what.

No tests, as I have no idea how to get .loc emitted for branches?

rdar://19347133

llvm-svn: 228463
2015-02-06 23:15:39 +00:00
Simon Pilgrim
a8d15b6f93 [X86][AVX2] Begun adding AVX2 integer stack folding tests.
llvm-svn: 228462
2015-02-06 23:12:15 +00:00
Hal Finkel
54eff20ea7 Revert "r227976 - [PowerPC] Yet another approach to __tls_get_addr" and related fixups
Unfortunately, even with the workaround of disabling the linker TLS
optimizations in Clang restored (which has already been done), this still
breaks self-hosting on my P7 machine (-O3 -DNDEBUG -mcpu=native).

Bill is currently working on an alternate implementation to address the TLS
issue in a way that also fully elides the linker bug (which, unfortunately,
this approach did not fully), so I'm reverting this now.

llvm-svn: 228460
2015-02-06 23:07:40 +00:00
Lang Hames
82a7572fd3 [Orc] Add a Kaleidoscope/Orc tutorial demonstrating lazy-codegen.
This tutorial builds on the initial kaleidoscope/orc tutorial by adding a
LazyEmittingLayer to the custom stack. This extra layer defers compilation
of modules in the JIT until they are statically referenced.

llvm-svn: 228459
2015-02-06 23:04:53 +00:00
Duncan P. N. Exon Smith
b2bb076de9 Support: Add dwarf::getLanguage()
llvm-svn: 228458
2015-02-06 22:55:13 +00:00
Duncan P. N. Exon Smith
b69d0ef5cb Support: Rewrite dwarf::LanguageString(), NFC
llvm-svn: 228457
2015-02-06 22:53:19 +00:00
Lang Hames
77ed02eb3f [Orc] Add a Kaleidoscope tutorial for Orc demonstrating eager compilation.
This tutorial demonstrates a very basic custom Orc JIT stack that performs eager
compilation: All modules are CodeGen'd immediately upon being added to the JIT.

llvm-svn: 228456
2015-02-06 22:52:04 +00:00
Duncan P. N. Exon Smith
213984fa5d IR: Allow 32-bits for lines in debug location
Remove unnecessary restriction of 24-bits for line numbers in
`MDLocation`.

The rest of the debug info schema (with the exception of local
variables) uses 32-bits for line numbers.  As I introduce the
specialized nodes, it makes sense to canonicalize on one size or the
other.

llvm-svn: 228455
2015-02-06 22:50:13 +00:00
Lang Hames
1179d700be [Orc] Add more missing headers.
llvm-svn: 228454
2015-02-06 22:48:43 +00:00
Sanjay Patel
e32ee3fda0 use local variables; NFC
llvm-svn: 228452
2015-02-06 22:43:52 +00:00
Duncan P. N. Exon Smith
76b9077d2d Support: Stop stringifying DW_LANG_{lo,hi}_user
llvm-svn: 228451
2015-02-06 22:34:48 +00:00
Duncan P. N. Exon Smith
37668ce7d1 AsmParser: Use DW_TAG_hi_user instead of magic constant, NFC
llvm-svn: 228448
2015-02-06 22:29:35 +00:00
Duncan P. N. Exon Smith
8888d60810 AsmWriter: Extract writeTag(), NFC
llvm-svn: 228447
2015-02-06 22:28:05 +00:00
Duncan P. N. Exon Smith
f85c3f9918 AsmWriter: Extract writeMetadataAsOperand(), NFC
llvm-svn: 228446
2015-02-06 22:27:22 +00:00
Evgeniy Stepanov
c071e0babc [msan] Fix "missing origin" in atomic store.
An atomic store always make the target location fully initialized (in the
current implementation). It should not store origin. Initialized memory can't
have meaningful origin, and, due to origin granularity (4 bytes) there is a
chance that this extra store would overwrite meaningfull origin for an adjacent
location.

llvm-svn: 228444
2015-02-06 21:47:39 +00:00
Cameron Esfahani
788e741467 Test commit to see if it triggers an email to llvm-commits. No change.
llvm-svn: 228442
2015-02-06 21:33:08 +00:00
Zachary Turner
2bbea13594 Try to fix Makefile build for LLVMDebugInfoPDB.
llvm-svn: 228437
2015-02-06 20:42:03 +00:00
Zachary Turner
743a32b50f Resubmit "Create lib/DebugInfo/PDB" (r228428)
This change resubmits the patch that broke the build, this time
without unittests.  The unittests will be submitted separately
after the problem has been addressed:

--Original Commit Message--

Create lib/DebugInfo/PDB.

This patch creates a platform-independent interface to a PDB reader.
There is currently no implementation of this interface, which will
be provided in future patches.  This defines the basic object model
which any implementation must conform to.

Reviewed by: David Blaikie
Differential Revision: http://reviews.llvm.org/D7356

llvm-svn: 228435
2015-02-06 20:30:52 +00:00