Kostya Serebryany [Fri, 22 Apr 2016 23:27:15 +0000 (23:27 +0000)]
[sanitizer] revert r267203 as it breaks aarch64 bots
llvm-svn: 267251
Tim Northover [Fri, 22 Apr 2016 23:23:31 +0000 (23:23 +0000)]
llvm-objdump: deal with invalid ARM encodings slightly better.
Before we printed a warning to stderr and left the actual output stream in a
mess. This tries to print a .long or .short representation of what we saw (as
if there was a data-in-code directive).
This isn't guaranteed to restore synchronization in Thumb-mode (if the invalid
instruction was supposed to be 32-bits, we may be off-by-16 for the rest of the
function). But there's no certain way to deal with that, and it's invalid code
anyway (if the data really wasn't an instruction, the user can add proper
.data_in_code directives if they care)
llvm-svn: 267250
Tim Northover [Fri, 22 Apr 2016 23:21:13 +0000 (23:21 +0000)]
MachO: remove weird ARM/Thumb interface from MachOObjectFile
Only one consumer (llvm-objdump) actually cared about the fact that there were
two triples. Others were actively working around the fact that the Triple
returned by getArch might have been invalid. As for llvm-objdump, it needs to
be acutely aware of both Triples anyway, so being generic in the exposed API is
no benefit.
Also rename the version of getArch returning a Triple. Users were having to
pass an unwanted nullptr to disambiguate the two, which was nasty.
The only functional change here is that armv7m and armv7em object files no
longer crash llvm-objdump.
llvm-svn: 267249
Greg Clayton [Fri, 22 Apr 2016 23:14:35 +0000 (23:14 +0000)]
DWARF layout for bitfields is wrong when the bit offset is negative.
Some older versions of clang emitted bit offsets that were negative and these bitfields would have their bitfield-ness stripped off and it would cause a clang assertion in clang assertions were enabled. I updated the bitfield C test to make sure we don't regress.
<rdar://problem/
21082998>
llvm-svn: 267248
Saleem Abdulrasool [Fri, 22 Apr 2016 23:08:34 +0000 (23:08 +0000)]
Source: fix another -Wunused-variable warning
Conditionalise a variable definition which may be unused in certain compilations
due to the preprocessor. Protect the variable accordingly. NFC.
llvm-svn: 267247
Rui Ueyama [Fri, 22 Apr 2016 22:59:24 +0000 (22:59 +0000)]
Devirtualize ScriptParserBase. NFC.
ScriptParserBase class is a container of collection of various methods
to parse linker script-ish text. It had a virtual method `run` to run
the parser. But we don't have to enforce its descendents to implement
that. It's up to them.
This patch removes pure virtual function `run`.
llvm-svn: 267246
Rui Ueyama [Fri, 22 Apr 2016 22:59:22 +0000 (22:59 +0000)]
Fix link failure.
llvm-svn: 267245
Matt Arsenault [Fri, 22 Apr 2016 22:59:16 +0000 (22:59 +0000)]
AMDGPU: sext_inreg (srl x, K), vt -> bfe x, K, vt.Size
llvm-svn: 267244
NAKAMURA Takumi [Fri, 22 Apr 2016 22:51:48 +0000 (22:51 +0000)]
Fix llvm/test/CodeGen/ARM/Windows/dbzchk.ll not to check mixed output, take #2.
llvm-svn: 267242
David Blaikie [Fri, 22 Apr 2016 22:50:56 +0000 (22:50 +0000)]
llvm-symbolizer: Avoid infinite recursion walking dwos where the dwo contains a dwo_name attribute
The dwo_name was added to dwo files to improve diagnostics in dwp, but
it confuses tools that attempt to load any dwo named by a dwo_name, even
ones inside dwos. Avoid this by keeping track of whether a unit is
already a dwo unit, and if so, not loading further dwos.
llvm-svn: 267241
Matt Arsenault [Fri, 22 Apr 2016 22:48:38 +0000 (22:48 +0000)]
AMDGPU: Re-visit nodes in performAndCombine
This fixes test regressions when i64 loads/stores are made promote.
llvm-svn: 267240
Sanjoy Das [Fri, 22 Apr 2016 22:45:23 +0000 (22:45 +0000)]
Add some release notes about the fix for PR26774
As suggested by Chandler on the review thread for D18634.
llvm-svn: 267239
Nicolai Haehnle [Fri, 22 Apr 2016 22:37:58 +0000 (22:37 +0000)]
Fix comment about Intr*Mem properties
Summary:
Follow up to D19291: it now makes sense to use two Intr*Mem properties,
in particular IntrReadMem + IntrArgMemOnly is common.
Pointed out by Mikael Holmén.
Reviewers: uabelho, joker.eph, reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19418
llvm-svn: 267238
Greg Clayton [Fri, 22 Apr 2016 22:35:08 +0000 (22:35 +0000)]
Fixed in issue with ObjectFileMachO where it would add empty sections to the section list that was used to try and cap symbols to the max address of the section in which it is contained. The empty sections would make cap the symbols and make their sizes zero. Also fixed a few other things that could cause problems in the SymbolFileDWARFDebugMap when zero sized symbols were found and used to make OSO range map entries.
<rdar://problem/
25886773>
llvm-svn: 267237
Andrew Kaylor [Fri, 22 Apr 2016 22:24:20 +0000 (22:24 +0000)]
Removing unused function.
llvm-svn: 267236
Greg Clayton [Fri, 22 Apr 2016 22:15:59 +0000 (22:15 +0000)]
Fix a build-llvm.py crasher when we can't find cmake. Now it exits with a valid error that explains what went wrong.
llvm-svn: 267235
Richard Trieu [Fri, 22 Apr 2016 22:14:32 +0000 (22:14 +0000)]
Revert the bool portion of r267054
Remove the floating point to bool conversion warnings. Some of these
conversions will be caught by -Wliteral-conversion and -Wfloat-conversion
llvm-svn: 267234
Rafael Espindola [Fri, 22 Apr 2016 22:09:35 +0000 (22:09 +0000)]
Bring r267164 back with a fix.
The fix is to handle local symbols referring to SHF_MERGE sections.
Original message:
GC entries of SHF_MERGE sections.
It is a fairly direct extension of the gc algorithm. For merge sections
instead of remembering just a live bit, we remember which offsets
were used.
This reduces the .rodata sections in chromium from 9648861 to 9477472
bytes.
llvm-svn: 267233
Nico Weber [Fri, 22 Apr 2016 22:08:42 +0000 (22:08 +0000)]
Revert r267210, it makes clang assert (PR27490).
llvm-svn: 267232
Andrew Kaylor [Fri, 22 Apr 2016 22:06:11 +0000 (22:06 +0000)]
Re-commit optimization bisect support (r267022) without new pass manager support.
The original commit was reverted because of a buildbot problem with LazyCallGraph::SCC handling (not related to the OptBisect handling).
Differential Revision: http://reviews.llvm.org/D19172
llvm-svn: 267231
Rui Ueyama [Fri, 22 Apr 2016 21:43:10 +0000 (21:43 +0000)]
LTO: Merge -lto-no-discard-value-names with -save-temps.
This patch is to remove -lto-no-discard-value-names flag and
instead to use -save-temps as we discussed in the post-commit
review thread for r267020.
Differential Revision: http://reviews.llvm.org/D19437
llvm-svn: 267230
Sriraman Tallam [Fri, 22 Apr 2016 21:41:58 +0000 (21:41 +0000)]
Differential Revision: reviews.llvm.org/D19040
llvm-svn: 267229
Eugene Zelenko [Fri, 22 Apr 2016 21:33:33 +0000 (21:33 +0000)]
[Clang-tidy] Fix Clang warning in misc/StringConstructorCheck.h.
Using LLVM_ENABLE_WARNINGS=ON is good idea.
llvm-svn: 267228
David Blaikie [Fri, 22 Apr 2016 21:32:59 +0000 (21:32 +0000)]
llvm-symbolizer: prefer .dwo contents over fission-gmlt-like-data when .dwo file is present
Rather than relying on the gmlt-like data emitted into the .o/executable
which only contains the simple name of any inlined functions, use the
.dwo file if present.
Test symbolication with/without a .dwo, and the old test that was
testing behavior when no gmlt-like data was present. (I haven't included
a test of non-gmlt-like data + no .dwo (that would be akin to
symbolication with no debug info) but we could add one for completeness)
The test was simplified a bit to be a little clearer (unoptimized, force
inline, using a function call as the inlined entity) and regenerated
with ToT clang. For the no-gmlt-like-data case, I modified Clang back to
its old behavior temporarily & the .dwo file is identical so it is
shared between the two executables.
llvm-svn: 267227
Dehao Chen [Fri, 22 Apr 2016 21:31:18 +0000 (21:31 +0000)]
Update discriminator assignment algorithm in clang assembler.
Summary: The clang assembler assumes that the discriminator remains the same when there is source line change. The correct behavior is that when there is line change, discriminator will automatically reset to 0.
Reviewers: dnovillo, davidxl, echristo
Subscribers: echristo, llvm-commits
Differential Revision: http://reviews.llvm.org/D19436
llvm-svn: 267226
Matt Arsenault [Fri, 22 Apr 2016 21:23:41 +0000 (21:23 +0000)]
AMDGPU: Fix crash when dumping unknown opcode
I'm for some reason having a problem producing a test.
It should be the same as test/MC/X86/invalid_opcode.s,
but llvm-mc seems to ignore random bytes.
llvm-svn: 267225
Rong Xu [Fri, 22 Apr 2016 21:19:05 +0000 (21:19 +0000)]
PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name
Write out the PGOFuncName meta data if PGOFuncName is different from function's
raw name. This should only apply to internal linkage functions. This is to be
consumed by indirect-call promotion when called in LTO optimization pass.
Differential Revision: http://reviews.llvm.org/D18624
llvm-svn: 267224
Peter Collingbourne [Fri, 22 Apr 2016 21:18:02 +0000 (21:18 +0000)]
Introduce llvm.load.relative intrinsic.
This intrinsic takes two arguments, ``%ptr`` and ``%offset``. It loads
a 32-bit value from the address ``%ptr + %offset``, adds ``%ptr`` to that
value and returns it. The constant folder specifically recognizes the form of
this intrinsic and the constant initializers it may load from; if a loaded
constant initializer is known to have the form ``i32 trunc(x - %ptr)``,
the intrinsic call is folded to ``x``.
LLVM provides that the calculation of such a constant initializer will
not overflow at link time under the medium code model if ``x`` is an
``unnamed_addr`` function. However, it does not provide this guarantee for
a constant initializer folded into a function body. This intrinsic can be
used to avoid the possibility of overflows when loading from such a constant.
Differential Revision: http://reviews.llvm.org/D18367
llvm-svn: 267223
Rui Ueyama [Fri, 22 Apr 2016 21:17:55 +0000 (21:17 +0000)]
Remove unused #include.
llvm-svn: 267222
Rui Ueyama [Fri, 22 Apr 2016 21:16:18 +0000 (21:16 +0000)]
Move BitcodeCompiler constructor to the .cpp file. NFC.
llvm-svn: 267221
Matt Arsenault [Fri, 22 Apr 2016 21:16:17 +0000 (21:16 +0000)]
TLI: Only iterate over integer vector types
Instead of iterating over all vectors and skipping integers.
llvm-svn: 267220
Rui Ueyama [Fri, 22 Apr 2016 21:05:04 +0000 (21:05 +0000)]
Inline getInteger as it's too short to be a function. NFC.
llvm-svn: 267219
Rui Ueyama [Fri, 22 Apr 2016 21:02:27 +0000 (21:02 +0000)]
Update a comment for r267145.
llvm-svn: 267218
Matt Arsenault [Fri, 22 Apr 2016 21:01:41 +0000 (21:01 +0000)]
DAGCombiner: Relax alignment restriction when changing store type
If the target allows the alignment, this should be OK.
llvm-svn: 267217
Rong Xu [Fri, 22 Apr 2016 21:00:17 +0000 (21:00 +0000)]
[PGO] change the interface for createPGOFuncNameMetadata()
This patch changes the interface for createPGOFuncNameMetadata() where we add
another PGOFuncName argument.
Differential Revision: http://reviews.llvm.org/D19433
llvm-svn: 267216
Philip Reames [Fri, 22 Apr 2016 20:53:32 +0000 (20:53 +0000)]
[unordered] sink unordered stores at end of blocks
The existing code turned out to be completely correct when auditted. Thus, only minor code changes and adding a couple of tests.
llvm-svn: 267215
Sanjoy Das [Fri, 22 Apr 2016 20:52:25 +0000 (20:52 +0000)]
Fold compares for distinct allocations
Summary:
We can fold compares to false when two distinct allocations within a
function are compared for equality.
Patch by Anna Thomas!
Reviewers: majnemer, reames, sanjoy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19390
llvm-svn: 267214
Rui Ueyama [Fri, 22 Apr 2016 20:41:07 +0000 (20:41 +0000)]
Move uintX_t typedef to the class definition. NFC.
Now it is doable because LinkerScript is a template class.
llvm-svn: 267212
Peter Collingbourne [Fri, 22 Apr 2016 20:40:10 +0000 (20:40 +0000)]
CodeGen: Use PLT relocations for relative references to unnamed_addr functions.
The relative vtable ABI (PR26723) needs PLT relocations to refer to virtual
functions defined in other DSOs. The unnamed_addr attribute means that the
function's address is not significant, so we're allowed to substitute it
with the address of a PLT entry.
Also includes a bonus feature: addends for COFF image-relative references.
Differential Revision: http://reviews.llvm.org/D17938
llvm-svn: 267211
Philip Reames [Fri, 22 Apr 2016 20:33:48 +0000 (20:33 +0000)]
[unordered] Extend load/store type canonicalization to handle unordered operations
Extend the type canonicalization logic to work for unordered atomic loads and stores. Note that while this change itself is fairly simple and low risk, there's a reasonable chance this will expose problems in the backends by suddenly generating IR they wouldn't have seen before. Anything of this nature will be an existing bug in the backend (you could write an atomic float load), but this will definitely change the frequency with which such cases are encountered. If you see problems, feel free to revert this change, but please make sure you collect a test case.
llvm-svn: 267210
Matt Arsenault [Fri, 22 Apr 2016 20:21:36 +0000 (20:21 +0000)]
DAGCombiner: Relax alignment restriction when changing load type
If the target allows the alignment, this should still be OK.
llvm-svn: 267209
Peter Collingbourne [Fri, 22 Apr 2016 20:21:26 +0000 (20:21 +0000)]
ELF: Implement basic support for --version-script.
This patch only implements support for version scripts of the form:
{ [ global: symbol1; symbol2; [...]; symbolN; ] local: *; };
No wildcards are supported, other than for the local entry. Symbol versioning
is also not supported.
It works by introducing a new Symbol flag which tracks whether a symbol
appears in the global section of a version script.
This patch also simplifies the logic in SymbolBody::isPreemptible(), and
teaches it to handle the case where symbols with default visibility in DSOs
do not appear in the dynamic symbol table because of a version script.
Fixes PR27482.
Differential Revision: http://reviews.llvm.org/D19430
llvm-svn: 267208
Rafael Espindola [Fri, 22 Apr 2016 20:21:25 +0000 (20:21 +0000)]
Update test.
Sorry about the noise.
llvm-svn: 267207
Quentin Colombet [Fri, 22 Apr 2016 20:09:58 +0000 (20:09 +0000)]
[AArch64] Fix optimizeCondBranch logic.
The opcode for the optimized branch does not depend on the size
of the activate bits in the AND masks, but the AND opcode itself.
Indeed, we need to use a X or W variant based on the AND variant
not based on whether the mask fits into the related variant.
Otherwise, we may end up using the W variant of the optimized branch
for 64-bit register inputs!
This fixes the last make check verifier issues for AArch64: PR27479.
llvm-svn: 267206
Rafael Espindola [Fri, 22 Apr 2016 20:07:59 +0000 (20:07 +0000)]
Add missing options that were required to crash.
llvm-svn: 267204
Kostya Serebryany [Fri, 22 Apr 2016 20:05:52 +0000 (20:05 +0000)]
[sanitizer] allow zero first parameter in MmapNoAccess; This is a part of r267094 that has been reverted
llvm-svn: 267203
Rafael Espindola [Fri, 22 Apr 2016 20:05:16 +0000 (20:05 +0000)]
Add a reduction of the recent bootstrap failure.
llvm-svn: 267202
Rui Ueyama [Fri, 22 Apr 2016 19:58:47 +0000 (19:58 +0000)]
Reorganize LinkerDriver::link and add comments. NFC.
llvm-svn: 267201
Peter Collingbourne [Fri, 22 Apr 2016 19:56:45 +0000 (19:56 +0000)]
Update an out of date comment.
llvm-svn: 267200
Justin Bogner [Fri, 22 Apr 2016 19:54:10 +0000 (19:54 +0000)]
PM: Port SinkingPass to the new pass manager
llvm-svn: 267199
Justin Bogner [Fri, 22 Apr 2016 19:54:04 +0000 (19:54 +0000)]
PM: Reorder the functions used for SinkingPass. NFC
This will make the port to the new PM easier to follow.
llvm-svn: 267198
Jun Bum Lim [Fri, 22 Apr 2016 19:51:29 +0000 (19:51 +0000)]
[DeadStoreElimination] Shorten beginning of memset overwritten by later stores
Summary: This change will shorten memset if the beginning of memset is overwritten by later stores.
Reviewers: hfinkel, eeckstein, dberlin, mcrosier
Subscribers: mgrang, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D18906
llvm-svn: 267197
Justin Bogner [Fri, 22 Apr 2016 19:40:41 +0000 (19:40 +0000)]
PM: Port DCE to the new pass manager
Also add a very basic test, since apparently there aren't any tests
for DCE whatsoever to add the new pass version to.
llvm-svn: 267196
Rui Ueyama [Fri, 22 Apr 2016 19:34:59 +0000 (19:34 +0000)]
Inline SymbolTable::compareCommons and add comments. NFC.
llvm-svn: 267195
Rafael Espindola [Fri, 22 Apr 2016 19:31:35 +0000 (19:31 +0000)]
Revert "GC entries of SHF_MERGE sections."
This reverts commit r267164.
Revert "Trying to fix the windows build."
This reverts commit r267168.
Debugging a bootstrap problem.
llvm-svn: 267194
Matthias Braun [Fri, 22 Apr 2016 19:10:15 +0000 (19:10 +0000)]
MachineScheduler: Move code to initialize a Candidate out of tryCandidate(); NFC
llvm-svn: 267191
Adam Nemet [Fri, 22 Apr 2016 19:10:05 +0000 (19:10 +0000)]
[LoopUtils] Extend findStringMetadataForLoop to return the value for metadata
E.g. for:
!1 = {"llvm.distribute", i32 1}
it now returns the MDOperand for 1.
I will use this in LoopDistribution to check the value of the metadata.
Note that the change is backward-compatible with its current use in
LoopVersioningLICM. An Optional implicitly converts to a bool depending
whether it contains a value or not.
llvm-svn: 267190
Matthias Braun [Fri, 22 Apr 2016 19:09:17 +0000 (19:09 +0000)]
MachineScheduler: Limit the size of the ready list.
Avoid quadratic complexity in unusually large basic blocks by limiting
the size of the ready lists.
Differential Revision: http://reviews.llvm.org/D19349
llvm-svn: 267189
Peter Collingbourne [Fri, 22 Apr 2016 18:47:52 +0000 (18:47 +0000)]
ELF: Scan for undefined symbols in shlibs and symbols in dynamic lists before LTO.
This ensures that these features work correctly with bitcode files.
llvm-svn: 267188
Chad Rosier [Fri, 22 Apr 2016 18:47:21 +0000 (18:47 +0000)]
[EarlyCSE/CVP] Add stats for CVPs and make sure to account for any Changes.
llvm-svn: 267187
Reid Kleckner [Fri, 22 Apr 2016 18:46:33 +0000 (18:46 +0000)]
Fix a bug involving deferred decl emission and PCH
For various reasons, involving dllexport and class linkage compuations,
we have to wait until after the semicolon after a class declaration to
emit inline methods. These are "deferred" decls. Before this change,
finishing the tag decl would trigger us to deserialize some PCH so that
we could make a "pretty" IR-level type. Deserializing the PCH triggered
calls to HandleTopLevelDecl, which, when done, checked the deferred decl
list, and emitted some dllexported decls that weren't ready.
Avoid this re-entrancy. Deferred decls should not get emitted when a tag
is finished, they should only be emitted after a real top level decl in
the main file.
llvm-svn: 267186
Quentin Colombet [Fri, 22 Apr 2016 18:46:17 +0000 (18:46 +0000)]
[AArch64] When creating MRS instruction, make sure the destination register is
declared as a definition.
This fixes the machine verifier error for CodeGen/AArch64/nzcv-save.ll.
llvm-svn: 267185
Peter Collingbourne [Fri, 22 Apr 2016 18:44:06 +0000 (18:44 +0000)]
ELF: Implement --export-dynamic-symbol.
llvm-svn: 267184
Peter Collingbourne [Fri, 22 Apr 2016 18:42:48 +0000 (18:42 +0000)]
ELF: Move Visibility, IsUsedInRegularObj and MustBeInDynSym flags to Symbol.
These are properties of a symbol name, rather than a particular instance
of a symbol in an object file. We can simplify the code by collecting these
properties in Symbol.
The MustBeInDynSym flag has been renamed ExportDynamic, as its semantics
have been changed to be the same as those of --dynamic-list and
--export-dynamic-symbol, which do not cause hidden symbols to be exported.
Differential Revision: http://reviews.llvm.org/D19400
llvm-svn: 267183
Adam Nemet [Fri, 22 Apr 2016 18:34:50 +0000 (18:34 +0000)]
[LoopVersioningLICM] Add test coverage for llvm.loop.licm_versioning.disable
In the next change, I am generalizing the function
findStringMetadataForLoop and I want to make sure I don't break this.
Looks like there was no coverage for this so far.
llvm-svn: 267182
Davide Italiano [Fri, 22 Apr 2016 18:26:33 +0000 (18:26 +0000)]
[LTO] Create Undefined Bitcode symbol when we drop a comdat member.
Differential Revision: http://reviews.llvm.org/D19389
llvm-svn: 267181
Quentin Colombet [Fri, 22 Apr 2016 18:09:14 +0000 (18:09 +0000)]
[AArch64][AdvSIMDScalar] Update the kill flags correctly.
We used to simply set the kill flags to true when transforming a scalar
instruction to a vector one.
SrcScalar1 = copy SrcVector1
... = opScalar SrcScalar1
=>
SrcScalar1 = copy SrcVector1
... = opVector SrcVector1<kill>
This is obviously wrong. The proper update consists in:
1. Propagate the kill status from the copy to the new opVector
2. Reset the kill status on the copy, since the live-range of
SrcVector1 got extended.
This fixes some of the machine verifier errors for AArch64 with make check.
llvm-svn: 267180
Saleem Abdulrasool [Fri, 22 Apr 2016 18:06:51 +0000 (18:06 +0000)]
test: split test into two runs
Rather than checking both stdout and stderr simultaneously, split it into two
tests. This apparently breaks on Windows where MSVCRT does not buffer output
correctly. NFC.
Thanks to chapuni for bringing the issue to my attention!
llvm-svn: 267179
Krzysztof Parzyszek [Fri, 22 Apr 2016 18:05:55 +0000 (18:05 +0000)]
[Hexagon] Use common Pat classes for selecting code for intrinsics
llvm-svn: 267178
Chad Rosier [Fri, 22 Apr 2016 17:57:34 +0000 (17:57 +0000)]
[SimplifyCFG] Add final missing implications to isImpliedTrueByMatchingCmp.
Summary: eq imply [u|s]ge and [u|s]le are true.
Remove redundant logic by implementing isImpliedFalseByMatchingCmp(Pred1, Pred2)
as isImpliedTrueByMatchingCmp(Pred1, getInversePredicate(Pred2)).
llvm-svn: 267177
Michael Kuperstein [Fri, 22 Apr 2016 17:41:12 +0000 (17:41 +0000)]
Point link to CODE_OWNERS.txt to klaus instead of viewvc.
llvm-svn: 267176
Sanjoy Das [Fri, 22 Apr 2016 17:41:06 +0000 (17:41 +0000)]
Have isKnownNotFullPoison be smarter around control flow
Summary:
(... while still not using a PostDomTree)
The way we use isKnownNotFullPoison from SCEV today, the new CFG walking
logic will not trigger for any realistic cases -- it will kick in only
for situations where we could have merged the contiguous basic blocks
anyway[0], since the poison generating instruction dominates all of its
non-PHI uses (which are the only uses we consider right now).
However, having this change in place will allow a later bugfix to break
fewer llvm-lit tests.
[0]: i.e. cases where block A branches to block B and B is A's only
successor and A is B's only predecessor.
Reviewers: broune, bjarke.roune
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19212
llvm-svn: 267175
Krzysztof Parzyszek [Fri, 22 Apr 2016 17:30:13 +0000 (17:30 +0000)]
[Hexagon] Properly close live range in HexagonBlockRanges ---add testcase
llvm-svn: 267174
Krzysztof Parzyszek [Fri, 22 Apr 2016 17:27:22 +0000 (17:27 +0000)]
[Hexagon] Properly close live range in HexagonBlockRanges
llvm-svn: 267173
Justin Bogner [Fri, 22 Apr 2016 17:25:43 +0000 (17:25 +0000)]
PM: Remove some redundant name() methods
These passes all get names from PassInfoMixin already, we don't need
to override them.
llvm-svn: 267172
Chad Rosier [Fri, 22 Apr 2016 17:14:12 +0000 (17:14 +0000)]
[SimplifyCFG] Add missing implications to isImpliedTrueByMatchingCmp.
Summary: [u|s]gt and [u|s]lt imply [u|s]ge and [u|s]le are true, respectively.
I've simplified the existing tests and added additional tests to cover the new
cases mentioned above. I've also added tests for all the cases where the
first compare doesn't imply anything about the second compare.
llvm-svn: 267171
Chad Rosier [Fri, 22 Apr 2016 17:14:08 +0000 (17:14 +0000)]
[SimplifyCFG] Simplify code review by temporarily removing this test file.
A followup commit will replace these tests with simplified and more inclusive
tests. The diff is unreadable if this were to be done in a single commit.
llvm-svn: 267170
Saleem Abdulrasool [Fri, 22 Apr 2016 17:11:05 +0000 (17:11 +0000)]
unwind: unify some more macros
The macros were defined identically across both cases. Unify the definitions to
have a single definition for _LIBUWNIND_{HIDDEN,EXPORT} and _LIBUNWIND_LOG.
NFC.
llvm-svn: 267169
Rafael Espindola [Fri, 22 Apr 2016 17:10:28 +0000 (17:10 +0000)]
Trying to fix the windows build.
llvm-svn: 267168
Konstantin Zhuravlyov [Fri, 22 Apr 2016 17:04:51 +0000 (17:04 +0000)]
[AMDGPU] Insert nop pass: take care of outstanding feedback
- Switch few loops to range-based for loops
- Fix nop insertion at the end of BB
- Fix formatting
- Check for endpgm
Differential Revision: http://reviews.llvm.org/D19380
llvm-svn: 267167
Zoran Jovanovic [Fri, 22 Apr 2016 16:53:15 +0000 (16:53 +0000)]
[mips][microMIPS] Revert commit r266861.
Commit r266861 was the reason for failing tests in LLVM test suite.
llvm-svn: 267166
Krzysztof Parzyszek [Fri, 22 Apr 2016 16:47:01 +0000 (16:47 +0000)]
[Hexagon] Teach mux expansion how to deal with undef predicates
llvm-svn: 267165
Rafael Espindola [Fri, 22 Apr 2016 16:46:08 +0000 (16:46 +0000)]
GC entries of SHF_MERGE sections.
It is a fairly direct extension of the gc algorithm. For merge sections
instead of remembering just a live bit, we remember which offsets were
used.
This reduces the .rodata sections in chromium from 9648861 to 9477472
bytes.
llvm-svn: 267164
Rafael Espindola [Fri, 22 Apr 2016 16:39:59 +0000 (16:39 +0000)]
This reverts commit r267154 and r267161.
It turns out that this will read data from the section to properly
handle Elf_Rel implicit addends.
Sorry for the noise.
Original messages:
Try to fix Windows lld build.
Move getRelocTarget to ObjectFile.
It doesn't use anything from the InputSection.
llvm-svn: 267163
Krzysztof Parzyszek [Fri, 22 Apr 2016 16:25:00 +0000 (16:25 +0000)]
[Hexagon] Add definitions for trap/pause instructions
Also add tests for other instructions from HexagonSystemInst.td.
llvm-svn: 267162
Nico Weber [Fri, 22 Apr 2016 15:23:02 +0000 (15:23 +0000)]
Try to fix Windows lld build.
llvm\tools\lld\ELF\MarkLive.cpp(49): error C2872: 'ObjectFile': ambiguous symbol
llvm\tools\lld\elf\InputFiles.h(100): note: could be 'lld::elf::ObjectFile'
llvm\include\llvm/Object/IRObjectFile.h(26): note: or 'llvm::object::ObjectFile'
llvm\tools\lld\ELF\MarkLive.cpp(133): note: see reference to function template instantiation
'void forEachSuccessor<ELFT>(lld::elf::InputSection<ELFT> *,
std::function<void (lld::elf::InputSectionBase<ELFT> *)>)'
being compiled with
[ ELFT=llvm::object::ELF32LE ]
llvm\tools\lld\ELF\MarkLive.cpp(136): note: see reference to function template instantiation
'void lld::elf::markLive<llvm::object::ELF32LE>(lld::elf::SymbolTable<llvm::object::ELF32LE> *)
being compiled
llvm-svn: 267161
Tom Stellard [Fri, 22 Apr 2016 15:11:08 +0000 (15:11 +0000)]
PostRAHazardRecocgnizer: Fix unused-private-field warning
llvm-svn: 267160
Krzysztof Parzyszek [Fri, 22 Apr 2016 14:58:46 +0000 (14:58 +0000)]
[Hexagon] Add definitions for circular and bit-reverse loads/stores
llvm-svn: 267159
Renato Golin [Fri, 22 Apr 2016 14:56:30 +0000 (14:56 +0000)]
Revert "[LSAN] Fix test swapcontext.cc on MIPS"
This reverts commit r266716, as it breaks the self-hosting on Thumb2 buildbot.
llvm-svn: 267158
Geoff Berry [Fri, 22 Apr 2016 14:44:10 +0000 (14:44 +0000)]
[MemorySSA] Fix bug in CachingMemorySSAWalker::invalidateInfo
Summary:
CachingMemorySSAWalker::invalidateInfo was using IsCall to determine
which cache map needed to be cleared of entries referring to the invalidated
MemoryAccess, but there could also be entries referring to it in the
other cache map (value entries, not key entries). This change just
clears both tables to be conservatively correct.
Also add a verifyRemoved() function, called when expensive
checks (i.e. XDEBUG) are enabled to verify that the invalidated
MemoryAccess object is not referenced in any of the caches.
Reviewers: dberlin, george.burgess.iv
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19388
llvm-svn: 267157
Tom Stellard [Fri, 22 Apr 2016 14:43:50 +0000 (14:43 +0000)]
CodeGen: Add a stand-alone hazard recognizer pass
Summary:
This new pass allows targets to use the hazard recognizer without having
to also run one of the schedulers. This is useful when compiling with
optimizations disabled for targets that still need noop hazards
to be handled correctly.
Reviewers: hfinkel, atrick
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18594
llvm-svn: 267156
Haojian Wu [Fri, 22 Apr 2016 14:43:39 +0000 (14:43 +0000)]
[clang-tidy] fix link in Release Notes
Summary: This is intended to fix https://llvm.org/bugs/show_bug.cgi?id=27426
Patch by Kirill Bobyrev!
Reviewers: alexfh, LegalizeAdulthood, hokein
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19406
llvm-svn: 267155
Rafael Espindola [Fri, 22 Apr 2016 14:17:14 +0000 (14:17 +0000)]
Move getRelocTarget to ObjectFile.
It doesn't use anything from the InputSection.
llvm-svn: 267154
David Majnemer [Fri, 22 Apr 2016 14:12:50 +0000 (14:12 +0000)]
[EarlyCSE] Don't add the overflow flags to the hash
We take the intersection of overflow flags while CSE'ing.
This permits us to consider two instructions with different overflow
behavior to be replaceable.
llvm-svn: 267153
Nirav Dave [Fri, 22 Apr 2016 13:36:11 +0000 (13:36 +0000)]
Emit code16 in assembly in 16-bit mode
Summary:
When generating assembly using -m16 we must explicitly mark it as
16-bit. Emit .code16 at beginning of file. Fixes wrong results when
using -fno-integrated-as.
Reviewers: dwmw2
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19392
llvm-svn: 267152
Simon Dardis [Fri, 22 Apr 2016 13:19:22 +0000 (13:19 +0000)]
[mips] Fix select patterns for MIPS64
When targetting MIPS64R6 some of the patterns for select were guarded by a
broken predicate. The predicate was supposed to test if a constant value
could fit in a 16 bit zero-extended field. Instead the value was tested to
fit in a 16 bit sign-extended field. For negative constants of native word
width this resulted in wrong code generation.
Reviewers: vkalintiris, dsanders
Differential Review: http://reviews.llvm.org/D19378
llvm-svn: 267151
Teresa Johnson [Fri, 22 Apr 2016 13:09:17 +0000 (13:09 +0000)]
Document source_filename in LangRef.
Summary: Add documentation for new LLVM IR source_filename identifier.
Reviewers: joker.eph, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18857
llvm-svn: 267150
Vasileios Kalintiris [Fri, 22 Apr 2016 13:05:51 +0000 (13:05 +0000)]
[mips] Fix a small typo that would leave BLTZC out of getAnalyzableBrOpc().'
llvm-svn: 267149
Daniel Sanders [Fri, 22 Apr 2016 12:04:42 +0000 (12:04 +0000)]
Revert r267049, r26706[16789], r267071 - Refactor raw pdb dumper into library
r267049 broke multiple buildbots (e.g. clang-cmake-mips, and clang-x86_64-linux-selfhost-modules) which the follow-ups have not yet resolved and this is preventing subsequent committers from being notified about additional failures on the affected buildbots.
llvm-svn: 267148
Rafael Espindola [Fri, 22 Apr 2016 11:46:28 +0000 (11:46 +0000)]
Simplify. NFC.
llvm-svn: 267147