Reid Kleckner [Tue, 3 Feb 2015 19:51:16 +0000 (19:51 +0000)]
Revert "Thread Safety Analysis: add support for before/after annotations on mutexes."
This reverts r227997, as well as r228009. It does not pass check-clang
for me locally on Linux.
llvm-svn: 228020
Colin LeMahieu [Tue, 3 Feb 2015 19:43:59 +0000 (19:43 +0000)]
[Hexagon] Updating XTYPE/PRED intrinsics.
llvm-svn: 228019
Kostya Serebryany [Tue, 3 Feb 2015 19:42:05 +0000 (19:42 +0000)]
[fuzzer] update the include line to use the new header name
llvm-svn: 228018
Kostya Serebryany [Tue, 3 Feb 2015 19:40:53 +0000 (19:40 +0000)]
[sanitizer] move the coverage interface into a separate header, <sanitizer/coverage_interface.h>. NFC, except for the header name change. This may break existing users, but in this case it's better this way (not too many users so far)
llvm-svn: 228017
Jingyue Wu [Tue, 3 Feb 2015 19:37:06 +0000 (19:37 +0000)]
Add straight-line strength reduction to LLVM
Summary:
Straight-line strength reduction (SLSR) is implemented in GCC but not yet in
LLVM. It has proven to effectively simplify statements derived from an unrolled
loop, and can potentially benefit many other cases too. For example,
LLVM unrolls
#pragma unroll
foo (int i = 0; i < 3; ++i) {
sum += foo((b + i) * s);
}
into
sum += foo(b * s);
sum += foo((b + 1) * s);
sum += foo((b + 2) * s);
However, no optimizations yet reduce the internal redundancy of the three
expressions:
b * s
(b + 1) * s
(b + 2) * s
With SLSR, LLVM can optimize these three expressions into:
t1 = b * s
t2 = t1 + s
t3 = t2 + s
This commit is only an initial step towards implementing a series of such
optimizations. I will implement more (see TODO in the file commentary) in the
near future. This optimization is enabled for the NVPTX backend for now.
However, I am more than happy to push it to the standard optimization pipeline
after more thorough performance tests.
Test Plan: test/StraightLineStrengthReduce/slsr.ll
Reviewers: eliben, HaoLiu, meheff, hfinkel, jholewinski, atrick
Reviewed By: jholewinski, atrick
Subscribers: karthikthecool, jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D7310
llvm-svn: 228016
Colin LeMahieu [Tue, 3 Feb 2015 19:36:59 +0000 (19:36 +0000)]
[Hexagon] Updating XTYPE/PERM intrinsics.
llvm-svn: 228015
Simon Pilgrim [Tue, 3 Feb 2015 19:34:09 +0000 (19:34 +0000)]
[X86][AVX2] Enabled shuffle matching for the AVX2 zero extension (128bit -> 256bit) vpmovzx* instructions.
Differential Revision: http://reviews.llvm.org/D7251
llvm-svn: 228014
Ben Langmuir [Tue, 3 Feb 2015 19:28:37 +0000 (19:28 +0000)]
Make the default module cache user-specific
Appends the username to the first component (after the temp dir) of the
module cache path. If the username contains a character that shouldn't
go into a path (for now conservatively allow [a-zA-Z0-9_]), we fallback
to the user id.
llvm-svn: 228013
Rafael Espindola [Tue, 3 Feb 2015 19:25:53 +0000 (19:25 +0000)]
Fix duplicated symbol error.
llvm-svn: 228012
Rafael Espindola [Tue, 3 Feb 2015 19:20:26 +0000 (19:20 +0000)]
Fix typo in test/CodeGen/X86/sibcall.ll (pr22331).
llvm-svn: 228011
Colin LeMahieu [Tue, 3 Feb 2015 19:15:11 +0000 (19:15 +0000)]
[Hexagon] Adding missing vector multiply instruction encodings. Converting multiply intrinsics and updating tests.
llvm-svn: 228010
Reid Kleckner [Tue, 3 Feb 2015 19:04:26 +0000 (19:04 +0000)]
thread safety: Add move ctor to BeforeInfo to fix MSVC build
MSVC cannot infer move ctors yet.
llvm-svn: 228009
Sanjay Patel [Tue, 3 Feb 2015 18:54:00 +0000 (18:54 +0000)]
Merge consecutive 16-byte loads into one 32-byte load (PR22329)
This patch detects consecutive vector loads using the existing
EltsFromConsecutiveLoads() logic. This fixes:
http://llvm.org/bugs/show_bug.cgi?id=22329
This patch effectively reverts the tablegen additions of D6492 /
http://reviews.llvm.org/rL224344 ...which in hindsight were a horrible hack.
The test cases that were added with that patch are simply modified to load
from varying offsets of a base pointer. These loads did not match the existing
tablegen patterns.
A happy side effect of doing this optimization earlier is that we can now fold
the load into a math op where possible; this is shown in some of the updated
checks in the test file.
Differential Revision: http://reviews.llvm.org/D7303
llvm-svn: 228006
Greg Fitzgerald [Tue, 3 Feb 2015 18:47:37 +0000 (18:47 +0000)]
Don't assume LIT_EXECUTABLE points to a Python script, take 2
Before this patch, the CMake build assumed LIT_EXECUTABLE pointed
to a Python script, not an executable. If you were to pass in an
executable, such as the result of py2exe on lit.py, the build would
fall over.
With this patch, the CMake build assumes LIT_EXECUTABLE is an
executable. You can continue setting it to lit.py, but it will
now use its shebang to find a Python interpreter.
Differential Revision: http://reviews.llvm.org/D7315
llvm-svn: 228005
Sanjay Patel [Tue, 3 Feb 2015 18:47:32 +0000 (18:47 +0000)]
remove variable names from comments; NFC
I didn't bother to fix the self-referential definitions and grammar
because my eyes started to bleed.
llvm-svn: 228004
Adrian Prantl [Tue, 3 Feb 2015 18:40:42 +0000 (18:40 +0000)]
Merge ArtificialLocation into ApplyDebugLocation and make a clear
distinction between the different use-cases. With the previous default
behavior we would occasionally emit empty debug locations in situations
where they actually were strictly required (= on invoke insns).
We now have a choice between defaulting to an empty location or an
artificial location.
Specifically, this fixes a bug caused by a missing debug location when
emitting C++ EH cleanup blocks from within an artificial function, such as
an ObjC destroy helper function.
rdar://problem/
19670595
llvm-svn: 228003
Adrian Prantl [Tue, 3 Feb 2015 18:40:38 +0000 (18:40 +0000)]
Add documentation to ApplyDebugLocation.
llvm-svn: 228002
Alexey Samsonov [Tue, 3 Feb 2015 18:40:34 +0000 (18:40 +0000)]
[ASan] Run tests with both static and dynamic runtime on Windows by default.
llvm-svn: 228001
Manman Ren [Tue, 3 Feb 2015 18:39:15 +0000 (18:39 +0000)]
[LTO API] split lto_codegen_compile to lto_codegen_optimize and
lto_codegen_compile_optimized. Also add lto_api_version.
Before this commit, we can only dump the optimized bitcode after running
lto_codegen_compile, but it includes some impacts of running codegen passes,
one example is StackProtector pass. We will get assertion failure when running
llc on the optimized bitcode, because StackProtector is effectively run twice.
After splitting lto_codegen_compile, the linker can choose to dump the bitcode
before running lto_codegen_compile_optimized.
lto_api_version is added so ld64 can check for runtime-availability of the new
API.
rdar://
19565500
llvm-svn: 228000
Hans Wennborg [Tue, 3 Feb 2015 18:31:29 +0000 (18:31 +0000)]
Fix ProgramFiles path for 64-bit Windows installer
If we are building an 64bit installer on Windows we have to adjust the
Program Files path otherwise it uses the wrong Program Files (x86)
directory. Related CMake bug report
http://public.kitware.com/Bug/view.php?id=14211
Patch by Ismail Dönmez!
llvm-svn: 227999
Zachary Turner [Tue, 3 Feb 2015 18:26:00 +0000 (18:26 +0000)]
Fix compilation failure on Windows.
llvm-svn: 227998
DeLesley Hutchins [Tue, 3 Feb 2015 18:17:48 +0000 (18:17 +0000)]
Thread Safety Analysis: add support for before/after annotations on mutexes.
These checks detect potential deadlocks caused by inconsistent lock
ordering. The checks are implemented under the -Wthread-safety-beta flag.
llvm-svn: 227997
Greg Fitzgerald [Tue, 3 Feb 2015 18:16:47 +0000 (18:16 +0000)]
Revert "Don't assume LIT_EXECUTABLE points to a Python script"
This reverts r227994
llvm-svn: 227996
Colin LeMahieu [Tue, 3 Feb 2015 18:16:28 +0000 (18:16 +0000)]
[Hexagon] Converting complex number intrinsics and adding tests.
llvm-svn: 227995
Greg Fitzgerald [Tue, 3 Feb 2015 18:02:04 +0000 (18:02 +0000)]
Don't assume LIT_EXECUTABLE points to a Python script
Before this patch, the CMake build assumed LIT_EXECUTABLE pointed
to a Python script, not an executable. If you were to pass in an
executable, such as the result of py2exe on lit.py, the build would
fall over.
With this patch, the CMake build assumes LIT_EXECUTABLE is an
executable. You can continue setting it to lit.py, but it will
now use its shebang to find a Python interpreter.
Differential Revision: http://reviews.llvm.org/D7315
llvm-svn: 227994
Colin LeMahieu [Tue, 3 Feb 2015 18:01:45 +0000 (18:01 +0000)]
[Hexagon] Adding vector intrinsics for alu32/alu and xtype/alu.
llvm-svn: 227993
Adam Nemet [Tue, 3 Feb 2015 17:59:53 +0000 (17:59 +0000)]
[LoopVectorize] Fix rebase glitch in r227751
LoopVectorizationLegality::{getNumLoads,getNumStores} should forward to
LoopAccessAnalysis now.
Thanks to Takumi for noticing this!
llvm-svn: 227992
Jingyue Wu [Tue, 3 Feb 2015 17:57:38 +0000 (17:57 +0000)]
Remove usernames from TODOs, NFC
making the style consistent with the rest
llvm-svn: 227991
Marek Olsak [Tue, 3 Feb 2015 17:38:12 +0000 (17:38 +0000)]
R600/SI: Don't generate non-existent LSHL, LSHR, ASHR B32 variants on VI
This can happen when a REV instruction is commuted.
The trick is not to define the _vi versions of instructions, which has these
consequences:
- code generation will always fail if a pseudo cannot be lowered
(very useful to catch bugs where an unsupported instruction somehow makes
it to the printer)
- ability to query if a pseudo can be lowered, which is done in commuteOpcode
to prevent REV from commuting to non-REV on VI
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 227990
Marek Olsak [Tue, 3 Feb 2015 17:38:05 +0000 (17:38 +0000)]
R600/SI: Remove VOP2_REV definitions from target-specific instructions
The getCommute* functions are only used with pseudos, so this commit doesn't
change anything.
The issue with missing non-rev versions of shift instructions on VI will fixed
separately.
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 227989
Marek Olsak [Tue, 3 Feb 2015 17:38:01 +0000 (17:38 +0000)]
R600/SI: Trivial instruction definition corrections for VI (v2)
- V_MAC_LEGACY_F32 exists on VI, but it's VOP3-only.
- Define CVT_PK opcodes which are different between SI and VI. These are
unused. The idea is to define all chip differences.
v2: keep V_MUL_LO_U32
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 227988
Marek Olsak [Tue, 3 Feb 2015 17:37:57 +0000 (17:37 +0000)]
R600/SI: Determine target-specific encoding of READLANE and WRITELANE early v2
These are VOP2 on SI and VOP3 on VI, and their pseudos are neither, which can
be a problem. In order to make isVOP2 and isVOP3 queries behave as expected,
the encoding must be determined first.
This doesn't fix any known issue, but better safe than sorry.
v2: add and use getMCOpcodeFromPseudo
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 227987
Marek Olsak [Tue, 3 Feb 2015 17:37:52 +0000 (17:37 +0000)]
R600/SI: Fix dependency between instruction writing M0 and S_SENDMSG on VI (v2)
This fixes a hang when using an empty geometry shader.
v2: - don't add s_nop when followed by s_waitcnt
- comestic changes
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 227986
Sanjay Patel [Tue, 3 Feb 2015 17:13:04 +0000 (17:13 +0000)]
Fix program crashes due to alignment exceptions generated for SSE memop instructions (PR22371).
r224330 introduced a bug by misinterpreting the "FeatureVectorUAMem" bit.
The commit log says that change did not affect anything, but that's not correct.
That change allowed SSE instructions to have unaligned mem operands folded into
math ops, and that's not allowed in the default specification for any SSE variant.
The bug is exposed when compiling for an AVX-capable CPU that had this feature
flag but without enabling AVX codegen. Another mistake in r224330 was not adding
the feature flag to all AVX CPUs; the AMD chips were excluded.
This is part of the fix for PR22371 ( http://llvm.org/bugs/show_bug.cgi?id=22371 ).
This feature bit is SSE-specific, so I've renamed it to "FeatureSSEUnalignedMem".
Changed the existing test case for the feature bit to reflect the new name and
renamed the test file itself to better reflect the feature.
Added runs to fold-vex.ll to check for the failing codegen.
Note that the feature bit is not set by default on any CPU because it may require a
configuration register setting to enable the enhanced unaligned behavior.
llvm-svn: 227983
Nico Weber [Tue, 3 Feb 2015 17:06:08 +0000 (17:06 +0000)]
Implement jump scope SEHmantic analysis.
Thou shall not jump into SEH blocks. Jumping out of SEH __try and __excepts
is A-ok. Jumping out of __finally blocks is B-ok (msvc doesn't error about it,
but warns that it has undefined behavior).
I've checked that clang's behavior with this patch matches msvc's behavior.
We don't have the warning on jumping out of a __finally yet, see the FIXME
in the test. clang also currently crashes on codegen for a jump out of a
__finally block, see PR22414 comment 7.
I also added a few tests for the interaction of indirect jumps and SEH blocks.
MSVC doesn't support indirect jumps, so there's no way to know if clang behave
the same way as msvc here. clang's behavior with this patch does make sense
to me, but maybe it could be argued that it should be more permissive (see
FIXME in the indirect jump tests -- shout if you have an opinion on this).
llvm-svn: 227982
Bill Schmidt [Tue, 3 Feb 2015 16:57:38 +0000 (16:57 +0000)]
Disable 32-bit tests in tls-pic.ll until they can be repaired
llvm-svn: 227981
Bill Schmidt [Tue, 3 Feb 2015 16:33:55 +0000 (16:33 +0000)]
Further revise too-restrictive test CodeGen/PowerPC/tls-pic.ll
llvm-svn: 227980
Rafael Espindola [Tue, 3 Feb 2015 16:33:53 +0000 (16:33 +0000)]
Use CLANG_LIBDIR_SUFFIX when looking for the gold plugin.
Patch by İsmail Dönmez!
llvm-svn: 227979
Bill Schmidt [Tue, 3 Feb 2015 16:29:52 +0000 (16:29 +0000)]
Further revise too-restrictive test CodeGen/PowerPC/tls-pic.ll
llvm-svn: 227978
Bill Schmidt [Tue, 3 Feb 2015 16:24:05 +0000 (16:24 +0000)]
Revise too-restrictive test CodeGen/PowerPC/tls-pic.ll
llvm-svn: 227977
Bill Schmidt [Tue, 3 Feb 2015 16:16:01 +0000 (16:16 +0000)]
[PowerPC] Yet another approach to __tls_get_addr
This patch is a third attempt to properly handle the local-dynamic and
global-dynamic TLS models.
In my original implementation, calls to __tls_get_addr were hidden
from view until the asm-printer phase, at which point the underlying
branch-and-link instruction was created with proper relocations. This
mostly worked well, but I used some repellent techniques to ensure
that the TLS_GET_ADDR nodes at the SD and MI levels correctly received
input from GPR3 and produced output into GPR3. This proved to work
badly in the presence of multiple TLS variable accesses, with the
copies to and from GPR3 being scheduled incorrectly and generally
creating havoc.
In r221703, I addressed that problem by representing the calls to
__tls_get_addr as true calls during instruction lowering. This had
the advantage of removing all of the bad hacks and relying on the
existing call machinery to properly glue the copies in place. It
looked like this was going to be the right way to go.
However, as a side effect of the recent discovery of problems with
linker optimizations for TLS, we discovered cases of suboptimal code
generation with this strategy. The problem comes when tls_get_addr is
called for the same address, and there is a resulting CSE
opportunity. It turns out that in such cases MachineCSE will common
the addis/addi instructions that set up the input value to
tls_get_addr, but will not common the calls themselves. MachineCSE
does not have any machinery to common idempotent calls. This is
perfectly sensible, since presumably this would be done at the IR
level, and introducing calls in the back end isn't commonplace. In
any case, we end up with two calls to __tls_get_addr when one would
suffice, and that isn't good.
I presumed that the original design would have allowed commoning of
the machine-specific nodes that hid the __tls_get_addr calls, so as
suggested by Ulrich Weigand, I went back to that design and cleaned it
up so that the copies were properly held together by glue
nodes. However, it turned out that this didn't work either...the
presence of copies to physical registers kept the machine-specific
nodes from being commoned also.
All of which leads to the design presented here. This is a return to
the original design, except that no attempt is made to introduce
copies to and from GPR3 during instruction lowering. Virtual registers
are used until prior to register allocation. At that point, a special
pass is run that identifies the machine-specific nodes that hide the
tls_get_addr calls and introduces the copies to and from GPR3 around
them. The register allocator then coalesces these copies away. With
this design, MachineCSE succeeds in commoning tls_get_addr calls where
possible, and we get nice optimal code generation (better than GCC at
the moment, which does not common these calls).
One additional problem must be dealt with: After introducing the
mentions of the physical register GPR3, the aggressive anti-dependence
breaker sees opportunities to improve scheduling by selecting a
different register instead. Flags must be used on the instruction
descriptions to tell the anti-dependence breaker to keep its hands in
its pockets.
One thing missing from the original design was recording a definition
of the link register on the GET_TLS_ADDR nodes. Doing this was found
to be insufficient to force a stack frame to be created, which led to
looping behavior because two different LR values were stored at the
same address. This appears to have been an oversight in
PPCFrameLowering::determineFrameLayout(), which is repaired here.
Because MustSaveLR() returns true for calls to builtin_return_address,
this changed the expected behavior of
test/CodeGen/PowerPC/retaddr2.ll, which now stacks a frame but
formerly did not. I've fixed the test case to reflect this.
There are existing TLS tests to catch regressions; the checks in
test/CodeGen/PowerPC/tls-store2.ll proved to be too restrictive in the
face of instruction scheduling with these changes, so I fixed that
up.
I've added a new test case based on the PrettyStackTrace module that
demonstrated the original problem. This checks that we get correct
code generation and that CSE of the calls to __get_tls_addr has taken
place.
llvm-svn: 227976
Rafael Auler [Tue, 3 Feb 2015 16:08:57 +0000 (16:08 +0000)]
Make ELFLinkingContext own LinkerScript buffers
Currently, no one owns script::Parser buffers, but yet ELFLinkingContext gets
updated with StringRef pointers to data inside Parser buffers. Since this buffer
is locally owned inside GnuLdDriver::evalLinkerScript(), as soon as this
function finishes, all pointers in ELFLinkingContext that comes from linker
scripts get invalid. The problem is that we need someone to own linker scripts
data structures and, since ELFLinkingContext transports references to linker
scripts data, we can simply make it also own all linker scripts data.
Differential Revision: http://reviews.llvm.org/D7323
llvm-svn: 227975
Eric Fiselier [Tue, 3 Feb 2015 16:04:45 +0000 (16:04 +0000)]
Mark <experimental/system_error> as complete
llvm-svn: 227974
Eric Fiselier [Tue, 3 Feb 2015 16:03:24 +0000 (16:03 +0000)]
[libcxx] Add <experimental/system_error>
Summary:
This patch just adds the variable templates in <experimental/system_error>.
see: https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#syserror
Reviewers: jroelofs, danalbert, K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: chandlerc, cfe-commits
Differential Revision: http://reviews.llvm.org/D7353
llvm-svn: 227973
Sanjay Patel [Tue, 3 Feb 2015 15:37:18 +0000 (15:37 +0000)]
Improve test to actually check for a folded load.
This test was checking for lack of a "movaps" (an aligned load)
rather than a "movups" (an unaligned load). It also included
a store which complicated the checking.
Add specific CPU runs to prevent subtarget feature flag overrides
from inhibiting this optimization.
llvm-svn: 227972
Jonathan Roelofs [Tue, 3 Feb 2015 15:34:17 +0000 (15:34 +0000)]
Revert: Revert r227804: Use fseek/ftell instead of fseeko/ftello when Newlib is the libc
EricWF has updated the compilers on his buildbots. Hopefully they won't crash now.
llvm-svn: 227971
Tobias Grosser [Tue, 3 Feb 2015 15:11:02 +0000 (15:11 +0000)]
Add test case for r227805
llvm-svn: 227970
Bruno Cardoso Lopes [Tue, 3 Feb 2015 14:46:49 +0000 (14:46 +0000)]
[X86][MMX] Improve transfer from mmx to i32
Improve EXTRACT_VECTOR_ELT DAG combine to catch conversion patterns
between x86mmx and i32 with more layers of indirection.
Before:
movq2dq %mm0, %xmm0
movd %xmm0, %eax
After:
movd %mm0, %eax
llvm-svn: 227969
Alexander Potapenko [Tue, 3 Feb 2015 12:47:15 +0000 (12:47 +0000)]
[ASan] Remove ifdefs for MAC_OS_X_VERSION_10_6, as ASan assumes OSX >= 10.6
llvm-svn: 227968
Alexander Potapenko [Tue, 3 Feb 2015 12:38:10 +0000 (12:38 +0000)]
[ASan] Add __asan_ prefix for "mz_*" allocation/deallocation functions
and make them global so that they're not removed by `strip -x`.
llvm-svn: 227967
Renato Golin [Tue, 3 Feb 2015 11:26:52 +0000 (11:26 +0000)]
Enabling testing ASAN on AArch64
Also, disabling BuiltinLongJmpTest, as it fails for ARM and PPC as well.
Patch by Christophe Lyon.
llvm-svn: 227966
Renato Golin [Tue, 3 Feb 2015 11:20:45 +0000 (11:20 +0000)]
Adding AArch64 support to ASan instrumentation
For the time being, it is still hardcoded to support only the 39 VA bits
variant, I plan to work on supporting 42 and 48 VA bits variants, but I
don't have access to such hardware at the moment.
Patch by Chrystophe Lyon.
llvm-svn: 227965
Hafiz Abid Qadeer [Tue, 3 Feb 2015 11:20:00 +0000 (11:20 +0000)]
Restore the signal handler for Windows as it is not presistent there.
On windows, signal handler is reset to default once a signal is received.
This causes doing ctrl-c twice on console (or pressing suspend button twice
in eclipse ide which uses SIGINT to stop the debuggee) to crash lldb-mi on
windows. Although there is very tiny window (after signal handler is called
and before we restore the handler) where default handler will be in place.
But this is hardly a problem in practice as IDEs generally disable their suspend
button once it has been presses.
llvm-svn: 227964
Craig Topper [Tue, 3 Feb 2015 11:03:57 +0000 (11:03 +0000)]
[X86] Make fxsave64/fxrstor64/xsave64/xsrstor64/xsaveopt64 parseable in AT&T syntax. Also make them the default output.
llvm-svn: 227963
Craig Topper [Tue, 3 Feb 2015 11:03:43 +0000 (11:03 +0000)]
[X86] Add Requires[In64BitMode] around MOVSX64rr32/MOVSX64rm32. This makes it more strictly mutexed with the ARPL instruction 32-bit mode. Helps with some disassembler changes I'm experimenting with. Should be NFC.
llvm-svn: 227962
Denis Protivensky [Tue, 3 Feb 2015 10:48:37 +0000 (10:48 +0000)]
[lld][ARM] Add relocations to perform function calls
Added relocations to perform function calls with and without passing arguments.
ARM-only, Thumb-only and mixed mode code generations are supported.
Only simple veneers (direct instruction modification) are supported as ARM-Thumb interwork.
Differential Revision: http://reviews.llvm.org/D7223
llvm-svn: 227961
Pavel Labath [Tue, 3 Feb 2015 10:38:21 +0000 (10:38 +0000)]
Test commit. No changes.
llvm-svn: 227960
Yury Gribov [Tue, 3 Feb 2015 10:15:15 +0000 (10:15 +0000)]
[ASan] Add use_madv_dontdump flag.
Differential Revision: http://reviews.llvm.org/D7294
llvm-svn: 227959
Hafiz Abid Qadeer [Tue, 3 Feb 2015 10:05:54 +0000 (10:05 +0000)]
Fix CLI commands in lldb-mi.
This patch fixes execution of CLI commands in MI mode. The CLI commands are
executed using "-interpreter-exec" command. The bug was in the
CMICmnLLDBDebugSessionInfo class which contained the following members:
SBProcess, SBTarget, SBDebugger and SBListener, but CLI commands don't affect
them and they aren't updated. Therefore some members can contain incorrect
(or obsolete) reference and it can cause an error. My patch removes these
members and uses getters that provides the updated instance every time it is used.
Patch from Ilia K ki.stfu@gmail.com. Approved by Greg.
llvm-svn: 227958
Daniel Jasper [Tue, 3 Feb 2015 09:54:58 +0000 (09:54 +0000)]
Move "inline" to the right place.
llvm-svn: 227957
Daniel Jasper [Tue, 3 Feb 2015 09:45:52 +0000 (09:45 +0000)]
Add some overloads so that floating point literals can be AST matched properly.
I am not entirely sure whether the implemented sematics are ideal. In
particular, should floatLiteral(equals(0.5)) match "0.5f" and should
floatLiteral(equals(0.5f)) match "0.5". With the overloads in this
patch, the answer to both questions is yes, but I am happy to change
that.
llvm-svn: 227956
Johannes Doerfert [Tue, 3 Feb 2015 08:55:01 +0000 (08:55 +0000)]
[NFC] Fix typo
llvm-svn: 227955
David Majnemer [Tue, 3 Feb 2015 08:49:32 +0000 (08:49 +0000)]
MS ABI: Records with fields with required aligmnet shouldn't be common
llvm-svn: 227954
David Majnemer [Tue, 3 Feb 2015 08:49:29 +0000 (08:49 +0000)]
AST: Hoist RT->getDecl() into a variable
llvm-svn: 227953
Bruce Mitchener [Tue, 3 Feb 2015 08:01:34 +0000 (08:01 +0000)]
Change void* name_token to const void* to address warnings.
Reviewers: granata.enrico, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7337
llvm-svn: 227952
Bruce Mitchener [Tue, 3 Feb 2015 07:59:26 +0000 (07:59 +0000)]
Cast to (const OptionPermissions*) to avoid warning.
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7336
llvm-svn: 227951
David Majnemer [Tue, 3 Feb 2015 07:35:55 +0000 (07:35 +0000)]
MS ABI: Records with required alignment can't have common linkage
This fixes PR22441.
llvm-svn: 227950
Eric Christopher [Tue, 3 Feb 2015 07:22:52 +0000 (07:22 +0000)]
Only access TLOF via the TargetMachine, not TargetLowering.
llvm-svn: 227949
Eric Christopher [Tue, 3 Feb 2015 06:40:22 +0000 (06:40 +0000)]
Define a runOnMachineFunction for the Hexagon AsmPrinter and
use it to initialize the subtarget.
llvm-svn: 227948
Eric Christopher [Tue, 3 Feb 2015 06:40:19 +0000 (06:40 +0000)]
Migrate away from using a Subtarget except for the one place we want
to use it. Use the triple to determine OS format bits at the module
level.
llvm-svn: 227947
Ted Kremenek [Tue, 3 Feb 2015 06:23:36 +0000 (06:23 +0000)]
[analyzer] Change ccc-analyzer to accept both -isystem <path> and -isystem<path>
Patch by Thomas Hauth!
llvm-svn: 227946
Lang Hames [Tue, 3 Feb 2015 06:14:06 +0000 (06:14 +0000)]
[PBQP Regalloc] Pre-spill vregs that have no legal physregs.
The PBQP::RegAlloc::MatrixMetadata class assumes that matrices have at least two
rows/columns (for the spill option plus at least one physreg). This patch
ensures that that invariant is met by pre-spilling vregs that have no physreg
options so that no node (and no corresponding edges) need be added to the PBQP
graph.
This fixes a bug in an out-of-tree target that was identified by Jonas Paulsson.
Thanks for tracking this down Jonas!
llvm-svn: 227942
NAKAMURA Takumi [Tue, 3 Feb 2015 03:55:06 +0000 (03:55 +0000)]
Resurrect initializers for NumLoads and NumStores in LoopVectorizationLegality to suppress undefined behavior.
FIXME: Shall they be managed in LAA?
llvm-svn: 227940
Richard Smith [Tue, 3 Feb 2015 03:32:14 +0000 (03:32 +0000)]
[modules] Be sure to load the lexical definition of a class template
specialization from an update record exactly once, even if we needed to fake up
the definition.
llvm-svn: 227939
Enrico Granata [Tue, 3 Feb 2015 03:11:59 +0000 (03:11 +0000)]
Add an expectall() API that allows you to pass a list of patterns and have pexpect match *ALL* of them instead of just picking one
llvm-svn: 227938
Andrew Kaylor [Tue, 3 Feb 2015 03:08:25 +0000 (03:08 +0000)]
Really, really, really don't build llvm-pdbdump on MSVC < 2013.
There was a typo in the last attempt.
llvm-svn: 227937
Enrico Granata [Tue, 3 Feb 2015 02:46:36 +0000 (02:46 +0000)]
Make it easier to see what's going on by tracing the test case
llvm-svn: 227936
Greg Clayton [Tue, 3 Feb 2015 02:05:44 +0000 (02:05 +0000)]
Fixed bugs in the multi-threaded access in HostInfoBase. Prior to this fix, static bool variables were used but this is not sufficient. We now use std::call_once in all places where the previous static bool code was used to try to implement thread safety.
This was causing code that opened multiple targets to try and get a path to debugserver from the GDB remote communication class, and it would get the LLDB path and some instances would return empty strings and it would cause debugserver to not be found.
<rdar://problem/
18756927>
llvm-svn: 227935
Rafael Espindola [Tue, 3 Feb 2015 01:53:03 +0000 (01:53 +0000)]
Propagate a better error message to the C api.
llvm-svn: 227934
Chaoren Lin [Tue, 3 Feb 2015 01:51:56 +0000 (01:51 +0000)]
Fix TestThreadStepOut on Linux with LLGS
Remove implicit stop action on $vCont package for threads where no
explicit action or default action specified based on the specification
(they have to stay in there original state).
llvm-svn: 227933
Chaoren Lin [Tue, 3 Feb 2015 01:51:54 +0000 (01:51 +0000)]
Fix compilation error and cleanup in ThreadStateCoordinatorTest
llvm-svn: 227932
Chaoren Lin [Tue, 3 Feb 2015 01:51:50 +0000 (01:51 +0000)]
Add missing switch cases to silence warnings.
llvm-svn: 227931
Chaoren Lin [Tue, 3 Feb 2015 01:51:47 +0000 (01:51 +0000)]
Implement setting and clearing watchpoints.
llvm-svn: 227930
Chaoren Lin [Tue, 3 Feb 2015 01:51:38 +0000 (01:51 +0000)]
Moving header files from source/Host/common to proper location.
llvm-svn: 227929
Chaoren Lin [Tue, 3 Feb 2015 01:51:30 +0000 (01:51 +0000)]
Make ThreadStateCoordinator to handle properly failed stop/resume operations.
llvm-svn: 227928
Chaoren Lin [Tue, 3 Feb 2015 01:51:28 +0000 (01:51 +0000)]
Mark TestProcessLaunch.test_set_working_dir_with_dwarf as expected to fail in LLGS mode due llvm.org/pr20265
llvm-svn: 227927
Chaoren Lin [Tue, 3 Feb 2015 01:51:25 +0000 (01:51 +0000)]
Share crash information between LLGS and local POSIX debugging with
CrashReason class. Deliver crash information from LLGS to lldb via
description field of thread stop packet.
llvm-svn: 227926
Chaoren Lin [Tue, 3 Feb 2015 01:51:18 +0000 (01:51 +0000)]
Mark several tests as XFAIL with new expectedFailureLLGS decorator since they are failing in Darwin for the same reason.
llvm-svn: 227925
Chaoren Lin [Tue, 3 Feb 2015 01:51:15 +0000 (01:51 +0000)]
Modify ThreadStateCoodrinator in order to resume threads if stop wasn't requested.
llvm-svn: 227924
Chaoren Lin [Tue, 3 Feb 2015 01:51:12 +0000 (01:51 +0000)]
Refactor ptrace commands in NativeProcessLinux to use Error as result return type.
llvm-svn: 227923
Chaoren Lin [Tue, 3 Feb 2015 01:51:10 +0000 (01:51 +0000)]
added some missing ABIs
llvm-svn: 227922
Chaoren Lin [Tue, 3 Feb 2015 01:51:06 +0000 (01:51 +0000)]
Fixed TestInferiorChanged
replaced expected stop reason 'address invalid' with 'signal SIGSEGV'
llvm-svn: 227921
Chaoren Lin [Tue, 3 Feb 2015 01:51:05 +0000 (01:51 +0000)]
Fixed TestInferiorCrashing failures
LLGS debugging is outputting different thread stop reasons than
local linux debugging. The stop reasons are reasonable so I've left
left them alone. Might update them to match darwin in the future.
llvm-svn: 227920
Chaoren Lin [Tue, 3 Feb 2015 01:51:03 +0000 (01:51 +0000)]
Added support for writing registers larger than 64 bits
llvm-svn: 227919
Chaoren Lin [Tue, 3 Feb 2015 01:51:02 +0000 (01:51 +0000)]
LLGS local - signal stops inferior in debugger
NativeProcessLinux::MonitorSignal was automatically resuming threads
that stopped due to a signal. This is inconsistent with the
behavior of lldb and gdb. This change removes the automatic resume.
Fixes
TestSendSignal.py
TestSignalsAPI.py
if PLATFORM_LINUX_FORCE_LLGS_LOCAL is in the environment vars.
llvm-svn: 227918
Chaoren Lin [Tue, 3 Feb 2015 01:51:00 +0000 (01:51 +0000)]
Fix up NativeProcessLinux::Interrupt() to use thread state coordinator mechanism.
llvm-svn: 227917
Chaoren Lin [Tue, 3 Feb 2015 01:50:57 +0000 (01:50 +0000)]
Added code to prevent "administrative stop" from overwriting a real stop reason.
Note this code path should not happen - it implies a bug in another part of
the code. For the thread to receive the stop signal as it is handled, the
and for it to already have a stop reason, it implies the kernel was able to
tell the thread that it stopped while it was stopped. More likely this
seems to indicate a bug where an actual thread start was not getting correctly
logged. If it does get hit, we'll want to understand the sequence to figure
out if it is truly legitimate or if it implies another bug.
llvm-svn: 227916
Chaoren Lin [Tue, 3 Feb 2015 01:50:56 +0000 (01:50 +0000)]
Fix step commands that mix running threads and stepping threads.
This fixes https://github.com/tfiala/lldb/issues/62.
llvm-svn: 227915
Chaoren Lin [Tue, 3 Feb 2015 01:50:54 +0000 (01:50 +0000)]
Disabled local-llgs hijacking of state on startup; passed along signo to killed process.
It looks like Shawn's fix addresses what the initial hijacking was trying
to accomplish per conversations with Greg and Jim. The hijacking was
causing several tests to hang (#61, #62, #63, #64, #67, possibly more).
These tests now just fail rather than hang with this modification.
llvm-svn: 227914
Chaoren Lin [Tue, 3 Feb 2015 01:50:51 +0000 (01:50 +0000)]
Fix some bugs in llgs thread state handling.
* When the thread state coordinator is told to skip sending a stop request
for a running thread that is ignored (e.g. the thread that steps in a
step operation is technically running and should not have a stop sent
to it, since it will stop of its own accord per the kernel step operation),
ensure the deferred signal notification logic still waits for the
skipped thread. (i.e. we want to defer the notification until the
stepping thread is indeed stopped, we just don't want to send it a tgkill).
* Add ThreadStateCoordinator::RequestResumeAsNeeded(). This variant of the
RequestResume() method does not call the error function when the thread
is already running. Instead, it just logs that the thread is already
running and skips the resume operation. This is useful for the case of
vCont;c handling, where we tell all threads that they should be running.
At the place we're calling, all we know is "we want this thread running if
it isn't already," and that's exactly what this command does.
* Formatting change (minor) in NativeThreadLinux logging.
llvm-svn: 227913