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

114076 Commits

Author SHA1 Message Date
Richard Smith
e2587821c4 [modules] Add include/llvm/IR/DebugInfoFlags.def to the textual headers list.
llvm-svn: 230427
2015-02-25 01:44:09 +00:00
Hal Finkel
157f3b2eaa [PowerPC] Add triples to QPX tests
Some of these tests fail on Darwin systems because of a lack of a triple;
fix that.

llvm-svn: 230421
2015-02-25 01:26:59 +00:00
Philip Reames
b509c48283 [GC] Document the recently added PlaceSafepoints and RewriteGCForStatepoints passes
llvm-svn: 230420
2015-02-25 01:23:59 +00:00
Duncan P. N. Exon Smith
3eb494d1b9 llvm-dis: Stop crashing when dropping debug info
Since r199356, we've printed a warning when dropping debug info.
r225562 started crashing on that, since it registered a diagnostic
handler that only expected errors.  This fixes the handler to expect
other severities.  As a side effect, it now prints "error: " at the
start of error messages, similar to `llvm-as`.

There was a testcase for r199356, but it only really checked the
assembler.  Move `test/Bitcode/drop-debug-info.ll` to `test/Assembler`,
and introduce `test/Bitcode/drop-debug-info.3.5.ll` (and companion
`.bc`) to test the bitcode reader.

Note: tools/gold/gold-plugin.cpp has an equivalent bug, but I'm not sure
what the best fix is there.  I'll file a PR.

llvm-svn: 230416
2015-02-25 01:10:03 +00:00
David Blaikie
cac63ea2c3 [opaque pointer type] Bitcode support for explicit type parameter on GEP.
Like r230414, add bitcode support including backwards compatibility, for
an explicit type parameter to GEP.

At the suggestion of Duncan I tried coalescing the two older bitcodes into a
single new bitcode, though I did hit a wrinkle: I couldn't figure out how to
create an explicit abbreviation for a record with a variable number of
arguments (the indicies to the gep). This means the discriminator between
inbounds and non-inbounds gep is a full variable-length field I believe? Is my
understanding correct? Is there a way to create such an abbreviation? Should I
just use two bitcodes as before?

Reviewers: dexonsmith

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

llvm-svn: 230415
2015-02-25 01:08:52 +00:00
David Blaikie
9cc272162f [opaque pointer type] bitcode support for explicit type parameter to the load instruction
Summary:
I've taken my best guess at this, but I've cargo culted in places & so
explanations/corrections would be great.

This seems to pass all the tests (check-all, covering clang and llvm) so I
believe that pretty well exercises both the backwards compatibility and common
(same version) compatibility given the number of checked in bitcode files we
already have. Is that a reasonable approach to testing here? Would some more
explicit tests be desired?

1) is this the right way to do back-compat in this case (looking at the number
  of entries in the bitcode record to disambiguate between the old schema and
  the new?)

2) I don't quite understand the logarithm logic to choose the encoding type of
  the type parameter in the abbreviation description, but I found another
  instruction doing the same thing & it seems to work. Is that the right
  approach?

Reviewers: dexonsmith

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

llvm-svn: 230414
2015-02-25 01:07:20 +00:00
Hal Finkel
67b5b15e9e [PowerPC] Add support for the QPX vector instruction set
This adds support for the QPX vector instruction set, which is used by the
enhanced A2 cores on the IBM BG/Q supercomputers. QPX vectors are 256 bytes
wide, holding 4 double-precision floating-point values. Boolean values, modeled
here as <4 x i1> are actually also represented as floating-point values
(essentially  { -1, 1 } for { false, true }). QPX shares many features with
Altivec and VSX, but is distinct from both of them. One major difference is
that, instead of adding completely-separate vector registers, QPX vector
registers are extensions of the scalar floating-point registers (lane 0 is the
corresponding scalar floating-point value). The operations supported on QPX
vectors mirrors that supported on the scalar floating-point values (with some
additional ones for permutations and logical/comparison operations).

I've been maintaining this support out-of-tree, as part of the bgclang project,
for several years. This is not the entire bgclang patch set, but is most of the
subset that can be cleanly integrated into LLVM proper at this time. Adding
this to the LLVM backend is part of my efforts to rebase bgclang to the current
LLVM trunk, but is independently useful (especially for codes that use LLVM as
a JIT in library form).

The assembler/disassembler test coverage is complete. The CodeGen test coverage
is not, but I've included some tests, and more will be added as follow-up work.

llvm-svn: 230413
2015-02-25 01:06:45 +00:00
Rafael Espindola
565d0485ca Support SHF_MERGE sections in COMDATs.
This patch unifies the comdat and non-comdat code paths. By doing this
it add missing features to the comdat side and removes the fixed
section assumptions from the non-comdat side.

