1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Commit Graph

103934 Commits

Author SHA1 Message Date
Eric Christopher
c6febecdec Add a comment here.
llvm-svn: 209262
2014-05-21 00:02:50 +00:00
Eric Christopher
4e6f085237 Move this test to the backend from the frontend.
llvm-svn: 209259
2014-05-20 23:59:54 +00:00
Eric Christopher
04464d5263 Move the verbose asm option to be part of the options struct and
set appropriately.

llvm-svn: 209258
2014-05-20 23:59:50 +00:00
Kevin Enderby
9ee20001f3 Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress
does.  This allows llvm-nm to print spaces instead of 0’s for the value
of undefined symbols in Mach-O files.

To make this change other uses of MachOObjectFile::getSymbolAddress
are updated to handle when the Value is returned as UnknownAddressOrSize.
Which is needed to keep two of the ExecutionEngine tests working for example.

llvm-svn: 209253
2014-05-20 23:04:47 +00:00
Alexey Samsonov
e152790b3c Fix test added in r209242: llc shouldn't create files in source tree
llvm-svn: 209252
2014-05-20 22:40:31 +00:00
David Blaikie
80cb22d7ed Revert "DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed."
This reverts commit r209178.

This seems to be asserting in an LTO build on some internal Apple
buildbots. No upstream reproduction (and I don't have an LLVM-aware gold
built right now to reproduce it personally) but it's a small patch & the
failure's semi-plausible so I'm going to revert first while I try to
reproduce this.

llvm-svn: 209251
2014-05-20 22:33:09 +00:00
Adam Nemet
6b3d606a41 [ARM64] PR19792: Fix cycle in DAG after performPostLD1Combine
Povray and dealII currently assert with "Overran sorted position" in
AssignTopologicalOrder.  The problem is that performPostLD1Combine can
introduce cycles.

Consider:

(insert_vector_elt (INSERT_SUBREG undef,
                                  (load (add %vreg0, Constant<8>), undef),  <= A
                                  TargetConstant<2>),
                   (load %vreg0, undef),                                    <= B
                   Constant<1>)

This is turned into a LD1LANEpost node.  However the address in A is not a
valid user of the post-incremented address of B in LD1LANEpost.

llvm-svn: 209242
2014-05-20 21:47:07 +00:00
David Blaikie
d856e7924f Unbreak the sanitizer buildbots after r209226 due to SROA issue described in http://reviews.llvm.org/D3714
Undecided whether this should include a test case - SROA produces bad
dbg.value metadata describing a value for a reference that is actually
the value of the thing the reference refers to. For now, loosening the
assert lets this not assert, but it's still bogus/wrong output...

If someone wants to tell me to add a test, I'm willing/able, just
undecided. Hopefully we'll get SROA fixed soon & we can tighten up this
assertion again.

llvm-svn: 209240
2014-05-20 21:40:13 +00:00
Eric Christopher
974cef18f4 Move the function and data section flags into the options struct and
make the functions to set them non-static.
Move and rename the llvm specific backend options to avoid conflicting
with the clang option.

Paired with a backend commit to update.

llvm-svn: 209238
2014-05-20 21:25:34 +00:00
Kevin Enderby
35b1659e80 Revert r209235 as it broke two tests:
Failing Tests (2):
	    LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
	    LLVM :: ExecutionEngine/MCJIT/stubs.ll

llvm-svn: 209236
2014-05-20 21:10:15 +00:00
Kevin Enderby
96dd7fc245 Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols.  Allowing llvm-nm to print spaces instead of 0’s for
the value of undefined symbols in Mach-O files.

llvm-svn: 209235
2014-05-20 20:32:18 +00:00
Quentin Colombet
c4e9e184e8 [LSR] Canonicalize reg1 + ... + regN into reg1 + ... + 1*regN.
This commit introduces a canonical representation for the formulae.
Basically, as soon as a formula has more that one base register, the scaled
register field is used for one of them. The register put into the scaled
register is preferably a loop variant.
The commit refactors how the formulae are built in order to produce such
representation.
This yields a more accurate, but still perfectible, cost model.

<rdar://problem/16731508>

llvm-svn: 209230
2014-05-20 19:25:04 +00:00
Duncan P. N. Exon Smith
ec22956f2f GlobalValue: Automatically reset visibility when setting local linkage
r208264 started asserting in `setLinkage()` and `setVisibility()` that
visibility and linkage are compatible.  There are a few places in clang
where visibility is set first, and then linkage later, so the assert
fires.  In `setLinkage()`, it's clear what the visibility *should* be,
so rather than updating all the call sites just automatically fix the
visibility.

