Michael Kruse [Fri, 24 Jul 2015 23:30:31 +0000 (23:30 +0000)]
Normalize whitespace in makefiles
Tabs for rules and space for line continuations.
llvm-svn: 243179
Rui Ueyama [Fri, 24 Jul 2015 23:24:45 +0000 (23:24 +0000)]
COFF: Fix base relocation type for x86.
llvm-svn: 243178
Rui Ueyama [Fri, 24 Jul 2015 22:58:44 +0000 (22:58 +0000)]
COFF: Fix __ImageBase symbol relocation.
__ImageBase is a special symbol whose value is the image base address.
Previously, we handled __ImageBase symbol as an absolute symbol.
Absolute symbols point to specific locations in memory and the locations
never change even if an image is base-relocated. That means that we
don't have base relocation entries for absolute symbols.
This is not a case for __ImageBase. If an image is base-relocated, its
base address changes, and __ImageBase needs to be shifted as well.
So we have to have base relocations for __ImageBase. That means that
__ImageBase is not really an absolute symbol but a different kind of
symbol.
In this patch, I introduced a new type of symbol -- DefinedRelative.
DefinedRelative is similar to DefinedAbsolute, but it has not a VA but RVA
and is a subject of base relocation. Currently only __ImageBase is of
the new symbol type.
llvm-svn: 243176
Jason Molenda [Fri, 24 Jul 2015 22:42:03 +0000 (22:42 +0000)]
Log socket communications to LIBLLDB_LOG_COMMUNICATION instead of
the Host channel.
http://reviews.llvm.org/D11497
llvm-svn: 243175
Zachary Turner [Fri, 24 Jul 2015 22:32:22 +0000 (22:32 +0000)]
Some fixes to get LLDB compiling with MSVC 2015.
llvm-svn: 243174
Alex Lorenz [Fri, 24 Jul 2015 22:22:50 +0000 (22:22 +0000)]
MIR Serialization: Serialize MachineFrameInfo's callee saved information.
This commit serializes the callee saved information from the class
'MachineFrameInfo'. This commit extends the YAML mappings for the fixed and
the ordinary stack objects and adds an optional 'callee-saved-register'
attribute. This attribute is used to serialize the callee save information.
llvm-svn: 243173
Lawrence Hu [Fri, 24 Jul 2015 22:01:49 +0000 (22:01 +0000)]
Handle loop with negtive induction variable increment
This patch extend LoopReroll pass to hand the loops which
is similar to the following:
while (len > 1) {
sum4 += buf[len];
sum4 += buf[len-1];
len -= 2;
}
llvm-svn: 243171
Alexey Samsonov [Fri, 24 Jul 2015 22:01:07 +0000 (22:01 +0000)]
[CMake] Workaround for PR24222: don't fail if we can't target COMPILER_RT_TEST_TARGET_TRIPLE unless it was explicitly set.
Summary:
Although we assume that we can always target host triple, relax
this check to avoid failing at configure-time for cases when we are
not able to correctly infer/verify host triple for some reasons.
See http://llvm.org/bugs/show_bug.cgi?id=24222 for more details.
Reviewers: hans
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11496
llvm-svn: 243170
Aaron Ballman [Fri, 24 Jul 2015 21:49:29 +0000 (21:49 +0000)]
Replacing some diagnostic string literals with tablegen equivalents because the wording is identical; NFC.
llvm-svn: 243169
Michael Kruse [Fri, 24 Jul 2015 21:40:22 +0000 (21:40 +0000)]
Add isl_ffs.c to file list in autoconf builds
In most configurations it doesn't contain any symbol, but add for
completeness.
llvm-svn: 243168
Pete Cooper [Fri, 24 Jul 2015 21:38:01 +0000 (21:38 +0000)]
Remove unnecessary null check. NFC.
Since both places which set this variable do so with dyn_cast, and not
dyn_cast_or_null, its impossible to get a nullptr here, so we can remove
the check.
llvm-svn: 243167
Siva Chandra [Fri, 24 Jul 2015 21:30:58 +0000 (21:30 +0000)]
Add option eTypeOptionHideEmptyAggregates.
Summary:
For certain data structures, when the synthetic child provider returns
zero children, a summary like "Empty instance of <typename>" could be
more appropriate than something like "size=0 {}". This new option helps
hide the trailing "{}".
This is also exposed with a -h option for the command "type summary add".
Reviewers: granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11473
llvm-svn: 243166
Hans Wennborg [Fri, 24 Jul 2015 21:24:48 +0000 (21:24 +0000)]
LibompMicroTests.cmake: Invoke 'test' instead of using '[ x -eq y ]'
I was getting this cmake error on Mac OS X:
CMake Error: Error in cmake code at
/tmp/openmp/runtime/cmake/LibompMicroTests.cmake:140:
Parse error. Function missing ending ")". Instead found bad character with text "[".
Perhaps invoking 'test' is less confusing for cmake.
Differential Revision: http://reviews.llvm.org/D11493
llvm-svn: 243165
Pete Cooper [Fri, 24 Jul 2015 21:13:43 +0000 (21:13 +0000)]
Use make_range(rbegin(), rend()) to allow foreach loops. NFC.
Instead of the pattern
for (auto I = x.rbegin(), E = x.end(); I != E; ++I)
we can use make_range to construct the reverse range and iterate using
that instead.
llvm-svn: 243163
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 21:11:06 +0000 (21:11 +0000)]
DI: Fix unit tests after r243160
These always empty fields are gone, so don't test that they're empty.
llvm-svn: 243162
Michael J. Spencer [Fri, 24 Jul 2015 21:03:07 +0000 (21:03 +0000)]
[ELF2] Add a new ELF linker based on the new PE/COFF linker.
Differential Revision: http://reviews.llvm.org/D11188
llvm-svn: 243161
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 20:56:36 +0000 (20:56 +0000)]
DI: Remove unnecessary DICompositeTypeBase
Remove unnecessary and confusing common base class for `DICompositeType`
and `DISubroutineType`.
While at a high-level `DISubroutineType` is a sort of composite of other
types, it has no shared code paths, and its fields are completely
disjoint. This relationship was left over from the old debug info
hierarchy.
llvm-svn: 243160
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 20:56:10 +0000 (20:56 +0000)]
DI: Simplify DebugInfoFinder::processType(), NFC
Handle `DISubroutineType` up-front rather than as part of a branch for
`DICompositeTypeBase`. The only shared code path was looking through
the base type, but `DISubroutineType` can never have a base type.
This also removes the last use of `DICompositeTypeBase`, since we can
strengthen the cast to `DICompositeType`.
llvm-svn: 243159
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 20:46:46 +0000 (20:46 +0000)]
DI: Remove dead code: getDICompositeType()
llvm-svn: 243158
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 20:45:26 +0000 (20:45 +0000)]
AsmPrinter: Use DICompositeType in updateAcceleratorTables(), NFC
`DISubroutineType` is impossible at this `dyn_cast` site, since we're
only dealing with named types and `DISubroutineType` cannot be named.
Strengthen the `dyn_cast` to `DICompositeType`.
llvm-svn: 243157
Alex Lorenz [Fri, 24 Jul 2015 20:35:40 +0000 (20:35 +0000)]
MIR Serialization: Serialize the simple virtual register allocation hints.
This commit serializes the virtual register allocations hints of type 0.
These hints specify the preferred physical registers for allocations.
llvm-svn: 243156
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 20:34:41 +0000 (20:34 +0000)]
DI: Make getOrCreateLimitedType() return DICompositeType, NFC
Change `getOrCreateLimitedType()` to return a `DICompositeType` and
remove the casts from its callers. Inside, I've strengthened a `cast`
from `DICompositeTypeBase`, but the casts in the callers already prove
that this is safe. There should be no functionality change here.
llvm-svn: 243155
Michael Kruse [Fri, 24 Jul 2015 20:33:22 +0000 (20:33 +0000)]
Make the lit configuration Python 3 compatible
by using the same techniques as LLVM's lit configuration.
llvm-svn: 243154
Yaron Keren [Fri, 24 Jul 2015 20:18:27 +0000 (20:18 +0000)]
Select the highest version of the mingw toolchain found using Generic_GCC::GCCVersion
similar to the way Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple works.
llvm-svn: 243153
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 20:16:36 +0000 (20:16 +0000)]
DI: Remove DIDerivedTypeBase
Remove an unnecessary (and confusing) common subclass for
`DIDerivedType` and `DICompositeType`. These classes aren't really
related, and even in the old debug info hierarchy, there was a
long-standing FIXME to separate them.
llvm-svn: 243152
Ismail Pazarbasi [Fri, 24 Jul 2015 20:00:49 +0000 (20:00 +0000)]
__tsan::ThreadCreate takes incorrect value for detached argument
Summary:
PTHREAD_CREATE_DETACHED has a different value on Mac OS X. Since both
PTHREAD_CREATE_JOINABLE and PTHREAD_CREATE_DETACHED are non-zero,
`__tsan::ThreadCreate` always creates detached threads.
Reviewers: kcc, samsonov, glider
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10606
llvm-svn: 243151
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 19:57:19 +0000 (19:57 +0000)]
Verifier: Sink filename check into visitMDCompositeType(), NFC
We really only want to check this for unions and classes (all the other
tags have been ruled out), so simplify the check and move it to the
right place.
llvm-svn: 243150
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 19:52:18 +0000 (19:52 +0000)]
Verifier: Remove unnecessary references to DW_TAG_subroutine_type, NFC
Remove unnecessary references to `DW_TAG_subroutine_type` in
`visitDICompositeType()` and `visitDIDerivedTypeBase()`, since
`visitDISubroutineType()` doesn't call either of those (and shouldn't,
since subroutine types are really quite special).
llvm-svn: 243149
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 19:42:12 +0000 (19:42 +0000)]
DI: Clarify isUnsignedDIType(), NFC
Refactor `isUnsignedDIType()` to deal with `DICompositeType` explicitly.
Since `DW_TAG_subroutine_type` isn't handled here (the assertions about
tags rule it out), this allows strengthening the `dyn_cast` to
`DIDerivedType`.
Besides making the code clearer, this it removes a use of
`DIDerivedTypeBase`.
llvm-svn: 243148
Renato Golin [Fri, 24 Jul 2015 19:29:05 +0000 (19:29 +0000)]
[libunwind] Flip order of extern "C" and attribute(visibility)
GCC doesn't seems to like having the attribute before extern, but
Clang accepts it either way. This patch makes it compile on both.
llvm-svn: 243147
Pete Cooper [Fri, 24 Jul 2015 19:19:26 +0000 (19:19 +0000)]
Add const to some Type* parameters which didn't need to be mutable. NFC.
We were only getting the size of the type which doesn't need to modify
the type.
llvm-svn: 243146
Diego Novillo [Fri, 24 Jul 2015 19:18:32 +0000 (19:18 +0000)]
Remove unused variable. NFC.
llvm-svn: 243145
Yaron Keren [Fri, 24 Jul 2015 19:18:17 +0000 (19:18 +0000)]
Base the sys-root/mingw/include path on sysroot and not on /usr.
Thanks to Richard Smith for pointing this out!
llvm-svn: 243144
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 19:17:20 +0000 (19:17 +0000)]
DI: Strengthen some dyn_casts to DIDerivedType, NFC
The surrounding code proves in both cases that these must be
`DIDerivedType` if they're `DIDerivedTypeBase`, so strengthen the
`dyn_cast`s to the more specific type.
llvm-svn: 243143
Michael Kruse [Fri, 24 Jul 2015 19:09:27 +0000 (19:09 +0000)]
Compile fix; add missing ISL files
The last ISL update added two files that we must also add to Polly.
llvm-svn: 243142
Jingyue Wu [Fri, 24 Jul 2015 19:05:53 +0000 (19:05 +0000)]
Remove the user-count threshold when analyzing read attributes
Summary:
This threshold limited FunctionAttrs ability to prove arguments to be read-only.
In NVPTX, a specialized instruction ld.global.nc can be used to load memory
with non-coherent texture cache. We notice that in SHOC [1] benchmark, some
function arguments are not marked with readonly because FunctionAttrs reaches
a hardcoded threshold when analysis uses.
Removing this threshold won't cause significant regression in compilation time, because the worst-case time complexity of the algorithm is still O(# of instructions) for each parameter.
Patched by Xuetian Weng.
[1] https://github.com/vetter/shoc
Reviewers: nlewycky, jingyue, nicholas
Subscribers: nicholas, test, llvm-commits
Differential Revision: http://reviews.llvm.org/D11311
llvm-svn: 243141
Philip Reames [Fri, 24 Jul 2015 19:01:39 +0000 (19:01 +0000)]
[RewriteStatepointsForGC] Adjust naming scheme to be more stable
The names for instructions inserted were previous dependent on iteration order. By deriving the names from the original instructions, we can avoid instability in tests without resorting to ordered traversals. It also makes the IR mildly easier to read at large scale.
llvm-svn: 243140
Evgeniy Stepanov [Fri, 24 Jul 2015 19:00:16 +0000 (19:00 +0000)]
[asan] Only link liblog on Android when it exists.
With r242975, liblog is only used on certain older platforms.
llvm-svn: 243139
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 18:58:32 +0000 (18:58 +0000)]
DI: Strengthen block-byref cast to DIDerivedType, NFC
This code is visiting the members of a block-byref, and we know those
are all `DIDerivedType`. Strengthen the cast.
llvm-svn: 243138
Evgeniy Stepanov [Fri, 24 Jul 2015 18:57:44 +0000 (18:57 +0000)]
[asan] Fix android system property access on aarch64.
__system_property_get is gone from the NDK headers and libs in 64-bit
toolchains, but it is still exported by platform libc.so.
llvm-svn: 243137
Pete Cooper [Fri, 24 Jul 2015 18:55:49 +0000 (18:55 +0000)]
Use foreach loops for StructType::elements(). NFC.
We had a few places where we did
for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) {
but those could instead do
for (auto *EltTy : STy->elements()) {
llvm-svn: 243136
Pete Cooper [Fri, 24 Jul 2015 18:29:09 +0000 (18:29 +0000)]
Add const to a bunch of Type* in DataLayout. NFC.
Almost all methods in DataLayout took mutable pointers but didn't need to.
These were only accessing constant methods of the types, or using the Type*
to key a map. Neither of these needs a mutable pointer.
llvm-svn: 243135
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 18:17:17 +0000 (18:17 +0000)]
DI: Only DICompositeType has getElements(), NFC
There is an assertion inside `DICompositeTypeBase::getElements()` that
`this` is not a `DISubroutineType`, leaving only `DICompositeType`.
Make that clear at the call sites.
llvm-svn: 243134
Chih-Hung Hsieh [Fri, 24 Jul 2015 18:12:54 +0000 (18:12 +0000)]
Correct x86_64 Android fp128 mangled name
These changes are for Android x86_64 targets to be compatible with current Android g++.
https://llvm.org/bugs/show_bug.cgi?id=23897
Use 'g' and 'Cg' for "long double" and "long double _Complex" mangled type names.
Differential Revision: http://reviews.llvm.org/D11466
llvm-svn: 243133
Tom Stellard [Fri, 24 Jul 2015 18:07:14 +0000 (18:07 +0000)]
Fix double implementation of log
We need to use M_LOG2E instead of M_LOG2E_F.
llvm-svn: 243132
Tom Stellard [Fri, 24 Jul 2015 18:07:12 +0000 (18:07 +0000)]
Implement accurate log2 function
Use the implementation was ported from the AMD builtin library rather
than LLVM Intrinsics.
This has been tested with piglit, OpenCV, and the ocl conformance tests.
llvm-svn: 243131
Tom Stellard [Fri, 24 Jul 2015 18:07:06 +0000 (18:07 +0000)]
Use llvm intrinsics for native_log and native_log2
llvm-svn: 243130
Duncan P. N. Exon Smith [Fri, 24 Jul 2015 18:05:58 +0000 (18:05 +0000)]
DI: Make StaticDataMemberCache type-safe, NFC
Change `StaticDataMemberCache` to store references to `DIDerivedType`
directly, and remove now-unnecessary casts from the accessors.
llvm-svn: 243129
Alex Lorenz [Fri, 24 Jul 2015 17:44:49 +0000 (17:44 +0000)]
MIR Parser: Run the machine verifier after initializing machine functions.
llvm-svn: 243128
Lang Hames [Fri, 24 Jul 2015 17:40:04 +0000 (17:40 +0000)]
[RuntimeDyld] MachO: Add support for ARM scattered vanilla relocations.
llvm-svn: 243126
Chih-Hung Hsieh [Fri, 24 Jul 2015 17:39:13 +0000 (17:39 +0000)]
Test commit.
llvm-svn: 243125
Alex Lorenz [Fri, 24 Jul 2015 17:36:55 +0000 (17:36 +0000)]
MIR Tests: Add liveins and successors to make tests pass with machine verifier.
This commit adds the liveins and successors properties to machine basic blocks
in some of the MIR tests to ensure that the tests will pass when the MIR parser
will run the machine verifier after initializing a machine function.
llvm-svn: 243124
Alex Lorenz [Fri, 24 Jul 2015 17:31:55 +0000 (17:31 +0000)]
MIR Tests: Make the basic block successor test an X86 specific test.
This commit moves and transforms the generic test
'CodeGen/MIR/successor-basic-blocks.mir' into an X86 specific test
'CodeGen/MIR/X86/successor-basic-blocks.mir'. This change is required in order
to enable the machine verifier for the MIR parser, as the machine verifier
verifies that the machine basic blocks contain instructions that actually
determine the machine basic block successors.
llvm-svn: 243123
Igor Breger [Fri, 24 Jul 2015 17:24:15 +0000 (17:24 +0000)]
AVX-512: Implemented encoding , DAG lowering and intrinsics for Integer Truncate with/without saturation
Added tests for DAG lowering ,encoding and intrinsic
Differential Revision: http://reviews.llvm.org/D11218
llvm-svn: 243122
Chandler Carruth [Fri, 24 Jul 2015 17:23:09 +0000 (17:23 +0000)]
Update for r243115 which changed the DataLayout API on TargetMachine but
didn't update the gold-plugin.
llvm-svn: 243121
Argyrios Kyrtzidis [Fri, 24 Jul 2015 17:18:25 +0000 (17:18 +0000)]
[test] Attempt to fix failing test in non-darwin bots.
llvm-svn: 243120
Argyrios Kyrtzidis [Fri, 24 Jul 2015 17:00:19 +0000 (17:00 +0000)]
[code-completion] Strip outer nullability annotations when completing method implementations.
The outer nullability is transferred from the declaration to the implementation so including them is redundant.
The inner ones are not transferred so they are kept to match the exact types. When we transfer the inner ones as well
adding them in the implementation will become redundant and we should strip those as well.
rdar://
21737451
llvm-svn: 243119
Greg Clayton [Fri, 24 Jul 2015 16:55:00 +0000 (16:55 +0000)]
Bind to the loopback when we are expecting a connection from 127.0.0.1 so we don't set off firewall protections.
<rdar://problem/
17897318>
llvm-svn: 243118
Hans Wennborg [Fri, 24 Jul 2015 16:16:09 +0000 (16:16 +0000)]
test-release.sh: Defer test errors until the end
This makes the script run to the end and produce tarballs even on test
failures, and then highlights any errors afterwards.
(I first tried just storing the errors in a global variable, but that
didn't work as the "test_llvmCore" function invocation is actually
running as a sub-shell.)
Differential Revision: http://reviews.llvm.org/D11478
llvm-svn: 243116
Mehdi Amini [Fri, 24 Jul 2015 16:04:29 +0000 (16:04 +0000)]
LLVM API Change: the Module always owns the DataLayout
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243115
Mehdi Amini [Fri, 24 Jul 2015 16:04:22 +0000 (16:04 +0000)]
Remove access to the DataLayout in the TargetMachine
Summary:
Replace getDataLayout() with a createDataLayout() method to make
explicit that it is intended to create a DataLayout only and not
accessing it for other purpose.
This change is the last of a series of commits dedicated to have a
single DataLayout during compilation by using always the one owned
by the module.
Reviewers: echristo
Subscribers: jholewinski, llvm-commits, rafael, yaron.keren
Differential Revision: http://reviews.llvm.org/D11103
(cherry picked from commit
5609fc56bca971e5a7efeaa6ca4676638eaec5ea)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243114
Sanjay Patel [Fri, 24 Jul 2015 16:02:14 +0000 (16:02 +0000)]
fix wrong comment; NFC
llvm-svn: 243113
Aaron Ballman [Fri, 24 Jul 2015 15:47:32 +0000 (15:47 +0000)]
Correcting some comments. (1) the function is named throughUsingDecl() and not throughUsingDeclaration(). (2) Testing shows that this does work for shadowed variables as well as shadowed functions. I could not find an example where this matcher was failing. NFC.
llvm-svn: 243111
Tobias Grosser [Fri, 24 Jul 2015 13:12:17 +0000 (13:12 +0000)]
Update isl to isl-0.15-86-g595055e
Besides a couple of cleanups and refactorings in isl, this change set fixes a
couple of bugs in isl, that can cause issues during code generation.
llvm-svn: 243110
Aaron Ballman [Fri, 24 Jul 2015 12:47:27 +0000 (12:47 +0000)]
Silence a "not all control paths return a value" warning from MSVC. Should also silence a -Wreturn-type warning. NFC intended.
llvm-svn: 243109
Aaron Ballman [Fri, 24 Jul 2015 12:44:02 +0000 (12:44 +0000)]
Visual Studio is more permissive than other compilers; amends r243107 to fix a compile error.
llvm-svn: 243108
Aaron Ballman [Fri, 24 Jul 2015 12:35:41 +0000 (12:35 +0000)]
Add an AST matcher, isFinal(), for testing whether a method or class declaration are marked final.
llvm-svn: 243107
NAKAMURA Takumi [Fri, 24 Jul 2015 11:55:11 +0000 (11:55 +0000)]
llvm/test/tools/dsymutil/ARM/lit.local.cfg: Fix possibly typo, s/X86/ARM/.
llvm-svn: 243106
Yaron Keren [Fri, 24 Jul 2015 11:01:45 +0000 (11:01 +0000)]
Apparently some of the bots add .svn dirs inside the test/Driver/Inputs
directory structure. Try to make mingw toolchain resilient to such surprises.
llvm-svn: 243105
Ewan Crawford [Fri, 24 Jul 2015 10:01:11 +0000 (10:01 +0000)]
Initialize variable to prevent garbage values (RenderScriptRuntime)
The kernels_found variable is not initialized, so if it is not assigned true on line 823, then it will be a garbage value in the branch condition on line 828. This patch initializes the variable to false.
Patch by neilparikh.
Reviewers: domipheus
Differential Revision: http://reviews.llvm.org/D11323
llvm-svn: 243104
Luke Cheeseman [Fri, 24 Jul 2015 09:57:05 +0000 (09:57 +0000)]
[ARM] - Fix lowering of shufflevectors in AArch32
Some shufflevectors are currently being incorrectly lowered in the AArch32
backend as the existing checks for detecting the NEON operations from the
shufflevector instruction expects the shuffle mask and the vector operands to be
of the same length.
This is not always the case as the mask may be twice as long as the operand;
here only the lower half of the shufflemask gets checked, so provided the lower
half of the shufflemask looks like a vector transpose (or even is just all -1
for undef) then the intrinsics may get incorrectly lowered into a vector
transpose (VTRN) instruction.
This patch fixes this by accommodating for both cases and adds regression tests.
Differential Revision: http://reviews.llvm.org/D11407
llvm-svn: 243103
Pavel Labath [Fri, 24 Jul 2015 09:52:25 +0000 (09:52 +0000)]
Revert "Fix an issue where LLDB would run out of stack space ..."
This commit introduced an infinite recursion in
ValueObjectChild::CanUpdateWithInvalidExecutionContext (because FollowParentChain also considers
the current object), which broke nearly all the tests. Ignoring the current object removes the
recursion, but two tests still time out (TestDataFormatterLibcxxList.py and
TestValueObjectRecursion.py) for some reason. Reverting for now.
llvm-svn: 243102
Yaron Keren [Fri, 24 Jul 2015 09:31:57 +0000 (09:31 +0000)]
Try to appease clang buildbot by forcing libstdc++ in mingw.cpp test.
llvm-svn: 243101
Luke Cheeseman [Fri, 24 Jul 2015 09:31:48 +0000 (09:31 +0000)]
When lowering vector shifts a check is performed to see if the value to shift by
is an immediate, in this check the value is negated and stored in and int64_t.
The value can be -2^63 yet the result cannot be stored in an int64_t and this
gives some undefined behaviour causing failures. The negation is only necessary
when the values is within a certain range and so it should not need to negate
-2^63, this patch introduces this and also a regression test.
Differential Revision: http://reviews.llvm.org/D11408
llvm-svn: 243100
Tamas Berghammer [Fri, 24 Jul 2015 08:54:22 +0000 (08:54 +0000)]
Improve C++ function name handling and step-in avoid regerxp handling
If the function is a template then the return type is part of the
function name. This CL fixes the parsing of these function names in
the case when the return type contains ':'.
The name of free functions in C++ don't have context part. Fix the
logic geting the function name without arguments out from a full
function name to handle this case.
Change the handling of step-in-avoid-regexp to match the value against
the function name without it's arguments and return value. This is
required because the default regex ("^std::") would match any template
function returning an std object.
Fifferential revision: http://reviews.llvm.org/D11461
llvm-svn: 243099
Yaron Keren [Fri, 24 Jul 2015 08:50:15 +0000 (08:50 +0000)]
Add extensive tests for the mingw toolchain and remove trailing slash from Arch.
Address Richard Smith comments: remove the trailing seperator from the Arch
variable, implement six mingw_* trees under tools/clangtest/Driver/Inputs
and merge linux and Windows tests into a universal test that uses these trees.
llvm-svn: 243098
David Majnemer [Fri, 24 Jul 2015 06:49:13 +0000 (06:49 +0000)]
[clang-cl] Implement support for the /Zl flag
The flag allows users to specify that they do not want the object file
to have any implicit /defaultlib directives.
This fixes PR24236.
llvm-svn: 243097
Frederic Riss [Fri, 24 Jul 2015 06:41:11 +0000 (06:41 +0000)]
[dsymutil] Implement support for universal mach-o object files.
This patch allows llvm-dsymutil to read universal (aka fat) macho object
files and archives. The patch touches nearly everything in the BinaryHolder,
but it is fairly mechinical: the methods that returned MemoryBufferRefs or
ObjectFiles now return a vector of those, and the high-level access function
takes a triple argument to select the architecture.
There is no support yet for handling fat executables and thus no support for
writing fat object files.
llvm-svn: 243096
Frederic Riss [Fri, 24 Jul 2015 06:41:04 +0000 (06:41 +0000)]
[dsymutil] Make the triple detection more strict.
MachOObjectFile offers a method for detecting the correct triple, use
it instead of the previous approximation. This doesn't matter right
now, but it will become important for mach-o universal (fat) binaries.
llvm-svn: 243095
Frederic Riss [Fri, 24 Jul 2015 06:40:59 +0000 (06:40 +0000)]
[dsymutil] Refactor BinaryHolder internals. NFC
Call a helper that resets all the internal state of the BinaryHolder
when we change the underlying memory buffer. Makes a followup patch
a tiny bit smaller.
llvm-svn: 243094
David Majnemer [Fri, 24 Jul 2015 05:54:19 +0000 (05:54 +0000)]
[AST] Perform additional canonicalization for DependentSizedArrayType
We treated DependentSizedArrayTypes with the same element type but
differing size expressions as equivalently canonical. This would lead
to bizarre behavior during template instantiation.
This fixes PR24212.
llvm-svn: 243093
Alex Denisov [Fri, 24 Jul 2015 05:09:40 +0000 (05:09 +0000)]
Cleanup ObjCInterfaceDecl lookup for ObjC literals
llvm-svn: 243092
Bhushan D. Attarde [Fri, 24 Jul 2015 04:06:20 +0000 (04:06 +0000)]
Handle old style S packet correctly
SUMMARY:
This patch fixes couple of issues:
1. A thread tries to lock a mutex which is already locked.
2. Updating a thread list before the stop packet is parsed so that it can get a valid thread id and allows to set the stop info correctly.
Reviewers: clayborg
Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
Differential Revision: http://reviews.llvm.org/D11449
llvm-svn: 243091
Piotr Padlewski [Fri, 24 Jul 2015 04:04:49 +0000 (04:04 +0000)]
Generating available_externally vtables for outline virtual functions
Generating available_externally vtables for optimizations purposes.
Unfortunatelly ItaniumABI doesn't guarantee that we will be able to
refer to virtual inline method by name.
But when we don't have any inline virtual methods, and key function is
not defined in this TU, we can generate that there will be vtable and
mark it as available_externally.
This is patch will help devirtualize better.
Differential Revision: http://reviews.llvm.org/D11441
llvm-svn: 243090
Mehdi Amini [Fri, 24 Jul 2015 03:36:55 +0000 (03:36 +0000)]
Revert "Remove access to the DataLayout in the TargetMachine"
This reverts commit
0f720d984f419c747709462f7476dff962c0bc41.
It breaks clang too badly, I need to prepare a proper patch for clang
first.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243089
Gabor Horvath [Fri, 24 Jul 2015 03:25:13 +0000 (03:25 +0000)]
[Static Analyzer] Some tests do not turn on core checkers. Running the analyzers without the core checkers is not supported.
Differential Revision: http://reviews.llvm.org/D11432
llvm-svn: 243088
Alexei Starovoitov [Fri, 24 Jul 2015 03:17:08 +0000 (03:17 +0000)]
[bpf] initial support for debug_info
llvm-svn: 243087
Davide Italiano [Fri, 24 Jul 2015 02:14:20 +0000 (02:14 +0000)]
[llvm-reaobj] Display COFF-specific sections/tables only if the object is COFF.
Just skip them otherwise.
llvm-svn: 243086
Steven Wu [Fri, 24 Jul 2015 02:12:43 +0000 (02:12 +0000)]
Fix the cc1as crash when it outputs assembly
In clang cc1as_main, when the output file type is “asm”, AsmStreamer
owns a formatted_raw_ostream which has a reference to FDOS
(raw_ostream), so AsmStreamer must be closed before FDOS is closed.
llvm-svn: 243085
Michael Zolotukhin [Fri, 24 Jul 2015 01:53:04 +0000 (01:53 +0000)]
Handle resolvable branches in complete loop unroll heuristic.
Summary:
Resolving a branch allows us to ignore blocks that won't be executed, and thus make our estimate more accurate.
This patch is intended to be applied after D10205 (though it could be applied independently).
Reviewers: chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10206
llvm-svn: 243084
Mehdi Amini [Fri, 24 Jul 2015 01:44:39 +0000 (01:44 +0000)]
Remove access to the DataLayout in the TargetMachine
Summary:
Replace getDataLayout() with a createDataLayout() method to make
explicit that it is intended to create a DataLayout only and not
accessing it for other purpose.
This change is the last of a series of commits dedicated to have a
single DataLayout during compilation by using always the one owned
by the module.
Reviewers: echristo
Subscribers: jholewinski, llvm-commits, rafael, yaron.keren
Differential Revision: http://reviews.llvm.org/D11103
(cherry picked from commit
5609fc56bca971e5a7efeaa6ca4676638eaec5ea)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243083
Saleem Abdulrasool [Fri, 24 Jul 2015 01:14:25 +0000 (01:14 +0000)]
build: fix small typo in cmake doxygen build
A search word spelled as "searhc" in the LLVM_DOXYGEN_SEARCHENGINE_URL cmake
variable docstring.
Patch by Daniel Otero!
llvm-svn: 243082
NAKAMURA Takumi [Fri, 24 Jul 2015 01:12:36 +0000 (01:12 +0000)]
MIRParser/LLVMBuild.txt: Add MC for MCRegisterInfo::getDwarfRegNum().
llvm-svn: 243081
NAKAMURA Takumi [Fri, 24 Jul 2015 01:12:28 +0000 (01:12 +0000)]
Reorder alphabetically.
llvm-svn: 243080
Eric Christopher [Fri, 24 Jul 2015 01:07:50 +0000 (01:07 +0000)]
Clean up function attributes on PPC fast-isel tests.
llvm-svn: 243079
Kostya Serebryany [Fri, 24 Jul 2015 01:06:40 +0000 (01:06 +0000)]
[libFuzzer] allow users to supply their own implementation of rand
llvm-svn: 243078
Enrico Granata [Fri, 24 Jul 2015 00:57:19 +0000 (00:57 +0000)]
Fix an issue where LLDB would run out of stack space trying to decide if a deeply nested child can be updated in the face of an invalid execution context
The issue is that a child can't really ask the root object, since this decision could actually hinge on whether a dynamic and/or synthetic value is present
To do this, make values vote lazily for whether they are willing to allow this, so that we can navigate up the chain without recursively invoking ourselves
Tentative fix for rdar://
21949558
llvm-svn: 243077
Philip Reames [Fri, 24 Jul 2015 00:42:55 +0000 (00:42 +0000)]
[RewriteStatepointsForGC] Fix release build warning
llvm-svn: 243076
Jonathan Roelofs [Fri, 24 Jul 2015 00:29:50 +0000 (00:29 +0000)]
Add missing underlines for a docs section. NFC
llvm-svn: 243075
Bruce Mitchener [Fri, 24 Jul 2015 00:23:29 +0000 (00:23 +0000)]
Add UNUSED_IF_ASSERT_DISABLED and apply it.
Summary:
This replaces (void)x; usages where they x was subsequently
involved in an assertion with this macro to make the
intent more clear.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11451
llvm-svn: 243074