In ELF there is no one true section for "4 byte mergeable" constants.
We are better off computing the required properties of the section
and asking the context for it.

llvm-svn: 230411
2015-02-25 00:52:15 +00:00
David Blaikie
84396f6ee6 BitcodeWriter: Refactor common computation of bits required for a type index.
Suggested by Duncan. Happy to bikeshed the name, cache the result, etc.

llvm-svn: 230410
2015-02-25 00:51:52 +00:00
Philip Reames
0f7f6f7f17 Fix consistently wrong sphinx markup
I'd been using '' where I should have been using ``.

llvm-svn: 230407
2015-02-25 00:22:07 +00:00
Philip Reames
3a07521b21 Update the GC docs to explicitly mention both gcroot and gc.statepoint
Also, fix confusing bit of the gcroot documentation that bit me personally.

llvm-svn: 230405
2015-02-25 00:18:04 +00:00
Eric Christopher
ceeffadd1e Make this test even more OS and register allocation neutral.
llvm-svn: 230404
2015-02-25 00:12:11 +00:00
Philip Reames
6468a5f251 [GC] Sync documentation with code naming
Fixing an issue pointed out by Sean Silva.  Thanks!

llvm-svn: 230403
2015-02-24 23:57:26 +00:00
Philip Reames
4d5446e399 More GC documentation cleanup
llvm-svn: 230402
2015-02-24 23:51:37 +00:00
Eric Christopher
e992fbba6a Make this test not dependent upon the triple. All that was needed
was some flexibility in the check line for the comment basic block.

llvm-svn: 230400
2015-02-24 23:43:26 +00:00
Philip Reames
52791a374e More GC doc cleanup
Mostly minor wording changes for readability.  Nothing major to see here.

llvm-svn: 230397
2015-02-24 23:34:24 +00:00
Zachary Turner
902ddacbc7 [CMake] Set policy CMP0051 to OLD globally.
When you use generator expressions in a library sources list,
and then later access the SOURCES property, the OLD behavior
(CMake 3.0 and earlier) would not include these expressions in
the SOURCES property.  The NEW behavior (starting in CMake 3.1)
is that they do include the generator expressions in the SOURCES
property.

Differential Revision: http://reviews.llvm.org/D7870
Reviewed By: Chris Bieneman

llvm-svn: 230396
2015-02-24 23:32:47 +00:00
Peter Collingbourne
b005cb0cfc LowerBitSets: Introduce global layout builder.
The builder is based on a layout algorithm that tries to keep members of
small bit sets together. The new layout compresses Chromium's bit sets to
around 15% of their original size.

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

llvm-svn: 230394
2015-02-24 23:17:02 +00:00
Philip Reames
135d984527 Improve the getting started instructions in the GC docs
This is still gcroot vs gc.statepoint agnostic.  I'm just trying to clarify the general documentation at this point.

llvm-svn: 230393
2015-02-24 23:12:27 +00:00
David Majnemer
074e36baf8 PrologEpilogInserter: Clean up math in calculateFrameObjectOffsets
There is no need to open-code the alignment calculation, we have a
handy RoundUpToAlignment function which "Does The Right Thing (TM)".

