Rui Ueyama [Fri, 4 Nov 2016 17:41:29 +0000 (17:41 +0000)]
Fix -Wcast-qual warnings.
llvm-svn: 286001
Eugene Zelenko [Fri, 4 Nov 2016 17:39:46 +0000 (17:39 +0000)]
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D26293
llvm-svn: 286000
Malcolm Parsons [Fri, 4 Nov 2016 16:32:14 +0000 (16:32 +0000)]
[clang-tidy] Fixed readability-else-after-return for cascade statements
Summary:
Fix generated by this check changed program semantics
in the case where 'if' was a part (direct child) of other statement.
Fixes PR30652.
Patch by Paweł Żukowski.
Reviewers: malcolm.parsons, alexfh, djasper
Subscribers: mgehre, omtcyfz, cfe-commits
Differential Revision: https://reviews.llvm.org/D26125
llvm-svn: 285999
Zvi Rackover [Fri, 4 Nov 2016 15:15:19 +0000 (15:15 +0000)]
[X86] Broadcast from memory intructions aren't unfoldable
Broadcast from memory instructions should be treated as moves. They can't be unfolded.
Fixes pr30693.
llvm-svn: 285998
Zvi Rackover [Fri, 4 Nov 2016 14:53:22 +0000 (14:53 +0000)]
Add bugpoint-reduced reproducer for pr30693
llvm-svn: 285997
Rafael Espindola [Fri, 4 Nov 2016 13:20:45 +0000 (13:20 +0000)]
Add a few const qualifiers.
llvm-svn: 285996
Tom Stellard [Fri, 4 Nov 2016 13:06:34 +0000 (13:06 +0000)]
Revert "AMDGPU: Add VI i16 support"
This reverts commit r285939 and r285948. These broke some conformance tests.
llvm-svn: 285995
Olivier Goffart [Fri, 4 Nov 2016 12:04:16 +0000 (12:04 +0000)]
[test] Test that static_assert is properly visited in liblcang
llvm-svn: 285994
Tobias Grosser [Fri, 4 Nov 2016 11:56:48 +0000 (11:56 +0000)]
Update isl to isl-0.17.1-243-g24c0339
This introduces big-endian support in imath and resolves
http://llvm.org/PR24632.
llvm-svn: 285993
Pavel Labath [Fri, 4 Nov 2016 11:49:06 +0000 (11:49 +0000)]
Fix GDBRemoteCommunicationClientTest.TestPacketSpeedJSON
The mock server was listening for only one packet (I forgot to put a loop around
it), which caused the client to stall in debug builds, as the timeout there is
1000 seconds. In case of a release builds the test would just silently succeed as
the tested function does not check or report errors (which should be fixed).
This fixes the test by adding the server loop. Since the test was taking quite a
long time now (8s), I have added a parameter to control the amount of data sent
(default 4MB), and call it with a smaller value in the test, to make the test run
faster.
llvm-svn: 285992
Jonas Paulsson [Fri, 4 Nov 2016 08:31:14 +0000 (08:31 +0000)]
Comment rewording in MachineScheduler.cpp.
Author: A Trick
llvm-svn: 285991
Chandler Carruth [Fri, 4 Nov 2016 07:16:33 +0000 (07:16 +0000)]
Add a missing return to the move assignment operator for
SequenceNumberManager.
Sadly, we don't have any unittests for this class because it is
a private class. Since it seems to have a nice isolated and testable
interface, it'd be great to extract it to a detail namespace and write
unit tests for it as then we could catch issues. I'll probably pester
Lang about that or some alternative refactoring.
This was noticed by PVS-Studio.
llvm-svn: 285990
Chandler Carruth [Fri, 4 Nov 2016 07:10:24 +0000 (07:10 +0000)]
Remove dead code trying to handle when the amount of data read is
insufficient to populate the expected struct. Prior to this we already
bailed out of the routine when this situation comes up, so none of this
code had any effect.
If someone wants to bring it back to handle these cases, fixing the
earlier conditions and adding the necessary test cases that actually
exercises it, they can always revert this and go from there.
Both of these were noticed by PVS-Studio due to the identical (dead)
condition.
llvm-svn: 285989
Chandler Carruth [Fri, 4 Nov 2016 06:59:50 +0000 (06:59 +0000)]
Only log the visit of a return instruction if we in fact found a return
instruction.
This avoids dereferencing null in the debug logging if the instruction
was not in fact a return instruction. This potential bug was found by
PVS-Studio.
This actually fixes the last of the "dereferenced a pointer before
checking it for null" reports in the recent PVS-Studio run. However,
there are quite a few reports of this nature that I did not do anything
to fix because they are pretty glaring false positives. They usually
took the form of quite clear correlated checks or a check made in
a separate function. I've even added asserts anywhere this correlation
wasn't pretty obvious and fundamental to the code.
llvm-svn: 285988
Chandler Carruth [Fri, 4 Nov 2016 06:54:00 +0000 (06:54 +0000)]
Hoist check for TLI above all of the attempts to use it (including one
of which that is hidden inside a separate function call) and helpfully
before building expensive transaction infrastructure. This will avoid
crashing when running CGP in a generic mode if we ever managed to hit
this case.
Note that I spent some time looking at alternatives. CGP is actually
used without a TM or TLI in order to do some target-independent testing.
Further, all of the neighboring optimization techniques actually have
some paths that are effective even in the absence of TLI so this seemed
the correct scope at which to check and bypass logic. It still isn't
clear that long-term support for missing TM/TLI is the right
cost/benefit tradeoff for CGP -- we seem to get relatively little for it
and the code is just littered with checks (and assumptions which
I suspect are still missing some checks).
This at least fixes the potential bug in this code spotted by
PVS-Studio, so we've got that going for us. ;]
llvm-svn: 285987
Olivier Goffart [Fri, 4 Nov 2016 06:50:59 +0000 (06:50 +0000)]
[python bindings] Expose CXCursor_FriendDecl as CursorKind.FRIEND_DECL
CXCursor_FriendDecl was added in r285984
llvm-svn: 285986
Chandler Carruth [Fri, 4 Nov 2016 06:32:57 +0000 (06:32 +0000)]
Add some more asserts to clearly indicate that there are special cases
which guarantee pointers are not null. These all seem to have useful
properties and correlations to document, in one case we even had it in
a comment but now it will also be an assert.
This should prevent PVS-Studio from incorrectly claiming that there are
a bunch of potential bugs here. But I feel really strongly that the
PVS-Studio warnings that pointed at this code have a far too high
false-positive rate to be entirely useful. These are just places where
there did seem to be a useful invariant to document and verify with an
assert. Several other places in the code were already correct and
already have perfectly clear code documenting and validating their
invariants, but still ran afoul of PVS-Studio.
llvm-svn: 285985
Olivier Goffart [Fri, 4 Nov 2016 06:29:27 +0000 (06:29 +0000)]
[index] Expose FriendDecl
Differential Revision: https://reviews.llvm.org/D26285
llvm-svn: 285984
Chandler Carruth [Fri, 4 Nov 2016 06:16:09 +0000 (06:16 +0000)]
Delete a trivially true check for a variable 'S' being null.
The exact same test guards entry into the loop in which this test
occurs, and there is nothing inside the loop that assigns to the
variable, so it has already been checked for null.
This was flagged by PVS-Studio as well, but the report is actually wrong
-- this is not a case where we dereference a variable prior to testing
it for null, this is a case where we have a redundant test for null
after we already performed the exact same test.
llvm-svn: 285983
Chandler Carruth [Fri, 4 Nov 2016 06:11:54 +0000 (06:11 +0000)]
Add an assert to further check the invariant that a null pointer
corresponds to another argument being valid.
This makes it clear that the code is correct despite the PVS-Studio
report that a pointer might be dereferenced prior to being checked for
whether it is null. It likely is also enough for static analyzers to not
flag the code.
llvm-svn: 285982
Serge Pavlov [Fri, 4 Nov 2016 06:09:23 +0000 (06:09 +0000)]
Enhancement to test for -ast-print
Present tests for the functionality provided by command lime option
`-ast-print` check only absence of crash. This change tries to make
testing better, - the output produced by the compiler is compiled again
with option `-print-ast` and both outputs are compared. Such test at
least checks that the output is valid code. This change fixes only the
test for pure C.
This is recommit of r285882.
llvm-svn: 285981
Chandler Carruth [Fri, 4 Nov 2016 06:06:50 +0000 (06:06 +0000)]
Remove no-op checks for a null CodeCompleter. We have already
dereferenced the pointer at this point, and these routines are
exclusively called after the parser encounters a code completion token.
Other code completion routines called at that point do not check for
null either, so this is clearly the current invariant expected in the
code.
This fixes another PVS-Studio found issue.
llvm-svn: 285980
Serge Pavlov [Fri, 4 Nov 2016 06:03:34 +0000 (06:03 +0000)]
Do not print enum underlying type if language is not C++11
Output generated by option '-ast-print' must not contains enum
base type specifications if source language does not include C++11.
llvm-svn: 285979
Xinliang David Li [Fri, 4 Nov 2016 03:00:52 +0000 (03:00 +0000)]
Fix typo
llvm-svn: 285978
Jim Ingham [Fri, 4 Nov 2016 01:47:59 +0000 (01:47 +0000)]
Added a couple more odd dot patterns that we got out
of clang.
llvm-svn: 285977
Hongbin Zheng [Fri, 4 Nov 2016 00:32:32 +0000 (00:32 +0000)]
Remove POLLY_LINK_LIBS, it is not used
llvm-svn: 285976
Justin Bogner [Thu, 3 Nov 2016 23:55:36 +0000 (23:55 +0000)]
X86: Move a non-null assert to before the pointer is dereferenced
llvm-svn: 285975
Jim Ingham [Thu, 3 Nov 2016 23:42:09 +0000 (23:42 +0000)]
Don't access the process in expressions w/o checking that
the process exists.
I also added some tests that crash before this fix, and work correctly after.
<rdar://problem/
29083321>
llvm-svn: 285974
Brian Gesiak [Thu, 3 Nov 2016 23:41:49 +0000 (23:41 +0000)]
[lit] Remove TODO
Summary:
Instead of keeping track of TODOs for lit in a file checked into source
control, use LLVM's bug tracker. The TODOs have been migrated to the
following bugs:
* https://llvm.org/bugs/show_bug.cgi?id=30666
* https://llvm.org/bugs/show_bug.cgi?id=30667
* https://llvm.org/bugs/show_bug.cgi?id=30668
* https://llvm.org/bugs/show_bug.cgi?id=30669
* https://llvm.org/bugs/show_bug.cgi?id=30670
* https://llvm.org/bugs/show_bug.cgi?id=30671
Reviewers: ddunbar, beanz, echristo, delcypher
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D25496
llvm-svn: 285973
Chandler Carruth [Thu, 3 Nov 2016 23:33:46 +0000 (23:33 +0000)]
Sink all of the code relying on the MachO MachineModuleInfo to live
behind the test that the MachineModuleInfo analysis was
actually available and can be used.
While the MachO bits may well be reasonable to assume in the darwin
assembly printer, the analysis isn't constructively guaranteed anywhere
I could find so it seems safest to avoid crashing here.
This issue was found with PVS-Studio. Pretty sure the Clang Static
Anaylzer flags similar issues but we've probably never pointed it at
this code effectively.
llvm-svn: 285972
Hongbin Zheng [Thu, 3 Nov 2016 22:02:40 +0000 (22:02 +0000)]
Remove the unused POLLY_LINK_LIBS for linking polly into clang
llvm-svn: 285971
Lang Hames [Thu, 3 Nov 2016 22:01:47 +0000 (22:01 +0000)]
[Support] Fix a segfault in llvm::Expected.
This fixes a mismatch between the declared error_type and the type used with
the placement new that initializes the field.
Patch by Yichao Yu.
llvm-svn: 285970
Weiming Zhao [Thu, 3 Nov 2016 21:49:08 +0000 (21:49 +0000)]
[Cortex-M0] Atomic lowering
Summary: ARMv6m supports dmb etc fench instructions but not ldrex/strex etc. So for some atomic load/store, LLVM should inline instructions instead of lowering to __sync_ calls.
Reviewers: rengolin, efriedma, t.p.northover, jmolloy
Subscribers: efriedma, aemerson, llvm-commits
Differential Revision: https://reviews.llvm.org/D26120
llvm-svn: 285969
Rui Ueyama [Thu, 3 Nov 2016 21:28:19 +0000 (21:28 +0000)]
Always use parallel_for_each because it falls back to std::for_each.
If multi-threading is disabled, parallel_for_each will automatically
fall back to std::for_each, so we don't have to do that ourselves.
llvm-svn: 285968
Kevin Enderby [Thu, 3 Nov 2016 20:51:28 +0000 (20:51 +0000)]
Add support for the ARM_THREAD_STATE64 and
in llvm-objdump for Mach-O files add the printing of the
ARM_THREAD_STATE64 in the same format as
otool-classic(1) on darwin.
To do this the 64-bit ARM general tread state
needed to be defined in include/llvm/Support/MachO.h .
rdar://
28985800
llvm-svn: 285967
Rafael Espindola [Thu, 3 Nov 2016 20:48:57 +0000 (20:48 +0000)]
Simplify now that this is only used for global symbols.
llvm-svn: 285966
Rafael Espindola [Thu, 3 Nov 2016 20:44:50 +0000 (20:44 +0000)]
Now that the ELFFile constructor does nothing, create it when needed.
This avoids duplicating the buffer in InputFile.
llvm-svn: 285965
Tony Jiang [Thu, 3 Nov 2016 20:32:21 +0000 (20:32 +0000)]
NFC - Test commit.
Delete an empty line at the end of README.txt file.
llvm-svn: 285964
Rafael Espindola [Thu, 3 Nov 2016 20:17:25 +0000 (20:17 +0000)]
Update for llvm change.
llvm-svn: 285962
Rafael Espindola [Thu, 3 Nov 2016 20:16:53 +0000 (20:16 +0000)]
Don't error in the ELFFile constructor.
All error checking now happens when the information is needed. The
only thing left is the minimum size of the buffer and that can be just
a precondition. I will add an ErrorOr create method in a followup
commit.
Also don't store a pointer to the Header, since it is just a trivial
cast.
llvm-svn: 285961
Adrian Prantl [Thu, 3 Nov 2016 19:42:14 +0000 (19:42 +0000)]
Add debug info support for C++11 inline namespaces.
<rdar://problem/
18616046>
llvm-svn: 285960
Adrian Prantl [Thu, 3 Nov 2016 19:42:02 +0000 (19:42 +0000)]
Add DWARF debug info support for C++11 inline namespaces.
This implements the DWARF 5 DW_AT_export_symbols feature:
http://dwarfstd.org/ShowIssue.php?issue=141212.1
<rdar://problem/
18616046>
llvm-svn: 285959
Kostya Serebryany [Thu, 3 Nov 2016 19:31:18 +0000 (19:31 +0000)]
[libFuzzer] fix -error_exitcode=N, now with a test
llvm-svn: 285958
Michael LeMay [Thu, 3 Nov 2016 19:14:46 +0000 (19:14 +0000)]
[ADT] IntervalMap: fix setStart and setStop
Summary:
These functions currently require that the new closed interval has a length of
at least 2. They also currently permit empty half-open intervals. This patch
defines nonEmpty in each traits structure and uses it to correct the
implementations of setStart and setStop.
Reviewers: stoklund, chandlerc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26064
llvm-svn: 285957
Rafael Espindola [Thu, 3 Nov 2016 19:07:44 +0000 (19:07 +0000)]
Update for llvm change.
llvm-svn: 285956
Rafael Espindola [Thu, 3 Nov 2016 19:07:15 +0000 (19:07 +0000)]
Remove the last use of report_fatal_error from ELF.h.
llvm-svn: 285955
Richard Smith [Thu, 3 Nov 2016 18:55:18 +0000 (18:55 +0000)]
Improve obvious-most-derived-type devirtualization:
* if the base is produced by a series of derived-to-base conversions, check
the expression inside them when looking for an expression with a known
dynamic type
* step past MaterializeTemporaryExprs when checking for a known dynamic type
* when checking for a known dynamic type, treat all class prvalues as having
a known dynamic type after skipping all relevant rvalue subobject
adjustments
* treat callees formed by pointer-to-member access for a non-reference member
type like callees formed by member access.
llvm-svn: 285954
Justin Bogner [Thu, 3 Nov 2016 18:28:04 +0000 (18:28 +0000)]
PDB: Fix some APIs to avoid use-after-frees
The buffer is already owned by the PDBFile for all of these APIs, so
don't pass it in separately.
llvm-svn: 285953
Rui Ueyama [Thu, 3 Nov 2016 18:20:08 +0000 (18:20 +0000)]
Simplify by directly using this->Symbols. NFC.
llvm-svn: 285952
Rafael Espindola [Thu, 3 Nov 2016 18:05:33 +0000 (18:05 +0000)]
Add error handling to getEntry.
Issue found by inspection.
llvm-svn: 285951
Chandler Carruth [Thu, 3 Nov 2016 18:03:14 +0000 (18:03 +0000)]
Instead of resetting the pointer, or releasing it which was the previous
code, let's just assert that the DiagonsticEngine doesn't own the client
because our constructor took ownership of it and has a std::unique_ptr
that handles deleting it. This seems much more clear -- the release was
harmless but confusing as if there were some memory there it would have
leaked, and the reset was harmless but confusing as if there were some
memory there it would have been double-freed. But in both cases there
was nothing there.
llvm-svn: 285950
Rui Ueyama [Thu, 3 Nov 2016 17:57:38 +0000 (17:57 +0000)]
Add [<chars>] to the glob matcher to eliminate use of llvm::Regex.
Previously, it didn't support the character class, so we couldn't
eliminate the use fo llvm::Regex. Now that it is supported, we
can remove compileGlobPattern, which converts a glob pattern to
a regex.
This patch contains optimization for exact/prefix/suffix matches.
Differential Revision: https://reviews.llvm.org/D26284
llvm-svn: 285949
Tom Stellard [Thu, 3 Nov 2016 17:56:46 +0000 (17:56 +0000)]
AMDGPU/SI: Re add VIInstructions.td to unbreak bots
This file is unused as of r285939, but we need to keep it around
for bots that don't do full rebuilds. We should be able to delete this
again in a few days.
llvm-svn: 285948
Andrey Churbanov [Thu, 3 Nov 2016 17:48:46 +0000 (17:48 +0000)]
fixed typo in comment
llvm-svn: 285947
Chandler Carruth [Thu, 3 Nov 2016 17:42:32 +0000 (17:42 +0000)]
Using release to free memory is at best confusing -- one would expect
that its result is in fact used. Instead, use reset.
This was pointed out by PVS-Studio.
llvm-svn: 285946
Chandler Carruth [Thu, 3 Nov 2016 17:42:02 +0000 (17:42 +0000)]
Remove a redundant condition found by PVS-Studio.
Filed http://llvm.org/PR30897 to teach Clang to warn on this kind of
stuff.
llvm-svn: 285945
Rafael Espindola [Thu, 3 Nov 2016 17:37:28 +0000 (17:37 +0000)]
Replace another report_fatal_error with an ErrorOr.
llvm-svn: 285944
Enrico Granata [Thu, 3 Nov 2016 17:33:11 +0000 (17:33 +0000)]
Add RenderScriptScriptGroup to the Xcode project
llvm-svn: 285943
Rafael Espindola [Thu, 3 Nov 2016 17:28:33 +0000 (17:28 +0000)]
Replace a report_fatal_error with an ErrorOr.
llvm-svn: 285942
Enrico Granata [Thu, 3 Nov 2016 17:25:27 +0000 (17:25 +0000)]
Add support to the ObjC type scavenger for finding types via debug info
llvm-svn: 285941
Rafael Espindola [Thu, 3 Nov 2016 17:18:31 +0000 (17:18 +0000)]
Delete dead code.
llvm-svn: 285940
Tom Stellard [Thu, 3 Nov 2016 17:13:50 +0000 (17:13 +0000)]
AMDGPU: Add VI i16 support
Patch By: Wei Ding
Differential Revision: https://reviews.llvm.org/D18049
llvm-svn: 285939
Akira Hatanaka [Thu, 3 Nov 2016 17:11:28 +0000 (17:11 +0000)]
Fix spelling mistake.
llvm-svn: 285938
Chandler Carruth [Thu, 3 Nov 2016 17:11:11 +0000 (17:11 +0000)]
Delete some dead code and add a missing "0x" prefix to a hex string in
llvm-readobj.
Another bug caught by PVS-Studio.
It'd be nice to actually have a test for this, but I found it by
inspection from PVS-Studio.
llvm-svn: 285937
Chandler Carruth [Thu, 3 Nov 2016 17:01:38 +0000 (17:01 +0000)]
Delete a dead store found by PVS-Studio.
Quite sad we still aren't really using aggressive dead code warnings
from Clang that we could potentially use to catch this and so many other
things.
llvm-svn: 285936
Rafael Espindola [Thu, 3 Nov 2016 16:58:27 +0000 (16:58 +0000)]
Delete dead code.
llvm-svn: 285935
Malcolm Parsons [Thu, 3 Nov 2016 16:57:30 +0000 (16:57 +0000)]
Fixed column shift when formatting line containing bit shift operators
Summary:
During clang-format source lexing >> and << operators are split and
treated as two less/greater operators but column position of following
tokens was not adjusted accordingly.
Fixes PR26887
Patch by Paweł Żukowski.
Reviewers: djasper
Subscribers: malcolm.parsons, mprobst, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D25439
llvm-svn: 285934
Rafael Espindola [Thu, 3 Nov 2016 16:55:44 +0000 (16:55 +0000)]
Change how we store the symbol table.
Instead of remembering a raw Elf_Shdr, store the symbol table proper
and the index of the first non local.
This moves error handling upfront and simplifies it.
llvm-svn: 285933
Rafael Espindola [Thu, 3 Nov 2016 16:51:44 +0000 (16:51 +0000)]
Add lower level versions of some functions.
This adds versions of getSectionIndex, getSection and getSymbol that
instead of a Elf_Shdr take the content of that section.
llvm-svn: 285932
Davide Italiano [Thu, 3 Nov 2016 16:43:10 +0000 (16:43 +0000)]
Make this test Windows-only (try to placate buildbots).
llvm-svn: 285931
Chandler Carruth [Thu, 3 Nov 2016 16:39:25 +0000 (16:39 +0000)]
Fix a bug found by inspection by PVS-Studio.
This condition is trivially always true prior to the change. The comment
at the call site makes it clear that we expect *all* of these to be '=',
'S', or 'I' so fix the code.
We have a bug I will update to track the fact that Clang doesn't warn on
this: http://llvm.org/PR13101
llvm-svn: 285930
Rafael Espindola [Thu, 3 Nov 2016 16:24:35 +0000 (16:24 +0000)]
Move function out of line. NFC.
llvm-svn: 285929
Rafael Espindola [Thu, 3 Nov 2016 16:10:39 +0000 (16:10 +0000)]
Inline function into only use.
llvm-svn: 285928
Saleem Abdulrasool [Thu, 3 Nov 2016 15:56:06 +0000 (15:56 +0000)]
vim: special case the CHECK prefix
A large number of tests in the LLVM tree use the default (CHECK) prefix
to indicate checked expressions via FileCheck. Highlight it as a
special comment. Although this wont get all the instances of the
checked patters, it is strictly better than the current state.
llvm-svn: 285927
Rafael Espindola [Thu, 3 Nov 2016 15:43:47 +0000 (15:43 +0000)]
Initialize the StringTable early and do it only once.
llvm-svn: 285926
Samuel Antao [Thu, 3 Nov 2016 15:41:50 +0000 (15:41 +0000)]
Rename the version of ConstructJob for multiple outputs to ConstructJobMultipleOutputs.
It was causing trouble with the GCC bots.
llvm-svn: 285925
Michael Kruse [Thu, 3 Nov 2016 15:19:41 +0000 (15:19 +0000)]
[ScopInfo] Fix isl object leak.
Fix return from function without releasing isl objects, which was introduced
in r269055.
llvm-svn: 285924
Akira Hatanaka [Thu, 3 Nov 2016 15:04:58 +0000 (15:04 +0000)]
[Sema] Avoid instantiating templates only when UncompilableErrorOccurred
and FatalErrorOccurred are both set.
This fixes a crash that occurs when a warning promoted to a fatal error
leaves the AST in an incomplete state, and then later CFG analysis is
run on the incomplete AST.
rdar://problem/
28558923
Differential Revision: https://reviews.llvm.org/D26166
llvm-svn: 285923
Rafael Espindola [Thu, 3 Nov 2016 15:01:12 +0000 (15:01 +0000)]
Delete dead code.
llvm-svn: 285922
Rafael Espindola [Thu, 3 Nov 2016 14:53:25 +0000 (14:53 +0000)]
Return existing error code.
Should fix the -Werror bots.
llvm-svn: 285921
Rafael Espindola [Thu, 3 Nov 2016 14:41:17 +0000 (14:41 +0000)]
Move a free function out of ELFFile.
llvm-svn: 285920
Alexander Timofeev [Thu, 3 Nov 2016 14:37:13 +0000 (14:37 +0000)]
[AMDGPU][CodeGen] To improve CGEMM performance: combine LDS reads.
hange explores the fact that LDS reads may be reordered even if access
the same location.
Prior the change, algorithm immediately stops as soon as any memory
access encountered between loads that are expected to be merged
together. Although, Read-After-Read conflict cannot affect execution
correctness.
Improves hcBLAS CGEMM manually loop-unrolled kernels performance by 44%.
Also improvement expected on any massive sequences of reads from LDS.
Differential Revision: https://reviews.llvm.org/D25944
llvm-svn: 285919
Rafael Espindola [Thu, 3 Nov 2016 14:26:25 +0000 (14:26 +0000)]
Use the getSectionIndex from llvm.
llvm-svn: 285918
Zvi Rackover [Thu, 3 Nov 2016 14:25:24 +0000 (14:25 +0000)]
Refactor creation of X86ISD::SETCC nodes to a helper function. NFC.
llvm-svn: 285917
Nicolai Haehnle [Thu, 3 Nov 2016 14:25:04 +0000 (14:25 +0000)]
DAGCombiner: fix use-after-free when merging consecutive stores
Summary:
Have MergeConsecutiveStores explicitly return information about the stores
that were merged, so that we can safely determine whether the starting
node has been freed.
Reviewers: chandlerc, bogner, niravd
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25601
llvm-svn: 285916
Rafael Espindola [Thu, 3 Nov 2016 14:24:53 +0000 (14:24 +0000)]
Split out a getSectionIndex.
That code is currently duplicated in lld.
llvm-svn: 285915
Rafael Espindola [Thu, 3 Nov 2016 14:17:53 +0000 (14:17 +0000)]
Use existing ELFObj function. NFC.
llvm-svn: 285913
James Molloy [Thu, 3 Nov 2016 14:08:01 +0000 (14:08 +0000)]
Revert "[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently"
This reverts commit r285893. It caused (probably) http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/83 .
llvm-svn: 285912
Rafael Espindola [Thu, 3 Nov 2016 13:58:26 +0000 (13:58 +0000)]
Update for llvm change.
llvm-svn: 285911
Rafael Espindola [Thu, 3 Nov 2016 13:58:15 +0000 (13:58 +0000)]
replace a report_fatal_error with a ErrorOr.
llvm-svn: 285910
Jonathan Coe [Thu, 3 Nov 2016 13:55:34 +0000 (13:55 +0000)]
Support for Python 3 in libclang python bindings
Summary:
Python bindings tests now pass in Python 3.
`map` in Python 3 is lazily evaluated so the method by which functions are registered needed updating.
Strings are unicode in Python 3 not UTF-8, I've tried to create an new c_types-like class (c_string_p) to automate the conversion.
String conversions made explicit where required.
Reviewers: eliben, nemanjai, skalinichev, compnerd
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D26082
llvm-svn: 285909
John Brawn [Thu, 3 Nov 2016 13:55:04 +0000 (13:55 +0000)]
[CMake] Make CMAKE_INSTALL_RPATH work again
r285714 made it so that when CMAKE_INSTALL_RPATH is set _install_rpath is not
set, but that means INSTALL_RPATH gets set to an empty string which isn't what
we want. Fix this by setting INSTALL_RPATH only when _install_rpath is set.
llvm-svn: 285908
Jonathan Coe [Thu, 3 Nov 2016 13:52:09 +0000 (13:52 +0000)]
[clang-tidy] Ignore forward declarations without definitions in the same translation unit in readability-identifier-naming
Summary: This change ensures that forward declarations of classes are not considered for identifier naming checks within a translation unit.
Reviewers: alexfh, aaron.ballman
Subscribers: mgehre
Differential Revision: https://reviews.llvm.org/D22571
llvm-svn: 285907
Rafael Espindola [Thu, 3 Nov 2016 13:43:51 +0000 (13:43 +0000)]
Update for llvm change.
llvm-svn: 285906
Rafael Espindola [Thu, 3 Nov 2016 13:43:30 +0000 (13:43 +0000)]
Replace a report_fatal_error with an ErrorOr.
llvm-svn: 285905
Rafael Espindola [Thu, 3 Nov 2016 13:24:29 +0000 (13:24 +0000)]
Pass the section table around instead of recomputing it.
llvm-svn: 285904
Rafael Espindola [Thu, 3 Nov 2016 13:22:51 +0000 (13:22 +0000)]
Split getStringTableForSymtab.
For use in cases where we already have the section table.
llvm-svn: 285903
Aidan Dodds [Thu, 3 Nov 2016 13:20:37 +0000 (13:20 +0000)]
[Renderscript] Add commands for scriptgroup interaction.
This commit hooks the nofity function that signals script group
compilation. By tracking scriptgroups compiled at runtine, users
are able to place breakpoints by script group name. Breakpoints
will be placed on the kernels forming the group.
llvm-svn: 285902
Malcolm Parsons [Thu, 3 Nov 2016 12:56:48 +0000 (12:56 +0000)]
[clang-tidy] Handle data() in readability-redundant-string-cstr
Summary:
std::string::data() and std::string::c_str() are equivalent.
Enhance the readability-redundant-string-cstr check to also handle
calls to data().
Reviewers: etienneb, alexfh, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26279
llvm-svn: 285901
George Rimar [Thu, 3 Nov 2016 12:49:25 +0000 (12:49 +0000)]
[ELF] - Accept both "-" and "--" for Ttext/Tdata/Tbss options.
llvm-svn: 285900