Adam Nemet [Thu, 14 May 2015 12:05:18 +0000 (12:05 +0000)]
New Loop Distribution pass
Summary:
This implements the initial version as was proposed earlier this year
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/080462.html).
Since then Loop Access Analysis was split out from the Loop Vectorizer
and was made into a separate analysis pass. Loop Distribution becomes
the second user of this analysis.
The pass is off by default and can be enabled
with -enable-loop-distribution. There is currently no notion of
profitability; if there is a loop with dependence cycles, the pass will
try to split them off from other memory operations into a separate loop.
I decided to remove the control-dependence calculation from this first
version. This and the issues with the PDT are actively discussed so it
probably makes sense to treat it separately. Right now I just mark all
terminator instruction required which keeps identical CFGs for each
distributed loop. This seems to be working pretty well for 456.hmmer
where even though there is an empty if-then block in the distributed
loop initially, it gets completely removed.
The pass keeps DominatorTree and LoopInfo updated. I've tested this
with -loop-distribute-verify with the testsuite where we distribute ~90
loops. SimplifyLoop is violated in some cases and I have a FIXME
covering this.
Reviewers: hfinkel, nadav, aschwaighofer
Reviewed By: aschwaighofer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8831
llvm-svn: 237358
Michael Kuperstein [Thu, 14 May 2015 10:58:59 +0000 (10:58 +0000)]
Fixed some typos and broken links in source level debugging docs.
llvm-svn: 237357
Toma Tabacu [Thu, 14 May 2015 10:53:40 +0000 (10:53 +0000)]
[mips] [IAS] Warn when LA is used with a 64-bit symbol.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9295
llvm-svn: 237356
Toma Tabacu [Thu, 14 May 2015 10:02:58 +0000 (10:02 +0000)]
[mips] [IAS] Give expandLoadAddressSym() more specific arguments. NFC.
Summary:
If we only pass the necessary operands, we don't have to determine the position of the symbol operand when entering expandLoadAddressSym().
This simplifies the expandLoadAddressSym() code.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9291
llvm-svn: 237355
Vladimir Sukharev [Thu, 14 May 2015 09:50:14 +0000 (09:50 +0000)]
[AArch64] Slight naming changes and comments for AArch64NamedImmMapper
Reviewers: echristo
Subscribers: llvm-commits
Follow-up to: http://reviews.llvm.org/D8496#158595
Relates to: http://reviews.llvm.org/rL235089
llvm-svn: 237354
Elena Demikhovsky [Thu, 14 May 2015 09:04:45 +0000 (09:04 +0000)]
AVX-512: Added i1 type handling for calling conventions.
i1 type is a legal type on AVX-512 and can be passed as parameter or return value.
i1 is promoted to i8 on return and to i32 for call arguments (i8 is also promoted to i32 here).
The result code is similar to the previous X86 targets, where i1 is allways promoted to i8.
llvm-svn: 237350
Vladimir Sukharev [Thu, 14 May 2015 08:25:18 +0000 (08:25 +0000)]
[ARM] Add v8.1a architecture
Add support for ARMv8.1a architecture.
Briefly it is described on http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development
Reviewers: jmolloy, rengolin
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8799
llvm-svn: 237349
Kevin Qin [Thu, 14 May 2015 08:18:05 +0000 (08:18 +0000)]
[AArch64 ACLE] Allow to define poly64_t as 'unsigned long long' on LLP64 system.
This fixes PR23414 as well.
llvm-svn: 237348
NAKAMURA Takumi [Thu, 14 May 2015 07:37:35 +0000 (07:37 +0000)]
clang/test/Frontend/dependency-gen-escaping.c: Appease win32 hosts. Investigating.
FIXME: Do we really emit single \ or escaped \\ along the context with -fms-compatibility -MG?
llvm-svn: 237347
Yaron Keren [Thu, 14 May 2015 06:53:31 +0000 (06:53 +0000)]
Revert r237339 as sanitizer-ppc64-linux1 does not like it.
Complains:
/home/buildbots/sanitizerslave1/sanitizer-ppc64-1/build/llvm/tools/clang/tools/c-index-test/c-index-test.c:829:30: error: format specifies type 'long' but the argument has type 'long long' [-Werror,-Wformat]
I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm not sure now how this should be fixed. %lld is non-standard
and not accepted by mingw on Windows while PRId64 is bad for this bot.
Is long long longer than 64 bits here? if not, why is PRId64
incompatible with it? something seems wrong.
Probably all the datatypes should be replaced to unsigned or uint64_t
depending upin requirements instead of the non standard long long.
llvm-svn: 237346
Justin Bogner [Thu, 14 May 2015 06:47:02 +0000 (06:47 +0000)]
TableGen: Avoid undefined behaviour by doing this shift in int64
Found by ubsan. This was taking a bool and left shifting by 32 - the
result is 64 bit, so we should really do the math in a type it fits
in.
llvm-svn: 237345
David Majnemer [Thu, 14 May 2015 05:55:00 +0000 (05:55 +0000)]
[MS ABI] Add support for /Zc:sizedDealloc
llvm-svn: 237344
Craig Topper [Thu, 14 May 2015 05:54:02 +0000 (05:54 +0000)]
[TableGen] Remove an unnecessary outer 'if' around 3 separate inner ifs. No functional change intended.
The outer if had 3 separate conditions ORed together and then the inner ifs detected which of the three conditions it was by using only a portion of the specific condition. Just put the whole condition in each inner if and remove the outer if.
llvm-svn: 237343
Craig Topper [Thu, 14 May 2015 05:53:59 +0000 (05:53 +0000)]
[TableGen] Simplify some code. NFC
llvm-svn: 237342
Craig Topper [Thu, 14 May 2015 05:53:56 +0000 (05:53 +0000)]
[TableGen] Remove ListInit::size() in favor of getSize() which does the same thing and is already used in most places. NFC.
llvm-svn: 237341
Craig Topper [Thu, 14 May 2015 05:53:53 +0000 (05:53 +0000)]
[TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it was just comparing to 0. NFC.
llvm-svn: 237340
Yaron Keren [Thu, 14 May 2015 05:40:50 +0000 (05:40 +0000)]
Replace non-standard %lld printf usage with PRId64.
See also r180024.
llvm-svn: 237339
David Majnemer [Thu, 14 May 2015 05:24:59 +0000 (05:24 +0000)]
Fix buildbots
llvm-svn: 237338
David Majnemer [Thu, 14 May 2015 05:19:23 +0000 (05:19 +0000)]
[MS ABI] __declspec(thread) behaves like thread_local in MSVC 2015
MSVC 2015 changed __declspec(thread) to make it behave like C++11's
thread_local keyword instead of acting similarly to __thread.
llvm-svn: 237337
David Majnemer [Thu, 14 May 2015 05:19:20 +0000 (05:19 +0000)]
[AST] hasAttr followed by getAttr isn't efficient
Just use getAttr because we are interested in the attribute's contents.
llvm-svn: 237336
David Majnemer [Thu, 14 May 2015 05:19:17 +0000 (05:19 +0000)]
[clang-cl] Add /Qvec and /Qvec- to control vectorization
llvm-svn: 237335
Justin Bogner [Thu, 14 May 2015 04:52:57 +0000 (04:52 +0000)]
cmake: Use -fno-sanitize-recover=all - the old spelling is deprecated
llvm-svn: 237334
NAKAMURA Takumi [Thu, 14 May 2015 04:25:54 +0000 (04:25 +0000)]
clang/test/Frontend/dependency-gen-escaping.c: Tweak r237296, to let '/' and '\\' distinguishd, to unbreak "--host=linux --target=msvc".
llvm-svn: 237333
Richard Smith [Thu, 14 May 2015 04:00:59 +0000 (04:00 +0000)]
Generalize future keyword compat diagnostics.
This, in preparation for the introduction of more new keywords in the
implementation of the C++ language, generalizes the support for future keyword
compat diagnostics (e.g., diag::warn_cxx11_keyword) by extending the
applicability of the relevant property in IdentifierTable with appropriate
renaming.
Patch by Hubert Tong!
llvm-svn: 237332
Richard Smith [Thu, 14 May 2015 02:25:44 +0000 (02:25 +0000)]
[modules] Rearrange preprocessor module visibility handling, no observable change intended.
llvm-svn: 237331
Ahmed Bougacha [Thu, 14 May 2015 02:21:02 +0000 (02:21 +0000)]
[Builtins] Wire half-precision conversions through cc_kext makefiles.
Kernel side of r237329.
llvm-svn: 237330
Ahmed Bougacha [Thu, 14 May 2015 01:47:32 +0000 (01:47 +0000)]
[Builtins] Wire half-precision conversions through Darwin makefiles.
Follow-up to r237161, modeled after r236805.
Note that arm64 is omitted on purpose, as the conversions are supported
natively there.
llvm-svn: 237329
Siva Chandra [Thu, 14 May 2015 01:36:47 +0000 (01:36 +0000)]
[TestAttachDenied] Use a file instead of a pipe for synchronization.
Summary:
One cannot use mknod or mkfifo on user Android devices. This commit
changes the use of pipe to a file to synchronize between the inferior
and the test.
Test Plan: dotest.py -P TestAttachDenied
Reviewers: ovyalov, chaoren
Reviewed By: chaoren
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D9768
llvm-svn: 237328
Andy Ayers [Thu, 14 May 2015 01:10:41 +0000 (01:10 +0000)]
Don't omit the constant when computing a cross-section relative relocation.
Differential Revision: http://reviews.llvm.org/D9692
llvm-svn: 237327
Richard Smith [Thu, 14 May 2015 01:08:58 +0000 (01:08 +0000)]
Add missing #include, found by modules build.
llvm-svn: 237326
Richard Smith [Thu, 14 May 2015 01:08:08 +0000 (01:08 +0000)]
[modules] Work around PR23521 to fix -O0 modules bootstrap.
llvm-svn: 237325
Ahmed Bougacha [Thu, 14 May 2015 01:00:51 +0000 (01:00 +0000)]
[CodeGen] Use standard -not gnueabi- naming for f16 libcalls on Darwin.
Other targets probably should as well. Since r237161, compiler-rt has
both, but I don't see why anything other than gnueabi would use a
gnueabi naming scheme.
llvm-svn: 237324
Ahmed Bougacha [Thu, 14 May 2015 00:50:28 +0000 (00:50 +0000)]
[Builtins] Implement f2h/h2f by jumping to trunc/extend.
Follow-up to r237161; seems like we can't use aliases, but we
can do better than duplicating the bodies, especially when that
body, after inlining, isn't as small as it looks.
Better approaches welcome. Perhaps the best thing is just to have
an #ifndef __APPLE__ over the GNUEABI names, since they're not used
there.
llvm-svn: 237323
Enrico Granata [Thu, 14 May 2015 00:46:47 +0000 (00:46 +0000)]
Implement an objc tagged-pointer info command that will provide information about what LLDB thinks an ObjC tagged pointer represents
llvm-svn: 237322
Richard Smith [Thu, 14 May 2015 00:45:20 +0000 (00:45 +0000)]
[modules] Fix a #include cycle when building a module for our builtin headers.
xmmintrin.h includes emmintrin.h and vice versa if SSE2 is enabled. We break
this cycle for a modules build, and instead make the xmmintrin.h module
re-export the immintrin.h module. Also included is a fix for an assert in the
serialization code if a module exports another module that was declared later
in the same module map.
llvm-svn: 237321
Richard Smith [Thu, 14 May 2015 00:22:12 +0000 (00:22 +0000)]
Fix a #include cycle in the libclang headers. "Eventually" is now.
llvm-svn: 237320
Vince Harron [Wed, 13 May 2015 23:59:03 +0000 (23:59 +0000)]
Added XTIMEOUT for TestAttachDenied.py
llvm-svn: 237319
Nick Lewycky [Wed, 13 May 2015 23:41:47 +0000 (23:41 +0000)]
Revert r237046. See the testcase on the thread where r237046 was committed.
llvm-svn: 237317
Ed Maste [Wed, 13 May 2015 23:12:51 +0000 (23:12 +0000)]
Add mips64el trap opcode to PlatformFreeBSD as well
llvm-svn: 237315
Alex Lorenz [Wed, 13 May 2015 23:10:51 +0000 (23:10 +0000)]
YAML: Implement block scalar parsing.
This commit implements the parsing of YAML block scalars.
Some code existed for it before, but it couldn't parse block
scalars.
This commit adds a new yaml node type to represent the block
scalar values.
This commit also deletes the 'spec-09-27' and 'spec-09-28' tests
as they are identical to the test file 'spec-09-26'.
This commit introduces 3 new utility functions to the YAML scanner
class: `skip_s_space`, `advanceWhile` and `consumeLineBreakIfPresent`.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D9503
llvm-svn: 237314
Ed Maste [Wed, 13 May 2015 23:09:43 +0000 (23:09 +0000)]
Restore breaks lost in shuffling GetSoftwareBreakpointTrapOpcode
llvm-svn: 237313
David Blaikie [Wed, 13 May 2015 22:55:01 +0000 (22:55 +0000)]
[opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's type
llvm-svn: 237312
David Blaikie [Wed, 13 May 2015 22:54:54 +0000 (22:54 +0000)]
[opaque pointer type] Use GlobalVariable::getValueType rather than accessing it through the GV's pointee type
llvm-svn: 237311
Douglas Katzman [Wed, 13 May 2015 22:44:52 +0000 (22:44 +0000)]
[X86] Fix PR23271 - RIP-relative decoding bug in disassembler.
Differential Revision: http://reviews.llvm.org/D9110
llvm-svn: 237310
Pete Cooper [Wed, 13 May 2015 22:43:09 +0000 (22:43 +0000)]
Construct ArrayRef<const T*> from vector<T>
ArrayRef already has a SFINAE constructor which can construct ArrayRef<const T*> from ArrayRef<T*>.
This adds methods to do the same directly from SmallVector and std::vector. This avoids an intermediate step through the use of makeArrayRef.
Also update the users of this in LICM and SROA to remove the now unnecessary makeArrayRef call.
Reviewed by David Blaikie.
llvm-svn: 237309
Kostya Serebryany [Wed, 13 May 2015 22:42:28 +0000 (22:42 +0000)]
[lib/Fuzzer] update docs about test corpuses in git
llvm-svn: 237308
Justin Bogner [Wed, 13 May 2015 22:41:48 +0000 (22:41 +0000)]
InstrProf: Fix display of large numbers in llvm-cov
llvm-cov was truncating numbers that were larger than a particular
fixed width, which is as confusing as it is useless. Instead, we use
engineering notation with SI prefix for magnitude.
llvm-svn: 237307
Ed Maste [Wed, 13 May 2015 22:40:01 +0000 (22:40 +0000)]
Add AArch64 and MIPS breakpoint opcodes and sort cases
New opcodes from PlatformLinux.cpp
llvm-svn: 237306
Paul Robinson [Wed, 13 May 2015 22:33:50 +0000 (22:33 +0000)]
Break \# in a depfile the same way as gcc.
Backslash followed by # in a filename should have both characters
escaped, if you do it the way GNU Make wants. GCC doesn't, so we do
it the way GCC does rather than the way GNU Make wants.
llvm-svn: 237304
Ed Maste [Wed, 13 May 2015 22:33:12 +0000 (22:33 +0000)]
Initial FreeBSD/arm live debugging support
Patch by Tom Rix, except using the RegisterContextFreeBSD_arm files
added in r235305 instead.
llvm-svn: 237303
Ed Maste [Wed, 13 May 2015 22:26:24 +0000 (22:26 +0000)]
Rearrange PlatformFreeBSD to match PlatformLinux
No functional change, but this simplifies diffs of the two.
llvm-svn: 237302
Pete Cooper [Wed, 13 May 2015 22:19:13 +0000 (22:19 +0000)]
Add llvm::all_of which wraps std::all_of.
This version doesn't need begin/end but can instead just take a type which has begin/end methods.
Use this to replace an eligible foreach loop in LoopInfo found by David Blaikie in r237224.
Reviewed by David Blaikie.
llvm-svn: 237301
Jonathan Roelofs [Wed, 13 May 2015 22:14:43 +0000 (22:14 +0000)]
Fix typo on Instruction::insert{After,Before}(). NFC
llvm-svn: 237300
Peter Collingbourne [Wed, 13 May 2015 22:07:22 +0000 (22:07 +0000)]
Make GNUInline consistent with whether we use traditional GNU inline semantics.
Previously we were setting LangOptions::GNUInline (which controls whether we
use traditional GNU inline semantics) if the language did not have the C99
feature flag set. The trouble with this is that C++ family languages also
do not have that flag set, so we ended up setting this flag in C++ modes
(and working around it in a few places downstream by also checking CPlusPlus).
The fix is to check whether the C89 flag is set for the target language,
rather than whether the C99 flag is cleared. This also lets us remove most
CPlusPlus checks. We continue to test CPlusPlus when deciding whether to
pre-define the __GNUC_GNU_INLINE__ macro for consistency with GCC.
There is a change in semantics in two other places
where we weren't checking both CPlusPlus and GNUInline
(FunctionDecl::doesDeclarationForceExternallyVisibleDefinition and
FunctionDecl::isInlineDefinitionExternallyVisible), but this change seems to
put us back into line with GCC's semantics (test case: test/CodeGen/inline.c).
While at it, forbid -fgnu89-inline in C++ modes, as GCC doesn't support it,
it didn't have any effect before, and supporting it just makes things more
complicated.
Differential Revision: http://reviews.llvm.org/D9333
llvm-svn: 237299
Justin Bogner [Wed, 13 May 2015 22:03:04 +0000 (22:03 +0000)]
InstrProf: Treat functions with a coverage map but no profile as unreached
If we have a coverage mapping but no profile data for a function,
calling it mismatched is misleading. This can just as easily be
unreachable code that was stripped from the binary. Instead, treat
these the same as functions where we have an explicit "zero" coverage
map by setting the count to zero for each mapped region.
llvm-svn: 237298
Duncan P. N. Exon Smith [Wed, 13 May 2015 21:41:14 +0000 (21:41 +0000)]
MC: clang-format MCSymbol.h, NFC
llvm-svn: 237297
Paul Robinson [Wed, 13 May 2015 21:18:15 +0000 (21:18 +0000)]
Fix dependency file escaping.
When writing a dependency (.d) file, if space or # is immediately
preceded by one or more backslashes, escape the backslashes as well as
the space or # character. Otherwise leave backslash alone.
This straddles the fence between BSD Make (which does no escaping at
all, and does not support space or # in filespecs) and GNU Make (which
does support escaping, but will fall back to the filespec as-written
if the escaping doesn't match an existing file).
Differential Revision: http://reviews.llvm.org/D9208
llvm-svn: 237296
Tim Northover [Wed, 13 May 2015 20:28:41 +0000 (20:28 +0000)]
ARM: remove possible vestiges of the legacy JIT???
There's no need to manually pass modifier strings around to tell an operand how
to print now, that information is encoded in the operand itself since the MC
layer came along.
llvm-svn: 237295
Tim Northover [Wed, 13 May 2015 20:28:38 +0000 (20:28 +0000)]
ARM: remove custom jump table UID
We were creating and propagating two separate indices for each jump table (from
back in the mists of time). However, the generic index used by other backends
is sufficient to emit a unique symbol so this was unneeded.
llvm-svn: 237294
Tim Northover [Wed, 13 May 2015 20:28:32 +0000 (20:28 +0000)]
ARM: refactor optimizeThumb2JumpTables.
The previous logic mixed 2 separate questions:
+ Can we form a TBB/TBH instruction?
+ Can we remove the jump-table calculation before it?
It then performed a bunch of random tests on the instructions earlier in the
basic block, which were probably sufficient to answer 2 but only because of the
very limited ways in which a t2BR_JT can actually be created.
For example there's no reason to expect the LeaInst to define the same base
register as the following indexing calulation. In practice this means we might
have missed opportunities to form TBB/TBH, in theory you could end up
misidentifying a sequence and removing the wrong LEA:
%R1 = t2LEApcrelJT ...
%R2 = t2LEApcrelJT ...
<... using and killing %R2 ...>
%R2 = t2ADDr %R1, $Ridx
Before we would have looked for an LEA defining %R2 and found the wrong one. We
just got lucky that jump table setup was (almost?) always confined to a single
basic block and there was only one jump table per block.
llvm-svn: 237293
Zachary Turner [Wed, 13 May 2015 20:21:33 +0000 (20:21 +0000)]
Don't import lock on Windows.
lock imports fcntl, which doesn't exist on Windows. If we need
to use this class on Windows, we will need to implement something
based on the CreateMutex API.
llvm-svn: 237292
Zachary Turner [Wed, 13 May 2015 20:21:22 +0000 (20:21 +0000)]
Fix broken test, this wasn't supposed to get committed.
llvm-svn: 237291
Sanjoy Das [Wed, 13 May 2015 20:20:10 +0000 (20:20 +0000)]
[Statepoints][Docs] Fix a couple of out of date examples.
Things I had missed in r237285.
llvm-svn: 237290
Sanjoy Das [Wed, 13 May 2015 20:19:51 +0000 (20:19 +0000)]
[Statepoints][Docs] Fix typo: change a period to a comma.
llvm-svn: 237289
Robert Flack [Wed, 13 May 2015 20:17:34 +0000 (20:17 +0000)]
Select expected remote libc++ library name based on remote platform.
Select expected remote libc++ library name based on remote platform. This is
used to verify libc++ is in the loaded image list by various tests which use it.
Test Plan:
Passes the following tests mac -> linux with this patch:
TestDataFormatterLibccIterator.py
TestDataFormatterLibccMap.py
TestDataFormatterLibccMultiMap.py
TestDataFormatterLibcxxMultiSet.py
TestDataFormatterLibcxxSet.py
TestDataFormatterUnordered.py
Differential Revision: http://reviews.llvm.org/D9759
llvm-svn: 237288
Sanjoy Das [Wed, 13 May 2015 20:11:59 +0000 (20:11 +0000)]
[Safepoints][Verifier] Fix a tautological Assert.
llvm-svn: 237287
Sanjoy Das [Wed, 13 May 2015 20:11:31 +0000 (20:11 +0000)]
[PlaceSafepoints] New attributes for patchable statepoints.
Summary:
This patch teaches the PlaceSafepoints pass about two `CallSite`
function attributes:
* "statepoint-id": if the string value of this attribute can be parsed
as an integer, then it is propagated to the ID parameter of the
statepoint created.
* "statepoint-num-patch-bytes": if the string value of this attribute
can be parsed as an integer, then it is propagated to the `num patch
bytes` parameter of the statepoint created.
This change intentionally does not assert on a malformed value for these
attributes, given that they're not "official" attributes.
Reviewers: reames, pgavlin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9735
llvm-svn: 237286
Sanjoy Das [Wed, 13 May 2015 20:11:24 +0000 (20:11 +0000)]
[PlaceSafepoints] Update docs for r237214.
Show the two new ID and NumPatchBytes fields in the PlaceSafepoint
examples in Statepoints.rst to avoid confusion.
llvm-svn: 237285
Davide Italiano [Wed, 13 May 2015 19:51:21 +0000 (19:51 +0000)]
[LoopIdiomRecognize] Use auto + range-based loop. NFC intended.
llvm-svn: 237284
Zachary Turner [Wed, 13 May 2015 19:45:06 +0000 (19:45 +0000)]
Fix line endings.
I must have committed these with windows line endings a few months
ago when I did this work.
llvm-svn: 237283
Zachary Turner [Wed, 13 May 2015 19:44:57 +0000 (19:44 +0000)]
Fix an issue with finding python on Windows.
Someone must have changed the behavior of FileSpec slightly
relating to whether or not there is a trailing backslash when calling
GetPath() and GetDirectory(). This caused ScriptInterpreterPython
to find the wrong values when initializing sys.path, and as a result
we couldn't find the lldb module.
This patch fixes the issue, and also adds a test to make sure that
GetDirectory() does not return a string containing a trailing slash.
llvm-svn: 237282
Zachary Turner [Wed, 13 May 2015 19:44:44 +0000 (19:44 +0000)]
Remove DoAttachToProcessWithId(lldb::pid_t).
There were two versions of DoAttachToprocessWithId. One that takes
a pid_t, and the other which takes a pid_t and a ProcessAttachInfo.
There were no callers of the former version, and all of the
implementations of this version were simply forwarding calls to
one version or the other.
llvm-svn: 237281
Zachary Turner [Wed, 13 May 2015 19:44:24 +0000 (19:44 +0000)]
Have Platform::KillProcess try to use the process plugin first.
llvm-svn: 237280
Jim Ingham [Wed, 13 May 2015 19:01:15 +0000 (19:01 +0000)]
Add a comment clarifying what func_name_type_mask is.
llvm-svn: 237279
Ted Woodward [Wed, 13 May 2015 18:52:56 +0000 (18:52 +0000)]
Change Linux Platform to support non-host Linux architectures
Summary:
This was originally http://reviews.llvm.org/D8709 , but I didn't commit it correctly.
Since then GetSupportedArchitectureAtIndex() has been changed. That change, http://reviews.llvm.org/D9511 , breaks non-x86 linux implementations, so this change goes back to the old implementation and adds remote linux support from D8709.
D8709 summary:
The Linux Platform currently will only say the Host architecture is supported. This patch retains that behavior for the Host Platform, but adds a list of architectures for the Remote Platform.
Reviewers: clayborg, flackr
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9683
llvm-svn: 237278
Jordan Rose [Wed, 13 May 2015 18:51:49 +0000 (18:51 +0000)]
[llvm-bcanalyzer] Add -show-binary-blobs option.
-dump mode normally omits blob data that contains unprintable characters.
When -show-binary-blobs is passed, it unilaterally escapes all blobs,
allowing those with binary data to be displayed.
llvm-svn: 237276
Jim Grosbach [Wed, 13 May 2015 18:37:00 +0000 (18:37 +0000)]
MC: Modernize MCOperand API naming. NFC.
MCOperand::Create*() methods renamed to MCOperand::create*().
llvm-svn: 237275
David Blaikie [Wed, 13 May 2015 18:35:29 +0000 (18:35 +0000)]
[opaque pointer type] Constant Folding: Use GEPOperator to access the pointee source type rather than going through the first operand's pointer type
llvm-svn: 237274
David Blaikie [Wed, 13 May 2015 18:35:26 +0000 (18:35 +0000)]
[opaque pointer type] Pass the explicit function type down to the instruction constructor when parsing invoke instructions
llvm-svn: 237273
Kostya Serebryany [Wed, 13 May 2015 18:31:46 +0000 (18:31 +0000)]
[lib/Fuzzer] enable -use_counters=1 by default
llvm-svn: 237272
Robert Flack [Wed, 13 May 2015 18:23:10 +0000 (18:23 +0000)]
Check the host platform to determine logging channel to test in TestRegisters.py
Checks the host platform to determine logging channel to test in
TestRegisters.py as the logging runs host side.
Test Plan:
./dotest.py $DOTEST_OPTS -v -t -p TestRegisters.py
This passes mac -> linux as it's logging the correct channel.
Differential Revision: http://reviews.llvm.org/D9755
llvm-svn: 237271
Robert Flack [Wed, 13 May 2015 18:20:02 +0000 (18:20 +0000)]
Enable workaround for finding functions in global namespace on linux binaries on
all hosts.
We require a workaround to be able to locate global and anonymous namespace
functions in the dwarf symbols on linux binaries. This patch enables this code
on all platforms so that we can still find these symbols when debugging from a
different host platform.
Test Plan:
The following tests begin passing when running with a mac host to linux client:
TestCallCPPFunction.py
TestCallStopAndContinue.py
TestExprs.py
TestExprsChar.py
TestNamespace.py
TestOverloadedFunctions.py
TestRvalueReferences.py
TestThreadExit.py
Differential Revision: http://reviews.llvm.org/D9754
llvm-svn: 237270
Jingyue Wu [Wed, 13 May 2015 18:12:24 +0000 (18:12 +0000)]
[NaryReassociate] avoid running forever
Avoid running forever by checking we are not reassociating an expression into
the same form.
Tested with @avoid_infinite_loops in nary-add.ll
llvm-svn: 237269
Aaron Ballman [Wed, 13 May 2015 18:06:48 +0000 (18:06 +0000)]
Made considerable updates to the documentation explaining how to add a new attribute to clang. Cleans up some of the existing wording, as well as adding new information and better explanations.
llvm-svn: 237268
Yaron Keren [Wed, 13 May 2015 17:56:46 +0000 (17:56 +0000)]
Silence Visual C++ warning C4189: 'Result' : local variable is initialized but not referenced.
Sadly, LLVM_ATTRIBUTE_UNUSED does nothing with Visual C++ which means
we'll have to workaround such cases again and again.
llvm-svn: 237267
Brendon Cahoon [Wed, 13 May 2015 17:56:03 +0000 (17:56 +0000)]
[Hexagon] Generate loop1 instruction for nested loops
loop1 is for the outer loop and loop0 is for the inner loop.
Differential Revision: http://reviews.llvm.org/D9680
llvm-svn: 237266
Diego Novillo [Wed, 13 May 2015 17:04:29 +0000 (17:04 +0000)]
Add function entry counts from sample profiles.
This patch uses the new function profile metadata "function_entry_count"
to annotate entry counts from sample profiles.
In a sampling profile, the total samples collected at the function entry
are an approximation for the number of times that function was invoked.
llvm-svn: 237265
Evgeniy Stepanov [Wed, 13 May 2015 16:55:41 +0000 (16:55 +0000)]
Implement std::experimental::sample.
Following specification in "C++ Extensions for Library Fundamentals":
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html#alg.random.sample
llvm-svn: 237264
Daniel Jasper [Wed, 13 May 2015 16:09:21 +0000 (16:09 +0000)]
clang-format: Improve nested block / lambda indentation when wrapping
before binary/ternary operators.
Basically, it doesn't seem right to indent a nested block aligned to a
binary or ternary operator.
Before:
int i = aaaaaa ? 1 //
: [] {
return 2; //
}();
llvm::errs() << "number of twos is "
<< std::count_if(v.begin(), v.end(), [](int x) {
return x == 2; // force break
});
After:
int i = aaaaaa ? 1 //
: [] {
return 2; //
}();
llvm::errs() << "number of twos is "
<< std::count_if(v.begin(), v.end(), [](int x) {
return x == 2; // force break
});
llvm-svn: 237263
Toma Tabacu [Wed, 13 May 2015 16:02:41 +0000 (16:02 +0000)]
[mips] [IAS] Preemptively fix warning introduced by r237255. NFC.
Some compilers warn about using the ternary operator with an unsigned variable
and enum.
I haven't seen this trigger in the llvm.org buildbots yet, but it probably will
at some point.
Reported by Daniel Sanders.
llvm-svn: 237262
Yaron Keren [Wed, 13 May 2015 15:17:19 +0000 (15:17 +0000)]
Update ELFObjectWriter::reset() following r236255.
llvm-svn: 237261
Diego Novillo [Wed, 13 May 2015 15:13:45 +0000 (15:13 +0000)]
Add function entry count metadata.
Summary:
This adds three Function methods to handle function entry counts:
setEntryCount() and getEntryCount().
Entry counts are stored under the MD_prof metadata node with the name
"function_entry_count". They are unsigned 64 bit values set by profilers
(instrumentation and sample profiler changes coming up).
Added documentation for new profile metadata and tests.
Reviewers: dexonsmith, bogner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9628
llvm-svn: 237260
Teresa Johnson [Wed, 13 May 2015 15:04:14 +0000 (15:04 +0000)]
Test commit: Remove unnecessary spaces.
llvm-svn: 237259
Brendon Cahoon [Wed, 13 May 2015 14:54:24 +0000 (14:54 +0000)]
[Hexagon] Generate hardware loop when loop has a critical edge
The hardware loop pass should try to generate a hardware loop
instruction when the original loop has a critical edge.
Differential Revision: http://reviews.llvm.org/D9678
llvm-svn: 237258
Jozef Kolek [Wed, 13 May 2015 14:18:11 +0000 (14:18 +0000)]
[mips][microMIPSr6] Implement CLO and CLZ instructions
This patch implements CLO and CLZ instructions using mapping.
Differential Revision: http://reviews.llvm.org/D8553
llvm-svn: 237257
Silviu Baranga [Wed, 13 May 2015 14:03:18 +0000 (14:03 +0000)]
Revert r237247 - [AArch64] Codegen VMAX/VMIN.. as it is causing failures in SPEC2000/2006
llvm-svn: 237256
Toma Tabacu [Wed, 13 May 2015 13:56:16 +0000 (13:56 +0000)]
[mips] [IAS] Unify common functionality of LA and LI.
Summary: A side-effect of this is that LA gains proper handling of unsigned and positive signed 16-bit immediates and more accurate error messages.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9290
llvm-svn: 237255
Andrey Churbanov [Wed, 13 May 2015 13:42:59 +0000 (13:42 +0000)]
Removed mentioning of OpenMP as unsupported feature (patch2 from A.Bokhanko)
llvm-svn: 237253
Tobias Grosser [Wed, 13 May 2015 13:10:13 +0000 (13:10 +0000)]
Update isl to
9f767f1766a0
This fixes a bug in the isl scheduler (http://llvm.org/PR21934)
Otherwise mostly minor changes.
llvm-svn: 237250
Daniel Jasper [Wed, 13 May 2015 12:54:30 +0000 (12:54 +0000)]
clang-format: Fix incorrect */& classification.
Before:
void f() { f(new a(), c *d); }
After:
void f() { f(new a(), c * d); }
llvm-svn: 237249