The testcase for this is for *clang*, so it'll follow separately in cfe.

PR19760

llvm-svn: 209227
2014-05-20 19:00:58 +00:00
David Blaikie
939d8411a7 Fix test breakage introduced in r209223.
Oops, broke the broken enum constants again.

llvm-svn: 209226
2014-05-20 18:36:35 +00:00
Alexey Samsonov
3a8ff19189 Rewrite calculateDbgValueHistory to make it (hopefully) more transparent.
This change preserves the original algorithm of generating history
for user variables, but makes it more clear.

High-level description of algorithm:
Scan all the machine basic blocks and machine instructions in the order
they are emitted to the object file. Do the following:
1) If we see a DBG_VALUE instruction, add it to the history of the
corresponding user variable. Keep track of all user variables, whose
locations are described by a register.
2) If we see a regular instruction, look at all the registers it clobbers,
and terminate the location range for all variables described by these registers.
3) At the end of the basic block, terminate location ranges for all
user variables described by some register.

Although this change shouldn't be user-visible (the contents of .debug_loc section
should be the same), it changes some internal assumptions about the set
of instructions used to track the variable locations. Watching the bots.

llvm-svn: 209225
2014-05-20 18:34:54 +00:00
David Blaikie
a92dddef5c PR19767: DebugInfo emission of pointer constants.
In refactoring DwarfUnit::isUnsignedDIType I restricted it to only work
on values with signedness (unsigned or signed), asserting on anything
else (which did uncover some bugs). But it turns out that we do need to
emit constants of signless data, such as pointer constants - only null
pointer constants are known to need this so far, but it's conceivable
that there might be non-null pointer constants at some point (hardcoded
address offsets for device drivers?).

This patch just uses 'unsigned' for signless data such as pointer
constants. Arguably we could use signless representations
(DW_FORM_dataN) instead, allowing a trinary result from isUnsignedDIType
(signed, unsigned, signless), but this seems reasonable for now.

llvm-svn: 209223
2014-05-20 18:21:51 +00:00
Renato Golin
7ee7479e73 Avoids DCE on write_register
llvm-svn: 209222
2014-05-20 17:40:03 +00:00
Adam Nemet
37337f0359 [PowerPC] PR19796: Also match ISD::TargetConstant in isIntS16Immediate
The SplitIndexingFromLoad changes exposed a latent isel bug in the PowerPC64
backend.  We matched an immediate offset with STWX8 even though it only
supports register offset.

The culprit is the complex-pattern predicate, SelectAddrIdx, which decides
that if the offset is not ISD::Constant it must be a register.

Many thanks to Bill Schmidt for testing this.

llvm-svn: 209219
2014-05-20 17:20:34 +00:00
Eric Christopher
262770bdee Clean up language and grammar.
Based on a patch by jfcaron3@gmail.com!
PR19806

llvm-svn: 209216
2014-05-20 17:11:11 +00:00
Daniel Sanders
b2debb9049 Temporarily revert: r209129 - [mips][mips64r6] Sorted *_ENC, *_DESC classes and tests
After discussion with Zoran, we have decided to temporarily revert this commit.
It's causing some difficult to resolve conflicts and we are under time pressure
to deliver an initial MIPS64r6 compiler.

We will re-apply an equivalent patch once the time pressure has passed.

llvm-svn: 209211
2014-05-20 14:46:24 +00:00
Bradley Smith
b4e4c1f8ea [ARM64] Port basic-a64-diagnostics.s over to ARM64
llvm-svn: 209207
2014-05-20 13:33:41 +00:00
Tim Northover
20001e6010 TableGen: permit non-leaf ComplexPattern uses
This allows the results of a ComplexPattern check to be distributed to separate
named Operands, instead of the current system where all results must apply (and
match perfectly) with a single Operand.

For example, if "some_addrmode" is a ComplexPattern producing two results, you
can write:

   def : Pat<(load (some_addrmode GPR64:$base, imm:$offset)),
             (INST GPR64:$base, imm:$offset)>;

This should allow neater instruction definitions in TableGen that don't put all
possible aspects of addressing into a single operand, but are still usable with
relatively simple C++ CodeGen idioms.

