Aaron Ballman [Wed, 2 Sep 2015 20:00:41 +0000 (20:00 +0000)]
Updating the code owners list.
llvm-svn: 246698
Piotr Padlewski [Wed, 2 Sep 2015 20:00:03 +0000 (20:00 +0000)]
assuem(X) handling in GVN bugfix
There was infinite loop because it was trying to change assume(true) into
assume(true)
Also added handling when assume(false) appear
http://reviews.llvm.org/D12516
llvm-svn: 246697
Piotr Padlewski [Wed, 2 Sep 2015 19:59:59 +0000 (19:59 +0000)]
Constant propagation after hitting assume(cmp) bugfix
Last time code run into assertion `BBE.isSingleEdge()` in
lib/IR/Dominators.cpp:200.
http://reviews.llvm.org/D12170
llvm-svn: 246696
Piotr Padlewski [Wed, 2 Sep 2015 19:59:53 +0000 (19:59 +0000)]
Constant propagation after hiting llvm.assume
After hitting @llvm.assume(X) we can:
- propagate equality that X == true
- if X is icmp/fcmp (with eq operation), and one of operand
is constant we can change all variables with constants in the same BasicBlock
http://reviews.llvm.org/D11918
llvm-svn: 246695
Benjamin Kramer [Wed, 2 Sep 2015 19:52:23 +0000 (19:52 +0000)]
[RemoveDuplicatePHINodes] Start over after removing a PHI.
This makes RemoveDuplicatePHINodes more effective and fixes an assertion
failure. Triggering the assertions requires a DenseSet reallocation
so this change only contains a constructive test.
I'll explain the issue with a small example. In the following function
there's a duplicate PHI, %4 and %5 are identical. When this is found
the DenseSet in RemoveDuplicatePHINodes contains %2, %3 and %4.
define void @F() {
br label %1
; <label>:1 ; preds = %1, %0
%2 = phi i32 [ 42, %0 ], [ %4, %1 ]
%3 = phi i32 [ 42, %0 ], [ %5, %1 ]
%4 = phi i32 [ 42, %0 ], [ 23, %1 ]
%5 = phi i32 [ 42, %0 ], [ 23, %1 ]
br label %1
}
after RemoveDuplicatePHINodes runs the function looks like this. %3 has
changed and is now identical to %2, but RemoveDuplicatePHINodes never
saw this.
define void @F() {
br label %1
; <label>:1 ; preds = %1, %0
%2 = phi i32 [ 42, %0 ], [ %4, %1 ]
%3 = phi i32 [ 42, %0 ], [ %4, %1 ]
%4 = phi i32 [ 42, %0 ], [ 23, %1 ]
br label %1
}
If the DenseSet does a reallocation now it will reinsert all
keys and stumble over %3 now having a different hash value than it had
when inserted into the map for the first time. This change clears the
set whenever a PHI is deleted and starts the progress from the
beginning, allowing %3 to be deleted and avoiding inconsistent DenseSet
state. This potentially has a negative performance impact because
it rescans all PHIs, but I don't think that this ever makes a difference
in practice.
llvm-svn: 246694
Sanjay Patel [Wed, 2 Sep 2015 19:35:31 +0000 (19:35 +0000)]
fix underline
llvm-svn: 246693
Sanjay Patel [Wed, 2 Sep 2015 19:23:23 +0000 (19:23 +0000)]
use "unpredictable" metadata in fast-isel when splitting compares
This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch.
Differential Revision: http://reviews.llvm.org/D12342
llvm-svn: 246692
Sanjay Patel [Wed, 2 Sep 2015 19:17:25 +0000 (19:17 +0000)]
use "unpredictable" metadata in SelectionDAG when splitting compares
This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch.
Differential Revision: http://reviews.llvm.org/D12343
llvm-svn: 246691
Kostya Serebryany [Wed, 2 Sep 2015 19:08:08 +0000 (19:08 +0000)]
[libFuzzer] honour -only_ascii=1 when reading the initial corpus. Also, remove ugly #ifdef
llvm-svn: 246689
Sanjay Patel [Wed, 2 Sep 2015 19:06:43 +0000 (19:06 +0000)]
add unpredictable metadata type for control flow
This patch defines 'unpredictable' metadata. This metadata can be used to signal to the optimizer
or backend that a branch or switch is unpredictable, and therefore, it's probably better to not
split a compound predicate into multiple branches such as in CodeGenPrepare::splitBranchCondition().
This was discussed in:
https://llvm.org/bugs/show_bug.cgi?id=23827
Dependent patches to alter codegen and expose this in clang to follow.
Differential Revision; http://reviews.llvm.org/D12341
llvm-svn: 246688
Ahmed Bougacha [Wed, 2 Sep 2015 18:52:54 +0000 (18:52 +0000)]
[AArch64] More consistently separate asm opc and operands with '\t'.
Somehow missed these in r246686.
llvm-svn: 246687
Ahmed Bougacha [Wed, 2 Sep 2015 18:38:36 +0000 (18:38 +0000)]
[AArch64] Consistently separate asm opc and operands with '\t'.
Some of the instructions use ' ', which drives OCD-me nuts.
Let's put an end to this.
NFC-ish: hopefully nobody cares about whitespace.
llvm-svn: 246686
Justin Bogner [Wed, 2 Sep 2015 18:03:01 +0000 (18:03 +0000)]
test: Only warn about missing substitutions for required tools
Every time lit is invoked, I get warnings like so:
lit.py: lit.cfg:286: note: Did not find llvm-go in /Users/bogner/build/llvm/./bin
lit.py: lit.cfg:286: note: Did not find Kaleidoscope-Ch3 in /Users/bogner/build/llvm/./bin
Since these tools are only built in certain configs, these warnings
are superfluous. Change it so that we only warn about tools that are
built in all configs.
llvm-svn: 246684
Zachary Turner [Wed, 2 Sep 2015 17:59:19 +0000 (17:59 +0000)]
When redirecting stdio, use FILE_SHARE_DELETE.
Some tests were failing because the test would try to delete the
file before inferior had exited, but on Windows this will fail by
default unless you specify FILE_SHARE_DELETE when opening the file.
Can't think of a good reason not to do this, so here it is.
llvm-svn: 246682
Justin Bogner [Wed, 2 Sep 2015 17:54:41 +0000 (17:54 +0000)]
IR: Invert a condition to make it more legible. NFC
Also updates the style to more modern conventions.
llvm-svn: 246681
Richard Smith [Wed, 2 Sep 2015 17:45:54 +0000 (17:45 +0000)]
[modules] Don't waste time reading in the names the module file writer gave to blocks. We don't need these names, and decoding the corresponding bitcode has a significant cost.
llvm-svn: 246680
James Molloy [Wed, 2 Sep 2015 17:29:54 +0000 (17:29 +0000)]
[ValueTracking] Minor comment change in test
This test was updated in r246678 - fix a copypasta in a comment noticed post-commit.
llvm-svn: 246679
James Molloy [Wed, 2 Sep 2015 17:25:25 +0000 (17:25 +0000)]
[ValueTracking] Look through casts when both operands are casts.
We only looked through casts when one operand was a constant. We can also look through casts when both operands are non-constant, but both are in fact the same cast type. For example:
%1 = icmp ult i8 %a, %b
%2 = zext i8 %a to i32
%3 = zext i8 %b to i32
%4 = select i1 %1, i32 %2, i32 %3
llvm-svn: 246678
Sean Callanan [Wed, 2 Sep 2015 16:59:02 +0000 (16:59 +0000)]
Added a skeleton plugin for the Clang expression parser, so I can start factoring stuff into it.
llvm-svn: 246677
Davide Italiano [Wed, 2 Sep 2015 16:53:25 +0000 (16:53 +0000)]
[llvm-reaodbj] Simplify code. No functional change (intended).
llvm-svn: 246676
Hal Finkel [Wed, 2 Sep 2015 16:52:37 +0000 (16:52 +0000)]
[PowerPC] Don't always consider P8Altivec-only masks in LowerVECTOR_SHUFFLE
LowerVECTOR_SHUFFLE needs to decide whether to pass a vector shuffle off to the
TableGen-generated matching code, and it does this by testing the same
predicates used by the TableGen files. Unfortunately, when we added new
P8Altivec-only predicates, we started universally testing them in
LowerVECTOR_SHUFFLE, and if then matched when targeting a system prior to a P8,
we'd end up with a selection failure.
llvm-svn: 246675
Sean Callanan [Wed, 2 Sep 2015 16:49:14 +0000 (16:49 +0000)]
Added an ExpressionParser plugin skeleton with nothing in it (yet).
llvm-svn: 246674
Frederic Riss [Wed, 2 Sep 2015 16:49:13 +0000 (16:49 +0000)]
Reapply r246012 [dsymutil] Emit real dSYM companion binaries.
With a fix for big endian machines. Thanks to Daniel Sanders for the debugging!
Original commit message:
The binaries containing the linked DWARF generated by dsymutil are not
standard relocatable object files like emitted did previsously. They should be
dSYM companion files, which means they have a different file type in the
header, but also a couple other peculiarities:
- they contain the segments and sections from the original binary in their
load commands, but not the actual contents. This means they get an address
and a size, but their offset is always 0 (but these are not virtual sections)
- they also conatin all the defined symbols from the original binary
This makes MC a really bad fit to emit these kind of binaries. The approach
that was used in this patch is to leverage MC's section layout for the
debug sections, but to use a replacement for MachObjectWriter that lives
in MachOUtils.cpp. Some of the low-level helpers from MachObjectWriter
were reused too.
llvm-svn: 246673
Zachary Turner [Wed, 2 Sep 2015 16:47:47 +0000 (16:47 +0000)]
Try to fix FreeBSD build.
llvm-svn: 246672
Zachary Turner [Wed, 2 Sep 2015 16:47:37 +0000 (16:47 +0000)]
Change Windows XFAIL comment for TestCompletion.py
Instead of fixing these tests by finding a pexpect replacement,
this set of tests can be fixed by re-writing the test to not use
pexpect.
llvm.org/pr24679
llvm-svn: 246671
Zachary Turner [Wed, 2 Sep 2015 16:47:29 +0000 (16:47 +0000)]
XFAIL tests on Windows that are failing to resolve breakpoints.
llvm.org/pr24668
llvm-svn: 246670
Zachary Turner [Wed, 2 Sep 2015 16:47:13 +0000 (16:47 +0000)]
[Windows] XFAIL test that depend on dynamic value types.
llvm-svn: 246669
Zachary Turner [Wed, 2 Sep 2015 16:47:01 +0000 (16:47 +0000)]
XFAIL test_thread_state_after_continue on Windows.
https://llvm.org/pr24660
llvm-svn: 246668
Sean Callanan [Wed, 2 Sep 2015 16:40:59 +0000 (16:40 +0000)]
Removed comments that suggested that asserts in the ClangASTImporter should be
debug-only. This is not the case; when they fire we are about to crash or do
something horrible anyway, so they should stay in.
llvm-svn: 246667
Sean Callanan [Wed, 2 Sep 2015 16:39:23 +0000 (16:39 +0000)]
Improved logging for deported types in the ClangASTImporter.
llvm-svn: 246666
Davide Italiano [Wed, 2 Sep 2015 16:24:24 +0000 (16:24 +0000)]
[llvm-readobj] MachO: Dump segment command.
Example output:
File: <stdin>
Format: Mach-O arm
Arch: arm
AddressSize: 32bit
Segment {
Cmd: LC_SEGMENT
Name:
Size: 260
vmaddr: 0x0
vmsize: 0x10
fileoff: 408
filesize: 408
maxprot: rwx
initprot: rwx
nsects: 3
flags: 0x0
}
Differential Revision: http://reviews.llvm.org/D12542
llvm-svn: 246665
NAKAMURA Takumi [Wed, 2 Sep 2015 16:21:27 +0000 (16:21 +0000)]
MCAssembler.h: Prune unused \param since r246604. [-Wdocumentation]
llvm-svn: 246664
Aaron Ballman [Wed, 2 Sep 2015 16:20:42 +0000 (16:20 +0000)]
Disable clang-tidy Google checkers when not compiling in C++ mode. None of the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct.
llvm-svn: 246663
Rafael Espindola [Wed, 2 Sep 2015 16:07:11 +0000 (16:07 +0000)]
Remove an allocator which was used for just one allocation.
llvm-svn: 246662
Aaron Ballman [Wed, 2 Sep 2015 16:05:21 +0000 (16:05 +0000)]
Disable clang-tidy readability checkers when not compiling in C++ mode. None of the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct.
llvm-svn: 246661
Aaron Ballman [Wed, 2 Sep 2015 16:04:15 +0000 (16:04 +0000)]
Move some more functionality into the AST consumer creation factory function, before registering matchers with the MatchFinder object. This allows us to set the language options for the ClangTidyContext object appropriately so that they can be used from registerMatchers(), and more closely models the way the clang-tidy tool works.
llvm-svn: 246660
David Majnemer [Wed, 2 Sep 2015 15:50:38 +0000 (15:50 +0000)]
[MS ABI] Number unnamed TagDecls which aren't externally visible
TagDecls (structs, enums, etc.) may have the same name for linkage
purposes of one another; to disambiguate, we add a number to the mangled
named. However, we didn't do this if the TagDecl has a pseudo-name for
linkage purposes (it was defined alongside a DeclaratorDecl or a
TypeNameDecl).
This fixes PR24651.
llvm-svn: 246659
Sanjay Patel [Wed, 2 Sep 2015 15:42:49 +0000 (15:42 +0000)]
[x86] fix allowsMisalignedMemoryAccesses() for 8-byte and smaller accesses
This is a continuation of the fix from:
http://reviews.llvm.org/D10662
and discussion in:
http://reviews.llvm.org/D12154
Here, we distinguish slow unaligned SSE (128-bit) accesses from slow unaligned
scalar (64-bit and under) accesses. Other lowering (eg, getOptimalMemOpType)
assumes that unaligned scalar accesses are always ok, so this changes
allowsMisalignedMemoryAccesses() to match that behavior.
Differential Revision: http://reviews.llvm.org/D12543
llvm-svn: 246658
Benjamin Kramer [Wed, 2 Sep 2015 15:31:05 +0000 (15:31 +0000)]
[OpenMP] Make helper functoin static. NFC.
llvm-svn: 246657
Rafael Espindola [Wed, 2 Sep 2015 15:07:39 +0000 (15:07 +0000)]
Pass a symbol table to getRelocationSymbol instead of returning one.
This removes a report_fatal_error from library and avoids checking a
section property for every section entry.
llvm-svn: 246656
Angel Garcia Gomez [Wed, 2 Sep 2015 14:25:08 +0000 (14:25 +0000)]
Fix loop-convert crash.
Summary: loop-convert no longer crashes when calling a member function using a member pointer which is a member of another record.
Reviewers: alexfh, klimek
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D12555
llvm-svn: 246655
Asaf Badouh [Wed, 2 Sep 2015 14:21:54 +0000 (14:21 +0000)]
[X86][AVX512VLBW] add support in byte shift and SAD
add byte shift left/right
add SAD - compute sum of absolute differences
Differential Revision: http://reviews.llvm.org/D12479
llvm-svn: 246654
Chad Rosier [Wed, 2 Sep 2015 14:06:16 +0000 (14:06 +0000)]
Add newline to test. NFC.
llvm-svn: 246653
Douglas Katzman [Wed, 2 Sep 2015 13:42:43 +0000 (13:42 +0000)]
[Shave]: pass through more clang options to moviCompile
llvm-svn: 246652
Joseph Tremoulet [Wed, 2 Sep 2015 13:36:25 +0000 (13:36 +0000)]
[TableGen] Allow TokenTy in intrinsic signatures
Summary:
Add the necessary plumbing so that llvm_token_ty can be used as an
argument/return type in intrinsic definitions and correspondingly require
TokenTy in function types. TokenTy is an opaque type that has no target
lowering, but can be used in machine-independent intrinsics. It is
required for the upcoming llvm.eh.padparam intrinsic.
Reviewers: majnemer, rnk
Subscribers: stoklund, llvm-commits
Differential Revision: http://reviews.llvm.org/D12532
llvm-svn: 246651
Douglas Katzman [Wed, 2 Sep 2015 13:33:42 +0000 (13:33 +0000)]
[Sparc]: GCCInstallationDetector should not care if little-endian
llvm-svn: 246650
Tamas Berghammer [Wed, 2 Sep 2015 13:31:18 +0000 (13:31 +0000)]
Only create alternative thumb disassembler if the main one is arm
This fixes a regression caused by r245645 where creating alternative
thumb disassembler was enabled even when the main disassembler is
already thumb.
llvm-svn: 246649
Tamas Berghammer [Wed, 2 Sep 2015 13:24:50 +0000 (13:24 +0000)]
Fix arm disassambler with specifying armv8.1a architecture
If no architecture is defined for the disassambler command then it uses
the architecture of the target. In case of arm it will be "arm" what is
treated as the oldest arm version by the LLVM disassambler causing a lot
of invalid opcode in the output.
This change forces the use of "armv8.1a" (the newest arm architecture) if
no sub architecure was specified (either by the user or by the target) to
disassamble all instruction.
Differential revision: http://reviews.llvm.org/D12553
llvm-svn: 246648
Pavel Labath [Wed, 2 Sep 2015 13:01:21 +0000 (13:01 +0000)]
Enable a couple of tests in TestExitDuringStep on linux
tests have been reliably passing at least the last 100 runs of the build bot.
llvm-svn: 246647
Aaron Ballman [Wed, 2 Sep 2015 12:50:12 +0000 (12:50 +0000)]
Silence a -Wsign-compare warning; NFC.
llvm-svn: 246646
Pavel Labath [Wed, 2 Sep 2015 12:20:41 +0000 (12:20 +0000)]
Fix test.html webpage alignment
llvm-svn: 246645
Pavel Labath [Wed, 2 Sep 2015 12:09:31 +0000 (12:09 +0000)]
XFAIL new tests in TestCompletion on windows due to missing pexpect
llvm-svn: 246644
Alexander Kornienko [Wed, 2 Sep 2015 12:01:51 +0000 (12:01 +0000)]
[clang-tidy] Updated the check name in the doc.
llvm-svn: 246643
Igor Breger [Wed, 2 Sep 2015 11:18:55 +0000 (11:18 +0000)]
AVX512: Implemented encoding and intrinsics for VGETMANTPD/S , VGETMANTSD/S instructions
Added tests for intrinsics and encoding.
Differential Revision: http://reviews.llvm.org/D11593
llvm-svn: 246642
NAKAMURA Takumi [Wed, 2 Sep 2015 10:59:21 +0000 (10:59 +0000)]
Suppress llvm/test/tools/gold/X86/parallel.ll while investigating.
For me,
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7deb0dc in _dl_fixup () from /lib64/ld-linux-x86-64.so.2
llvm-svn: 246641
Igor Breger [Wed, 2 Sep 2015 10:50:58 +0000 (10:50 +0000)]
AVX512: Implemented encoding and intrinsics for vshufps/d.
Added tests for intrinsics and encoding.
Differential Revision: http://reviews.llvm.org/D11709
llvm-svn: 246640
Tamas Berghammer [Wed, 2 Sep 2015 10:35:27 +0000 (10:35 +0000)]
Fix tab completion for command arguments containing spaces
If a command argument contains a space then it have to be escaped with
backslash signs so the argument parsing logic can parse it properly.
This CL fixes the tab completion code for the arguments to create
complitions with correctly escaped strings.
Differential revision: http://reviews.llvm.org/D12531
llvm-svn: 246639
Angel Garcia Gomez [Wed, 2 Sep 2015 10:20:00 +0000 (10:20 +0000)]
Fix use-auto-check.
Summary: Fix a bug where use-auto check would crash when the definition of a type is in the same statement than its instantiation with new.
Reviewers: alexfh
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D12551
llvm-svn: 246638
James Molloy [Wed, 2 Sep 2015 10:15:39 +0000 (10:15 +0000)]
[LV] Don't bail to MiddleBlock if a runtime check fails, bail to ScalarPH instead
We were bailing to two places if our runtime checks failed. If the initial overflow check failed, we'd go to ScalarPH. If any other check failed, we'd go to MiddleBlock. This caused us to have to have an extra PHI per induction and reduction as the vector loop's exit block was not dominated by its latch.
There's no need to have this behavior - if we just always go to ScalarPH we can get rid of a bunch of complexity.
llvm-svn: 246637
James Molloy [Wed, 2 Sep 2015 10:15:32 +0000 (10:15 +0000)]
[LV] Move some code around slightly to make the intent of the function more clear.
NFC.
llvm-svn: 246636
James Molloy [Wed, 2 Sep 2015 10:15:27 +0000 (10:15 +0000)]
[LV] Cleanup: Sink an IRBuilder closer to its uses.
NFC.
llvm-svn: 246635
James Molloy [Wed, 2 Sep 2015 10:15:22 +0000 (10:15 +0000)]
[LV] Refactor all runtime check emissions into helper functions.
This reduces the complexity of createEmptyBlock() and will open the door to further refactoring.
The test change is simply because we're now constant folding a trivial test.
llvm-svn: 246634
James Molloy [Wed, 2 Sep 2015 10:15:16 +0000 (10:15 +0000)]
[LV] Pull creation of trip counts into a helper function.
... and do a tad of tidyup while we're at it. Because StartIdx must now be zero, there's no difference between Count and EndIdx.
llvm-svn: 246633
James Molloy [Wed, 2 Sep 2015 10:15:09 +0000 (10:15 +0000)]
[LV] Factor the creation of the loop induction variable out of createEmptyLoop()
It makes things easier to understand if this is in a helper method. This is part of my ongoing spaghetti-removal operation on createEmptyLoop.
llvm-svn: 246632
James Molloy [Wed, 2 Sep 2015 10:15:05 +0000 (10:15 +0000)]
[LV] Never widen an induction variable.
There's no need to widen canonical induction variables. It's just as efficient to create a *new*, wide, induction variable.
Consider, if we widen an indvar, then we'll have to truncate it before its uses anyway (1 trunc). If we create a new indvar instead, we'll have to truncate that instead (1 trunc) [besides which IndVars should go and clean up our mess after us anyway on principle].
This lets us remove a ton of special-casing code.
llvm-svn: 246631
James Molloy [Wed, 2 Sep 2015 10:14:54 +0000 (10:14 +0000)]
[LV] Switch to using canonical induction variables.
Vectorized loops only ever have one induction variable. All induction PHIs from the scalar loop are rewritten to be in terms of this single indvar.
We were trying very hard to pick an indvar that already existed, even if that indvar wasn't canonical (didn't start at zero). But trying so hard is really fruitless - creating a new, canonical, indvar only results in one extra add in the worst case and that add is trivially easy to push through the PHI out of the loop by instcombine.
If we try and be less clever here and instead let instcombine clean up our mess (as we do in many other places in LV), we can remove unneeded complexity.
llvm-svn: 246630
NAKAMURA Takumi [Wed, 2 Sep 2015 10:11:26 +0000 (10:11 +0000)]
[CMake] Don't use OBJLIB on Xcode.
I got a few reports it didn't work.
llvm-svn: 246629
Pavel Labath [Wed, 2 Sep 2015 09:33:09 +0000 (09:33 +0000)]
Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards
patch by Eugene Zelenko.
Differential Revision: http://reviews.llvm.org/D12207
llvm-svn: 246628
Pavel Labath [Wed, 2 Sep 2015 09:28:35 +0000 (09:28 +0000)]
Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Interpreter, unify closing inclusion guards
patch by Eugene Zelenko.
Differential Revision: http://reviews.llvm.org/D12171
llvm-svn: 246627
Pavel Labath [Wed, 2 Sep 2015 09:24:21 +0000 (09:24 +0000)]
Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Target, unify closing inclusion guards
patch by Eugene Zelenko.
Differential Revision: http://reviews.llvm.org/D12167
llvm-svn: 246626
Elena Demikhovsky [Wed, 2 Sep 2015 09:20:58 +0000 (09:20 +0000)]
AVX-512: store <4 x i1> and <2 x i1> values in memory
Enabled DAG pattern lowering for SKX with DQI predicate.
Differential Revision: http://reviews.llvm.org/D12550
llvm-svn: 246625
Pavel Labath [Wed, 2 Sep 2015 09:19:24 +0000 (09:19 +0000)]
Fix Clang-tidy misc-use-override warnings in include/lldb/API, Breakpoint and Symbol, unify closing inclusion guards
patch by Eugene Zelenko.
llvm-svn: 246624
Pavel Labath [Wed, 2 Sep 2015 09:12:28 +0000 (09:12 +0000)]
Address flakyness in TestAttachResume
Summary:
The test (among other things) attempts to verify that detaching works while the inferior is
running. However, this was racy since the inferior could end up stopping again before we got a
chance to detach from it (the test could be made to fail reliably by inserting a sleep just after
the last "continue" command). The reason for the stop was that we had a breakpoint set in a place
that can be hit by multiple threads, and we stop because another thread hit a breakpoint.
I fix this by moving the breakpoint to a place that is reachable from only one thread. I also
make sure that the same thread cannot hit the breakpoint if we are exceptionaly slow by flipping
a flag which makes the breakpoint unreachable (I cannot just disable or delete the breakpoint as
the test makes it a point to try detaching while breakpoints are still set).
Another source or racyness was that the test verified that the process resumes and
stops after a "continue". However, if these two events happened too fast, the initial start event
would be lost, and the test would end up confused. I have implemented this in a safer manner and
made a utility function out of it, as I know of a couple of other tests which need the same
functionality.
Reviewers: zturner, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12527
llvm-svn: 246623
Elena Demikhovsky [Wed, 2 Sep 2015 08:39:13 +0000 (08:39 +0000)]
Optimization for Gather/Scatter with uniform base
Vector 'getelementptr' with scalar base is an opportunity for gather/scatter intrinsic to generate a better sequence.
While looking for uniform base, we want to use the scalar base pointer of GEP, if exists.
Differential Revision: http://reviews.llvm.org/D11121
llvm-svn: 246622
Rui Ueyama [Wed, 2 Sep 2015 08:10:37 +0000 (08:10 +0000)]
COFF: Attempt to fix a flaky test.
I don't understand why the previous code is pretty flaky and
the new code is at least less flaky, but the original test
occasionally failed on the second run of lib.exe.
My guess was that lib.exe was failing because the output of
the echo command executed immediately before lib.exe was not
flushed to a file, but as far as I can say, the file
descriptor is properly closed in TestRunner.py, so this's
probably not correct. Other theory is that, on Windows, file
output is not guaranteed to be visible to other processes even
if a process flushes file descriptors, but I'd think that's
unlikely. So honestly I don't know the cause yet.
llvm-svn: 246621
Rui Ueyama [Wed, 2 Sep 2015 07:27:31 +0000 (07:27 +0000)]
COFF: Preserve original spelling of DLL file name.
This patch fixes a subtle incompatibility with MSVC linker.
MSVC linker preserves the original spelling of a DLL in the
import descriptor table. LLD previously converted all
characters to lowercase. Usually this difference is benign,
but if a program explicitly checks for DLL file names, the
program could fail.
llvm-svn: 246620
Yaron Keren [Wed, 2 Sep 2015 06:34:11 +0000 (06:34 +0000)]
Move createEliminateAvailableExternallyPass earlier in the pass pipeline
to save running many ModulePasses on available external functions that
are thrown away anyhow.
llvm-svn: 246619
Vedant Kumar [Wed, 2 Sep 2015 03:27:15 +0000 (03:27 +0000)]
[Sema] Avoid crash on tag-type mismatch (Fixes PR24610)
Differential Revision: http://reviews.llvm.org/D12444
llvm-svn: 246618
Peter Collingbourne [Wed, 2 Sep 2015 02:18:46 +0000 (02:18 +0000)]
CFI: Make the cfi target a dependency of compiler-rt.
This causes the blacklist to be copied into place as a default build step.
llvm-svn: 246617
Jim Ingham [Wed, 2 Sep 2015 01:59:14 +0000 (01:59 +0000)]
Move more functionality from the LanguageRuntimes to the Languages.
llvm-svn: 246616
Vedant Kumar [Wed, 2 Sep 2015 01:31:58 +0000 (01:31 +0000)]
[CodeGen] Fix FREM on 32-bit MSVC on x86
Patch by Dylan McKay!
Differential Revision: http://reviews.llvm.org/D12099
llvm-svn: 246615
Enrico Granata [Wed, 2 Sep 2015 01:31:10 +0000 (01:31 +0000)]
Add a Language::ForAllLanguages helper function
llvm-svn: 246614
Enrico Granata [Wed, 2 Sep 2015 01:28:24 +0000 (01:28 +0000)]
Use Language::LanguageIsCPlusPlus instead of doing the same switch over language
llvm-svn: 246613
Enrico Granata [Wed, 2 Sep 2015 01:21:31 +0000 (01:21 +0000)]
Move the functions that FormatManager uses to actually load formatters into their own file
These are useful helpers over the low-level API of the FormattersContainer, and since we're actually going to start moving formatters into plugins, it makes sense to simplify things
llvm-svn: 246612
Jim Ingham [Wed, 2 Sep 2015 01:06:46 +0000 (01:06 +0000)]
Move things from the LanguageRuntime that obviously belong in the new Language plugin instead.
llvm-svn: 246611
Eric Christopher [Wed, 2 Sep 2015 00:12:02 +0000 (00:12 +0000)]
Migrate the target attribute parsing code into an extension off of
the main attribute and cache the results so we don't have to parse
a single attribute more than once.
This reapplies r246596 with a fix for an uninitialized class member,
and a couple of cleanups and formatting changes.
llvm-svn: 246610
Bruce Mitchener [Tue, 1 Sep 2015 23:57:17 +0000 (23:57 +0000)]
Simplify find_first_of & find_last_of on single char.
Summary:
When calling find_first_of and find_last_of on a single character,
we can instead just call find / rfind and make our intent more
clear.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12518
llvm-svn: 246609
Bruce Mitchener [Tue, 1 Sep 2015 23:51:30 +0000 (23:51 +0000)]
Remove ABIMacOSX_i386::PrepareNormalCall().
Summary:
This was removed from the other ABI plugins long ago. This removes
a warning that was happening in this unused code as a result of
adding 2 new types to Scalar.h (e_uint128 and e_sint128).
Reviewers: clayborg
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12514
llvm-svn: 246608
David Majnemer [Tue, 1 Sep 2015 23:46:11 +0000 (23:46 +0000)]
[MC] Generate a timestamp for COFF object files
The MS incremental linker seems to inspect the timestamp written into
the object file to determine whether or not it's contents need to be
considered. Failing to set the timestamp to a date newer than the
executable will result in the object file not participating in
subsequent links. To ameliorate this, write the current time into the
object file's TimeDateStamp field.
llvm-svn: 246607
Bruce Mitchener [Tue, 1 Sep 2015 23:45:14 +0000 (23:45 +0000)]
[debugserver] Fix sign comparison warning.
Summary:
Comparing m_page_size against kInvalidPageSize was resulting in
a warning about comparing integers with different signs. Since
kInvalidPageSize isn't used anywhere outside of MachVMMemory.cpp,
we can readily transform it into a static const vm_size_t with
the correct value to avoid the sign comparison warnings.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12519
llvm-svn: 246606
Bruce Mitchener [Tue, 1 Sep 2015 23:43:51 +0000 (23:43 +0000)]
Use -Wno-vla-extension globally.
Summary:
This was previously only established within debugserver, but
there is a use of the VLA extension in source/Host/macosx/Symbols.cpp,
so ignore this warning globally.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12515
llvm-svn: 246605
David Majnemer [Tue, 1 Sep 2015 23:19:38 +0000 (23:19 +0000)]
[MC] Remove MCAssembler's copy of OS
We can just ask the ObjectWriter for it's stream instead of caching
around our own reference to it. No functionality change is intended.
llvm-svn: 246604
Rafael Espindola [Tue, 1 Sep 2015 23:12:52 +0000 (23:12 +0000)]
Merge visibility from all symbols with the same name.
The ELF spec says:
... if any reference to or definition of a name is a symbol with a
non-default visibility attribute, the visibility attribute must be
propagated to the resolving symbol in the linked object. If different
visibility attributes are specified for distinct references to or
definitions of a symbol, the most constraining visibility attribute
must be propagated to the resolving symbol in the linked object. The
attributes, ordered from least to most constraining, are:
STV_PROTECTED, STV_HIDDEN and STV_INTERNAL.
llvm-svn: 246603
Peter Collingbourne [Tue, 1 Sep 2015 23:00:56 +0000 (23:00 +0000)]
CFI: Add blacklist entries for various standard library functions.
llvm-svn: 246602
Jim Ingham [Tue, 1 Sep 2015 22:56:59 +0000 (22:56 +0000)]
Fix ProcessKDP.cpp for the change in r246578.
llvm-svn: 246601
Hubert Tong [Tue, 1 Sep 2015 22:50:31 +0000 (22:50 +0000)]
Fix assertion failure in TransformOpaqueValueExpr
Summary:
`OpaqueValueExpr`s may not have a source expression (as in the case when
they are created due to a default argument error).
This can cause an assertion failure in `TransformOpaqueValueExpr` during
template instantiation.
This patch fixes the assertion failure.
Reviewers: hfinkel, rsmith
Subscribers: fraggamuffin, cfe-commits
Differential Revision: http://reviews.llvm.org/D11582
Patch by Rachel Craik!
llvm-svn: 246600
Chris Bieneman [Tue, 1 Sep 2015 22:39:04 +0000 (22:39 +0000)]
[autoconf] Add ___udivti3 to iOS builtins
llvm-svn: 246599
Eric Christopher [Tue, 1 Sep 2015 22:37:03 +0000 (22:37 +0000)]
Revert "Migrate the target attribute parsing code into an extension off of"
This is failing in release mode. Revert while I figure out what's happening.
This reverts commit r246596.
llvm-svn: 246598
Enrico Granata [Tue, 1 Sep 2015 22:24:35 +0000 (22:24 +0000)]
std::initializer_list is not safe to return from a function, as copies are not guaranteed to extend the lifetime of the underlying storage
llvm-svn: 246597
Eric Christopher [Tue, 1 Sep 2015 22:03:58 +0000 (22:03 +0000)]
Migrate the target attribute parsing code into an extension off of
the main attribute and cache the results so we don't have to parse
a single attribute more than once.
llvm-svn: 246596