Colin LeMahieu
d6f8b07bfa
[MC] Function naming NFC.
...
llvm-svn: 239263
2015-06-07 20:29:37 +00:00
Matt Arsenault
e81944fd5e
SeparateConstOffsetFromGEP: Pass address space to isLegalAddressingMode
...
llvm-svn: 239262
2015-06-07 20:17:44 +00:00
Matt Arsenault
fb88aca348
Make NaryReassociate pass the address space to isLegalAddressingMode
...
No test since the kinds of transforms this prevents seem to not really
be relevant for SI's different addressing modes.
llvm-svn: 239261
2015-06-07 20:17:42 +00:00
Matt Arsenault
e83379e8e4
Add isLegalAddressingMode address space argument to TTI
...
Update to match the TLI version, and remove the TLI version's
default argument.
llvm-svn: 239260
2015-06-07 20:12:03 +00:00
Peter Zotov
3c40cbb812
[cmake] [OCaml] Make ocamldoc targets depend on output files
...
OCaml doc builds fail without .cmi files, and .cmi files are collected
in ocaml_outputs. Therefore, make doc targets depend on ocaml_outputs as
well.
Fixes: https://llvm.org/bugs/show_bug.cgi?id=23777
Patch by Michał Górny <mgorny@gentoo.org>
llvm-svn: 239259
2015-06-07 19:22:22 +00:00
Chaoren Lin
a4447b338c
Update dosep to display dotest command invoked on failure.
...
llvm-svn: 239258
2015-06-07 18:50:40 +00:00
Simon Pilgrim
3a7718038d
[X86] Added BitScanForward/BitScanReverse memory folding + tests
...
llvm-svn: 239257
2015-06-07 18:34:25 +00:00
Benjamin Kramer
82f865277e
Remove global std::string. NFC.
...
llvm-svn: 239254
2015-06-07 16:36:28 +00:00
Simon Pilgrim
19cefe6903
Fixed line endings
...
llvm-svn: 239253
2015-06-07 16:09:48 +00:00
Simon Pilgrim
68cd237f57
[DAGCombiner] Added CTPOP vector constant folding support.
...
Added tests to the existing SSE/AVX test files.
llvm-svn: 239252
2015-06-07 15:37:14 +00:00
Benjamin Kramer
bbd05a2470
[AsmWriter] Rewrite module asm printing using StringRef::split.
...
No change in output intended.
llvm-svn: 239251
2015-06-07 13:59:33 +00:00
Filipe Cabecinhas
a0cb17c379
Fix doxygen comments. NFC
...
llvm-svn: 239250
2015-06-07 06:40:24 +00:00
Craig Topper
e28cd8014c
[TableGen] Remove unnecessary include. NFC.
...
llvm-svn: 239249
2015-06-07 06:01:22 +00:00
Craig Topper
95d9b5a506
[TableGen] Remove unnecessary forward declaration. NFC
...
llvm-svn: 239248
2015-06-07 06:01:19 +00:00
Craig Topper
4e2aa8014f
[TableGen] Write one of the Record constructors in terms of the other constructor to reduce code duplication. NFC
...
llvm-svn: 239247
2015-06-07 06:01:17 +00:00
Craig Topper
c424245fb7
[TableGen] Remove unused function. NFC
...
llvm-svn: 239246
2015-06-07 06:01:15 +00:00
Craig Topper
1ea7dba19f
[TableGen] Use 'isa' to check if something is an UnsetInit rather than getting the UnsetInit singleton and comparing pointers. NFC.
...
llvm-svn: 239245
2015-06-07 06:01:13 +00:00
Rui Ueyama
94df713199
COFF: Make local variables local.
...
llvm-svn: 239244
2015-06-07 03:55:28 +00:00
Rui Ueyama
e2cbfeae5c
COFF: Add /opt:noref option.
...
This option disables dead-stripping.
llvm-svn: 239243
2015-06-07 03:17:42 +00:00
Rui Ueyama
115d7c1036
COFF: Support resonpse files.
...
llvm-svn: 239242
2015-06-07 02:55:19 +00:00
Davide Italiano
2772b1d36d
[Object/ELF] Don't confuse isDefined() and isCommon.
...
Reported by Rafael Espindola. Pointy-hat to me.
llvm-svn: 239241
2015-06-07 02:45:19 +00:00
Colin LeMahieu
229a1e69fc
Teaching llvm-mc how to understand the defsym command line option. This allows integer-constant symbols to be defined on the command line and used during assembly.
...
llvm-svn: 239240
2015-06-07 01:46:24 +00:00
Rui Ueyama
4b22fa7437
COFF: Move Windows-specific code from Chunk.{cpp,h} to DLL.{cpp,h}.
...
llvm-svn: 239239
2015-06-07 01:15:04 +00:00
Rui Ueyama
ad66098c20
COFF: Fix default output file path.
...
Default output filename is the same as the first object file's
name with its extension replaced with ".exe".
llvm-svn: 239238
2015-06-07 00:20:32 +00:00
Rui Ueyama
4a9fbbca9f
COFF: Add comments and move main function to the top. NFC.
...
llvm-svn: 239237
2015-06-06 23:32:08 +00:00
Rui Ueyama
cc608e4f35
COFF: Rename writeHeader -> writeHeaderTo.
...
Chunk has writeTo function which takes uint8_t *Buf.
writeHeaderTo feels more consistent with that because this member
function also takes uint8_t *Buf.
llvm-svn: 239236
2015-06-06 23:19:38 +00:00
Rui Ueyama
929d8c52b1
COFF: Inline a constant that is used only once.
...
llvm-svn: 239235
2015-06-06 23:19:36 +00:00
Rui Ueyama
e56f9c0883
Remove redundant `using namespace`.
...
llvm-svn: 239234
2015-06-06 23:11:39 +00:00
Rui Ueyama
55168c9f70
COFF: Add .didat section.
...
llvm-svn: 239233
2015-06-06 23:07:01 +00:00
Rui Ueyama
458df98869
COFF: Update comments.
...
llvm-svn: 239232
2015-06-06 22:56:55 +00:00
Davide Italiano
fa1a31eec6
[Object/ELF] Provide helpers for symbol types.
...
These were, originally, in a different form in lld.
They can be reused for other tools, e.g. llvm-readobj.
llvm-svn: 239231
2015-06-06 22:54:09 +00:00
Rui Ueyama
c6ea057d7f
COFF: Move .idata constructor from Writer to Chunk.
...
Previously, half of the constructor for .idata contents was in Chunks.cpp
and the rest was in Writer.cpp. This patch moves the latter to Chunks.cpp.
Now IdataContents class manages everything for .idata section.
llvm-svn: 239230
2015-06-06 22:46:15 +00:00
David Majnemer
3f0fb98d01
[InstCombine, InstSimplify] Move xforms from Combine to Simplify
...
There were several SelectInst combines that always returned an existing
instruction instead of modifying an old one or creating a new one.
These are prime candidates for moving to InstSimplify.
llvm-svn: 239229
2015-06-06 22:40:21 +00:00
Filipe Cabecinhas
a911af0e8c
Use early return idiom. NFC
...
llvm-svn: 239228
2015-06-06 20:44:53 +00:00
Colin LeMahieu
1c8c213529
[MC] Common symbols weren't being checked for redeclaration which allowed an assembly file to generate an assertion in setCommon(): !isCommon(). This change allows redeclaration as long as the size and alignment match exactly, otherwise report a fatal error.
...
llvm-svn: 239227
2015-06-06 20:12:40 +00:00
Simon Atanasyan
253fd15977
[Mips] Factor out some bit manipulation code into separate routines
...
No functional changes.
llvm-svn: 239226
2015-06-06 17:26:35 +00:00
Simon Atanasyan
c859644f67
[Mips] Check symbol alignment for some MIPS relocations.
...
llvm-svn: 239225
2015-06-06 17:26:28 +00:00
Simon Atanasyan
439af8550e
[Mips] Perform an overflow checking for relocations results
...
llvm-svn: 239224
2015-06-06 17:26:18 +00:00
Simon Atanasyan
26b1c4584d
[Mips] Rearrange relocation related cases in the `switch` operator
...
No functional changes.
llvm-svn: 239223
2015-06-06 17:26:09 +00:00
Simon Atanasyan
e801f43655
[Mips] Use signed/unsigned types in relocation calculations consistently
...
No functional changes.
llvm-svn: 239222
2015-06-06 17:26:04 +00:00
Simon Atanasyan
6d19105c1d
[Mips] Handle all grouped relocations in a uniform way
...
No functional changes.
llvm-svn: 239221
2015-06-06 17:25:58 +00:00
Chaoren Lin
bcd2786a6d
Use skipIf instead of skipUnless in TestTerminal for better readability.
...
llvm-svn: 239220
2015-06-06 14:51:34 +00:00
Tobias Grosser
6091417ebc
Add NVIDIA vprintf printing to RuntimeDebugBuilder
...
llvm-svn: 239219
2015-06-06 08:43:22 +00:00
Sanjoy Das
ad714b1af3
[LoopUnroll] Fix truncation bug in canUnrollCompletely.
...
Summary:
canUnrollCompletely takes `unsigned` values for `UnrolledCost` and
`RolledDynamicCost` but is passed in `uint64_t`s that are silently
truncated. Because of this, when `UnrolledSize` is a large integer
that has a small remainder with UINT32_MAX, LLVM tries to completely
unroll loops with high trip counts.
Reviewers: mzolotukhin, chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10293
llvm-svn: 239218
2015-06-06 05:24:10 +00:00
David Majnemer
1c297e66fb
[CVP] Don't assume Constants of type i1 can be known to be true or false
...
CVP wants to analyze the condition operand of a select along an edge.
It succeeds in getting back a Constant but not a ConstantInt. Instead,
it gets a ConstantExpr. It then assumes that the Constant must be equal
to false because it isn't equal to true.
Instead, perform an additional comparison.
This fixes PR23752.
llvm-svn: 239217
2015-06-06 04:56:51 +00:00
Rui Ueyama
743afa0736
COFF: Merge Chunk::applyRelocations with Chunk::writeTo.
...
In this design, Chunk is the only thing that knows how to write
its contents to output file as well as how to apply relocations
there. The writer shouldn't know about the details.
llvm-svn: 239216
2015-06-06 04:07:39 +00:00
David Majnemer
468f670021
[InstCombine] Don't miscompile select to poison
...
If we have (select a, b, c), it is sometimes valid to simplify this to a
single select operand. However, doing so is only valid if the
computation doesn't inject poison into the computation.
It might be helpful to consider the following example:
(select (icmp ne %i, INT_MAX), (add nsw %i, 1), INT_MIN)
The select is equivalent to (add %i, 1) but not (add nsw %i, 1).
Self hosting on x86_64 revealed that this occurs very, very rarely so
bailing out is hopefully pretty reasonable.
llvm-svn: 239215
2015-06-06 02:30:43 +00:00
Rafael Espindola
f3d49b30b5
Handle 16 bit PC relative relocations.
...
Fixes pr23771.
llvm-svn: 239214
2015-06-06 02:29:56 +00:00
Peter Collingbourne
8a484c3017
clang-cl: Implement /GL in terms of -flto.
...
No documentation yet; the linker needs more work.
Differential Revision: http://reviews.llvm.org/D10270
llvm-svn: 239213
2015-06-06 02:09:34 +00:00
Peter Collingbourne
ace2f091fd
COFF: Read linker directives from bitcode files.
...
Differential Revision: http://reviews.llvm.org/D10285
llvm-svn: 239212
2015-06-06 02:00:45 +00:00