llvm-svn: 209206
2014-05-20 11:52:46 +00:00
Simon Atanasyan
e4d2663548 Add parentheses to suppress the gcc warning '-Wparentheses'.
No functional changes.

llvm-svn: 209203
2014-05-20 10:23:04 +00:00
Benjamin Kramer
5f1713b9ab Legalizer: Make bswap promotion safe for vectors.
llvm-svn: 209202
2014-05-20 09:42:31 +00:00
Simon Atanasyan
1dd1d4e3a7 [Mips] Add more relocation types and MIPS specific e_flags constants.
llvm-svn: 209201
2014-05-20 09:27:49 +00:00
Christian Pirker
e22202ec76 ARMEB: Additional test files for ARM fixups
llvm-svn: 209200
2014-05-20 09:24:37 +00:00
Tim Northover
465abfd56e TableGen: convert InstAlias's Emit bit to an int.
When multiple aliases overlap, the correct string to print can often be
determined purely by considering the InstAlias declarations in some particular
order. This allows the user to specify that order manually when desired,
without resorting to hacking around with the default lexicographical order on
Record instantiation, which is error-prone and ugly.

I was also mistaken about "add w2, w3, w4" being the same as "add w2, w3, w4,
uxtw". That's only true if Rn is the stack pointer.

llvm-svn: 209199
2014-05-20 09:17:16 +00:00
Alexey Volkov
9a03018603 [X86] Tune LEA usage for Silvermont
According to Intel Software Optimization Manual on Silvermont in some cases LEA
is better to be replaced with ADD instructions:
"The rule of thumb for ADDs and LEAs is that it is justified to use LEA
with a valid index and/or displacement for non-destructive destination purposes
(especially useful for stack offset cases), or to use a SCALE.
Otherwise, ADD(s) are preferable."

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

llvm-svn: 209198
2014-05-20 08:55:50 +00:00
Zinovy Nis
f1d54111ee [LV][REFACTOR] One more tiny fix for printing debug locations in loop vectorizer. Now consistent with the remarks emitter.
Differential Revision: http://reviews.llvm.org/D3821

llvm-svn: 209197
2014-05-20 08:26:20 +00:00
Saleem Abdulrasool
4ac71f7fe6 llvm-readobj: use range-based for loop
Convert an additional site to a range based for loop.  NFC.

llvm-svn: 209194
2014-05-20 05:18:06 +00:00
Nick Lewycky
ea4c3a9a9c Teach isKnownNonNull that a nonnull return is not null. Add a test for this case as well as the case of a nonnull attribute (already handled but not tested).
llvm-svn: 209193
2014-05-20 05:13:21 +00:00
David Blaikie
4c5d7eb5e6 DebugInfo: Emit function definitions within their namespace scope.
This workaround (presumably for ancient GDB) doesn't appear to be
required (GDB 7.5 seems to tolerate function definition DIEs in
namespace scope just fine).

llvm-svn: 209189
2014-05-20 03:23:24 +00:00
David Blaikie
c8185a548f Follow up to 209187, updating a test to use FileCheck. Needed to ignore an extra DW_TAG_class_type
llvm-svn: 209188
2014-05-20 02:40:34 +00:00
David Blaikie
aa9524a4c9 Update test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll to use FileCheck.
llvm-svn: 209187
2014-05-20 02:19:15 +00:00
Nick Lewycky
de84a8bb51 Add 'nonnull', a new parameter and return attribute which indicates that the pointer is not null. Instcombine will elide comparisons between these and null. Patch by Luqman Aden!
llvm-svn: 209185
2014-05-20 01:23:40 +00:00
Adrian Prantl
786c84b6bd LTO: Add a testcase for linking modules with incompatible Debug Info
Versions.
rdar://problem/16926122

llvm-svn: 209183
2014-05-19 23:41:25 +00:00
Kevin Enderby
8760d77d1a OK, NAKAMURA Takumi beat me to this change. So backing out my addition of
llvm-size to the list so it only has one.  Sorry for the noise.

llvm-svn: 209181
2014-05-19 23:26:51 +00:00
Kevin Enderby
5cbf213240 David Blaikie pointed out that the test added in r209158 fails in the
check-llvm target under CMake.  And the test/CMakeFiles.txt needs to
have llvm-size added to the list.

