Saleem Abdulrasool [Thu, 7 Aug 2014 02:59:41 +0000 (02:59 +0000)]
MC: split Win64EHUnwindEmitter into a shared streamer
This changes Win64EHEmitter into a utility WinEH UnwindEmitter that can be
shared across multiple architectures and a target specific bit which is
overridden (Win64::UnwindEmitter). This enables sharing the section selection
code across X86 and the intended use in ARM for emitting unwind information for
Windows on ARM.
llvm-svn: 215050
Richard Trieu [Thu, 7 Aug 2014 02:09:05 +0000 (02:09 +0000)]
Update the context location of the condition of a conditional operator to the
question mark instead of the context of the conditional operator. The
condition does not need the context of the conditional operator at all.
llvm-svn: 215048
Reid Kleckner [Thu, 7 Aug 2014 01:00:42 +0000 (01:00 +0000)]
Make FullExprArg trivially copyable by removing the copy ctor
The default copy ctor is good. This avoids using inalloca for a bunch
of Sema methods when self-hosting.
llvm-svn: 215047
Richard Smith [Thu, 7 Aug 2014 00:24:21 +0000 (00:24 +0000)]
Use -Rblah, not -Wblah, to control remark diagnostics. This was always the
intent when we added remark support, but was never implemented in the general
case, because the first -R flags didn't need it. (-Rpass= had special handling
to accomodate its argument.)
-Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark,
or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything
does not affect remarks, and -Reverything does not affect warnings or errors.
The only "real" -R flag we have right now is -Rmodule-build; that flag is
effectively renamed from -Wmodule-build to -Rmodule-build by this change.
-Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and
-Rno-pass by this change; it's not completely clear whether we intended to have
a -Rpass (with no =pattern), but that is unchanged by this commit, other than
the flag name. The default pattern is effectively one which matches no passes.
In future, we may want to make the default pattern be .*, so that -Reverything
works for -Rpass properly.
llvm-svn: 215046
Quentin Colombet [Thu, 7 Aug 2014 00:20:44 +0000 (00:20 +0000)]
[X86][SchedModel] Fixed missing/wrong scheduling model found by code inspection.
Source: Agner Fog's Instruction tables.
Related to <rdar://problem/
15607571>
llvm-svn: 215045
Reid Kleckner [Thu, 7 Aug 2014 00:05:00 +0000 (00:05 +0000)]
Add back the leading space when printing commands with -###
This was an unintentional behavior change from r214924.
llvm-svn: 215044
Fariborz Jahanian [Wed, 6 Aug 2014 23:40:31 +0000 (23:40 +0000)]
Objective-C ARC. More code for Objective-C's
new APIs for literals. nfc. wip. rdar://
17554063
llvm-svn: 215043
Kevin Enderby [Wed, 6 Aug 2014 23:24:41 +0000 (23:24 +0000)]
Add the -mcpu= option to llvm-objdump for use with the disassemblers.
Also make the disassembler created with the Mach-O parser (the -m option)
pick up the Target specific attributes specified with -mattr option.
llvm-svn: 215032
Reid Kleckner [Wed, 6 Aug 2014 23:21:13 +0000 (23:21 +0000)]
MC X86: Accept ".att_syntax prefix" and diagnose noprefix
Fixes PR18916. I don't think we need to implement support for either
hybrid syntax. Nobody should write Intel assembly with '%' prefixes on
their registers or AT&T assembly without them.
llvm-svn: 215031
Alexey Samsonov [Wed, 6 Aug 2014 23:13:23 +0000 (23:13 +0000)]
[TSan] Try to fix Go runtime build
llvm-svn: 215000
David Blaikie [Wed, 6 Aug 2014 22:30:12 +0000 (22:30 +0000)]
Revert "Reapply "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself.""
This reverts commit r214761.
Revert while Reid investigates & provides a reproduction for an
assertion failure for this on Windows.
llvm-svn: 214999
Rui Ueyama [Wed, 6 Aug 2014 22:01:54 +0000 (22:01 +0000)]
Revert "Fix modelling of non-lifetime-extended temporary destructors in the analyzer."
This reverts commit r214962 because after the change the
following code doesn't compile with -Wreturn-type -Werror.
#include <cstdlib>
class NoReturn {
public:
~NoReturn() __attribute__((noreturn)) { exit(1); }
};
int check() {
true ? NoReturn() : NoReturn();
}
llvm-svn: 214998
Keno Fischer [Wed, 6 Aug 2014 21:18:13 +0000 (21:18 +0000)]
Fix ProcessKDP after Host/Socket addition
Reviewers: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D4815
llvm-svn: 214996
Sanjay Patel [Wed, 6 Aug 2014 21:08:38 +0000 (21:08 +0000)]
fix typo
llvm-svn: 214995
Yaron Keren [Wed, 6 Aug 2014 20:59:09 +0000 (20:59 +0000)]
getNewMemBuffer memsets the buffer to zeros,
the caller don't have to initialize it.
llvm-svn: 214994
Fariborz Jahanian [Wed, 6 Aug 2014 20:56:21 +0000 (20:56 +0000)]
Objective-C ARC. Adding declarations for Objective-C's
new APIs for literals. nfc. wip. rdar://
17554063
llvm-svn: 214993
Sanjay Patel [Wed, 6 Aug 2014 20:45:30 +0000 (20:45 +0000)]
Fix a test that has no checks.
X86 doesn't have fneg, so check for xor.
Differential Revision: http://reviews.llvm.org/D4812
llvm-svn: 214992
Matt Arsenault [Wed, 6 Aug 2014 20:27:55 +0000 (20:27 +0000)]
R600: Cleanup fadd and fsub tests
llvm-svn: 214991
Rui Ueyama [Wed, 6 Aug 2014 19:37:35 +0000 (19:37 +0000)]
Fix mach-o tests on Windows
The tests assume the path separator is '/', but if you run
them on Windows it is '\'. As a result the tests are failing
on Windows. This should be the minimal change to make these
tests to pass on Windows platform.
Differential Revision: http://reviews.llvm.org/D4710
llvm-svn: 214990
Rui Ueyama [Wed, 6 Aug 2014 19:30:38 +0000 (19:30 +0000)]
Revert "r214897 - Remove dead zero store to calloc initialized memory"
It broke msan.
llvm-svn: 214989
Eric Christopher [Wed, 6 Aug 2014 18:45:26 +0000 (18:45 +0000)]
Remove the target machine from CCState. Previously it was only used
to get the subtarget and that's accessible from the MachineFunction
now. This helps clear the way for smaller changes where we getting
a subtarget will require passing in a MachineFunction/Function as
well.
llvm-svn: 214988
Adrian Prantl [Wed, 6 Aug 2014 18:41:24 +0000 (18:41 +0000)]
Improve performance of calculateDbgValueHistory.
In r210492 the logic of calculateDbgValueHistory was changed to end
register variable live ranges at the end of MBB conditionally on
the fact that the register was or not clobbered by the function body.
This requires an initial scan of all the operands of the function
to collect all clobbered registers. In a second pass over all
instructions, we compare this set with the set of clobbered
registers for the current MachineInstruction. This modification
incurred a compilation time regression on some benchmarks: the
debug info emission phase takes ~10% more time.
While a small performance hit is unavoidable due to the initial
scan requirement, we can improve the situation by avoiding to
create too many temporary sets and just use lambdas to work directly
on the result of the initial scan.
Fixes <rdar://problem/
17884104>
Patch by Frederic Riss!
llvm-svn: 214987
Adrian Prantl [Wed, 6 Aug 2014 18:41:19 +0000 (18:41 +0000)]
Cleanup collectChangingRegs
The handling of the epilogue is best expressed as an early exit and
there is no reason to look for register defs in DbgValue MIs.
Patch by Frederic Riss!
llvm-svn: 214986
David Blaikie [Wed, 6 Aug 2014 18:24:19 +0000 (18:24 +0000)]
DebugInfo: Fix ranges+gmlt test case to actually exercise the gmlt situation.
Originally this test case tested the specified behavior (that -gmlt
would not produce DW_AT_ranges and that when no CU DW_AT_ranges were
produced, no debug_ranges section (not even an empty list) would be
produced) but then the ranges emission code was improved not to create
ranges of a single element (instead favoring high_pc/low_pc) and so this
test case no longer exercised the -gmlt portion of the behavior.
This caused me some confusion when reading the comments and trying to
update this test case for future changes to -gmlt. I've made this test
resilient to those changes (by using the {{DW_TAG|NULL}} pattern to
block the end of the attribute search at the end of the CU's attribute
list without mandating that it must (or must not) be followed by another
tag (the future changes to -gmlt should produce no subprograms in this
CU))
Fix the test case to have two functions in distinct sections to force
the use of DW_AT_ranges.
llvm-svn: 214985
Zachary Turner [Wed, 6 Aug 2014 18:16:26 +0000 (18:16 +0000)]
Creates a socket host object.
This patch moves the logic of many common socket operations into
its own class lldb_private::Socket. It then modifies the
ConnectionFileDescriptor class, and a few users of that class,
to use this new Socket class instead of hardcoding socket logic
directly.
Finally, this patch creates a common interface called IOObject for
any objects that support reading and writing, so that endpoints
such as sockets and files can be treated the same.
Differential Revision: http://reviews.llvm.org/D4641
Reviewed by: Todd Fiala, Greg Clayton
llvm-svn: 214984
Fariborz Jahanian [Wed, 6 Aug 2014 18:13:46 +0000 (18:13 +0000)]
Objective-C ARC. First patch toward generating new APIs
for Objective-C's array and dictionary literals.
rdar://
17554063. This is wip.
llvm-svn: 214983
Reid Kleckner [Wed, 6 Aug 2014 18:09:15 +0000 (18:09 +0000)]
Add a triple to this test to get the right IR mangling
llvm-svn: 214982
Reid Kleckner [Wed, 6 Aug 2014 18:09:04 +0000 (18:09 +0000)]
Don't count inreg params when mangling fastcall functions
This is consistent with MSVC.
llvm-svn: 214981
Reid Kleckner [Wed, 6 Aug 2014 17:57:23 +0000 (17:57 +0000)]
Round up the size of byval arguments to MinAlign
Otherwise we can end up with an argument frame size that is not a
multiple of stack slot size, which is very awkward.
This fixes PR20547, which was a bug in x86_64 Sys V vararg handling.
However, it's much easier to test this with x86 callee-cleanup
functions, which previously ended in "retl $6" instead of "retl $8".
This does affect behavior of all backends, but it presumably fixes the
same bug in all of them.
llvm-svn: 214980
Duncan P. N. Exon Smith [Wed, 6 Aug 2014 17:36:08 +0000 (17:36 +0000)]
UseListOrder: Use std::vector
I initially used a `SmallVector<>` for `UseListOrder::Shuffle`, which
was a silly choice. When I realized my error I quickly rolled a custom
data structure.
This commit simplifies it to a `std::vector<>`. Now that I've had a
chance to measure performance, this data structure isn't part of a
bottleneck, so the additional complexity is unnecessary.
This is part of PR5680.
llvm-svn: 214979
Chad Rosier [Wed, 6 Aug 2014 16:56:58 +0000 (16:56 +0000)]
[AArch64] Add a few isTarget* API to AArch64 Subtarget.
llvm-svn: 214977
NAKAMURA Takumi [Wed, 6 Aug 2014 16:53:13 +0000 (16:53 +0000)]
FormatTokenLexer: Avoid non-static member initializer.
llvm-svn: 214976
Chad Rosier [Wed, 6 Aug 2014 16:06:41 +0000 (16:06 +0000)]
Add test case omitted in r214974.
llvm-svn: 214975
Chad Rosier [Wed, 6 Aug 2014 16:05:02 +0000 (16:05 +0000)]
[AArch64] Fix OS ABI flag for aarch64-linux-gnu target.
For triple aarch64-linux-gnu we were incorrectly setting IRIX.
For triple aarch64 we are correctly setting SYSV.
Patch by Ana Pazos <apazos@codeaurora.org>.
llvm-svn: 214974
Sanjay Patel [Wed, 6 Aug 2014 15:58:15 +0000 (15:58 +0000)]
use register iterators that include self to reduce code duplication in CriticalAntiDepBreaker
This patch addresses 2 FIXME comments that I added to CriticalAntiDepBreaker while fixing PR20020.
Initialize an MCSubRegIterator and an MCRegAliasIterator to include the self reg.
Assuming that works as advertised, there should be functional difference with this patch, just less code.
Also, remove the associated asserts - we're setting those values just before, so the asserts don't do anything meaningful.
Differential Revision: http://reviews.llvm.org/D4566
llvm-svn: 214973
Robert Khasanov [Wed, 6 Aug 2014 15:40:34 +0000 (15:40 +0000)]
[AVX512] Added load/store instructions to Register2Memory opcode tables.
Added lowering tests for load/store.
Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>
llvm-svn: 214972
Dan Liew [Wed, 6 Aug 2014 14:37:00 +0000 (14:37 +0000)]
Fix missing favicon.ico warning (Sphinx 1.2.2). The comments next to
``html_favicon`` seem to conflict with [what it in the sphinx
docs](http://sphinx-doc.org/config.html#confval-html_favicon).
So I've copied the comments from there to conf.py and changed its
value appropriately to remove the missing favicon.ico warning.
llvm-svn: 214971
Manuel Klimek [Wed, 6 Aug 2014 14:21:59 +0000 (14:21 +0000)]
Remove unnecessary semicolon.
llvm-svn: 214970
Daniel Jasper [Wed, 6 Aug 2014 14:15:41 +0000 (14:15 +0000)]
clang-format: Correct SBPO_Always-behavior after function-like keywords
Before:
auto f (int x) -> decltype(x) { return sizeof(x); }
int g () noexcept(someCall ());
static_assert(sizeof(char) == 1, "Your compiler is broken");
After:
auto f (int x) -> decltype (x) { return sizeof (x); }
int g () noexcept (someCall ());
static_assert (sizeof (char) == 1, "Your compiler is broken");
This fixes llvm.org/PR20559.
Patch by Roman Kashitsyn, thank you!
llvm-svn: 214969
Dan Liew [Wed, 6 Aug 2014 14:11:47 +0000 (14:11 +0000)]
Fix sphinx warning.
llvm-svn: 214968
Dan Liew [Wed, 6 Aug 2014 13:49:33 +0000 (13:49 +0000)]
Fix sphinx warning.
llvm-svn: 214967
Daniel Jasper [Wed, 6 Aug 2014 13:40:26 +0000 (13:40 +0000)]
clang-format: Add special comments to disable formatting.
With this patch:
int ThisWillBeFormatted;
// clang-format off
int ThisWontBeFormatted;
// clang-format on
int Formatted;
This is for regions where a significantly nicer code layout can be found
knowing the content of the code.
This fixes llvm.org/PR20463.
llvm-svn: 214966
James Molloy [Wed, 6 Aug 2014 13:31:32 +0000 (13:31 +0000)]
[AArch64] Add a testcase for r214957.
llvm-svn: 214965
Daniel Jasper [Wed, 6 Aug 2014 13:14:58 +0000 (13:14 +0000)]
clang-format: Fix indentation in multi-line placement new.
Before:
auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
new (
aaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaa))
typename
aaaaaaaaaaaaaaaaaaaaaaaa();
After:
auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
new (
aaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaa))
typename
aaaaaaaaaaaaaaaaaaaaaaaa();
llvm-svn: 214964
James Molloy [Wed, 6 Aug 2014 12:56:19 +0000 (12:56 +0000)]
Add a new option -run-slp-after-loop-vectorization.
This swaps the order of the loop vectorizer and the SLP/BB vectorizers. It is disabled by default so we can do performance testing - ideally we want to change to having the loop vectorizer running first, and the SLP vectorizer using its leftovers instead of the other way around.
llvm-svn: 214963
Manuel Klimek [Wed, 6 Aug 2014 12:45:51 +0000 (12:45 +0000)]
Fix modelling of non-lifetime-extended temporary destructors in the analyzer.
1. Changes to the CFG:
When creating the CFG for temporary destructors, we create a structure
that mirrors the branch structure of the conditionally executed
temporary constructors in a full expression.
The branches we create use a CXXBindTemporaryExpr as terminator which
corresponds to the temporary constructor which must have been executed
to enter the destruction branch.
2. Changes to the Analyzer:
When we visit a CXXBindTemporaryExpr we mark the CXXBindTemporaryExpr as
executed in the state; when we reach a branch that contains the
corresponding CXXBindTemporaryExpr as terminator, we branch out
depending on whether the corresponding CXXBindTemporaryExpr was marked
as executed.
llvm-svn: 214962
Alexander Kornienko [Wed, 6 Aug 2014 11:49:10 +0000 (11:49 +0000)]
Rename ChecksFilter to GlobList, as there's nothing specific to checks in it.
Summary:
Rename ChecksFilter to GlobList, as there's nothing specific to checks in it.
It's a rather generic way to represent sets of strings (or patterns), so it may
be used for something else in ClangTidy. The new name would not look strange
when used to filter other entities.
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4806
llvm-svn: 214961
Ed Maste [Wed, 6 Aug 2014 11:43:54 +0000 (11:43 +0000)]
Add decorators for tests failing to build on the lab.llvm.org FreeBSD buildbot
llvm.org/pr20548
llvm-svn: 214960
Tim Northover [Wed, 6 Aug 2014 11:13:14 +0000 (11:13 +0000)]
ARM: do not generate BLX instructions on Cortex-M CPUs.
Particularly on MachO, we were generating "blx _dest" instructions on M-class
CPUs, which don't actually exist. They happen to get fixed up by the linker
into valid "bl _dest" instructions (which is why such a massive issue has
remained largely undetected), but we shouldn't rely on that.
llvm-svn: 214959
Tim Northover [Wed, 6 Aug 2014 11:13:06 +0000 (11:13 +0000)]
ARM-MachO: materialize callee address correctly on v4t.
llvm-svn: 214958
James Molloy [Wed, 6 Aug 2014 10:42:18 +0000 (10:42 +0000)]
[AArch64] Conditional selects are expensive on out-of-order cores.
Specifically Cortex-A57. This probably applies to Cyclone too but I haven't enabled it for that as I can't test it.
This gives ~4% improvement on SPEC 174.vpr, and ~1% in 471.omnetpp.
llvm-svn: 214957
Alexander Kornienko [Wed, 6 Aug 2014 10:17:55 +0000 (10:17 +0000)]
check_clang_tidy_fix.sh: added comments, use set -o errexit instead of '|| exit $?' on each command
llvm-svn: 214956
Viktor Kutuzov [Wed, 6 Aug 2014 10:16:52 +0000 (10:16 +0000)]
Segregate FreeBSD-specific parts from sanitizer_procmaps_linux.cc
Differential Revision: http://reviews.llvm.org/D4555
llvm-svn: 214955
Chandler Carruth [Wed, 6 Aug 2014 10:16:36 +0000 (10:16 +0000)]
[x86] Fix two independent miscompiles in the process of getting the same
test case to actually generate correct code.
The primary miscompile fixed here is that we weren't correctly handling
in-place elements in one half of a single-input v8i16 shuffle when
moving a dword of elements from that half to the other half. Some times,
we would clobber the in-place elements in forming the dword to move
across halves.
The fix to this involves forcibly marking the in-place inputs even when
there is no need to gather them into a dword, and to much more carefully
re-arrange the elements when grouping them into a dword to move across
halves. With these two changes we would generate correct shuffles for
the test case, but found another miscompile. There are also some random
perturbations of the generated shuffle pattern in SSE2. It looks like
a wash; more instructions in some cases fewer in others.
The second miscompile would corrupt the results into nonsense. This is
a buggy pattern in one of the added DAG combines. Mapping elements
through a PSHUFD when pairing redundant half-shuffles is *much* harder
than this code makes it out to be -- it requires reasoning about *all*
of where the input is used in the PSHUFD, not just one part of where it
is used. Plus, we can't combine a half shuffle *into* a PSHUFD but the
code didn't guard against it. I think this was just a bad idea and I've
just removed that aspect of the combine. No tests regress as
a consequence so seems OK.
llvm-svn: 214954
Chandler Carruth [Wed, 6 Aug 2014 10:16:33 +0000 (10:16 +0000)]
[x86] Switch to a formulation of a for loop that is much more obviously
not corrupting the mask by mutating it more times than intended. No
functionality changed (the results were non-overlapping so the old
version "worked" but was non-obvious).
llvm-svn: 214953
Benjamin Kramer [Wed, 6 Aug 2014 08:19:30 +0000 (08:19 +0000)]
[clang-tidy] forward arguments of the testing script to clang-tidy.
llvm-svn: 214952
Adam Nemet [Wed, 6 Aug 2014 07:13:12 +0000 (07:13 +0000)]
[X86] Fixes commit r214890 to match the posted patch
This was another fallout from my local rebase where something went wrong :(
llvm-svn: 214951
Simon Atanasyan [Wed, 6 Aug 2014 06:04:48 +0000 (06:04 +0000)]
[Driver] Add missed include header.
llvm-svn: 214950
Simon Atanasyan [Wed, 6 Aug 2014 05:44:47 +0000 (05:44 +0000)]
[Driver] Move information about toolchain specific include directories
from the common driver code to the corresponding `MultilibSet` declarations.
Now the `MultilibSet` can hold an optional callback function which is
responsible to return a set of include directories specific for the toolchain.
That allows to remove MIPS toolchain specific directories from
`Linux::AddClangSystemIncludeArgs` method and simplify adding new directories
in the future.
llvm-svn: 214949
Rui Ueyama [Wed, 6 Aug 2014 03:29:17 +0000 (03:29 +0000)]
[PECOFF] Exported symbols are dead-strip roots.
llvm-svn: 214948
David Majnemer [Wed, 6 Aug 2014 03:12:47 +0000 (03:12 +0000)]
MS ABI: Mangle lambdas which are given the same mangling number
It is possible for lambdas to get the same mangling number because they
may exist in different mangling contexts. To handle this correctly,
mangle the context into the name as well.
llvm-svn: 214947
Jim Ingham [Wed, 6 Aug 2014 01:49:59 +0000 (01:49 +0000)]
When stepping, handle the case where the step leaves us with
the same parent frame, but different current frame - e.g. when
you step past a tail call exit from a function. Apply the same
"avoid-no-debug" rules to this case as for a "step-in".
<rdar://problem/
16189225>
llvm-svn: 214946
Matt Arsenault [Wed, 6 Aug 2014 00:44:25 +0000 (00:44 +0000)]
Correct comment
llvm-svn: 214945
Peter Collingbourne [Wed, 6 Aug 2014 00:33:40 +0000 (00:33 +0000)]
[dfsan] Try not to create too many additional basic blocks in functions which
already have a large number of blocks. Works around a performance issue with
the greedy register allocator.
llvm-svn: 214944
Matt Arsenault [Wed, 6 Aug 2014 00:29:49 +0000 (00:29 +0000)]
R600: Increase nearby load scheduling threshold.
This partially fixes weird looking load scheduling
in memcpy test. The load clustering doesn't seem
particularly smart, but this method seems to be partially
deprecated so it might not be worth trying to fix.
llvm-svn: 214943
Matt Arsenault [Wed, 6 Aug 2014 00:29:43 +0000 (00:29 +0000)]
R600/SI: Implement areLoadsFromSameBasePtr
This currently has a noticable effect on the kernel argument loads.
LDS and global loads are more problematic, I think because of how copies
are currently inserted to ensure that the address is a VGPR.
llvm-svn: 214942
Jim Ingham [Wed, 6 Aug 2014 00:24:38 +0000 (00:24 +0000)]
Probably should initialize that new ivar while I'm at it...
llvm-svn: 214941
Quentin Colombet [Wed, 6 Aug 2014 00:22:39 +0000 (00:22 +0000)]
[X86][SchedModel] Fixed some wrong scheduling model found by code inspection.
Source: Agner Fog's Instruction tables.
Related to <rdar://problem/
15607571>
llvm-svn: 214940
David Blaikie [Wed, 6 Aug 2014 00:21:25 +0000 (00:21 +0000)]
DebugInfo: Assert that any CU for which debug_loc lists are emitted, has at least one range.
This was coming in weird debug info that had variables (and hence
debug_locs) but was in GMLT mode (because it was missing the 13th field
of the compile_unit metadata) so no ranges were constructed. We should
always have at least one range for any CU with a debug_loc in it -
because the range should cover the debug_loc.
The assertion just ensures that the "!= 1" range case inside the
subsequent loop doesn't get entered for the case where there are no
ranges at all, which should never reach here in the first place.
llvm-svn: 214939
Jim Ingham [Wed, 6 Aug 2014 00:10:12 +0000 (00:10 +0000)]
Add a variant of the CommandOverrideCallback that takes a
CommandReturnObject. Otherwise, all the overridden command
can do is say it overrode the command, not say what it did...
Also removed the duplicate definition of CommandOverrideCallback
from the private interfaces.
Now to figure out how to get this through the SB API's...
<rdar://problem/
17911629>
llvm-svn: 214938
David Blaikie [Tue, 5 Aug 2014 23:57:31 +0000 (23:57 +0000)]
DebugInfo: Fix a bunch of tests that, owing to their compile_unit metadata not including a 13th field, had some subtle behavior.
Without the 13th field, the "emission kind" field defaults to 0 (which
is not equal to either of the values of the emission kind enum (1 ==
full debug info, 2 == line tables only)).
In this particular instance, the comparison with "FullDebugInfo" was
done when adding elements to the ranges list - so for these test cases
no values were added to the ranges list.
This got weirder when emitting debug_loc entries as the addresses should
be relative to the range of the CU if the CU has only one range (the
reasonable assumption is that if we're emitting debug_loc lists for a CU
that CU has at least one range - but due to the above situation, it has
zero) so the ranges were emitted relative to the start of the section
rather than relative to the start of the CU's singular range.
Fix these tests by accounting for the difference in the description of
debug_loc entries (in some cases making the test ignorant to these
differences, in others adding the extra label difference expression,
etc) or the presence/absence of high/low_pc on the CU, and add the 13th
field to their CUs to enable proper "full debug info" emission here.
In a future commit I'll fix up a bunch of other test cases that are not
so rigorously depending on this behavior, but still doing similarly
weird things due to the missing 13th field.
llvm-svn: 214937
Matt Arsenault [Tue, 5 Aug 2014 23:53:20 +0000 (23:53 +0000)]
R600/SI: Add definitions for ds_read2st64_ / ds_write2st64_
llvm-svn: 214936
Rui Ueyama [Tue, 5 Aug 2014 23:43:21 +0000 (23:43 +0000)]
Remove trailing whitespaces
llvm-svn: 214935
JF Bastien [Tue, 5 Aug 2014 23:27:34 +0000 (23:27 +0000)]
Fix typos in comments and doc
Committing http://reviews.llvm.org/D4798 for Robin Morisset (morisset@google.com)
llvm-svn: 214934
David Blaikie [Tue, 5 Aug 2014 23:14:16 +0000 (23:14 +0000)]
DebugInfo: Move the reference to the CU from the location list entry to the list itself, since it is constant across an entire list.
This simplifies construction and usage while making the data structure
smaller. It was a holdover from the days when we didn't have a separate
DebugLocList and all we had was a flat list of DebugLocEntries.
llvm-svn: 214933
David Majnemer [Tue, 5 Aug 2014 22:43:45 +0000 (22:43 +0000)]
MS ABI: Mangle empty type parameter packs compatibly
The MS mangling scheme apparently has separate manglings for type and
non-type parameter packs when they are empty. Match template arguments
with parameters during mangling; check the parameter to see if it was
destined to hold type-ish things or nontype-ish things.
Differential Revision: http://reviews.llvm.org/D4792
llvm-svn: 214932
Reid Kleckner [Tue, 5 Aug 2014 22:39:07 +0000 (22:39 +0000)]
Fix Driver tests that I broke on Windows in r214924
llvm-svn: 214931
Eli Bendersky [Tue, 5 Aug 2014 22:27:50 +0000 (22:27 +0000)]
Expose the name mangling C API to Python bindings.
llvm-svn: 214930
Rafael Espindola [Tue, 5 Aug 2014 22:10:21 +0000 (22:10 +0000)]
Remove a virtual function from TargetMachine. NFC.
llvm-svn: 214929
Jonathan Roelofs [Tue, 5 Aug 2014 21:32:21 +0000 (21:32 +0000)]
Re-apply r214881: Fix return sequence on armv4 thumb
This reverts r214893, re-applying r214881 with the test case relaxed a bit to
satiate the build bots.
POP on armv4t cannot be used to change thumb state (unilke later non-m-class
architectures), therefore we need a different return sequence that uses 'bx'
instead:
POP {r3}
ADD sp, #offset
BX r3
This patch also fixes an issue where the return value in r3 would get clobbered
for functions that return 128 bits of data. In that case, we generate this
sequence instead:
MOV ip, r3
POP {r3}
ADD sp, #offset
MOV lr, r3
MOV r3, ip
BX lr
http://reviews.llvm.org/D4748
llvm-svn: 214928
Lang Hames [Tue, 5 Aug 2014 20:51:46 +0000 (20:51 +0000)]
[MCJIT] Make llvm-rtdyld check RuntimeDyld's error state when running in -verify
mode.
This will cause -verify mode to report failure when RuntimeDyld encounters an
internal error (e.g. overflows in relocation computations). Previously we had
let these errors slip past unreported.
llvm-svn: 214925
Reid Kleckner [Tue, 5 Aug 2014 20:49:12 +0000 (20:49 +0000)]
Make crash diagnostics on Windows the tiniest bit more useful
This escapes any backslashes in the executable path and fixes an issue
with a trailing quote when the main file name had to be quoted during
printing.
It's impossible to test this without putting backslashes or quotes into
the executable path, so I didn't add automated tests.
The crash diagnostics are still only useful if you're using bash on
Windows, though. This should probably be writing a batch file instead.
llvm-svn: 214924
Bill Schmidt [Tue, 5 Aug 2014 20:47:25 +0000 (20:47 +0000)]
[PowerPC] Swap arguments and adjust shift count for vsldoi on little endian
Commits r213915 and r214718 fix recognition of shuffle masks for vmrg*
and vpku*um instructions for a little-endian target, by swapping the
input arguments. The vsldoi instruction requires similar treatment,
and also needs its shift count adjusted for little endian.
Reviewed by Ulrich Weigand.
This is a bug fix candidate for release 3.5 (and hopefully the last of
those for PowerPC).
llvm-svn: 214923
Ed Maste [Tue, 5 Aug 2014 20:33:17 +0000 (20:33 +0000)]
Force trace on system() failure on FreeBSD while tracking down buildbot issues
llvm-svn: 214922
Sanjay Patel [Tue, 5 Aug 2014 20:16:35 +0000 (20:16 +0000)]
Improved test cases that were added with r214892.
1. Added ':' to CHECK-LABELs
2. Added more CHECKs
3. Added CHECK-NEXTs
4. Added verbose hex immediate comments to CHECKs
llvm-svn: 214921
Rafael Espindola [Tue, 5 Aug 2014 20:10:38 +0000 (20:10 +0000)]
Don't internalize all but main by default.
This is mostly a cleanup, but it changes a fairly old behavior.
Every "real" LTO user was already disabling the silly internalize pass
and creating the internalize pass itself. The difference with this
patch is for "opt -std-link-opts" and the C api.
Now to get a usable behavior out of opt one doesn't need the funny
looking command line:
opt -internalize -disable-internalize -internalize-public-api-list=foo,bar -std-link-opts
llvm-svn: 214919
Rafael Espindola [Tue, 5 Aug 2014 19:56:53 +0000 (19:56 +0000)]
Add a test showing the interaction of linker scripts and plugin.
In particular, the linker script is processed early enough for function g
to be internalized.
llvm-svn: 214916
Chandler Carruth [Tue, 5 Aug 2014 18:45:49 +0000 (18:45 +0000)]
[x86] Fix a crasher due to shuffles which cancel each other out and add
a test case.
We also miscompile this test case which is showing a serious flaw in the
single-input v8i16 shuffle code. I've left the specific instruction
checks FIXME-ed out until I can address the bug in the single-input
code, but I wanted to separate out a significant functionality change to
produce correct code from a very simple and targeted crasher fix.
The miscompile problem stems from keeping track of inputs by value
rather than by index. As a consequence of doing this, we can't reliably
update those inputs because they might swap and we can't detect this
without copying the mask.
The blend code now uses indices for the input lists and this seems
strictly better. It also should make it easier to sort things and do
other cleanups. I think the time has come to simplify The Great Lambda
here.
llvm-svn: 214914
Dmitry Vyukov [Tue, 5 Aug 2014 18:45:02 +0000 (18:45 +0000)]
tsan: allocate vector clocks using slab allocator
Vector clocks is the most actively allocated object in tsan runtime.
Current internal allocator is not scalable enough to handle allocation
of clocks in scalable way (too small caches). This changes transforms
clocks to 2-level array with 512-byte blocks. Since all blocks are of
the same size, it's possible to cache them more efficiently in per-thread caches.
llvm-svn: 214912
Fariborz Jahanian [Tue, 5 Aug 2014 18:37:48 +0000 (18:37 +0000)]
Introduce f[no-]max-unknown-pointer-align=[number] option
to instruct the code generator to not enforce a higher alignment
than the given number (of bytes) when accessing memory via an opaque
pointer or reference. Patch reviewed by John McCall (with post-commit
review pending). rdar://
16254558
llvm-svn: 214911
Anton Yartsev [Tue, 5 Aug 2014 18:26:05 +0000 (18:26 +0000)]
[Analyzer] fix for PR19102
Newly-created unconsumed instance is now assumed escaped if an invoked constructor has an argument of a pointer-to-record type.
llvm-svn: 214909
Duncan P. N. Exon Smith [Tue, 5 Aug 2014 18:22:58 +0000 (18:22 +0000)]
Remove dead code in condition
Whether or not it's appropriate, labels have been first-class types
since r51511.
llvm-svn: 214908
Arthur Marble [Tue, 5 Aug 2014 18:21:20 +0000 (18:21 +0000)]
Added f and m flags to be ignored. These will not display a warning. The revision
for this patch is here: http://reviews.llvm.org/D4570. This will help with the
rebuild of Debian with clang. Here is a link to the errors that Debian is
experiencing: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG
llvm-svn: 214907
Arthur Marble [Tue, 5 Aug 2014 18:13:48 +0000 (18:13 +0000)]
Added flags that should be ignored for compatibility. These flags will display
a warning. Revision for this patch is here: http://reviews.llvm.org/D4565. This
patch will help with the rebuild of Debian with clang and many other projects
that wish to use clang. Here is a link to the errors that Debian is experiencing:
http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG
llvm-svn: 214906
NAKAMURA Takumi [Tue, 5 Aug 2014 18:04:15 +0000 (18:04 +0000)]
X86CodeEmitter.cpp: Add SEH_Epilogue to ignored list for legacy JIT, corresponding to r214775.
llvm-svn: 214905
Chad Rosier [Tue, 5 Aug 2014 17:58:54 +0000 (17:58 +0000)]
[PR19983] SBPO_Always not covering all the cases.
Patch by "Roman Kashitsyn" <romankashicin@gmail.com>.
Phabricator revision: http://reviews.llvm.org/D4788
llvm-svn: 214904
Adam Nemet [Tue, 5 Aug 2014 17:58:49 +0000 (17:58 +0000)]
[X86] Improve comments for r214888
A rebase somehow ate my comments. This restores them.
llvm-svn: 214903
Matt Arsenault [Tue, 5 Aug 2014 17:52:40 +0000 (17:52 +0000)]
R600/SI: Use register class instead of list of registers
I'm not sure if this has any consequence or not.
llvm-svn: 214902
Matt Arsenault [Tue, 5 Aug 2014 17:52:37 +0000 (17:52 +0000)]
R600/SI: Add exec_lo and exec_hi subregisters.
This allows accessing an SReg subregister with a normal subregister
index, instead of getting a machine verifier error.
Also be sure to include all of these subregisters in SReg_32.
This fixes inferring SGPR instead of SReg when finding a
super register class.
llvm-svn: 214901
Ed Maste [Tue, 5 Aug 2014 17:50:04 +0000 (17:50 +0000)]
On FreeBSD skip test that produces bogus output
The test produces lines that start with "<word>: " which confuses the
buildbot log parser. Disable the test until either the test is fixed
or the buildbot can deal with the undesired output.
llvm.org/pr20545
llvm-svn: 214900