Alexey Samsonov [Tue, 3 Mar 2015 22:15:32 +0000 (22:15 +0000)]
[Sanitizers] Use uint64_t for bitmask of enabled sanitizers.
The total number of sanitizers and sanitizer groups will soon
reach 32.
llvm-svn: 231149
Eric Christopher [Tue, 3 Mar 2015 22:03:03 +0000 (22:03 +0000)]
Fix a problem where the TwoAddressInstructionPass which generate redundant register moves in a loop.
From:
int M, total;
void foo() {
int i;
for (i = 0; i < M; i++) {
total = total + i / 2;
}
}
This is the kernel loop:
.LBB0_2: # %for.body
=>This Inner Loop Header: Depth=1
movl %edx, %esi
movl %ecx, %edx
shrl $31, %edx
addl %ecx, %edx
sarl %edx
addl %esi, %edx
incl %ecx
cmpl %eax, %ecx
jl .LBB0_2
--------------------------
The first mov insn "movl %edx, %esi" could be removed if we change "addl %esi, %edx" to "addl %edx, %esi".
The IR before TwoAddressInstructionPass is:
BB#2: derived from LLVM BB %for.body
Predecessors according to CFG: BB#1 BB#2
%vreg3<def> = COPY %vreg12<kill>; GR32:%vreg3,%vreg12
%vreg2<def> = COPY %vreg11<kill>; GR32:%vreg2,%vreg11
%vreg7<def,tied1> = SHR32ri %vreg3<tied0>, 31, %EFLAGS<imp-def,dead>; GR32:%vreg7,%vreg3
%vreg8<def,tied1> = ADD32rr %vreg3<tied0>, %vreg7<kill>, %EFLAGS<imp-def,dead>; GR32:%vreg8,%vreg3,%vreg7
%vreg9<def,tied1> = SAR32r1 %vreg8<kill,tied0>, %EFLAGS<imp-def,dead>; GR32:%vreg9,%vreg8
%vreg4<def,tied1> = ADD32rr %vreg9<kill,tied0>, %vreg2<kill>, %EFLAGS<imp-def,dead>; GR32:%vreg4,%vreg9,%vreg2
%vreg5<def,tied1> = INC64_32r %vreg3<kill,tied0>, %EFLAGS<imp-def,dead>; GR32:%vreg5,%vreg3
CMP32rr %vreg5, %vreg0, %EFLAGS<imp-def>; GR32:%vreg5,%vreg0
%vreg11<def> = COPY %vreg4; GR32:%vreg11,%vreg4
%vreg12<def> = COPY %vreg5<kill>; GR32:%vreg12,%vreg5
JL_4 <BB#2>, %EFLAGS<imp-use,kill>
Now TwoAddressInstructionPass will choose vreg9 to be tied with vreg4. However, it doesn't see that there is copy from vreg4 to vreg11 and another copy from vreg11 to vreg2 inside the loop body. To remove those copies, it is necessary to choose vreg2 to be tied with vreg4 instead of vreg9. This code pattern commonly appears when there is reduction operation in a loop.
So check for a reversed copy chain and if we encounter one then we can commute the add instruction so we can avoid a copy.
Patch by Wei Mi.
http://reviews.llvm.org/D7806
llvm-svn: 231148
Mehdi Amini [Tue, 3 Mar 2015 22:01:13 +0000 (22:01 +0000)]
Remove getDataLayout() from Instruction/GlobalValue/BasicBlock/Function
Summary:
This does not conceptually belongs here. Instead provide a shortcut
getModule() that provides access to the DataLayout.
Reviewers: chandlerc, echristo
Reviewed By: echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8027
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231147
David Blaikie [Tue, 3 Mar 2015 21:56:11 +0000 (21:56 +0000)]
Fix the build broken in r231142
I removed the copy ctor, thinking that'd be the end of it - these
iterators should be perfectly assignable even from disjoint ranges (as
any iterator would be) - exkcept that the member was const.
Unconstify it.
llvm-svn: 231146
Zachary Turner [Tue, 3 Mar 2015 21:51:25 +0000 (21:51 +0000)]
Further reduce the header footprint of Process.h
No functional change here, only deletes unnecessary headers
and moves one function's body from the .h file to the .cpp.
llvm-svn: 231145
David Blaikie [Tue, 3 Mar 2015 21:50:47 +0000 (21:50 +0000)]
DAGCombiner::LoadedSlice: Remove explicit copy ctor in favor of the Rule of Zero
This way, the copy assignment operator can be used without hitting the
deprecated case in C++11.
llvm-svn: 231144
David Blaikie [Tue, 3 Mar 2015 21:49:07 +0000 (21:49 +0000)]
RewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the Rule of Zero
The assertion was just checking a class invariant that's pretty easy to
verify by inspection (no mutating operations, and the two non-copy ctors
already ensure the state is maintained) so remove the explicit copy ctor
in favor of the default, thus allowing the use of the default copy
assignment operator without hitting the C++11 deprecation here.
llvm-svn: 231143
David Blaikie [Tue, 3 Mar 2015 21:45:54 +0000 (21:45 +0000)]
CFG::SuccessorIterator: Remove explicit copy assignment, as the default is fine
There's no reason to disallow assigning an iterator from one range to an
iterator that previously iterated over a disjoint range. This then
follows the Rule of Zero, allowing implicit copy construction to be used
without hitting the case that's deprecated in C++11.
llvm-svn: 231142
David Blaikie [Tue, 3 Mar 2015 21:44:06 +0000 (21:44 +0000)]
CFG::SuccessorIterator::SuccessorProxy:: Expliictly default copy construction as it is deprecated in C++11 in the presence of explicit copy assignment.
See r231099 for similar issues & details in [Small]BitVector.
llvm-svn: 231141
Nadav Rotem [Tue, 3 Mar 2015 21:39:02 +0000 (21:39 +0000)]
Teach ComputeNumSignBits about signed divisions.
http://reviews.llvm.org/D8028
rdar://
20023136
llvm-svn: 231140
Rui Ueyama [Tue, 3 Mar 2015 21:38:38 +0000 (21:38 +0000)]
Fix -Wcast-qual warning.
llvm-svn: 231139
David Blaikie [Tue, 3 Mar 2015 21:26:17 +0000 (21:26 +0000)]
Remove the explicit SDNodeIterator::operator= in favor of the implicit default
There doesn't seem to be any need to assert that iterator assignment is
between iterators over the same node - if you want to reuse an iterator
variable to iterate another node, that's perfectly acceptable. Just
don't mix comparisons between iterators into disjoint sequences, as
usual.
llvm-svn: 231138
Aaron Watry [Tue, 3 Mar 2015 21:25:08 +0000 (21:25 +0000)]
Move mix from math to common
It has been part of the common functions since 1.0
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 231137
David Blaikie [Tue, 3 Mar 2015 21:18:16 +0000 (21:18 +0000)]
Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default"
Accidentally committed a few more of these cleanup changes than
intended. Still breaking these out & tidying them up.
This reverts commit r231135.
llvm-svn: 231136
David Blaikie [Tue, 3 Mar 2015 21:17:08 +0000 (21:17 +0000)]
Remove the explicit SDNodeIterator::operator= in favor of the implicit default
There doesn't seem to be any need to assert that iterator assignment is
between iterators over the same node - if you want to reuse an iterator
variable to iterate another node, that's perfectly acceptable. Just
don't mix comparisons between iterators into disjoint sequences, as
usual.
llvm-svn: 231135
David Blaikie [Tue, 3 Mar 2015 21:17:00 +0000 (21:17 +0000)]
Remove the explicit SUnitIterator::operator= as the default is just fine
There doesn't seem to be any need to assert that iterator assignment is
between iterators over the same node - if you want to reuse an iterator
variable to iterate another node, that's perfectly acceptable. Just
don't mix comparisons between iterators into disjoint sequences, as
usual.
llvm-svn: 231134
David Blaikie [Tue, 3 Mar 2015 21:16:56 +0000 (21:16 +0000)]
Remove LatencyPriorityQueue::dump because it relies on an implicit copy ctor which is deprecated in C++11 (due to the presence of a user-declare dtor in the base class)
This type could be made copyable (= default a protected copy ctor in the
base class, and preferably make the derived class final to avoid risks
of providing a slicing copy operation to further derived classes) but it
seemed easier to avoid that complexity for a dump function that I assume
(by symmetry with ResourcePriorityQueue's dump, which was actively
buggy) not often used.
llvm-svn: 231133
Rafael Espindola [Tue, 3 Mar 2015 21:11:13 +0000 (21:11 +0000)]
Correctly handle -pass-remarks in the gold plugin.
llvm-svn: 231132
Zachary Turner [Tue, 3 Mar 2015 21:05:17 +0000 (21:05 +0000)]
Don't #include ClangPersistentVariables.h from Process.h
Nothing from this header file was even being referenced in
Process.h anyway, so it was a completely unnecessary include.
llvm-svn: 231131
Paul Robinson [Tue, 3 Mar 2015 21:01:27 +0000 (21:01 +0000)]
[X86][ELF] Correct relocation for DWARF TLS references
Previously we had only Linux using DTPOFF for these; all X86 ELF
targets should. Fixes a side issue mentioned in PR21077.
Differential Revision: http://reviews.llvm.org/D8011
llvm-svn: 231130
Sanjay Patel [Tue, 3 Mar 2015 20:58:35 +0000 (20:58 +0000)]
remove enum value names from comments; NFC
llvm-svn: 231129
Eric Christopher [Tue, 3 Mar 2015 20:54:29 +0000 (20:54 +0000)]
Add support for SunOS function/data sections and associated
section gc.
Patch by Bill Rushmore.
llvm-svn: 231128
David Blaikie [Tue, 3 Mar 2015 20:49:08 +0000 (20:49 +0000)]
unique_ptrify ResourcePriorityQueue::ResourceModel
llvm-svn: 231127
David Blaikie [Tue, 3 Mar 2015 20:49:05 +0000 (20:49 +0000)]
Remove ResourcePriorityQueue::dump as it relies on copying a non-copyable type which would result in a double-delete
llvm-svn: 231126
Sanjoy Das [Tue, 3 Mar 2015 20:46:45 +0000 (20:46 +0000)]
[ADT] fail-fast iterators for DenseMap
This patch was landed in r231035 and reverted because it was buggy.
This is fixed version of the same change.
Summary:
This patch is an attempt at making `DenseMapIterator`s "fail-fast".
Fail-fast iterators that have been invalidated due to insertion into
the host `DenseMap` deterministically trip an assert (in debug mode)
on access, instead of non-deterministically hitting memory corruption
issues.
Reviewers: dexonsmith, dberlin, ruiu, chandlerc
Reviewed By: chandlerc
Subscribers: yaron.keren, chandlerc, llvm-commits
Differential Revision: http://reviews.llvm.org/D7931
llvm-svn: 231125
Sumanth Gundapaneni [Tue, 3 Mar 2015 20:43:12 +0000 (20:43 +0000)]
Fix program name in "clang -help"
With out this patch,
"clang -help" prints "USAGE: clang-3 [options] <inputs>".
It should either print
USAGE: clang [options] <inputs>
or
USAGE: clang-3.7 [options] <inputs>
With this patch, on Linux, it prints
USAGE: clang-3.7 [options] <inputs>
On Windows, it prints
USAGE: clang.exe [options] <inputs>
llvm-svn: 231124
Sanjay Patel [Tue, 3 Mar 2015 20:41:27 +0000 (20:41 +0000)]
use bool operator shortcut; NFC
llvm-svn: 231123
Andrew Kaylor [Tue, 3 Mar 2015 20:22:09 +0000 (20:22 +0000)]
Fixing problem with field initialization order
llvm-svn: 231122
Adrian Prantl [Tue, 3 Mar 2015 20:12:52 +0000 (20:12 +0000)]
Fix PR22762. When emitting a DWARF expression check whether this is the
frame register before checking if there is a DWARF register number for it.
Thanks to H.J. Lu for diagnosing this and providing the testcase!
llvm-svn: 231121
Chaoren Lin [Tue, 3 Mar 2015 20:11:48 +0000 (20:11 +0000)]
[TestGlobalVariables] LD_LIBRARY_PATH should be process working directory.
Summary:
The inferior can load the library now, but the remote test is still failing
because of a module loading problem in LLDB.
Reviewers: ovyalov, sivachandra, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8038
llvm-svn: 231120
Eric Fiselier [Tue, 3 Mar 2015 20:10:01 +0000 (20:10 +0000)]
Allow declaration of map and multimap iterator with incomplete mapped type. Patch from eugenis
llvm-svn: 231119
Bill Seurer [Tue, 3 Mar 2015 20:08:43 +0000 (20:08 +0000)]
[PowerPC]Activate "vector bool long long" (and alternate spellings) as a valid type for Altivec support for Power.
There are two test case updates for very basic testing. While I was editing cxx-altivec.cpp I also updated it to better match some other changes in altivec.c.
Note: "vector bool long" was not also added because its use is considered deprecated.
http://reviews.llvm.org/D7235
llvm-svn: 231118
Andrew Kaylor [Tue, 3 Mar 2015 20:00:16 +0000 (20:00 +0000)]
Outline cleanup handlers for native Windows C++ exception handling
Differential Revision: http://reviews.llvm.org/D7865
llvm-svn: 231117
Kit Barton [Tue, 3 Mar 2015 19:55:45 +0000 (19:55 +0000)]
Add the following 64-bit vector integer arithmetic instructions added in POWER8:
vaddudm
vsubudm
vmulesw
vmulosw
vmuleuw
vmulouw
vmuluwm
vmaxsd
vmaxud
vminsd
vminud
vcmpequd
vcmpequd.
vcmpgtsd
vcmpgtsd.
vcmpgtud
vcmpgtud.
vrld
vsld
vsrd
vsrad
Phabricator review: http://reviews.llvm.org/D7959
llvm-svn: 231115
David Blaikie [Tue, 3 Mar 2015 19:53:04 +0000 (19:53 +0000)]
DeltaAlgorithm: Provide protected default copy ctor for use by test derived class.
Without this, use of this copy ctor is deprecated in C++11 due to the
presence of a user-declared dtor.
Marking the class final is just a little extra security that there are
no further derived classes that may then end up using the intermediate
base class's copy assignment operator and cause slicing to occur.
I didn't bother marking the other (non-test) base class final, since it
has reference members so it won't have any implicit assignment operators
anyway. Open to ideas on that, though.
We probably want a warning about use of a slicing assignment operator,
then I wouldn't worry so much about marking the class as final.
llvm-svn: 231114
David Blaikie [Tue, 3 Mar 2015 19:53:02 +0000 (19:53 +0000)]
Remove explicit no-op dtor in favor of the implicit dtor so as not to disable/deprecate the copy operations.
llvm-svn: 231113
David Blaikie [Tue, 3 Mar 2015 19:52:59 +0000 (19:52 +0000)]
Remove no-op dtor so that use of the implicit copy ctor/assignment operator are not deprecated.
llvm-svn: 231112
Eric Christopher [Tue, 3 Mar 2015 19:47:14 +0000 (19:47 +0000)]
Add a comment above findRepresentativeClass explaining why it's
where it is so that future generations can understand.
llvm-svn: 231111
David Blaikie [Tue, 3 Mar 2015 19:29:14 +0000 (19:29 +0000)]
Remove explicit copy ctor in favor of the implicit one so that the use of the copy assignment operator is not deprecated.
llvm-svn: 231110
David Blaikie [Tue, 3 Mar 2015 19:29:13 +0000 (19:29 +0000)]
Remove explicit copy assignment operator in favor of the implicit/default to avoid disabling/deprecating the implicit copy ctor.
llvm-svn: 231109
David Blaikie [Tue, 3 Mar 2015 19:29:11 +0000 (19:29 +0000)]
Remove explicit copy ctor in favor of the default so as not to disable/deprecate the implicit copy assignment operator
llvm-svn: 231108
Zachary Turner [Tue, 3 Mar 2015 19:23:09 +0000 (19:23 +0000)]
Reduce header footprint of Target.h
This continues the effort to reduce header footprint and improve
build speed by removing clang and other unnecessary headers
from Target.h. In one case, some headers were included solely
for the purpose of declaring a nested class in Target, which was
not needed by anybody outside the class. In this case the
definition and implementation of the nested class were isolated
in the .cpp file so the header could be removed.
llvm-svn: 231107
Reid Kleckner [Tue, 3 Mar 2015 19:21:04 +0000 (19:21 +0000)]
Split catch IRgen into ItaniumCXXABI and MicrosoftCXXABI
Use llvm.eh.begincatch for Microsoft-style catches.
This moves lots of CGException code into ItaniumCXXABI. Sorry for the
blame pain.
llvm-svn: 231105
David Blaikie [Tue, 3 Mar 2015 19:20:18 +0000 (19:20 +0000)]
unique_ptrify FullDependenceAnalysis::DV
Making this type a little harder to abuse (see workaround relating to
use of the implicit copy ctor in the prior commit)
llvm-svn: 231104
David Blaikie [Tue, 3 Mar 2015 19:20:16 +0000 (19:20 +0000)]
FullDependenceAnalysis: Avoid using the (deprecated in C++11) copy ctor
llvm-svn: 231103
David Blaikie [Tue, 3 Mar 2015 19:20:13 +0000 (19:20 +0000)]
Remove some explicit copy assignment operators is favor of implicit ones, as their presence makes the use of the implicit copy ctor deprecated in C++11
llvm-svn: 231102
Chaoren Lin [Tue, 3 Mar 2015 19:10:39 +0000 (19:10 +0000)]
Fix TestQuoting on remote targets.
Summary: Needed to transfer stdout.txt to host before reading.
Reviewers: ovyalov, clayborg
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D8023
llvm-svn: 231101
Dario Domizioli [Tue, 3 Mar 2015 18:40:53 +0000 (18:40 +0000)]
Fix PR22750: non-determinism causes assertion failure in DWARF generation
The cause of the issue is the interaction of two factors:
1) When generating a DW_TAG_imported_declaration DIE which imports another
imported declaration, the code in AsmPrinter/DwarfCompileUnit.cpp
asserts that the second imported declaration must already have a DIE.
2) There is a non-determinism in the order in which imported declarations
within the same scope are processed.
Because of the non-determinism (2), it is possible that an imported
declaration is processed before another one it depends on, breaking the
assumption in (1).
The source of the non-determinism is that the imported declaration
DIDescriptors are sorted by scope in DwarfDebug::beginModule(); however that
sort is not a stable_sort, therefore the order of the declarations within
the same scope is not preserved. The attached patch changes the std::sort to
a std::stable_sort and it fixes the problem.
Test omitted due to it being non-deterministic and depending on the
implementation of std::sort.
llvm-svn: 231100
David Blaikie [Tue, 3 Mar 2015 18:39:00 +0000 (18:39 +0000)]
[Small]BitVector::reference: Explicitly default copy construction as it is deprecated in C++11 in the presence of explicit copy assignment.
I tried making these private & friended to the BitVector, but that
didn't work - there's one use of BitVector::reference in Clang that
actually copies it into a local variable & uses it from there, rather
than just using the result of op[] in a temporary expression.
Whether or not this is desired is debatable (we could just fix that one
use in Clang) & it's not clear which way the C++ standard falls on this
for std::bitset's reference type (it has the same bug at least in
libstdc++, but Clang's -Wdeprecated doesn't flag it, because it's in a
standard header)
While it was only BitVector::reference's copy ctor that was referenced
by user code, I made SmallBitVector::reference's copy ctor public too,
for consistency.
llvm-svn: 231099
Reid Kleckner [Tue, 3 Mar 2015 18:36:38 +0000 (18:36 +0000)]
Disable the right RUN line
llvm-svn: 231098
Zachary Turner [Tue, 3 Mar 2015 18:34:26 +0000 (18:34 +0000)]
Don't #include ClangASTContext.h from Module.h
This is part of a larger effort to reduce header file footprints.
Combined, these patches reduce the build time of LLDB locally by
over 30%. However, they touch many files and make many changes,
so will be submitted in small incremental pieces.
Reviewed By: Greg Clayton
Differential Revision: http://reviews.llvm.org/D8022
llvm-svn: 231097
Filipe Cabecinhas [Tue, 3 Mar 2015 18:32:38 +0000 (18:32 +0000)]
Disabled the other test from r231086 (like in r231087) since it also had problems
llvm-svn: 231096
David Blaikie [Tue, 3 Mar 2015 18:29:27 +0000 (18:29 +0000)]
Avoid explicitly declaring the copy assignment operator, as this unnecessarily makes the copy ctor deprecated in C++11
llvm-svn: 231095
David Blaikie [Tue, 3 Mar 2015 18:29:25 +0000 (18:29 +0000)]
Twine: Explicitly default the copy ctor as it's otherwise deprecated in C++11 by the presence of a user-declared copy assignment operator.
llvm-svn: 231094
David Blaikie [Tue, 3 Mar 2015 18:29:23 +0000 (18:29 +0000)]
DenseMapIterator: Avoid explicitly declaring the copy ctor as this makes the copy assignment operator deprecated in C++11
llvm-svn: 231093
Dan Albert [Tue, 3 Mar 2015 18:28:38 +0000 (18:28 +0000)]
Support __attribute__((availability)) on Android.
Reviewers: srhines
Reviewed By: srhines
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7929
llvm-svn: 231092
Dan Albert [Tue, 3 Mar 2015 18:24:57 +0000 (18:24 +0000)]
Don't force -pie for Android.
Summary:
There is no -no-pie flag that can override this, so making it default
to being on for Android means it is no longer possible to create
non-PIE executables on Android. While current versions of Android
support (and the most recent requires) PIE, ICS and earlier versions
of Android cannot run PIE executables, so this needs to be optional.
Reviewers: srhines
Reviewed By: srhines
Subscribers: thakis, volkalexey, cfe-commits
Differential Revision: http://reviews.llvm.org/D8015
llvm-svn: 231091
Dan Albert [Tue, 3 Mar 2015 18:23:51 +0000 (18:23 +0000)]
Make Triple::getOSVersion make sense for Android.
Reviewers: srhines
Reviewed By: srhines
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7928
llvm-svn: 231090
David Blaikie [Tue, 3 Mar 2015 18:17:26 +0000 (18:17 +0000)]
Update Polly tests for the great metadata schema change
llvm-svn: 231089
Eric Christopher [Tue, 3 Mar 2015 17:54:39 +0000 (17:54 +0000)]
80-column fixup.
llvm-svn: 231088
Reid Kleckner [Tue, 3 Mar 2015 17:51:26 +0000 (17:51 +0000)]
Disable a Clang test until the begincatch change lands
llvm-svn: 231087
Reid Kleckner [Tue, 3 Mar 2015 17:41:09 +0000 (17:41 +0000)]
Make llvm.eh.begincatch use an outparam
Ultimately, __CxxFrameHandler3 needs us to put a stack offset in a
table, and it will take responsibility for copying the exception object
into that slot. Modelling the exception object as an SSA value returned
by begincatch isn't going to work in general, so make it use an output
parameter.
Reviewers: andrew.w.kaylor
Differential Revision: http://reviews.llvm.org/D7920
llvm-svn: 231086
Chad Rosier [Tue, 3 Mar 2015 17:31:01 +0000 (17:31 +0000)]
[AArch64] When combining constant mul of -3, prefer (sub x, (shl x, N)).
This change only effects codegen when the constant is -3.
llvm-svn: 231085
Hans Wennborg [Tue, 3 Mar 2015 17:30:50 +0000 (17:30 +0000)]
Migrate clang-format-vs plugin project to VS 2013
The plugin still works fine in versions starting from 2010,
but this was needed to make the project _build_ in VS 2013, which
is the blessed version for building LLVM projects these days.
http://reviews.llvm.org/D8021
llvm-svn: 231084
Duncan P. N. Exon Smith [Tue, 3 Mar 2015 17:25:55 +0000 (17:25 +0000)]
DebugInfo: Move new hierarchy into place (clang)
Update testcases for LLVM change in r231082 to use the new debug info
hierarchy.
llvm-svn: 231083
Duncan P. N. Exon Smith [Tue, 3 Mar 2015 17:24:31 +0000 (17:24 +0000)]
DebugInfo: Move new hierarchy into place
Move the specialized metadata nodes for the new debug info hierarchy
into place, finishing off PR22464. I've done bootstraps (and all that)
and I'm confident this commit is NFC as far as DWARF output is
concerned. Let me know if I'm wrong :).
The code changes are fairly mechanical:
- Bumped the "Debug Info Version".
- `DIBuilder` now creates the appropriate subclass of `MDNode`.
- Subclasses of DIDescriptor now expect to hold their "MD"
counterparts (e.g., `DIBasicType` expects `MDBasicType`).
- Deleted a ton of dead code in `AsmWriter.cpp` and `DebugInfo.cpp`
for printing comments.
- Big update to LangRef to describe the nodes in the new hierarchy.
Feel free to make it better.
Testcase changes are enormous. There's an accompanying clang commit on
its way.
If you have out-of-tree debug info testcases, I just broke your build.
- `upgrade-specialized-nodes.sh` is attached to PR22564. I used it to
update all the IR testcases.
- Unfortunately I failed to find way to script the updates to CHECK
lines, so I updated all of these by hand. This was fairly painful,
since the old CHECKs are difficult to reason about. That's one of
the benefits of the new hierarchy.
This work isn't quite finished, BTW. The `DIDescriptor` subclasses are
almost empty wrappers, but not quite: they still have loose casting
checks (see the `RETURN_FROM_RAW()` macro). Once they're completely
gutted, I'll rename the "MD" classes to "DI" and kill the wrappers. I
also expect to make a few schema changes now that it's easier to reason
about everything.
llvm-svn: 231082
Juergen Ributzka [Tue, 3 Mar 2015 17:22:53 +0000 (17:22 +0000)]
Lower _mm256_broadcastsi128_si256 directly to a vector shuffle.
Originally we were using the same GCC builtins to lower this AVX2 vector
intrinsic. Instead we will now lower it directly to a vector shuffle.
This will not only allow LLVM to generate better code, but it will also allow us
to remove the GCC intrinsics.
Reviewed by Andrea
This is related to rdar://problem/
18742778.
llvm-svn: 231081
Fariborz Jahanian [Tue, 3 Mar 2015 17:15:38 +0000 (17:15 +0000)]
[SDK modernizer]. Patch fixes driver's lack of
recognition of mernizer's -objcmt-migrate-property-dot-syntax
option with a new test in test/Driver. rdar://
19994452
llvm-svn: 231080
Duncan P. N. Exon Smith [Tue, 3 Mar 2015 16:45:34 +0000 (16:45 +0000)]
IR: Add missing API to specialized metadata nodes
Add the final bits of API that `DIBuilder` needs before the new nodes
can be moved into place.
- Add `MDType::clone()` and `MDType::setFlags()` to support
`DIBuilder::createTypeWithFlags()`.
- Add `MDBasicType::get()` overload that just requires a tag and a
name, as a convenience for `DIBuilder::createUnspecifiedType()`.
- Add `MDLocalVariable::withInline()` and
`MDLocalVariable::withoutInline()` to support
`llvm::createInlinedVariable()` and
`llvm::cleanseInlinedVariable()`.
(Somehow these got lost inside the "move into place" patch I'm about to
commit -- better to commit separately!)
llvm-svn: 231079
Andrey Churbanov [Tue, 3 Mar 2015 16:19:57 +0000 (16:19 +0000)]
Cleanup provided by Carlo Bertolli
llvm-svn: 231078
Marshall Clow [Tue, 3 Mar 2015 16:15:26 +0000 (16:15 +0000)]
Add better tests for ctype<char>::classic_table
llvm-svn: 231077
Eric Fiselier [Tue, 3 Mar 2015 15:59:51 +0000 (15:59 +0000)]
[libcxx] Add support for linking libc++ against a static ABI library.
Summary:
This patch add the CMake option `LIBCXX_ENABLE_STATIC_ABI_LIBRARY` which, when enabled, will link libc++ against the static version of the ABI library.
Reviewers: mclow.lists, jroelofs, danalbert
Reviewed By: danalbert
Subscribers: compnerd, cfe-commits
Differential Revision: http://reviews.llvm.org/D8017
llvm-svn: 231076
Eric Fiselier [Tue, 3 Mar 2015 15:59:09 +0000 (15:59 +0000)]
[libcxxabi] Build both static and shared versions of libc++abi by default.
Summary:
This patch builds both static and shared versions of libc++abi by default. It adds/repurposes the following cmake options:
* `LIBCXXABI_ENABLE_SHARED`: Enable/disable building the shared library. (Previously using `OFF` would build the static library instead)
* `LIBCXXABI_ENABLE_STATIC`: Enable/disable building the static library.
This patch also re-purposes the CMake target `cxxabi` to be a meta-target for `cxxabi_shared` and `cxxabi_static`. This could potentially break other builds that depend on `cxxabi` being a library target. We will need to apply a patch to libc++'s CMake before committing this change.
Running the tests is still only supported when the shared version is built. Support for running the tests against the static library will come in another patch.
Reviewers: jroelofs, mclow.lists, danalbert, compnerd
Reviewed By: danalbert, compnerd
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8013
llvm-svn: 231075
NAKAMURA Takumi [Tue, 3 Mar 2015 15:54:48 +0000 (15:54 +0000)]
Make llvm/test/Object/archive-format.test CRLF-tolerant.
llvm-svn: 231074
Michael Kuperstein [Tue, 3 Mar 2015 15:47:02 +0000 (15:47 +0000)]
[X86][Haswell][SchedModel] Fix patterns for scalar FMA3 variants.
llvm-svn: 231073
Ilia K [Tue, 3 Mar 2015 15:32:39 +0000 (15:32 +0000)]
Fix and enable some tests on Linux (MI)
Summary:
Fix and enable some lldb-mi tests on Linux:
Fixed:
# MiExecInterpreterTestCase.test_lldbmi_thread_step_in
# MiExecTestCase.test_lldbmi_exec_step
# MiStackTestCase.test_lldbmi_stack_info_frame tests.
Also I enabled the following tests on Linux:
# MiExecTestCase.test_lldbmi_exec_step_instruction
# MiSignalTestCase.test_lldbmi_stopped_when_interrupted
All test pass on OS X and Linux.
Reviewers: abidh, vharron, clayborg
Reviewed By: clayborg
Subscribers: vharron, lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7987
llvm-svn: 231072
Ilia K [Tue, 3 Mar 2015 15:17:44 +0000 (15:17 +0000)]
Improve MiStackTestCase tests
Summary:
Improve MiStackTestCase tests.
All tests pass on OS X.
Reviewers: clayborg, abidh
Reviewed By: clayborg
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8004
llvm-svn: 231071
Ilia K [Tue, 3 Mar 2015 15:14:32 +0000 (15:14 +0000)]
Allow to pass an executable file via lldb-mi arguments (MI)
Summary:
# Allow to pass an executable file via lldb-mi arguments
# Add tests
# Fix (gdb) prompt in CMIDriver::LocalDebugSessionStartupExecuteCommands
# Fix prompt in CMIDriver::InterpretCommandThisDriver: use the lldb-mi prompt instead of a hard-coded value.
All tests pass on OS X.
Reviewers: abidh, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8001
llvm-svn: 231070
Elena Demikhovsky [Tue, 3 Mar 2015 15:03:35 +0000 (15:03 +0000)]
AVX-512: Moved patterns for masked load/store under avx_store, avx_load classes.
No functional changes.
llvm-svn: 231069
Manuel Klimek [Tue, 3 Mar 2015 14:54:25 +0000 (14:54 +0000)]
Make -Wuninitialized warn on pointer-to-member and comma operators.
`isTrackedVar` has been updated to also track records.
`DeclRefExpr`s appearing on the left side of a comma operator are
ignored, while those appearing on the right side are classified as
`Use`.
Patch by Enrico Pertoso.
llvm-svn: 231068
Manuel Klimek [Tue, 3 Mar 2015 14:21:48 +0000 (14:21 +0000)]
Make sure we initialize all values in WhitespaceManager::Change.
llvm-svn: 231067
Daniel Jasper [Tue, 3 Mar 2015 13:59:49 +0000 (13:59 +0000)]
clang-format: Fix access to uninitialized memory.
With incomplete code, we aren't guaranteed to generated changes for
every token. In that case, we need to assume that even the very first
change can continue a preprocessor directive and initialize values
accordingly.
llvm-svn: 231066
Tamas Berghammer [Tue, 3 Mar 2015 12:14:45 +0000 (12:14 +0000)]
Fix execution of platform shell commands on android
* Add missing functionality to the process launcher
* Fixup PATH environment variable to workaround an OS bug
* Add default shell path to the host info structure
Differential revision: http://reviews.llvm.org/D8009
llvm-svn: 231065
Daniel Jasper [Tue, 3 Mar 2015 10:23:11 +0000 (10:23 +0000)]
During PHI elimination, split critical edges that move copies out of loops.
This prevents the behavior observed in llvm.org/PR22369. I am not sure
whether I am reading the code correctly, but the early exit based on
isLiveOutPastPHIs() seems to make the wrong assumption that
RegisterCoalescer won't be able to coalesce those copies later.
This change hides the new behavior behind -no-phi-elim-live-out-early-exit
as it currently breaks four tests:
* Assertion in:
CodeGen/Hexagon/hwloop-cleanup.ll
* Worse code in:
CodeGen/X86/coalescer-commute4.ll
CodeGen/X86/phys_subreg_coalesce-2.ll
CodeGen/X86/zlib-longest-match.ll
The root cause here seems to be that the heuristic that determines
the visitation order in RegisterCoalescer gets less lucky.
llvm-svn: 231064
Daniel Jasper [Tue, 3 Mar 2015 10:02:53 +0000 (10:02 +0000)]
Revert r231008 (and dependent r231019).
As Chandler responded on the initial commit, just directly setting the
triple through -Xclang option to the driver creates havoc on other
platforms. The driver test should specifically go into test/Driver and
test the cc1 commandline itself.
llvm-svn: 231063
Daniel Berlin [Tue, 3 Mar 2015 09:31:01 +0000 (09:31 +0000)]
Add range iterators to Extract/InsertValueInst indices
llvm-svn: 231062
Kuba Brecka [Tue, 3 Mar 2015 09:18:44 +0000 (09:18 +0000)]
Symbolizer refactoring: Turn FillAddressAndModuleInfo into FillModuleInfo
Reviewed at http://reviews.llvm.org/D8020
llvm-svn: 231061
Argyrios Kyrtzidis [Tue, 3 Mar 2015 08:04:19 +0000 (08:04 +0000)]
[ASTUnit] Fix crash when trying to load a module file via ASTUnit::LoadFromASTFile.
rdar://
19997358
llvm-svn: 231060
Nick Lewycky [Tue, 3 Mar 2015 07:59:45 +0000 (07:59 +0000)]
Switch up whitespace with better whitespace.
llvm-svn: 231059
Nick Lewycky [Tue, 3 Mar 2015 07:57:45 +0000 (07:57 +0000)]
Revert the non-cleanup part of r230769 because it introduced a non-determinism found only in the names of symbols.
llvm-svn: 231058
Davide Italiano [Tue, 3 Mar 2015 07:38:20 +0000 (07:38 +0000)]
[ELF] Implement R_X86_64_PC16 relocation.
Yet another chapter in the story. We're getting there, finally.
Note for the future: the tests for relocation have a lot of duplication
and probably can be unified in a single file. Let's reevaluate this once
the support will be complete (hopefully, soon).
llvm-svn: 231057
Owen Anderson [Tue, 3 Mar 2015 05:39:27 +0000 (05:39 +0000)]
Cleanup after r230934 per Dave's suggestions.
llvm-svn: 231056
Craig Topper [Tue, 3 Mar 2015 05:24:03 +0000 (05:24 +0000)]
[X86] Remove some unused code from disassembler.
llvm-svn: 231055
David Majnemer [Tue, 3 Mar 2015 04:38:34 +0000 (04:38 +0000)]
Sema: Caught exception objects should be unqualified
The exception object should be unqualified. Using a qualified exception
object results in the wrong copy constructor getting called when the
catch handler executes.
llvm-svn: 231054
Nico Weber [Tue, 3 Mar 2015 03:31:15 +0000 (03:31 +0000)]
Remove obsolete FIXME. override on definitions is fine.
llvm-svn: 231053
Kostya Serebryany [Tue, 3 Mar 2015 02:45:21 +0000 (02:45 +0000)]
[asan] Since x32 has 32-bit pointers, it should use the same code sequence as ia32 for AddressSanitizer asm_flags test. Patch by H.J. Lu
llvm-svn: 231052
Sanjoy Das [Tue, 3 Mar 2015 01:59:38 +0000 (01:59 +0000)]
Revert "[ADT] fail-fast iterators for DenseMap"
This reverts commit r231035. It breaks clang.
llvm-svn: 231050
David Majnemer [Tue, 3 Mar 2015 01:50:05 +0000 (01:50 +0000)]
Sema: Properly initialize the thrown exception object
We would create the exception object with the wrong qualifiers, ensuring
that the wrong copy constructor would get called.
llvm-svn: 231049
Greg Clayton [Tue, 3 Mar 2015 01:40:46 +0000 (01:40 +0000)]
Fix a crasher where we might have a N_UNDF symbol with no name and this could cause ObjectFileMachO::ParseSymtab() to crash.
<rdar://problem/
19989491>
llvm-svn: 231048
Peter Collingbourne [Tue, 3 Mar 2015 01:39:13 +0000 (01:39 +0000)]
Add explicit type to empty std::set initializer to fix the libc++ build.
llvm-svn: 231047