1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

101288 Commits

Author SHA1 Message Date
Evgeniy Stepanov
7ad8a1f5a2 [msan] Remove unused code.
llvm-svn: 204125
2014-03-18 08:29:42 +00:00
Craig Topper
f7e1d669fe [C++11] Mark the target fast isel classes as 'final' so that the compiler can de-virtualize some of the internal calls.
llvm-svn: 204123
2014-03-18 07:27:13 +00:00
Alexey Samsonov
c29886ea05 [C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make it work with range-based for loops.
Reviewers: ruiu

Reviewed By: ruiu

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3097

llvm-svn: 204120
2014-03-18 06:53:02 +00:00
NAKAMURA Takumi
a0deabb112 CodeGen/R600/v_cndmask.ll: Relax an expression to unbreak msvcrt.
V_CNDMASK_B32_e64 v0, v0, -1.#QNAN0e+00, s[2:3], 0, 0, 0, 0

FIXME: We really need to implement our formatter...
llvm-svn: 204118
2014-03-18 06:17:22 +00:00
NAKAMURA Takumi
24c711e6ca DebugInfo/lto-comp-dir.ll: Tweak for dos path.
llvm-svn: 204117
2014-03-18 06:01:14 +00:00
Saleem Abdulrasool
208386ebfa ARM: add an assertion
Add an assertion that a valid section is referenced.  The potential NULL pointer
dereference was identified by the clang static analyzer.

llvm-svn: 204114
2014-03-18 05:26:55 +00:00
Adrian Prantl
2858669a6f DwarfDebug: Only unique retained types instead of all types.
This is a follow-up to r203983 based on feedback from dblaikie and mren (Thanks!)
No functionality change.

llvm-svn: 204107
2014-03-18 02:35:03 +00:00
Adrian Prantl
c28a560ab2 Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs.
This allows us to catch more opportunities for ODR-based type uniquing
during LTO.
Paired commit with CFE which updates some testcases to verify the new
DIBuilder behavior.

llvm-svn: 204106
2014-03-18 02:34:58 +00:00
Adrian Prantl
ca108f3f54 Replace unnecessary #include directive with forward declarations.
llvm-svn: 204104
2014-03-18 02:34:52 +00:00
Eric Christopher
4614b6ba2a Add explanatory comment.
llvm-svn: 204103
2014-03-18 02:18:27 +00:00
Eric Christopher
81af357a6f Shorten DotDebugLocEntry to just DebugLocEntry and reformat.
No functional change.

llvm-svn: 204102
2014-03-18 02:18:24 +00:00
David Blaikie
1bdbb37386 DebugInfo: Avoid emitting standard opcode lengths in debug_line.dwo headers where opcodes are never used anyway
Introduce a slightly tighter wrapper around the header structure that
handles this use case. (MCDwarfDwoLineTable)

llvm-svn: 204101
2014-03-18 02:13:23 +00:00
David Blaikie
9b1e3d2728 DebugInfo: Implement debug_line.dwo for file names used in type units during -gsplit-dwarf
This removes an attribute (and more importantly, a relocation) from
skeleton type units and removes some unnecessary file names from the
debug_line section that remains in the .o (and linked executable) file.

There's still a few places we could shave off some more space here:

* use compilation dir of the underlying compilation unit (since all the
  type units share that compilation dir - though this would be more
  complicated in LTO cases where they don't (keep a map of compilation
  dir->line table header?))

* Remove some of the unnecessary header fields from the line table since
  they're not needed in this situation (about 12 bytes per table).

llvm-svn: 204099
2014-03-18 01:17:26 +00:00
David Blaikie
2a38f66bd7 DebugInfo: Flag test as requiring object emission support
Cleans up buildbot failures on R600 and similar.

llvm-svn: 204095
2014-03-18 00:12:25 +00:00
David Blaikie
cb0b38be9c DebugInfo: Do not rely on the compilation dir (index 0) for files in line tables shared between compilation units
When emitting assembly there's no support for emitting separate line
tables for each compilation unit - so LLVM emits .loc directives
producing a single line table.

Line tables have an implicit directory (index 0) equal to the
compilation directory (DW_AT_comp_dir) of the compilation unit that
references them.

If multiple compilation units (with possibly disparate compilation
directories) reference the same line table, we must avoid relying on
this ambiguous directory.

Achieve this my simply not setting the compilation directory on the line
table when we're in this situation (multiple units while emitting
assembly).

llvm-svn: 204094
2014-03-18 00:11:48 +00:00
David Blaikie
1e7fb56e8e DebugInfo: Move getOrCreateSourceID from DwarfDebug to DwarfCompileUnit
We still do a few lookups into the line table mapping in MCContext that
could be factored out into a single lookup (rather than looking it up
once for the table label, once to set the compilation unit, once for
each time we need a file ID, etc... ) but assembly output complicates
that somewhat as we still need a virtual dispatch back to the
MCAsmStreamer in that case.