llvm-svn: 230392
2015-02-24 23:08:13 +00:00
Sanjay Patel
b665feb92e remove function names from comments; NFC
llvm-svn: 230391
2015-02-24 22:43:06 +00:00
Simon Pilgrim
50fa51790b Reapplied D7816 & rL230177 & rL230278 - with an additional fix toensure that the smallest build vector input scalar type is always used. Additional (crash) test cases already committed.
llvm-svn: 230388
2015-02-24 22:08:56 +00:00
Simon Pilgrim
ce1717761f Added test case for PR22678 (check CONCAT_VECTORS DAG combiner pass doesn't introduce illegal types)
llvm-svn: 230386
2015-02-24 21:46:23 +00:00
Justin Bogner
acd9f7b0d5 InstrProf: Test for appropriate linkage of the profiling structures
This test checks that the symbols instrprof creates have appropriate
linkage. The tests already exist in clang in a slightly different form
from before we sunk profile generation into an LLVM pass, but that's
an awkward place for them now. I'll remove/simplify the clang versions
shortly.

llvm-svn: 230383
2015-02-24 21:42:42 +00:00
Andrew Kaylor
914fdbf483 Fixing eol-style
llvm-svn: 230378
2015-02-24 20:49:35 +00:00
Hans Wennborg
35a376e970 ReleaseNotes: add notes about VS2014 Update 4 requirement
llvm-svn: 230363
2015-02-24 20:36:40 +00:00
Arch D. Robison
8ca1c4da63 Fix typo: qual -> equal
llvm-svn: 230361
2015-02-24 20:11:49 +00:00
Philip Reames
f2814925a2 Starting to cleanup the garbage collection documentation
In this change:
- Put the getting started section first
- Create a dedicated section to document the built in collector strategies
- Move discuss of ShadowStack into new section
- Add placeholders for erlang, ocaml, and statepoint-example collectors

There will be many more changes following.  I plan on full integrating the documentation for gc.statepoint and gc.root.  I want to make it much clearer on how to get started and what users should expect in terms of effort.

llvm-svn: 230359
2015-02-24 19:44:46 +00:00
Eric Christopher
db420cc1dd Revert:
Author: Simon Pilgrim <llvm-dev@redking.me.uk>
Date:   Mon Feb 23 23:04:28 2015 +0000

    Fix based on post-commit comment on D7816 & rL230177 - BUILD_VECTOR operand truncation was using the the BV's output scalar type instead of the input type.

and

Author: Simon Pilgrim <llvm-dev@redking.me.uk>
Date:   Sun Feb 22 18:17:28 2015 +0000

    [DagCombiner] Generalized BuildVector Vector Concatenation

    The CONCAT_VECTORS combiner pass can transform the concat of two BUILD_VECTOR nodes into a single BUILD_VECTOR node.

    This patch generalises this to support any number of BUILD_VECTOR nodes, and also permits UNDEF nodes to be included as well.

    This was noticed as AVX vec128 -> vec256 canonicalization sometimes creates a CONCAT_VECTOR with a real vec128 lower and an vec128 UNDEF upper.

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

as the root cause of PR22678 which is causing an assertion inside the DAG combiner.

I'll follow up to the main thread as well.

llvm-svn: 230358
2015-02-24 19:11:00 +00:00
Eric Christopher
7ee6f3d6c2 Rename UpdateRegAllocHint to match style guidelines.
llvm-svn: 230357
2015-02-24 19:10:57 +00:00
Matthias Braun
45ead6c770 AArch64: Relax assert about large shift sizes.
The reason why these large shift sizes happen is because OpaqueConstants
currently inhibit alot of DAG combining, but that has to be addressed in
another commit (like the proposal in D6946).

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

llvm-svn: 230355
2015-02-24 18:52:04 +00:00
Matthias Braun
2c6ac76701 DAGCombiner: Move variable definitions closer to use; NFC
llvm-svn: 230354
2015-02-24 18:52:01 +00:00
Matthias Braun
69fb836050 DAGCombiner: Move variable declaration closer to definiion; NFC
llvm-svn: 230353
2015-02-24 18:51:59 +00:00
Tom Stellard
266ed1f528 R600/SI: Remove isel mubuf legalization
We legalize mubuf instructions post-instruction selection, so this
code is no longer needed.

llvm-svn: 230352
2015-02-24 17:59:19 +00:00
Tim Northover
afcf85da25 ARM: treat [N x i32] and [N x i64] as AAPCS composite types
The logic is almost there already, with our special homogeneous aggregate
handling. Tweaking it like this allows front-ends to emit AAPCS compliant code
without ever having to count registers or add discarded padding arguments.

Only arrays of i32 and i64 are needed to model AAPCS rules, but I decided to
apply the logic to all integer arrays for more consistency.

llvm-svn: 230348
2015-02-24 17:22:34 +00:00
Tobias Grosser
3022fe4913 Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit r230062.

Debian stable (wheezy) ships still with cmake 2.8.9.

The commit broke my LLVM/Polly buildbot, to my knowledge our only Linux+cmake
buildbot.

llvm-svn: 230343
2015-02-24 16:39:46 +00:00
Sanjay Patel
2d353d537e simplify control flow; NFC
llvm-svn: 230342
2015-02-24 16:26:02 +00:00
Hans Wennborg
fb5af71543 Revert r230280: "Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap"
This caused PR22674, failing this assert:

Instructions.h:2281: llvm::Value* llvm::PHINode::getOperand(unsigned int) const: Assertion `i_nocapture < OperandTraits<PHINode>::operands(this) && "getOperand() out of range!"' failed.

llvm-svn: 230341
2015-02-24 16:19:29 +00:00
Michael Kuperstein
d658f2fd10 [x32] Mark RBX as reserved when EBX is the base pointer.
This should have gone into r230334.

llvm-svn: 230339
2015-02-24 16:13:16 +00:00
Sanjay Patel
c5eee89f6f fix typo in comment; NFC
llvm-svn: 230338
2015-02-24 16:11:05 +00:00
Michael Kuperstein
0bcb785609 [x32] x32 should use ebx as the base pointer.
This fixes the original issue in PR22655, but not the secondary one.

llvm-svn: 230334
2015-02-24 15:27:13 +00:00
Hal Finkel
5b5de90baa [SDAG] Handle LowerOperation returning its input consistently
For almost all node types, if the target requested custom lowering, and
LowerOperation returned its input, we'd treat the original node as legal. This
did not work, however, for many loads and stores, because they follow
slightly different code paths, and we did not account for the possibility of
LowerOperation returning its input at those call sites.

I think that we now handle this consistently everywhere. At the call sites in
LegalizeDAG, we used to assert in this case, so there's no functional change
for any existing code there. For the call sites in LegalizeVectorOps, this
really only affects whether or not we set Changed = true, but I think makes the
semantics clearer.

No test case here, but it will be covered by an upcoming PowerPC commit adding
QPX support.

llvm-svn: 230332
2015-02-24 12:59:47 +00:00
Toma Tabacu
6dd4831b6f [mips] Reformat some TableGen definitions. NFC.
Summary: Separated some instruction and pseudo-instruction definitions from InstAlias definitions, added banner for pseudo-instructions and removed a redundant whitespace from a pseudo-instruction definition. No functional change.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 230327
2015-02-24 11:52:19 +00:00
Kuba Brecka
fda2cdf0bc Fix alloca_instruments_all_paddings.cc test to work under higher -O levels (llvm part)
When AddressSanitizer only a single dynamic alloca and no static allocas, due to an early exit from FunctionStackPoisoner::poisonStack we forget to unpoison the dynamic alloca.  This patch fixes that.

Reviewed at http://reviews.llvm.org/D7810

llvm-svn: 230316
2015-02-24 09:47:05 +00:00
Craig Topper
554fe54ab0 [X86] Remove the AbsMem32 type from the assembly parser. Only really need the 16-bit version which will automatically get prioritized over AbsMem.
llvm-svn: 230313
2015-02-24 08:02:13 +00:00
Reed Kotler
05834965d0 Beginning of alloca implementation for Mips fast-isel
Summary: Begin to add various address modes; including alloca.

Test Plan: Make sure there are no regressions in test-suite at O0/02 in mips32r1/r2

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: echristo, rfuhler, llvm-commits

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

llvm-svn: 230300
2015-02-24 02:36:45 +00:00
Bob Wilson
be0e2eb89d Fix handling of negative offsets for AddrModeT2_i8s4 in rewriteT2FrameIndex.
This is a follow up to r230233 to fix something that I noticed by
inspection. The AddrModeT2_i8s4 addressing mode does not support
negative offsets. I spent a good chunk of the day trying to come up with
a testcase for this but was not successful. This addressing mode is used
to spill and restore GPRPair registers in Thumb2 code and that does not
happen often. We also make very limited used of negative offsets when
lowering frame indexes. I am going ahead with the change anyway, because
I am pretty confident that it is correct. I also added a missing assertion
to check that the low bits of the scaled offset are zero.

llvm-svn: 230297
2015-02-24 01:37:31 +00:00
Sanjoy Das
5b35fffa29 Fix bug 22641
The bug was a result of getPreStartForExtend interpreting nsw/nuw
flags on an add recurrence more strongly than is legal.  {S,+,X}<nsw>
implies S+X is nsw only if the backedge of the loop is taken at least
once.

NOTE: I had accidentally committed an unrelated change with the commit
message of this change in r230275 (r230275 was reverted in r230279).
This is the correct change for this commit message.

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

llvm-svn: 230291
2015-02-24 01:02:42 +00:00
Manman Ren
87a073ae1a [LTO API] add lto_codegen_set_module to set the destination module.
When debugging LTO issues with ld64, we use -save-temps to save the merged
optimized bitcode file, then invoke ld64 again on the single bitcode file to
speed up debugging code generation passes and ld64 stuff after code generation.

llvm linking a single bitcode file via lto_codegen_add_module will generate a
different bitcode file from the single input. With the newly-added
lto_codegen_set_module, we can make sure the destination module is the same as
the input.

lto_codegen_set_module will transfer the ownship of the module to code
generator.

rdar://19024554

llvm-svn: 230290
2015-02-24 00:45:56 +00:00
Adam Nemet
0b7049f21a [LoopAccesses] LAA::getInfo to use const reference for stride parameter
And other required const-correctness fixes to make this work.

llvm-svn: 230289
2015-02-24 00:41:59 +00:00