Rafael Espindola [Tue, 28 Oct 2014 00:29:51 +0000 (00:29 +0000)]
Update for LLVM API change.
llvm-svn: 220742
Rafael Espindola [Tue, 28 Oct 2014 00:24:16 +0000 (00:24 +0000)]
Remove the PreserveSource linker mode.
I noticed that it was untested, and forcing it on caused some tests to fail:
LLVM :: Linker/metadata-a.ll
LLVM :: Linker/prefixdata.ll
LLVM :: Linker/type-unique-odr-a.ll
LLVM :: Linker/type-unique-simple-a.ll
LLVM :: Linker/type-unique-simple2-a.ll
LLVM :: Linker/type-unique-simple2.ll
LLVM :: Linker/type-unique-type-array-a.ll
LLVM :: Linker/unnamed-addr1-a.ll
LLVM :: Linker/visibility1.ll
If it is to be resurrected, it has to be fixed and we should probably have a
-preserve-source command line option in llvm-mc and run tests with and without
it.
llvm-svn: 220741
Fariborz Jahanian [Mon, 27 Oct 2014 23:41:04 +0000 (23:41 +0000)]
Improve on the diagnostic in my last patch and change warning
to error. rdar://
18768214.
llvm-svn: 220740
NAKAMURA Takumi [Mon, 27 Oct 2014 23:29:27 +0000 (23:29 +0000)]
AArch64InstrInfo.h: Fix a warning introduced in clang r220703. [-Winconsistent-missing-override]
llvm-svn: 220739
Richard Smith [Mon, 27 Oct 2014 23:25:15 +0000 (23:25 +0000)]
Remove unused variable.
llvm-svn: 220738
Adam Nemet [Mon, 27 Oct 2014 23:08:40 +0000 (23:08 +0000)]
[AVX512] Add vpermil variable version
This is implemented via a multiclass that derives from the vperm imm
multiclass.
Fixes <rdar://problem/
18426089>
llvm-svn: 220737
Adam Nemet [Mon, 27 Oct 2014 23:08:37 +0000 (23:08 +0000)]
[AVX512] Clean up avx512_perm_imm to use X86VectorVTInfo
No functionality change. No change in X86.td.expanded except that we only set
the CD8 attributes for the memory variants. (This shouldn't be used unless we
have a memory operand.)
llvm-svn: 220736
Adam Nemet [Mon, 27 Oct 2014 23:08:34 +0000 (23:08 +0000)]
[AVX512] Derive vpermil* from avx512_perm_imm
This used to derive from avx512_pshuf_imm which is confusing.
NFC. Compared X86.td.expanded.
llvm-svn: 220735
Adam Nemet [Mon, 27 Oct 2014 23:08:31 +0000 (23:08 +0000)]
[AVX512] Fix copy-and-paste bugs in vpermil
1) i512mem -> f512mem (this is the packed FP input being permuted)
2) element size is 64 bits in EVEX_CD8 for PD.
(A good illustration why X86VectorVTInfo is useful)
llvm-svn: 220734
Rafael Espindola [Mon, 27 Oct 2014 23:02:34 +0000 (23:02 +0000)]
Use the newer/simple API for passing a diagnostic handler to the IR linker.
llvm-svn: 220733
Rafael Espindola [Mon, 27 Oct 2014 23:02:10 +0000 (23:02 +0000)]
Make it easier to pass a custom diagnostic handler to the IR linker.
llvm-svn: 220732
Richard Smith [Mon, 27 Oct 2014 23:01:16 +0000 (23:01 +0000)]
[modules] Load .pcm files specified by -fmodule-file lazily.
llvm-svn: 220731
Tim Northover [Mon, 27 Oct 2014 22:48:35 +0000 (22:48 +0000)]
TMP: fix readN & writeN to not encourage UB
llvm-svn: 220730
Jonathan Roelofs [Mon, 27 Oct 2014 22:39:19 +0000 (22:39 +0000)]
Test that the single-threaded lit feature is available iff the corresponding guard is #defined
http://reviews.llvm.org/D6006
llvm-svn: 220729
Pete Cooper [Mon, 27 Oct 2014 22:38:45 +0000 (22:38 +0000)]
Fix a stackmap bug introduced in r220710.
For a call to not return in to the stackmap shadow, the shadow must end with the call.
To do this, we must insert any required nops *before* the call, and not after it.
llvm-svn: 220728
Fariborz Jahanian [Mon, 27 Oct 2014 22:33:06 +0000 (22:33 +0000)]
Objective-C ARC [qoi]. Issue diagnostic if __bridge casting
to C type a collection literal. rdar://
18768214
llvm-svn: 220727
David Majnemer [Mon, 27 Oct 2014 22:31:50 +0000 (22:31 +0000)]
Frontend: Don't include stdin in the dependency list for an object file
GCC doesn't do this and it semes weird to include a file that we can't
open.
This fixes PR21362.
llvm-svn: 220726
Hans Wennborg [Mon, 27 Oct 2014 22:28:50 +0000 (22:28 +0000)]
Try to appease the C++ gods
Looks like some builds were not happy with the potentially-throwing move
constructor that was added in r220723, and reached for the implicitly
deleted copy constructor instead.
llvm-svn: 220725
Eric Fiselier [Mon, 27 Oct 2014 22:14:25 +0000 (22:14 +0000)]
Add special case handling of linux target triples that do not contain `-gnu`.
For targets that end it `redhat-linux` and `suse-linux` manually add the `-gnu`
section of the target since `linux-gnu` is needed in the testsuite.
This patch also moves the removal of minor and patchlevel numbers from OSX
triples to be handled when deducing the triple instead of when adding available
features.
llvm-svn: 220724
Hans Wennborg [Mon, 27 Oct 2014 21:50:49 +0000 (21:50 +0000)]
Give TypoExprState a move constructor and assignment operator to appease MSVC build
llvm-svn: 220723
Eric Fiselier [Mon, 27 Oct 2014 21:38:23 +0000 (21:38 +0000)]
Add test to ensure including <atomic> fails when _LIBCPP_HAS_NO_THREADS is defined.
llvm-svn: 220722
Jingyue Wu [Mon, 27 Oct 2014 21:14:41 +0000 (21:14 +0000)]
[ScalarEvolution] Guard dump() with #if
to be consistent with its definition in ScalarEvolution.cpp
llvm-svn: 220721
Greg Clayton [Mon, 27 Oct 2014 21:14:34 +0000 (21:14 +0000)]
Make sure OTHER_CFLAGS and OTHER_LDFLAGS are inherited from the Xcode project so you can easily add to the flags of all targets.
llvm-svn: 220720
Samuel Benzaquen [Mon, 27 Oct 2014 20:58:44 +0000 (20:58 +0000)]
Fix segfault in hasDeclContext for nodes that have no decl context.
Summary:
Some declarations do not have a declaration context, like TranslationUnitDecl.
Fix hasDeclContext() to not segfault on these nodes.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6003
llvm-svn: 220719
Enrico Granata [Mon, 27 Oct 2014 20:31:12 +0000 (20:31 +0000)]
This looks like the actual path under which the builder looks for LLDB headers, so use this path instead
llvm-svn: 220718
Rafael Espindola [Mon, 27 Oct 2014 20:30:04 +0000 (20:30 +0000)]
Fix bug where sys::Wait could wait on wrong pid.
Setting ChildPid to -1 would cause waitpid to wait for any child process.
Patch by Daniel Reynaud!
llvm-svn: 220717
Eric Fiselier [Mon, 27 Oct 2014 20:29:05 +0000 (20:29 +0000)]
[libcxx] use clang's __char16_t and __char32_t definitions on Linux in C++03 mode.
Summary: This fixes ODR violations in C++03 mode in test/localization/locale.stdcvt. The special case for linux was introduced in 2010 before clang always defined __char16_t and __char32_t.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5930
llvm-svn: 220716
Eric Fiselier [Mon, 27 Oct 2014 20:26:25 +0000 (20:26 +0000)]
Fix use of operator comma in is_permutation and delete comma operator for test iterators.
The comma operators in the test iterators give better error messages when they
are deleted as opposed to not defined. Delete these functions when possible.
llvm-svn: 220715
David Majnemer [Mon, 27 Oct 2014 20:02:19 +0000 (20:02 +0000)]
Frontend: Define __EXCEPTIONS if -fexceptions is passed
GCC defines __EXCEPTIONS, regardless of language mode, if -fexceptions
is passed. We should do the same.
This fixes PR21358.
llvm-svn: 220714
Juergen Ributzka [Mon, 27 Oct 2014 19:58:36 +0000 (19:58 +0000)]
[FastISel][AArch64] Emit immediate version of icmp (subs) for null pointer check.
This is a minor change to use the immediate version when the operand is a null
value. This should get rid of an unnecessary 'mov' instruction in debug
builds and align the code more with the one generated by SelectionDAG.
This fixes rdar://problem/
18785125.
llvm-svn: 220713
Juergen Ributzka [Mon, 27 Oct 2014 19:46:23 +0000 (19:46 +0000)]
[FastISel][AArch64] Optimize compare-and-branch for i1 to use 'tbz'.
Minor enhancement to use 'tbz' for i1 compare-and-branch to get rid of an 'and'
instruction.
This fixes rdar://problem/
18784953.
llvm-svn: 220712
Daniel Jasper [Mon, 27 Oct 2014 19:45:31 +0000 (19:45 +0000)]
Fix polly formatting after recent clang-format behavior change.
llvm-svn: 220711
Pete Cooper [Mon, 27 Oct 2014 19:40:35 +0000 (19:40 +0000)]
Stackmap shadows should consider call returns a branch target.
To avoid emitting too many nops, a stackmap shadow can include emitted instructions in the shadow, but these must not include branch targets.
A return from a call should count as a branch target as patching over the instructions after the call would lead to incorrect behaviour for threads currently making that call, when they return.
llvm-svn: 220710
Juergen Ributzka [Mon, 27 Oct 2014 19:38:05 +0000 (19:38 +0000)]
[FastISel][AArch64] Use 'cbz' also for null values (pointers).
The pattern matching for a 'ConstantInt' value was too restrictive. Checking for
a 'Constant' with a bull value is sufficient for using an 'cbz/cbnz' instruction.
This fixes rdar://problem/
18784732.
llvm-svn: 220709
Kostya Serebryany [Mon, 27 Oct 2014 19:34:10 +0000 (19:34 +0000)]
Do not insert asan paddings after fields that have flexible arrays.
Summary:
We should avoid a tail padding not only if the last field
has zero size but also if the last field is a struct with a flexible array.
If/when http://reviews.llvm.org/D5478 is committed,
this will also handle the case of structs with zero-sized arrays.
Reviewers: majnemer, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5924
llvm-svn: 220708
Eric Fiselier [Mon, 27 Oct 2014 19:29:32 +0000 (19:29 +0000)]
[libcxx] Remove use of uniform initialization from regex tests so that they compile in C++03.
Reviewers: danalbert, jroelofs, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5957
llvm-svn: 220707
Eric Fiselier [Mon, 27 Oct 2014 19:28:20 +0000 (19:28 +0000)]
[libcxx] Fix use of operator comma where the types can be user defined
Summary:
An evil user might overload operator comma. Use a void cast to make sure any user overload is not selected.
Modify all the test iterators to define operator comma.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5929
llvm-svn: 220706
Hafiz Abid Qadeer [Mon, 27 Oct 2014 19:27:00 +0000 (19:27 +0000)]
Stub out 'close' call on m_master_fd for Windows.
PseudoTerminal.cpp uses a dummy implementation of posix_openpt for Windows. This
implementation just returns 0. So m_master_fd is 0. But destructor calls 'close'
on m_master_fd. This 'close' calls seems un-necessary as m_master_fd was never
opened in first place and calling 'close' on 0 can have other un-intended
consequences.
I am committing it as obvious as it is only a one-liner. Long term, we may want
to refactor this class.
llvm-svn: 220705
Juergen Ributzka [Mon, 27 Oct 2014 19:16:48 +0000 (19:16 +0000)]
[FastISel][AArch64] Don't fold the 'and' instruction into the 'tbz/tbnz' instruction if it is in a different basic block.
This fixes a bug where the input register was not defined for the 'tbz/tbnz'
instruction. This happened, because we folded the 'and' instruction from a
different basic block.
This fixes rdar://problem/
18784013.
llvm-svn: 220704
Fariborz Jahanian [Mon, 27 Oct 2014 19:11:51 +0000 (19:11 +0000)]
c++11 patch to issue warning on missing 'override' on
overriding methods. Patch review by Richard Smith.
rdar://
18295240
llvm-svn: 220703
Marshall Clow [Mon, 27 Oct 2014 19:08:10 +0000 (19:08 +0000)]
PR #21321 talked about implementation-defined behavior of realloc. I poo-poohed it, and was wrong. Fix the call in <locale>. Review the others, refactored some duplicated code, and found overflow bugs (and __event_cap_ was never getting updated, either).
llvm-svn: 220702
Juergen Ributzka [Mon, 27 Oct 2014 18:21:58 +0000 (18:21 +0000)]
[FastISel][AArch64] Fix load/store with frame indices.
At higher optimization levels the LLVM IR may contain more complex patterns for
loads/stores from/to frame indices. The 'computeAddress' function wasn't able to
handle this and triggered an assertion.
This fix extends the possible addressing modes for frame indices.
This fixes rdar://problem/
18783298.
llvm-svn: 220700
Kostya Serebryany [Mon, 27 Oct 2014 18:13:56 +0000 (18:13 +0000)]
[asan] experimental tracing for indirect calls, llvm part.
llvm-svn: 220699
Kaelyn Takata [Mon, 27 Oct 2014 18:07:46 +0000 (18:07 +0000)]
Wire up LookupMemberExpr to use the new TypoExpr.
This includes adding the new TypoExpr-based lazy typo correction to
LookupMemberExprInRecord as an alternative to the existing eager typo
correction.
llvm-svn: 220698
Kaelyn Takata [Mon, 27 Oct 2014 18:07:42 +0000 (18:07 +0000)]
Add a callback for recovering using a typo correction.
Also keep track of the stack of Exprs visited during the tree transform
so the callback can be passed the parent of the TypoExpr.
llvm-svn: 220697
Kaelyn Takata [Mon, 27 Oct 2014 18:07:40 +0000 (18:07 +0000)]
Add simple way for a CorrectionCandidateCallback to reject exact
matches of the typo.
Also be more proactive about checking a correction's visibility so that
a correction requiring a module import can be distinguished from the
original typo even if it looks identical. Otherwise the correction will
be excluded and the diagnostic about needing the module import won't be
emitted.
Note that no change was made to checkCorrectionVisibility other than
moving where it is at in SemaLookup.cpp.
llvm-svn: 220696
Kaelyn Takata [Mon, 27 Oct 2014 18:07:37 +0000 (18:07 +0000)]
Start adding the infrastructure for handling TypoExprs.
Part of the infrastructure is a map from a TypoExpr to the Sema-specific
state needed to correct it, along with helpers to ease dealing with the
state.
The the typo count is propagated up the stack of
ExpressionEvaluationContextRecords when one is popped off of to
avoid accidentally dropping TypoExprs on the floor. For example,
the attempted correction of g() in test/CXX/class/class.mem/p5-0x.cpp
happens with an ExpressionEvaluationContextRecord that is popped off
the stack prior to ActOnFinishFullExpr being called and the tree
transform for TypoExprs being run.
llvm-svn: 220695
Kaelyn Takata [Mon, 27 Oct 2014 18:07:34 +0000 (18:07 +0000)]
Have TypoCorrectionConsumer remember the TypoCorrections it returned.
Two additional methods are provided: one to return the current
correction (the last correction returned by getNextCorrection), and one
to "reset" the state so that getNextCorrection will return the previous
corrections before returning any new corrections.
Also ensure that all TypoCorrections have valid source ranges.
llvm-svn: 220694
Kaelyn Takata [Mon, 27 Oct 2014 18:07:29 +0000 (18:07 +0000)]
Pass around CorrectionCandidateCallbacks as unique_ptrs so
TypoCorrectionConsumer can keep the callback around as long as needed.
llvm-svn: 220693
Kaelyn Takata [Mon, 27 Oct 2014 18:07:20 +0000 (18:07 +0000)]
Add the initial TypoExpr AST node for delayed typo correction.
llvm-svn: 220692
Kaelyn Takata [Mon, 27 Oct 2014 18:07:13 +0000 (18:07 +0000)]
Move TypoCorrectionConsumer into a header.
This makes it available outside of SemaLookup.cpp, as
needed for the forthcoming TypoExpr AST node which will
keep a TypoCorrectionConsumer that provides the possible
typo corrections for that TypoExpr.
llvm-svn: 220691
Lang Hames [Mon, 27 Oct 2014 17:59:51 +0000 (17:59 +0000)]
[PBQP] Remove a spurious 'typename' keyword. This was causing an error on MSVC.
llvm-svn: 220690
Lang Hames [Mon, 27 Oct 2014 17:52:05 +0000 (17:52 +0000)]
[PBQP] Clarify ambiguous-looking typedef.
This was causing an error on the hexagon bots.
llvm-svn: 220689
Lang Hames [Mon, 27 Oct 2014 17:44:25 +0000 (17:44 +0000)]
[PBQP] Unique allowed-sets for nodes in the PBQP graph and use pairs of these
sets as keys into a cache of interference matrice values in the Interference
constraint adder.
Creating interference matrices was one of the large remaining time-sinks in
PBQP. Caching them reduces the total compile time (when using PBQP) on the
nightly test suite by ~10%.
llvm-svn: 220688
Michael Gottesman [Mon, 27 Oct 2014 17:20:53 +0000 (17:20 +0000)]
Add MapVector::rbegin(), MapVector::rend() to completment MapVector::begin(), MapVector::end().
These just delegate to the underlying vector type in the MapVector.
Also just add in some sanity unittests.
llvm-svn: 220687
Daniel Jasper [Mon, 27 Oct 2014 17:13:59 +0000 (17:13 +0000)]
clang-format: Don't break after very short return types.
Before:
void
SomeFunction(int parameter);
After:
void SomeFunction(
int parameter);
(Unless AlwaysBreakAfterDefinitionReturnType after type is set).
llvm-svn: 220686
Saleem Abdulrasool [Mon, 27 Oct 2014 17:13:33 +0000 (17:13 +0000)]
clang-format: improve vim integration docs
Improve the documentation for vim integration of clang-format. Prefer the use
of <c-o> to do the normal mode command execution to avoid side-effects of the
escape and re-insertion (cursor movement). Tweak the macros to use a double
return to avoid having to manually return control to the editor from the
subprocess.
llvm-svn: 220685
Daniel Jasper [Mon, 27 Oct 2014 16:31:46 +0000 (16:31 +0000)]
clang-format: Fix bad merging of lines in nested blocks.
Before:
SomeFunction([]() {
#define A a
return 43; });
After:
SomeFunction([]() {
#define A a
return 43;
});
llvm-svn: 220684
Adrian Prantl [Mon, 27 Oct 2014 16:20:59 +0000 (16:20 +0000)]
Unbreak the darwin build.
Patch by Ismail Pazarbasi!
llvm-svn: 220683
Samuel Benzaquen [Mon, 27 Oct 2014 15:22:59 +0000 (15:22 +0000)]
Speed up clang-tidy when profiling in on.
Summary:
Speed up clang-tidy when profiling in on.
It makes profiling runs twice as fast by reusing the time samples between the
different actions.
It also joins together the sampling of different matchers of the same check.
Reviewers: alexfh
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D5972
llvm-svn: 220682
Ed Maste [Mon, 27 Oct 2014 15:01:59 +0000 (15:01 +0000)]
Skip ObjC test on FreeBSD that does not build
llvm-svn: 220681
Viktor Kutuzov [Mon, 27 Oct 2014 13:51:25 +0000 (13:51 +0000)]
Allow thread sanitizer in clang driver on FreeBSD
http://reviews.llvm.org/D5999
llvm-svn: 220680
Daniel Jasper [Mon, 27 Oct 2014 13:25:59 +0000 (13:25 +0000)]
clang-format: [Proto] Change formatting text-formatted options.
Before:
optional Type type = 1 [(mutate_options) = {vital : true
abc : false}];
After:
optional Type type = 1 [(mutate_options) = {
vital : true
abc : false
}];
llvm-svn: 220679
NAKAMURA Takumi [Mon, 27 Oct 2014 12:37:26 +0000 (12:37 +0000)]
Prune CRLF.
llvm-svn: 220678
Viktor Kutuzov [Mon, 27 Oct 2014 12:33:10 +0000 (12:33 +0000)]
Revert rL220675 due to failures on check-clang
llvm-svn: 220677
Viktor Kutuzov [Mon, 27 Oct 2014 11:28:53 +0000 (11:28 +0000)]
[Tsan] Enable thread sanitizer tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D5995
llvm-svn: 220676
Viktor Kutuzov [Mon, 27 Oct 2014 11:26:01 +0000 (11:26 +0000)]
Allow thread sanitizer in clang driver on FreeBSD
Differential Revision: http://reviews.llvm.org/D5994
llvm-svn: 220675
Viktor Kutuzov [Mon, 27 Oct 2014 11:22:24 +0000 (11:22 +0000)]
[Tsan] Fix references to renamed variables in DPrintf()
Differential Revision: http://reviews.llvm.org/D5993
llvm-svn: 220674
Viktor Kutuzov [Mon, 27 Oct 2014 11:19:08 +0000 (11:19 +0000)]
[Tsan] Make calloc() to not track allocated space unless thread is completely initialized
Differential Revision: http://reviews.llvm.org/D5992
llvm-svn: 220673
Viktor Kutuzov [Mon, 27 Oct 2014 11:14:24 +0000 (11:14 +0000)]
[Tsan] Fix guessing data range on FreeBSD
Differential Revision: http://reviews.llvm.org/D5990
llvm-svn: 220672
Oliver Stannard [Mon, 27 Oct 2014 09:23:02 +0000 (09:23 +0000)]
[ARM] Select VMAXNM and VMINNM regardless of operand order
Currently, the ARM backend will select the VMAXNM and VMINNM for these C
expressions:
(a < b) ? a : b
(a > b) ? a : b
but not these expressions:
(a > b) ? b : a
(a < b) ? b : a
This patch allows all of these expressions to be matched.
llvm-svn: 220671
Yuri Gorshenin [Mon, 27 Oct 2014 08:38:54 +0000 (08:38 +0000)]
[asan-asm-instrumentation] Added comment describing how asm instrumentation works.
Summary: [asan-asm-instrumentation] Added comment describing how asm instrumentation works.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5970
llvm-svn: 220670
Rui Ueyama [Mon, 27 Oct 2014 08:16:18 +0000 (08:16 +0000)]
Re-commit r220667.
C++ source given to check_cxx_source_compile should have define "main".
llvm-svn: 220669
NAKAMURA Takumi [Mon, 27 Oct 2014 08:08:18 +0000 (08:08 +0000)]
Fix unicode chars into ascii in comment lines.
llvm-svn: 220668
Rui Ueyama [Mon, 27 Oct 2014 08:03:21 +0000 (08:03 +0000)]
Revert "Include stddef.h before including cxxabi.h" to un-break buildbot
This reverts commit r220665.
llvm-svn: 220667
Rui Ueyama [Mon, 27 Oct 2014 07:44:40 +0000 (07:44 +0000)]
Remove #ifdef __FreeBSD
r220665 makes configure or CMake to set HAVE_CXXABI_H on FreeBSD 10.0.
We don't need this ugly ifdef condition anymore.
llvm-svn: 220666
Rui Ueyama [Mon, 27 Oct 2014 07:37:57 +0000 (07:37 +0000)]
Include stddef.h before including cxxabi.h
On FreeBSD 10.0, size_t needs to be defined before including cxxabi.h.
Currenty HAVE_CXXABI_H is not defined on FreeBSD because of that reason.
This patch teaches cmake and configure how to include it.
http://reviews.llvm.org/D5940
llvm-svn: 220665
David Majnemer [Mon, 27 Oct 2014 05:47:49 +0000 (05:47 +0000)]
InstCombine: Fix a combine assuming that icmp operands were integers
An icmp may have pointer arguments, it isn't limited to integers or
vectors of integers.
This fixes PR21388.
llvm-svn: 220664
Alexey Samsonov [Mon, 27 Oct 2014 03:10:27 +0000 (03:10 +0000)]
[Sanitizer] Return code that calculates hash for stacktrace back to StackDepot implementation
llvm-svn: 220663
Rafael Espindola [Mon, 27 Oct 2014 02:35:46 +0000 (02:35 +0000)]
LinkModules.cpp: don't repeat names in comments.
llvm-svn: 220662
Todd Fiala [Mon, 27 Oct 2014 00:58:27 +0000 (00:58 +0000)]
Fix the TestCreateAfterAttach test for llgs-local on ptracer lock-down.
llvm-svn: 220661
Todd Fiala [Mon, 27 Oct 2014 00:31:05 +0000 (00:31 +0000)]
Fix TestProcessAttach for Linux ptracer lock-down and llgs-local.
llvm-svn: 220660
Eric Christopher [Sun, 26 Oct 2014 23:40:33 +0000 (23:40 +0000)]
Fix 80-column and other odd formatting.
llvm-svn: 220659
David Blaikie [Sun, 26 Oct 2014 23:37:04 +0000 (23:37 +0000)]
Remove some unnecessary casts.
llvm-svn: 220658
Benjamin Kramer [Sun, 26 Oct 2014 22:44:13 +0000 (22:44 +0000)]
Make VFS and FileManager match the current MemoryBuffer API.
This eliminates converting back and forth between the 3 formats and
gives us a more homogeneous interface.
llvm-svn: 220657
Todd Fiala [Sun, 26 Oct 2014 22:25:33 +0000 (22:25 +0000)]
Fix up TestRegisters for Linux ptracer lock-down.
All of these test fixups are prep work for when llgs is
running with llgs for local process debugging, where these
tests fail without the ptracer lock-down suppression.
llvm-svn: 220656
Lang Hames [Sun, 26 Oct 2014 22:12:02 +0000 (22:12 +0000)]
[PBQP] Tidying up as per Dave Blaikie's suggesions for r220642.
llvm-svn: 220655
Todd Fiala [Sun, 26 Oct 2014 22:08:56 +0000 (22:08 +0000)]
Fix TestAttachResume test so it doesn't hang on Linux with ptrace lockdown.
Similar to previous fix, this augments the test inferior to
immediately indicate it may be ptraced by any Linux process
when the appropriate symbols are defined.
This seems to indicate we need to fix our lldb attach logic to
catch when an attach fails, and trigger an appropriate error
instead of the current behavior of hanging indefinitely.
llvm-svn: 220654
Lang Hames [Sun, 26 Oct 2014 21:55:54 +0000 (21:55 +0000)]
[PBQP] Explicitly define copy/move operations for NodeMetadata to keep VS happy.
Hopefully this fixes the bug that was introduced in r220642, and not-quite-fixed
in r220649.
llvm-svn: 220653
Arnold Schwaighofer [Sun, 26 Oct 2014 21:50:58 +0000 (21:50 +0000)]
Add an option to the LTO code generator to disable vectorization during LTO
We used to always vectorize (slp and loop vectorize) in the LTO pass pipeline.
r220345 changed it so that we used the PassManager's fields 'LoopVectorize' and
'SLPVectorize' out of the desire to be able to disable vectorization using the
cl::opt flags 'vectorize-loops'/'slp-vectorize' which the before mentioned
fields default to.
Unfortunately, this turns off vectorization because those fields
default to false.
This commit adds flags to the LTO library to disable lto vectorization which
reconciles the desire to optionally disable vectorization during LTO and
the desired behavior of defaulting to enabled vectorization.
We really want tools to set PassManager flags directly to enable/disable
vectorization and not go the route via cl::opt flags *in*
PassManagerBuilder.cpp.
llvm-svn: 220652
Hafiz Abid Qadeer [Sun, 26 Oct 2014 21:38:43 +0000 (21:38 +0000)]
Added a missing call to 'Reset'.
HostThreadWindows::Join() did not call the Reset as is done by
the HostThreadPosix::Join(). As a result, future call to
IsJoinable() can fail.
Committed as obvious.
llvm-svn: 220651
Todd Fiala [Sun, 26 Oct 2014 21:37:46 +0000 (21:37 +0000)]
Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.
Similar to a recent test I fixed for gdb-remote attach scenarios, this
fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and
later, where ptrace starts requiring a ptracer to be an ancestor of the
inferior to be ptraced. This change checks for Linux and the ptrace-related
flags. If they're found, it tries to switch on the "allow any ptracer" mode
for the inferior as the first statements in the program. It's a best-effort
solution - if the prctl call fails, the failure is ignored, and probably will
lead to the test failing.
The ptrace security behavior can be modified system-wide, but is outside the
scope of the test to address. Hence I went with this particular solution.
llvm-svn: 220650
Lang Hames [Sun, 26 Oct 2014 20:57:16 +0000 (20:57 +0000)]
[PBQP] Re-commit r220642 with a workaround for quirky Visual Studio behavior.
Apparently unique_ptr'ifying NodeMetadata exposed an issue in VS where it
occasionally tries to synthesize copy constructors instead of moves. Hopefully
explicitly deleting the copy constructor and defining the move constructor will
fix this.
llvm-svn: 220649
Peter Zotov [Sun, 26 Oct 2014 20:45:22 +0000 (20:45 +0000)]
[OCaml] Expose existing documentation in ocamldoc.
Patch by Gabriel Radanne <drupyog@zoho.com>.
llvm-svn: 220648
Marshall Clow [Sun, 26 Oct 2014 20:29:38 +0000 (20:29 +0000)]
Change the comment on the closing #endif to match the condition on the corresponding #ifdef. Thanks to K-ballo for the catch. No functionality change.
llvm-svn: 220647
Hans Wennborg [Sun, 26 Oct 2014 20:00:53 +0000 (20:00 +0000)]
ModuleMap.cpp: fix Windows build, take 2
llvm-svn: 220646
Hans Wennborg [Sun, 26 Oct 2014 19:50:13 +0000 (19:50 +0000)]
Revert "[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change." (r220642)
It broke the Windows build:
[1/19] Building CXX object lib\CodeGen\CMakeFiles\LLVMCodeGen.dir\RegAllocPBQP.cpp.obj
C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/CodeGen/RegAllocPBQP.h(132) : error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'
with
[
_Ty=unsigned int []
]
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1600) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
with
[
_Ty=unsigned int []
]
This diagnostic occurred in the compiler generated function 'llvm::PBQP::RegAlloc::NodeMetadata::NodeMetadata(const llvm::PBQP::RegAlloc::NodeMetadata &)'
llvm-svn: 220645
Hans Wennborg [Sun, 26 Oct 2014 19:39:46 +0000 (19:39 +0000)]
ModuleMap.cpp: fix VS2012 build
llvm-svn: 220644
Hans Wennborg [Sun, 26 Oct 2014 19:27:02 +0000 (19:27 +0000)]
Try to fix the Windows build after r220637
llvm-svn: 220643
Lang Hames [Sun, 26 Oct 2014 18:50:52 +0000 (18:50 +0000)]
[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change.
llvm-svn: 220642