llvm-svn: 204092
2014-03-17 23:53:25 +00:00
David Blaikie
dea7f464ea DebugInfo: Move line table zero-directory-index (compilation dir) handling into MCDwarf
Our handling of compilation directory in DwarfDebug was broken
(incorrectly using the 'last' compilation directory (that of the last
CU in the metadata list) for all function emission in any CU). By moving
this handling down into MCDwarf the issue is fixed as the compilation
dir is tracked correctly per line table.

llvm-svn: 204089
2014-03-17 23:29:40 +00:00
Matt Arsenault
36b9235d4c Make methods static
llvm-svn: 204085
2014-03-17 22:23:09 +00:00
Dan Gohman
b0339af0e1 Use range metadata instead of introducing selects.
When GlobalOpt has determined that a GlobalVariable only ever has two values,
it would convert the GlobalVariable to a boolean, and introduce SelectInsts
at every load, to choose between the two possible values. These SelectInsts
introduce overhead and other unpleasantness.

This patch makes GlobalOpt just add range metadata to loads from such
GlobalVariables instead. This enables the same main optimization (as seen in
test/Transforms/GlobalOpt/integer-bool.ll), without introducing selects.

The main downside is that it doesn't get the memory savings of shrinking such
GlobalVariables, but this is expected to be negligible.

llvm-svn: 204076
2014-03-17 19:57:04 +00:00
Owen Anderson
67b0438463 Switch a number of loops in lib/CodeGen over to range-based for-loops, now that
the MachineRegisterInfo iterators are compatible with it.

llvm-svn: 204075
2014-03-17 19:36:09 +00:00
Owen Anderson
a72732cdf5 Really REALLY finish adding const to the MachineRegisterInfo iterator range methods.
llvm-svn: 204074
2014-03-17 19:34:51 +00:00
Kevin Enderby
b8221f3c03 Making a guess to fix the test case with r204056 to get the build bot working.
llvm-svn: 204073
2014-03-17 19:00:03 +00:00
Matt Arsenault
553297669c R600: Match sign_extend_inreg to BFE instructions
llvm-svn: 204072
2014-03-17 18:58:11 +00:00
Matt Arsenault
c95c06bda9 Make DAGCombiner work on vector bitshifts with constant splat vectors.
llvm-svn: 204071
2014-03-17 18:58:01 +00:00
Owen Anderson
1813cdfb4a Add one more const marker that I missed.
llvm-svn: 204070
2014-03-17 18:16:10 +00:00
David Blaikie
d61679d719 DebugInfo: Use MC line table file entry uniquing for non-asm input as well.
See r204027 for the precursor to this that applied to asm debug info.

