Reid Kleckner [Tue, 17 Mar 2015 21:51:43 +0000 (21:51 +0000)]
MS ABI: Build C++ default argument exprs for exported template classes
This was an omission from r232229.
llvm-svn: 232554
Krzysztof Parzyszek [Tue, 17 Mar 2015 21:47:16 +0000 (21:47 +0000)]
Selection DAG preprocessing on Hexagon
Simplify: (or (select c x 0) z) -> (select c (or x z) z)
(or (select c 0 y) z) -> (select c z (or y z))
llvm-svn: 232553
Siva Chandra [Tue, 17 Mar 2015 21:43:01 +0000 (21:43 +0000)]
Enable TestDataFormatterStdIterator with GCC.
Summary:
This test now passes for Clang and GCC. I do not know why it was
disabled for GCC with link to a bug which should not have had an
effect on this test.
Test Plan: dotest.py -C gcc -p TestDataFormatterStdIterator
Reviewers: vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8396
llvm-svn: 232552
Yaron Keren [Tue, 17 Mar 2015 21:33:38 +0000 (21:33 +0000)]
Remove StringRef->std::string->StringRef conversions.
As StringInit::get() accepts StringRef there is no need
to construct a std::string out of the StringRef input and
then construct a new StringRef from the std::string.
llvm-svn: 232551
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 21:32:46 +0000 (21:32 +0000)]
DebugInfo: Drop fake DW_TAG_expression
Break MDExpression off of DebugNode (inherit directly from `MDNode`) and
drop the fake `DW_TAG_expression` tag in the process.
AFAICT, there's no real functionality change here. The tag was
originally used by `DIDescriptor::isExpression()` to discriminate
between `MDNode`s, but in the new hierarchy we don't need that.
Fixes PR22780.
llvm-svn: 232550
Rafael Espindola [Tue, 17 Mar 2015 21:30:21 +0000 (21:30 +0000)]
Emit the offset directly instead of creating a dummy expression.
We were creating an expression of the form (S+C)-S which is just C.
Patch by Frédéric Riss. I just added the testcase.
llvm-svn: 232549
Siva Chandra [Tue, 17 Mar 2015 21:23:17 +0000 (21:23 +0000)]
Implement formatter for std::vector<bool, ...> of libstdc++ in Python.
Summary:
The existing formatter in C++ has been removed as it was not being used.
The associated test TestDataFormatterStdVBool.py has been enabled for
both Clang and GCC on Linux.
Test Plan: dotest.py -p TestDataFormatterStdVBool
Reviewers: vharron, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8390
llvm-svn: 232548
Kevin Enderby [Tue, 17 Mar 2015 21:07:39 +0000 (21:07 +0000)]
Add the option, -no-leading-addr llvm-objdump used with -macho and
-disassemble or -section to not print the leading addresses on each line.
llvm-svn: 232547
Sean Silva [Tue, 17 Mar 2015 21:02:37 +0000 (21:02 +0000)]
[docs] Fix some malformed links.
Patch by Stanislav Manilov!
llvm-svn: 232546
David Majnemer [Tue, 17 Mar 2015 20:41:11 +0000 (20:41 +0000)]
Revert "COFF: Let globals with private linkage reside in their own section"
This reverts commit r232539. This was committed accidently.
llvm-svn: 232543
Benjamin Kramer [Tue, 17 Mar 2015 20:40:24 +0000 (20:40 +0000)]
Internalize BitcodeReader. Not used outside of BitcodeReader.cpp.
NFC.
llvm-svn: 232542
David Majnemer [Tue, 17 Mar 2015 20:40:21 +0000 (20:40 +0000)]
Revert "Address review comments"
This reverts commit r232540. This was committed accidently.
llvm-svn: 232541
David Majnemer [Tue, 17 Mar 2015 20:39:40 +0000 (20:39 +0000)]
Address review comments
llvm-svn: 232540
David Majnemer [Tue, 17 Mar 2015 20:39:25 +0000 (20:39 +0000)]
COFF: Let globals with private linkage reside in their own section
Summary:
COFF COMDATs (for selection kinds other than 'select any') require at
least one non-section symbol in the symbol table.
Satisfy this by morally enhancing the linkage from private to internal.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8374
llvm-svn: 232539
David Majnemer [Tue, 17 Mar 2015 20:35:05 +0000 (20:35 +0000)]
MS ABI: Emit HandlerMap entries for C++ catch
The HandlerMap describes, to the runtime, what sort of catches surround
the try. In principle, this structure has to be emitted by the backend
because only it knows the layout of the stack (the runtime needs to know
where on the stack the destination of a copy lives, etc.) but there is
some C++ specific information that the backend can't reason about.
Stick this information in special LLVM globals with the relevant
"const", "volatile", "reference" info mangled into the name.
llvm-svn: 232538
David Majnemer [Tue, 17 Mar 2015 20:35:00 +0000 (20:35 +0000)]
WIP
llvm-svn: 232537
Michael Zolotukhin [Tue, 17 Mar 2015 20:31:56 +0000 (20:31 +0000)]
Try to fix a test broken by one of my previous commits.
llvm-svn: 232536
Rafael Espindola [Tue, 17 Mar 2015 20:07:06 +0000 (20:07 +0000)]
Centralize the handling of unique ids for temporary labels.
Before this patch code wanting to create temporary labels for a given entity
(function, cu, exception range, etc) had to keep its own counter to have stable
symbol names.
createTempSymbol would still add a suffix to make sure a new symbol was always
returned, but it kept a single counter. Because of that, if we were to use
just createTempSymbol("cu_begin"), the label could change from cu_begin42 to
cu_begin43 because some other code started using temporary labels.
Simplify this by just keeping one counter per prefix and removing the various
specialized counters.
llvm-svn: 232535
Zachary Turner [Tue, 17 Mar 2015 20:04:04 +0000 (20:04 +0000)]
Remove ScriptInterpreterObject.
This removes ScriptInterpreterObject from the codebase completely.
Places that used to rely on ScriptInterpreterObject now use
StructuredData::Object and its derived classes. To support this,
a new type of StructuredData object is introduced, called
StructuredData::Generic, which stores a void*. Internally within
the python library, StructuredPythonObject subclasses this
StructuredData::Generic class so that it can addref and decref
the python object on construction and destruction.
Additionally, all of the classes in PythonDataObjects.h such
as PythonList, PythonDictionary, etc now provide a method to
create an instance of the corresponding StructuredData type. For
example, there is PythonDictionary::CreateStructuredDictionary.
To eliminate dependencies on PythonDataObjects for external
callers, all ScriptInterpreter methods now return only
StructuredData classes
The rest of the changes in this CL are focused on fixing up
users of PythonDataObjects classes to use the new StructuredData
classes.
llvm-svn: 232534
Michael Zolotukhin [Tue, 17 Mar 2015 20:03:11 +0000 (20:03 +0000)]
Add fveclib option.
Review: http://reviews.llvm.org/D8097
llvm-svn: 232533
Benjamin Kramer [Tue, 17 Mar 2015 19:53:41 +0000 (19:53 +0000)]
Internalize llvm::AssemblyWriter. It's not used outside of AsmWriter.cpp.
This is an artifact of an implementation detail of DebugIR that has been
long refactored away. NFC.
llvm-svn: 232532
Michael Zolotukhin [Tue, 17 Mar 2015 19:50:55 +0000 (19:50 +0000)]
TLI: Add addVectorizableFunctionsFromVecLib.
Also, add several entries to vectorizable functions table, and
corresponding tests. The table isn't complete, it'll be populated later.
Review: http://reviews.llvm.org/D8131
llvm-svn: 232531
Michael Zolotukhin [Tue, 17 Mar 2015 19:46:50 +0000 (19:46 +0000)]
LoopVectorize: teach loop vectorizer to vectorize calls.
The tests would be committed in a commit for http://reviews.llvm.org/D8131
Review: http://reviews.llvm.org/D8095
llvm-svn: 232530
Eric Fiselier [Tue, 17 Mar 2015 19:45:21 +0000 (19:45 +0000)]
Let libc++'s LIT configuration setup our linker paths and env.
llvm-svn: 232529
Michael Zolotukhin [Tue, 17 Mar 2015 19:37:28 +0000 (19:37 +0000)]
TTI: Honour cost model for estimating cost of vector-intrinsic and calls.
Review: http://reviews.llvm.org/D8096
llvm-svn: 232528
Eric Fiselier [Tue, 17 Mar 2015 19:37:26 +0000 (19:37 +0000)]
Fix DYNLD_LIBRARY_PATH to include the ABI path if specified
llvm-svn: 232527
Jonathan Roelofs [Tue, 17 Mar 2015 19:32:24 +0000 (19:32 +0000)]
Fix failed test command repro printing for *.pass.cpp tests
Before we were printing out the compile command twice, which isn't that useful.
Thanks EricWF for the report!
llvm-svn: 232526
Samuel Antao [Tue, 17 Mar 2015 19:31:19 +0000 (19:31 +0000)]
Add assertion to detect invalid registers in the PowerPC MC instruction lowering.
We have observed that noreg was being generated due to a bug in FastIsel and was not being detected during emission. It happens that in the Asm emission there is an assertion that detects this in getRegisterName() from the tbl-generated file PPCGenAsmWriter.inc. However, when emitting an Obj file, invalid registers can be emitted given that no check are made in getBinaryCodeFromInstr() from PPCGenMCCodeEmitter.inc. In order to cover all cases this adds an assertion for reg operands in LowerPPCMachineInstrToMCInst.
llvm-svn: 232525
Michael Zolotukhin [Tue, 17 Mar 2015 19:26:23 +0000 (19:26 +0000)]
TTI: Add getCallInstrCost.
Review: http://reviews.llvm.org/D8094
llvm-svn: 232524
Michael Zolotukhin [Tue, 17 Mar 2015 19:22:30 +0000 (19:22 +0000)]
TLI: Add interface for querying whether a function is vectorizable.
Review: http://reviews.llvm.org/D8093
llvm-svn: 232523
Michael Zolotukhin [Tue, 17 Mar 2015 19:17:18 +0000 (19:17 +0000)]
LoopVectorizer: Add TargetTransformInfo.
Review: http://reviews.llvm.org/D8092
llvm-svn: 232522
Kostya Serebryany [Tue, 17 Mar 2015 19:13:23 +0000 (19:13 +0000)]
[asan] remove redundant ifndefs. NFC
llvm-svn: 232521
Reid Kleckner [Tue, 17 Mar 2015 19:00:50 +0000 (19:00 +0000)]
MS ABI: Delay default constructor closure checking until the outermost class scope ends
Previously, we would error out on this code because the default argument
wasn't parsed until the end of Outer:
struct __declspec(dllexport) Outer {
struct __declspec(dllexport) Inner {
Inner(void *p = 0);
};
};
Now we do the checking on the closing brace of Outer instead of Inner.
llvm-svn: 232519
Eric Fiselier [Tue, 17 Mar 2015 18:58:14 +0000 (18:58 +0000)]
add option to tell LIT where to find the libc++ library when built out of tree
llvm-svn: 232518
Yaron Keren [Tue, 17 Mar 2015 18:55:30 +0000 (18:55 +0000)]
Remove LookupSymbol(StringRef) and optimize LookupSymbol(Twine).
Same as MakeArgString in r232465, keep only LookupSymbol(Twine)
while making sure it handles the StringRef like cases efficiently
using twine::toStringRef.
llvm-svn: 232517
Ed Schouten [Tue, 17 Mar 2015 18:40:58 +0000 (18:40 +0000)]
Clean up iostream creation in preparation for conditionalizing streams.
Interleave the code for narrow and wide character streams. This makes it
more obvious that the two pieces of code are identical. Furthermore, it
makes it easier to conditionally compile support for certain streams, as
less #ifdef blocks are needed.
Differential Revision: http://reviews.llvm.org/D8342
Reviewed by: marshall
llvm-svn: 232516
Eric Fiselier [Tue, 17 Mar 2015 18:28:14 +0000 (18:28 +0000)]
[libcxx] Add <experimental/tuple> header for LFTS.
Summary:
This patch adds the `<experimental/tuple>` header (almost) as specified in the latest draft of the library fundamentals TS.
The main changes in this patch are:
1. Added variable template `tuple_size_v`
2. Added function `apply(Func &&, Tuple &&)`.
3. Changed `__invoke` to be `_LIBCPP_CONSTEXPR_AFTER_CXX11`.
The `apply(...)` implementation uses `__invoke` to invoke the given function. `__invoke` already provides the required functionality. Using `__invoke` also allows `apply` to be used on pointers to member function/objects as an extension. In order to facilitate this `__invoke` has to be marked `constexpr`.
Test Plan:
Each new feature was tested.
The test cases for `tuple_size_v` are as follows:
1. tuple_size_v.pass.cpp
- Check `tuple_size_v` on cv qualified tuples, pairs and arrays.
2. tuple_size_v.fail.cpp
- Test on reference type.
3. tuple_size_v_2.fail.cpp
- Test on non-tuple
4. tuple_size_v_3.fail.cpp
- Test on pointer type.
The test cases for tuple.apply are as follows:
1. arg_type.pass.cpp
- Ensure that ref/pointer/cv qualified types are properly passed.
2. constexpr_types.pass.cpp
- Ensure constexpr evaluation of apply is possible for `tuple` and `pair`.
3. extended_types.pass.cpp
- Test apply on function types permitted by extension.
4. large_arity.pass.cpp
- Test that apply can evaluated on tuples and arrays with large sizes.
5. ref_qualifiers.pass.cpp
- Test that apply respects ref qualified functions.
6. return_type.pass.cpp
- Test that apply returns the proper type.
7. types.pass.cpp
- Test apply on function types as required by LFTS.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4512
llvm-svn: 232515
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 18:23:38 +0000 (18:23 +0000)]
Fix debug info now that the verifier is on
`i32 0` isn't a valid type, and `!{i32 0}` isn't an empty array.
Needed because of r232505.
llvm-svn: 232514
Richard Barton [Tue, 17 Mar 2015 18:20:47 +0000 (18:20 +0000)]
[ARM] Fix offset calculation in ARMBaseRegisterInfo::needsFrameBaseReg
The input offset to needsFrameBaseReg is a negative value below the top of the
stack frame, but when converting to a positive offset from the bottom of the
stack frame this value was negated, causing the final offset to be too large
by twice the input offset's magnitude. Fix that by not negating the offset.
Patch by John Brawn
Differential Revision: http://reviews.llvm.org/D8316
llvm-svn: 232513
Dmitri Gribenko [Tue, 17 Mar 2015 18:03:42 +0000 (18:03 +0000)]
Comment parsing: move a diagnostic to the correct group.
Based on a patch by LE GARREC Vincent.
llvm-svn: 232511
Michael Liao [Tue, 17 Mar 2015 18:03:10 +0000 (18:03 +0000)]
[SwitchLowering] Remove incoming values in the reverse order
- To prevent invalidating *successive* indices.
llvm-svn: 232510
Adam Nemet [Tue, 17 Mar 2015 17:51:58 +0000 (17:51 +0000)]
[docs] Fix copy-and-paste bug in def-use example
This appeared when the example was converted to use range-based loop in
r207755.
llvm-svn: 232509
David Blaikie [Tue, 17 Mar 2015 17:48:24 +0000 (17:48 +0000)]
Fix GCC -Wparentheses warning (& reformat now that the precedence is fixed)
Benign warning (clang deliberately suppresses this case) but does
regularly produce bad formatting, so it's nice to fix/reformat.
llvm-svn: 232508
David Blaikie [Tue, 17 Mar 2015 17:37:17 +0000 (17:37 +0000)]
Fix the clang -Werror build by suppressing -Wextended-offsetof
llvm-svn: 232507
Dmitry Vyukov [Tue, 17 Mar 2015 17:30:41 +0000 (17:30 +0000)]
asan: remove left-over code from submitted in rev r232501
__sanitizer_cov_hint is part of a different functionality
and was not intended to be submitted.
llvm-svn: 232506
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 17:28:41 +0000 (17:28 +0000)]
Verifier: Set --verify-debug-info=true by default
r186634 started verifying debug info, and r194986 disabled it by default
because it was too expensive to run the checks on every function (since
most of the graph was reachable from each function).
r206300 moved the checks to module-level to make it cheaper, but there
was already quite a bit of testcase bitrot (and the verifier would only
print `<badref>`) so I guess no one had time to turn it back on.
This does just that. Upgrade scripts this past autumn and winter
probably fixed some of the bitrot, and this weekend I fixed the verifier
output (r232275, r232417, r232418) and thusly the remaining failing
testcases (r232290, r232415).
This is part of PR22777.
llvm-svn: 232505
David Blaikie [Tue, 17 Mar 2015 17:26:41 +0000 (17:26 +0000)]
Add missing overrides to fix the clang -Werror build (-Winconsistent-missing-override)
llvm-svn: 232504
Kevin Enderby [Tue, 17 Mar 2015 17:10:57 +0000 (17:10 +0000)]
Add the option, -dis-symname to llvm-objdump used with -macho and
-disassemble to disassemble just one symbol’s instructions.
llvm-svn: 232503
Dmitry Vyukov [Tue, 17 Mar 2015 16:59:19 +0000 (16:59 +0000)]
asan: optimization experiments
The experiments can be used to evaluate potential optimizations that remove
instrumentation (assess false negatives). Instead of completely removing
some instrumentation, you set Exp to a non-zero value (mask of optimization
experiments that want to remove instrumentation of this instruction).
If Exp is non-zero, this pass will emit special calls into runtime
(e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls
make runtime terminate the program in a special way (with a different
exit status). Then you run the new compiler on a buggy corpus, collect
the special terminations (ideally, you don't see them at all -- no false
negatives) and make the decision on the optimization.
The exact reaction to experiments in runtime is not implemented in this patch.
It will be defined and implemented in a subsequent patch.
http://reviews.llvm.org/D8198
llvm-svn: 232502
Dmitry Vyukov [Tue, 17 Mar 2015 16:59:11 +0000 (16:59 +0000)]
asan: optimization experiments
The experiments can be used to evaluate potential optimizations that remove
instrumentation (assess false negatives). Instead of completely removing
some instrumentation, you set Exp to a non-zero value (mask of optimization
experiments that want to remove instrumentation of this instruction).
If Exp is non-zero, this pass will emit special calls into runtime
(e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls
make runtime terminate the program in a special way (with a different
exit status). Then you run the new compiler on a buggy corpus, collect
the special terminations (ideally, you don't see them at all -- no false
negatives) and make the decision on the optimization.
The exact reaction to experiments in runtime is not implemented in this patch.
It will be defined and implemented in a subsequent patch.
http://reviews.llvm.org/D8198
llvm-svn: 232501
Ilia K [Tue, 17 Mar 2015 16:54:52 +0000 (16:54 +0000)]
Fix broadcasters for interpreter and process:
# Fix CommandInterpreter.Broadcaster name (it should be the same as CommandInterpreter::GetStaticBroadcasterClass())
# Prevent the same error in Process.Broadcaster
# Fix SBCommandInterpreter::GetBroadcasterClass (it should call CommandInterpreter::GetStaticBroadcasterClass(), was Communication::GetStaticBroadcasterClass())
llvm-svn: 232500
Timur Iskhodzhanov [Tue, 17 Mar 2015 16:50:59 +0000 (16:50 +0000)]
[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed to BindIoCompletionCallback
This also simplifies how we handle QueueUserWorkItem
llvm-svn: 232499
Reid Kleckner [Tue, 17 Mar 2015 16:50:20 +0000 (16:50 +0000)]
Use an underlying enum type of unsigned to silence a -Wmicrosoft warning about being unable to put (unsigned)-1 into the default underyling type of int
llvm-svn: 232498
Shankar Easwaran [Tue, 17 Mar 2015 16:40:14 +0000 (16:40 +0000)]
[ELF][ARM] Place gotSymbol in an anonymous namespace
Address comments from Espindola.
llvm-svn: 232497
Hans Wennborg [Tue, 17 Mar 2015 16:38:58 +0000 (16:38 +0000)]
Revert r232454 and r232456: "Fix the LLVM type used when lowering initializer list reference temporaries to global variables."
This caused PR22940.
llvm-svn: 232496
Daniel Sanders [Tue, 17 Mar 2015 16:16:14 +0000 (16:16 +0000)]
[systemz] Distinguish the 'Q', 'R', 'S', and 'T' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: uweigand
Reviewed By: uweigand
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8251
llvm-svn: 232495
Shankar Easwaran [Tue, 17 Mar 2015 15:44:20 +0000 (15:44 +0000)]
[Object][ELF] ELFEntityIterator : Add operators for random access
Fix review comments from djasper.
llvm-svn: 232494
Marshall Clow [Tue, 17 Mar 2015 15:30:22 +0000 (15:30 +0000)]
Define a new macro: _LIBCPP_HAS_NO_VARIABLE_TEMPLATES and use it. No functionality change.
llvm-svn: 232493
Eric Fiselier [Tue, 17 Mar 2015 15:08:03 +0000 (15:08 +0000)]
[libcxx] Move tuple_size and tuple_element overloads for pair and array out of !defined(_LIBCPP_HAS_NO_VARIADICS) block.
Summary:
There is no reason to guard `tuple_size`, `tuple_element` and `get<I>(...)` for pair and array inside of `<__tuple>` so that they are only available when we have variadic templates.
This requires there be redundant declarations and definitions. It also makes it easy to get things wrong.
For example the following code should compile (and does in c++11).
```
#define _LIBCPP_HAS_NO_VARIADICS
#include <array>
int main()
{
static_assert((std::tuple_size<std::array<int, 10> volatile>::value == 10), "");
}
```
This patch lifts the non-variadic parts of `tuple_size`, `tuple_types`, and `get<I>(...)` to the top of `<__tuple>` where they don't require variadic templates. This patch also removes `<__tuple_03>` because there is no longer a need for it.
Reviewers: danalbert, K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7774
llvm-svn: 232492
Tamas Berghammer [Tue, 17 Mar 2015 15:05:31 +0000 (15:05 +0000)]
Change reinterpret_casts to static_casts in NativeProcessLinux
llvm-svn: 232491
Tamas Berghammer [Tue, 17 Mar 2015 15:05:28 +0000 (15:05 +0000)]
Remove obsolate rdar comment from TestSetValues.py
llvm-svn: 232490
Tamas Berghammer [Tue, 17 Mar 2015 15:05:25 +0000 (15:05 +0000)]
Fix signature of ProcessInfo::SetArchitecture
llvm-svn: 232489
Tamas Berghammer [Tue, 17 Mar 2015 15:05:23 +0000 (15:05 +0000)]
Remove unused handler registreation from GDBRemoteCommunicationServerLLGS
llvm-svn: 232488
Rafael Espindola [Tue, 17 Mar 2015 15:02:17 +0000 (15:02 +0000)]
Remove the error prone GetTempSymbol API.
llvm-svn: 232487
Samuel Antao [Tue, 17 Mar 2015 15:00:57 +0000 (15:00 +0000)]
Fix R0 use in PowerPC VSX store for FastIsel.
The VSX stores are sometimes generated with a undefined index register, causing %noreg to be used and R0 to be emitted later on. The semantics of the VSX store (e.g. stdsdx) requires R0 to be used as base if we want zero to be used in the computation of the effective address instead of the content of R0. This patch checks if no index register was generated and forces R0 to be used as base address.
llvm-svn: 232486
Rafael Espindola [Tue, 17 Mar 2015 14:58:47 +0000 (14:58 +0000)]
Convert the last 4 users of GetTempSymbol to createTempSymbol.
Despite using the same name these are unrelated.
llvm-svn: 232485
Rafael Espindola [Tue, 17 Mar 2015 14:54:43 +0000 (14:54 +0000)]
Switch two simple uses of GetTempSymbol to createTempSymbol.
llvm-svn: 232484
Rafael Espindola [Tue, 17 Mar 2015 14:50:32 +0000 (14:50 +0000)]
Use createTempSymbol to avoid collisions instead of an ad hoc method.
llvm-svn: 232483
Tamas Berghammer [Tue, 17 Mar 2015 14:40:57 +0000 (14:40 +0000)]
Report stopped by trace if none of the watchpoint was hit
Some linux kernel reports a watchpoint hit after single stepping even
when no watchpoint was hit. This CL looks for a watchpoint which was hit
and reports a stop by trace if it haven't found any.
Differential revision: http://reviews.llvm.org/D8081
llvm-svn: 232482
Rafael Espindola [Tue, 17 Mar 2015 14:38:30 +0000 (14:38 +0000)]
Make EmitFunctionHeader a private helper.
llvm-svn: 232481
Daniel Sanders [Tue, 17 Mar 2015 14:37:39 +0000 (14:37 +0000)]
Re-commit: [hexagon] Distinguish the 'o', 'v', and 'm' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: kparzysz, adasgupt
Reviewed By: kparzysz, adasgupt
Subscribers: colinl, llvm-commits
Differential Revision: http://reviews.llvm.org/D8204
Like for the PowerPC target, I've had to add 'i' to the constraint mappings in
order to pass 2007-12-17-InvokeAsm.ll. It's not clear why 'i' has historically
been treated as a memory constraint.
llvm-svn: 232480
Rafael Espindola [Tue, 17 Mar 2015 14:34:42 +0000 (14:34 +0000)]
Call EmitFunctionHeader just before EmitFunctionBody.
This avoids switching to .AMDGPU.config and back and hardcoding the
section it switches back to.
llvm-svn: 232479
Rafael Espindola [Tue, 17 Mar 2015 14:22:31 +0000 (14:22 +0000)]
Convert the easy cases of GetTempSymbol to createTempSymbol.
In these cases no code was depending on GetTempSymbol finding an existing
symbol.
llvm-svn: 232478
Hafiz Abid Qadeer [Tue, 17 Mar 2015 14:12:03 +0000 (14:12 +0000)]
Cleanup the MIReadMe.txt after the recent changes in lldb-mi.
This commit removed the redundant and out of date stuff from the file.
llvm-svn: 232477
Rafael Espindola [Tue, 17 Mar 2015 14:06:24 +0000 (14:06 +0000)]
Don't duplicate comment from the .h. NFC.
llvm-svn: 232476
Rafael Espindola [Tue, 17 Mar 2015 13:57:48 +0000 (13:57 +0000)]
Move the EH symbol to the asm printer and use it for the SJLJ case too.
llvm-svn: 232475
Denis Protivensky [Tue, 17 Mar 2015 13:51:32 +0000 (13:51 +0000)]
[ARM] Read initial addend for REL32 and PREL31 relocs
llvm-svn: 232474
Toma Tabacu [Tue, 17 Mar 2015 13:17:44 +0000 (13:17 +0000)]
[mips] [IAS] Add support for the XOR $reg,imm pseudo-instruction.
Summary:
This adds a MipsInstAlias which expands to XORi $reg,$reg,imm. For example, "xor $6, 0x3A" should be expanded to "xori $6, $6, 58".
This should work for all MIPS ISAs.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8284
llvm-svn: 232473
Rafael Espindola [Tue, 17 Mar 2015 13:09:01 +0000 (13:09 +0000)]
Remove dead code. NFC.
llvm-svn: 232472
Rafael Espindola [Tue, 17 Mar 2015 12:54:04 +0000 (12:54 +0000)]
Replace a use of GetTempSymbol with createTempSymbol.
This is cleaner and avoids a crash in a corner case.
llvm-svn: 232471
Daniel Sanders [Tue, 17 Mar 2015 12:00:04 +0000 (12:00 +0000)]
Fix r232466 by adding 'i' to the mappings for inline assembly memory constraints.
It's not completely clear why 'i' has historically been treated as a memory
constraint. According to the documentation, it represents a constant immediate.
llvm-svn: 232470
Renato Golin [Tue, 17 Mar 2015 11:55:43 +0000 (11:55 +0000)]
[ARM] Add support for ARMV6K subtarget (Clang)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the Clang
side of the changes.
ARMV6 family LLVM implementation.
+-------------------------------------+
| ARMV6 |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+ have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+ be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2) | The two processors also use
+-------------------------------------+ different encoding for them.
Patch by Vinicius Tinti.
llvm-svn: 232469
Renato Golin [Tue, 17 Mar 2015 11:55:28 +0000 (11:55 +0000)]
[ARM] Add support for ARMV6K subtarget (LLVM)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the LLVM
side of the changes.
ARMV6 family LLVM implementation.
+-------------------------------------+
| ARMV6 |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+ have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+ be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2) | The two processors also use
+-------------------------------------+ different encoding for them.
Patch by Vinicius Tinti.
llvm-svn: 232468
Mohit K. Bhakkad [Tue, 17 Mar 2015 11:43:56 +0000 (11:43 +0000)]
[MIPS] - Register Context for MIPS64
Patch by Jaydeep Patil
Summery:
1. Add MIPS variants by parsing e_flags of the ELF
2. Create RegisterInfoInterface and RegisterContext for MIPS64 and MIPS64EL
Reviewers: clayborg
Subscribers: tberghammer, bhushan, mohit.bhakkad, sagar
Differential Revision: http://reviews.llvm.org/D8166
llvm-svn: 232467
Daniel Sanders [Tue, 17 Mar 2015 11:09:13 +0000 (11:09 +0000)]
[ppc] Distinguish the 'es', 'o', 'm', 'Q', 'Z', and 'Zy' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
Of these, 'es', and 'Q' do not have backend tests but are accepted by
clang.
No functional change intended. Depends on D8173.
Reviewers: hfinkel
Reviewed By: hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8213
llvm-svn: 232466
Yaron Keren [Tue, 17 Mar 2015 09:51:17 +0000 (09:51 +0000)]
Teach Twine to support SmallString.
Enable removing .str() member calls for these frequent cases.
http://reviews.llvm.org/D6372
llvm-svn: 232465
Denis Protivensky [Tue, 17 Mar 2015 09:18:24 +0000 (09:18 +0000)]
[ARM] Implement relocations: R_ARM_REL32, R_ARM_THM_JUMP11, R_ARM_PREL31
Test case for every relocation is added.
Differential Revision: http://reviews.llvm.org/D7565
llvm-svn: 232464
David Blaikie [Tue, 17 Mar 2015 05:49:45 +0000 (05:49 +0000)]
Recommit simplification first attempted in r232309 (fixed a bit in r232312, with fixes in r232314)
Messed it up because I didn't realize there were two different iterators
here (& clearly didn't build any of this... ) - still seems easier to
just use the injected class name than introduce a self typedef.
llvm-svn: 232462
David Blaikie [Tue, 17 Mar 2015 03:32:21 +0000 (03:32 +0000)]
Fix the clang -Werror build & make the unit tests link under Linux
The order of libraries passed to the linker didn't work under linux (you
need the llvm libraries first, then the lldb libraries). I modelled this
after clang's setup here. Seemed simple enough to just be consistent.
llvm-svn: 232461
Shankar Easwaran [Tue, 17 Mar 2015 03:29:32 +0000 (03:29 +0000)]
[ELF] Use parallel_for_each for writing.
This changes improves performance of lld, when self-hosting lld, when compared
with the bfd linker. BFD linker on average takes 8 seconds in elapsed time.
lld takes 3 seconds elapased time average. Without this change, lld takes ~5
seconds average. The runtime comparisons were done on a release build and
measured by running linking thrice.
lld self-host without the change
----------------------------------
real 0m3.196s
user 0m4.580s
sys 0m0.832s
lld self-host with lld
-----------------------
user 0m3.024s
user 0m3.252s
sys 0m0.796s
time taken to build lld with bfd
--------------------------------
real 0m8.419s
user 0m7.748s
sys 0m0.632s
llvm-svn: 232460
Ahmed Bougacha [Tue, 17 Mar 2015 03:23:09 +0000 (03:23 +0000)]
[AArch64] Use intermediate step for concat_vectors of illegal truncs.
Optimize concat_vectors of truncated vectors, where the intermediate
type is illegal, to avoid said illegality, e.g.,
(v4i16 (concat_vectors (v2i16 (truncate (v2i64))),
(v2i16 (truncate (v2i64)))))
->
(v4i16 (truncate (v4i32 (concat_vectors (v2i32 (truncate (v2i64))),
(v2i32 (truncate (v2i64)))))))
This isn't really target-specific, and, as such, would best go in the
DAGCombiner. However, ISD::TRUNCATE legality isn't keyed on both input
and result type, so we might generate worse code when we don't know
better. On AArch64 we know it's fine for v2i64->v4i16 and v4i32->v8i8.
rdar://
20022387
llvm-svn: 232459
Ahmed Bougacha [Tue, 17 Mar 2015 03:19:18 +0000 (03:19 +0000)]
[AArch64] Factor out N->getOperand()s; format. NFCI.
llvm-svn: 232458
Richard Smith [Tue, 17 Mar 2015 02:36:51 +0000 (02:36 +0000)]
Fix ODR violations caused by putting anonymous namespaces in header files (and
then using the symbols from those anonymous namespaces from outside the
anonymous namespace).
This was "detected" by causing the modules selfhost to fail in some cases.
The corresponding Clang bug was fixed in r232455.
llvm-svn: 232457
Nick Lewycky [Tue, 17 Mar 2015 02:31:46 +0000 (02:31 +0000)]
Fix test in release mode.
llvm-svn: 232456
Richard Smith [Tue, 17 Mar 2015 02:23:11 +0000 (02:23 +0000)]
[modules] Fix bug where an anonymous namespace could cause the containing
namespace to not merge properly.
We have an invariant here: after a declaration reads its canonical declaration,
it can assume the canonical declaration is fully merged. This invariant can be
violated if deserializing some declaration triggers the deserialization of a
later declaration, because that later declaration can in turn deserialize a
redeclaration of that first declaration before it is fully merged.
The anonymous namespace for a namespace gets stored with the first declaration
of that namespace, which may be before its parent namespace, so defer loading
it until after we've finished merging the surrounding namespace.
llvm-svn: 232455
Nick Lewycky [Tue, 17 Mar 2015 02:21:31 +0000 (02:21 +0000)]
Fix the LLVM type used when lowering initializer list reference temporaries to global variables.
llvm-svn: 232454
Shankar Easwaran [Tue, 17 Mar 2015 02:12:35 +0000 (02:12 +0000)]
[Object][ELF] ELFEntityIterator : Add operators for random access
Add operators add/subtract for random access. This is essentially used by
lld.
llvm-svn: 232453
Sanjoy Das [Tue, 17 Mar 2015 01:40:24 +0000 (01:40 +0000)]
[IRCE] Re-commit tests cases.
Re-commit the test cases added in r232444. These now use
-irce-print-changed-loops and -irce-print-range-checks so they run
correctly on a without asserts build of llvm.
llvm-svn: 232452
Sanjoy Das [Tue, 17 Mar 2015 01:40:22 +0000 (01:40 +0000)]
[IRCE] Add a -irce-print-range-checks option.
-irce-print-range-checks prints out the set of range checks recognized
by IRCE.
llvm-svn: 232451
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 01:19:01 +0000 (01:19 +0000)]
CodeGenCXX: Test that linetables work with variadic virtual thunks
Add a frontend test for PR22929, which was fixed by LLVM r232449.
Besides the crash test, check that the `!dbg` attachment is sane since
its presence was the trigger.
llvm-svn: 232450