llvm-svn: 209179
2014-05-19 23:22:58 +00:00
David Blaikie
c6084e64ed DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed.
Since we visit the whole list of subprograms for each CU at module
start, this is clearly true - don't test for the case, just assert it.

A few old test cases seemed to have incomplete subprogram lists, but any
attempt to reproduce them shows full subprogram lists that even include
entities that have been completely inlined and the out of line
definition removed.

llvm-svn: 209178
2014-05-19 23:16:19 +00:00
NAKAMURA Takumi
e3feb01c2a [CMake] Add llvm-size to check-llvm, to fix build since r209158.
llvm-svn: 209177
2014-05-19 23:12:43 +00:00
Chad Rosier
3052ad5e5f [ARM64] Adds Cortex-A53 scheduling support for vector load/store post.
Patch by Dave Estes<cestes@codeaurora.org>!
PR19761 http://reviews.llvm.org/D3829

llvm-svn: 209176
2014-05-19 22:59:51 +00:00
Matt Arsenault
cb883e1e39 Remove unused method declaration
llvm-svn: 209174
2014-05-19 22:55:35 +00:00
Alexey Samsonov
7b5647b707 Add documentation for llvm-dwarfdump tool
llvm-svn: 209173
2014-05-19 22:53:29 +00:00
David Blaikie
aa1faa6281 DebugInfo: Don't include DW_AT_inline on each abstract definition multiple times.
When I refactored this in r208636 I accidentally caused this to be added
multiple times to each abstract subprogram (not accounting for the
deduplicating effect of the InlinedSubprogramDIEs set).

This got better in r208798 when the abstract definitions got the
attribute added to them at construction time, but still had the
redundant copies introduced in r208636.

This commit removes those excess DW_AT_inlines and relies solely on the
insertion in r208798.

llvm-svn: 209166
2014-05-19 22:07:16 +00:00
David Blaikie
5d56623a2c DebugInfo: Fix missing inlined_subroutines caused by r208748.
The check in DwarfDebug::constructScopeDIE was meant to consider inlined
subroutines as any non-top-level scope that was a subprogram. Instead of
checking "not top level scope" it was checking if the /subprogram's/
scope was non-top-level.

Fix this and beef up a test case to demonstrate some of the missing
inlined_subroutines are no longer missing.

In the course of fixing this I also found that r208748 (with this fix)
found one /extra/ inlined_subroutine in concrete_out_of_line.ll due to
two inlined_subroutines having the same inlinedAt location. The previous
implementation was collapsing these into a single inlined subroutine.

I'm not sure what the original code was that created this .ll file so
I'm not sure if this actually happens in practice today. Since we
deliberately include column information to disambiguate two calls on the
same line, that may've addressed this bug in the frontend, but it's good
to know that workaround isn't necessary for this particular case
anymore.

llvm-svn: 209165
2014-05-19 21:54:31 +00:00
Eric Christopher
f08cdc9333 Fix typos.
llvm-svn: 209164
2014-05-19 21:18:47 +00:00
Reid Kleckner
4a058c6635 cmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGS
This silences ~7 warnings on .c files in the LLVM build.

llvm-svn: 209163
2014-05-19 21:13:41 +00:00
Juergen Ributzka
b62ac80e67 [ConstantHoisting][X86] Change the cost model to never hoist constants for types larger than i128.
Currently the X86 backend doesn't support types larger than i128 very well. For
example an i192 multiply will assert in codegen when the 2nd argument is a constant and the constant got hoisted.

This fix changes the cost model to never hoist constants for types larger than
i128. Once the codegen issues have been resolved, the cost model can be updated
to allow also larger types.

This is related to <rdar://problem/16954938>

llvm-svn: 209162
2014-05-19 21:00:53 +00:00
Andrea Di Biagio
41bcee5bc3 [X86] Add ISel patterns to improve the selection of TZCNT and LZCNT.
Instructions TZCNT (requires BMI1) and LZCNT (requires LZCNT), always
provide the operand size as output if the input operand is zero.

We can take advantage of this knowledge during instruction selection
stage in order to simplify a few corner case.

llvm-svn: 209159
2014-05-19 20:38:59 +00:00
Kevin Enderby
329b5c1fea Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
so that llvm-size will total up all the sections in the Berkeley format.  This
allows for rough categorizations for Mach-O sections.  And allows the total of
llvm-size’s Berkeley and System V formats to be the same.

llvm-svn: 209158
2014-05-19 20:36:02 +00:00