This required some non-obvious API changes to handle the case of asm
output (we never go asm->asm so this didn't come up in r204027): the
modification of the file/directory name by MCDwarfLineTableHeader needed
to be reflected in the MCAsmStreamer caller so it could print the
appropriate .file directive, so those StringRef parameters are now
non-const ref (in/out) parameters rather than just const.

llvm-svn: 204069
2014-03-17 18:13:58 +00:00
Owen Anderson
48d559a25e Mark MachineRegisterInfo's iterator range methods as const.
llvm-svn: 204067
2014-03-17 18:05:05 +00:00
Owen Anderson
0ca3e8371f Add iterator range definitions for the MachineRegisterInfo iterators.
llvm-svn: 204066
2014-03-17 18:01:41 +00:00
Adam Nemet
2d2e2e7516 [X86] Fix unused variable warning with NDEBUG from r204058
llvm-svn: 204063
2014-03-17 17:32:53 +00:00
Saleem Abdulrasool
8e877674bc MC: change runtime check to an assertion
It is unclear how it would be possible to get M to be NULL in normal scenarios.
Change this to an assert rather than a runtime check as per dblakie's
suggestion.

llvm-svn: 204060
2014-03-17 17:13:57 +00:00
Saleem Abdulrasool
b49ac81455 ARM IAS: support .thumb_set
This performs the equivalent of a .set directive in that it creates a symbol
which is an alias for another symbol or value which may possibly be yet
undefined.  This directive also has the added property in that it marks the
aliased symbol as being a thumb function entry point, in the same way that the
.thumb_func directive does.

The current implementation fails one test due to an unrelated issue.  Functions
within .thumb sections are not marked as thumb_func.  The result is that
the aliasee function is not valued correctly.

llvm-svn: 204059
2014-03-17 17:13:54 +00:00
Adam Nemet
65c87794ae [VectorLegalizer/X86] Don't unvectorize fp_to_uint for v8f32->v8i16
Rather than LegalizeAction::Expand, this needs LegalizeAction::Promote to get
promoted to fp_to_sint v8f32->v8i32.  This is a legal operation on AVX.

For that to work properly, we also need to teach the legalizer about the
specific promotion required here.  The default vector promotion uses
bitcasting to a vector type of the same total size.  We want to promote the
vector element type, effectively widening the operation and then truncating
the result.  This is analogous to the current logic of how int_to_fp is
promoted.

The change also factors out some code from the int_to_fp promotion code to
ValueType::widenIntegerVectorElementType.  This is now shared between
int_to_fp and fp_to_int.

There is no longer need for the custom lowering of fp_to_sint f32->v8i16 in
X86.  It can now go through the new target-independent fp_to_*int promotion
logic.

I also checked that no other target uses Promote for these ops yet, so there
shouldn't be any unexpected change in behavior.

Fixes <rdar://problem/16202247>

llvm-svn: 204058
2014-03-17 17:06:14 +00:00
Tom Stellard
6f60ceca31 R600/SI: Fix implementation of isInlineConstant() used by the verifier
The type of the immediates should not matter as long as the encoding is
equivalent to the encoding of one of the legal inline constants.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204056
2014-03-17 17:03:52 +00:00
Tom Stellard
6b4e505e41 R600/SI: Use correct dest register class for V_READFIRSTLANE_B32
This instructions writes to an 32-bit SGPR.  This change required adding
the 32-bit VCC_LO and VCC_HI registers, because the full VCC register
is 64 bits.

This fixes verifier errors on several of the indirect addressing piglit
tests.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204055
2014-03-17 17:03:51 +00:00
Tom Stellard
d6888e7435 R600/SI: Add generic checks to SIInstrInfo::verifyInstruction()
Added checks for number of operands and operand register classes.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 204054
2014-03-17 17:03:49 +00:00
Eli Bendersky
631277f3dd Consistent use of the noduplicate attribute.
The "noduplicate" attribute of call instructions is sometimes queried directly
and sometimes through the cannotDuplicate() predicate. This patch streamlines
all queries to use the cannotDuplicate() predicate. It also adds this predicate
to InvokeInst, to mirror what CallInst has.

llvm-svn: 204049
2014-03-17 16:19:07 +00:00
Alexey Samsonov
d507177bf9 [C++11] Introduce ObjectFile::symbols() to use range-based loops.
Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3081

llvm-svn: 204031
2014-03-17 07:28:19 +00:00
NAKAMURA Takumi
7d945f9afa llvm/test/MC/MachO/gen-dwarf-cpp.s: Relax an expression to match DOS pat.
llvm-svn: 204030
2014-03-17 05:31:54 +00:00
Rafael Espindola
9e9323ec74 Consider the base pointer for setting the symbol type.
This is really a consistency fix. Since given

a = b

we propagate the information, we should propagate it too given

a = b + (1 - 1)

Fixes pr19145.

llvm-svn: 204028
2014-03-17 04:29:51 +00:00
David Blaikie
616f0545ea DebugInfo: Improve reuse of file table entries in asm debug info
The previous deduping strategy was woefully inadequate - it only
considered the most recent file used and avoided emitting a duplicate in
that case - never considering the a/b/a scenario.

It was also lacking when it came to directory paths as the previous
filename would never match the current if the filename had been split
into file and directory components.

This change builds caching functionality into the line table at the
lowest level in an optional form (a file number of 0 indicates that one
should be chosen and returned) and will eventually be reused by the
normal source level debugging DWARF emission.

llvm-svn: 204027
2014-03-17 01:52:11 +00:00
David Blaikie
51302bdec5 Test case
llvm-svn: 204026
2014-03-17 01:52:04 +00:00
Lang Hames
bef12cc14d Deleted copy-constructor/copy-assignment broke a buildbot. Removing while I
investigate.

llvm-svn: 204025
2014-03-17 01:51:51 +00:00
Nico Rieck
5564d1b271 llvm-readobj: Print referred symbol name for CLR token definition
llvm-svn: 204024
2014-03-17 01:46:52 +00:00
Nico Rieck
8fcb9744c7 llvm-readobj: Add test for COFF auxiliary symbols as used by C++/CLI
llvm-svn: 204023
2014-03-17 01:46:28 +00:00
Lang Hames
71892ada86 Rename PBQP RegAllocSolver local variables to conform to LLVM coding style.
No functional change.

llvm-svn: 204022
2014-03-17 01:33:21 +00:00
Lang Hames
8992c5f69e [X86] New and improved VZeroUpperInserter optimization.
- Adds support for inserting vzerouppers before tail-calls.
  This is enabled implicitly by having MachineInstr::copyImplicitOps preserve
  regmask operands, which allows VZeroUpperInserter to see where tail-calls use
  vector registers.

- Fixes a bug that caused the previous version of this optimization to miss some
  vzeroupper insertion points in loops. (Loops-with-vector-code that followed
  loops-without-vector-code were mistakenly overlooked by the previous version).

- New algorithm never revisits instructions.

Fixes <rdar://problem/16228798>

llvm-svn: 204021
2014-03-17 01:22:54 +00:00
NAKAMURA Takumi
91b0695948 Untabify.
llvm-svn: 204020
2014-03-16 23:58:43 +00:00
Manman Ren
845a646084 Add FIXMEs to use DIScopeRef instead of DIScope for LTO type uniqueing.
llvm-svn: 204019
2014-03-16 18:44:23 +00:00
NAKAMURA Takumi
0980916774 [CMake][cygming] Disable --out-implib from executables.
It doesn't make sense even with --export-all-symbols.

llvm-svn: 204017
2014-03-16 13:51:24 +00:00
David Blaikie
60ddd2b93c Remove named Twine.
While technically correct, we generally disallow any instance of named
Twines due to their subtlety.

llvm-svn: 204016
2014-03-16 01:36:18 +00:00