Commit Graph

166445 Commits

Author SHA1 Message Date
Richard Smith 2e87e14490 Remove dead code; MacroDirective's IsHidden flag is always false.
llvm-svn: 200265
2014-01-27 23:54:39 +00:00
Eric Christopher f07ee3ae28 Reformat slightly.
llvm-svn: 200264
2014-01-27 23:50:03 +00:00
Greg Clayton 44d937820b Merging the iohandler branch back into main.
The many many benefits include:
1 - Input/Output/Error streams are now handled as real streams not a push style input
2 - auto completion in python embedded interpreter
3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use
4 - it is now possible to use curses to drive LLDB (please try the "gui" command)

We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases.

llvm-svn: 200263
2014-01-27 23:43:24 +00:00
Manman Ren f1cb16e481 PGO branch weight: keep halving the weights until they can fit into
uint32.

When folding branches to common destination, the updated branch weights
can exceed uint32 by more than factor of 2. We should keep halving the
weights until they can fit into uint32.

llvm-svn: 200262
2014-01-27 23:39:03 +00:00
Adrian Prantl c67e7976b3 Reverting because reverting r200145.
Revert "check-clang doesn't require neither llvm_src_root nor llvm_obj_root."

This reverts commit r200146.

llvm-svn: 200261
2014-01-27 22:57:33 +00:00
Adrian Prantl ba3c350545 Reverting because reverting r200145.
Revert "clang-check: Unittests doesn't requires tools."

This reverts commit r200147.

llvm-svn: 200260
2014-01-27 22:57:30 +00:00
Mark Seaborn 8d5b0e2f8f Fix the "#ifndef HAVE_SYS_WAIT_H" code path in Program.inc to compile
Without this fix, WaitResult is not defined.

llvm-svn: 200259
2014-01-27 22:53:07 +00:00
Adrian Prantl 8ae19f74c3 Rumors of test_debuginfo's death are slightly exaggerated.
Revert "Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line.""

This reverts commit r200145.

llvm-svn: 200258
2014-01-27 22:50:20 +00:00
Fariborz Jahanian c5fa540bcf Another test for patch for // rdar://15890251
llvm-svn: 200257
2014-01-27 22:44:17 +00:00
Bob Wilson 2d5d005842 Temporarily disable test that fails on Mac OS X 10.9.
PR18322. This test will be reenabled when the SDK gets fixed. In the meantime,
it is pretty disruptive to have this test keep failing.

llvm-svn: 200256
2014-01-27 22:43:21 +00:00
Mark Seaborn ba86cf51c9 ARM MC: Fix the initial DWARF CFI unwind info at the start of a function
This brings MC into line with GNU 'as' on ARM, and it brings the ARM
target into line with most other LLVM targets, which declare the
initial CFI state with addInitialFrameState().

Without this, functions generated with .cfi_startproc/endproc on ARM
will tend to cause GDB to abort with:
  gdb/dwarf2-frame.c:1132: internal-error: Unknown CFA rule.

I've also tested this by comparing the output of "readelf -w" on the
object files produced by llvm-mc and gas when given the .s file added
here.

This change is part of addressing PR18636.

Differential Revision: http://llvm-reviews.chandlerc.com/D2597

llvm-svn: 200255
2014-01-27 22:38:14 +00:00
Fariborz Jahanian 122d94fd61 ObjectiveC. Fixes a bug in recognition of an ivar
backing a property resulting in bogus warning.
// rdar://15890251

llvm-svn: 200254
2014-01-27 22:27:43 +00:00
Jason Molenda 89c37499dd Change DecodeProcessInfoResponse to set the ProcessInfo's architecture
if the remote stub provided enough information to identify it in the
qProcessInfo packet response.  (e.g. for an Apple device where we know 
it is Mach-O, the cpu type & cpu sub type).
<rdar://problem/15847901> 

llvm-svn: 200253
2014-01-27 22:23:20 +00:00
Aaron Ballman c669cc0d77 Add a new attribute meta-spelling called "GCC" -- it widens into being a GNU spelling, and a CXX11 spelling with the namespace "gnu". It also sets a bit on the spelling certifying that it is known to GCC. From this, we can warn about the extension appropriately. As a consequence, the FunctionDefinition functionality is completely removed.
Replacing the functionality from r199676, which didn't solve the problem as elegantly.

llvm-svn: 200252
2014-01-27 22:10:04 +00:00
Richard Smith 340e44074b Remove dead code.
llvm-svn: 200251
2014-01-27 22:08:43 +00:00
Matt Arsenault 5f2a92a26c Fix sext(setcc) -> select_cc using wrong type for setcc.
Also update the comment, since it actually produces a
select (setcc) instead of select_cc.

It was checking and using the setcc result type for the
type of the sext, instead of the type of the compared items.

In my problem case, the sext was to i32 and was used as the setcc type,
but the expected type was i64.

No test since I haven't been able to hit the problem with
this on any in-tree targets.

llvm-svn: 200249
2014-01-27 21:41:54 +00:00
David Peixotto b76f55f74a Fix unsupported addressing mode assertion for pld
Summary:
This commit gives an address mode to the PLD instruction. We
were getting an assertion failure in the frame lowering code
because we had code that was doing a pld of a stack allocated
address. The frame lowering was checking the address mode and
then asserting because pld had none defined.

This commit fixes pld for arm mode. There was a previous fix for
thumb mode in a separate commit. The commit for thumb mode
added a test in a separate file because it would otherwise fail
for arm. This commit moves the thumb test back into the prefetch.ll
file and adds the corresponding arm test.

Differential Revision: http://llvm-reviews.chandlerc.com/D2622

llvm-svn: 200248
2014-01-27 21:39:04 +00:00
Enrico Granata 5000ee16f6 <rdar://problem/15776874>
ValueObjectPrinter could enter an infinite loop while trying to display an aptly formed ValueObject: a reference, with a child of some pointer type, such that the pointees chain ended up pointing back to some part of itself - a pointer to itself being the simplest such case

Fixed here by only setting a pointer depth when needed, and ensuring that we won't overflow and wrap the pointer depth when it's zero.

llvm-svn: 200247
2014-01-27 21:31:26 +00:00
Todd Fiala 9f37737311 convert gdb-remote 'A' launch to use LaunchProcess ()
This change modifies the 'A' command handler's launch code to launch
with LaunchProcess (). The net effect is that the default process
monitoring that LaunchProcess () adds will kick in, allowing the
GDBRemoteCommunicationServer to be able to reap processes started with
this facility correctly. Later, in the case of lldb-gdbserver, we'll
also have the proper process monitoring going on to really debug the
inferior process.

llvm-svn: 200246
2014-01-27 20:44:50 +00:00
Joerg Sonnenberger 92ce6e83fc Rename fabs to local_fabs to not conflict with the builtin.
llvm-svn: 200245
2014-01-27 20:09:03 +00:00
Gautam Chakrabarti 35bd952a10 test commit: add minor comment
llvm-svn: 200244
2014-01-27 20:03:35 +00:00
Reid Kleckner 33630907d6 Revert "intrin.h: include setjmp.h to get a jmp_buf definition"
This failed the ms-intrin.cpp test.

This reverts commit r200237.

This also comments out the _setjmpex declaration for now so that
intrin.h will work on x64 targets.

llvm-svn: 200243
2014-01-27 19:32:42 +00:00
Reid Kleckner 2c35b3b029 Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
This reverts commit r200233.

The test required a registered ARM target, it was testing LLVM's
generated assembly, and it should have been an IRGen test.

llvm-svn: 200242
2014-01-27 19:26:39 +00:00
Rui Ueyama 22291d2cbf [PECOFF] Implement some relocations for x86-64.
llvm-svn: 200240
2014-01-27 19:23:12 +00:00
Reid Kleckner f08d658d48 Add implementations of some MSVC intrinsics
Adds an implementation for _InterlockedCompareExchangePointer() and
__faststorefence().

Patch by David Ziman!

llvm-svn: 200239
2014-01-27 19:16:35 +00:00
Fariborz Jahanian 369a9c3b51 ObjectiveC. When introducing a new property declaration in
parimary class and in mrr mode, assume property's default
memory attribute (assign) and to prevent a bogus warning.
// rdar://15859862

llvm-svn: 200238
2014-01-27 19:14:49 +00:00
Reid Kleckner 9b8dcebbca intrin.h: include setjmp.h to get a jmp_buf definition
This fixes an error on our _setjmpex declaration for 64-bit code and
allows us to declare _setjmp for 32-bit code.

llvm-svn: 200237
2014-01-27 19:14:09 +00:00
David Blaikie f36d9bac47 Driver: support -fno-debug-types-section to override -fdebug-types-section
llvm-svn: 200236
2014-01-27 18:52:43 +00:00
Reid Kleckner 924eb2afdc Add 'static __inline__' to MSVC intrinsics with implementations
This avoids warnings visible with -Wsystem-headers.

llvm-svn: 200235
2014-01-27 18:48:02 +00:00
Andrea Di Biagio f09a357765 [DAGCombiner] Teach how to fold sext/aext/zext of constant build vectors.
This patch teaches the DAGCombiner how to fold a sext/aext/zext dag node when
the operand in input is a build vector of constants (or UNDEFs).

The inability to fold a sext/zext of a constant build_vector was the root
cause of some pcg bugs affecting vselect expansion on x86-64 with AVX support.

Before this change, the DAGCombiner only knew how to fold a sext/zext/aext of a
ConstantSDNode.

llvm-svn: 200234
2014-01-27 18:45:30 +00:00
Artyom Skrobov 1c66c3a7f2 Cortex-M3 and Cortex-M4 should not enable hwdiv-arm
llvm-svn: 200233
2014-01-27 18:44:25 +00:00
Robert Lytton 1a2292614c XCore target exception handling
Implement __builtin_eh_return_data_regno()

llvm-svn: 200231
2014-01-27 17:56:25 +00:00
Dmitri Gribenko 6bf8f803f2 Comment parsing: don't crash while parsing \deprecated in a standalone comment
(comment without a decl).

I think this can not happen during normal compilation with -Wdocumentation,
only while using Clang APIs to parse comments outside of a source file.

Based on a patch by Olivier Goffart.

llvm-svn: 200230
2014-01-27 17:55:43 +00:00
Reid Kleckner 73afb43213 Silence MSVC warning on 'uint16_t |= bool' with a cast
This isn't C4800, it's C4805.  MSVC says this is unsafe, but it
generates correct code.

llvm-svn: 200229
2014-01-27 17:47:11 +00:00
NAKAMURA Takumi 14f1f44a16 [CMake] Put *_exports into "Misc" folder.
llvm-svn: 200228
2014-01-27 17:39:38 +00:00
David Majnemer e035cf9ce4 MC: Add support for .cfi_startproc simple
This commit allows LLVM MC to process .cfi_startproc directives when
they are followed by an additional `simple' identifier. This signals to
elide the emission of target specific CFI instructions that would
normally occur initially.

This fixes PR16587.

Differential Revision: http://llvm-reviews.chandlerc.com/D2624

llvm-svn: 200227
2014-01-27 17:20:25 +00:00
Todd Fiala 1b0539c7f6 Fix group stop signal handling issue on Linux.
This patch addresses a bug where in a multi-threaded program a new
signal from the inferior may be received before all group-stop
messages from an earlier signal have been handled.

Patch by Andrew MacPherson

llvm-svn: 200226
2014-01-27 17:03:57 +00:00
Tobias Grosser 6a62ebdd0f TODO: Add topic 'teach bugpoint to extract regions'
This does not only seem helpful for Polly, but it should help in general to
further reduce bugs.

llvm-svn: 200225
2014-01-27 14:48:17 +00:00
Tobias Grosser 4449e52655 Detection: Allow to filter the regions that can be detected
llvm-svn: 200224
2014-01-27 14:24:53 +00:00
Simon Atanasyan 26292ccc91 [Mips] Fix __mips macro definition.
llvm-svn: 200223
2014-01-27 13:59:11 +00:00
Simon Atanasyan 1a3665b676 [Mips] Change default CPU for MIPS 32/64 targets. Now they are mips32r2/mips64r2 respectively.
llvm-svn: 200222
2014-01-27 13:59:04 +00:00
Simon Atanasyan 682b49b9ef [Mips] Add tests to check MIPS arch macros.
llvm-svn: 200221
2014-01-27 13:58:54 +00:00
Tobias Grosser 0811b945e2 Do not reference llvm-gcc from bugpoint
Reiterating: llvm-gcc is dead since a long time.
llvm-svn: 200220
2014-01-27 13:44:58 +00:00
Chandler Carruth e24f3973eb [vectorize] Initial version of respecting PGO in the vectorizer: treat
cold loops as-if they were being optimized for size.

Nothing fancy here. Simply test case included. The nice thing is that we
can now incrementally build on top of this to drive other heuristics.
All of the infrastructure work is done to get the profile information
into this layer.

The remaining work necessary to make this a fully general purpose loop
unroller for very hot loops is to make it a fully general purpose loop
unroller. Things I know of but am not going to have time to benchmark
and fix in the immediate future:

1) Don't disable the entire pass when the target is lacking vector
   registers. This really doesn't make any sense any more.
2) Teach the unroller at least and the vectorizer potentially to handle
   non-if-converted loops. This is trivial for the unroller but hard for
   the vectorizer.
3) Compute the relative hotness of the loop and thread that down to the
   various places that make cost tradeoffs (very likely only the
   unroller makes sense here, and then only when dealing with loops that
   are small enough for unrolling to not completely blow out the LSD).

I'm still dubious how useful hotness information will be. So far, my
experiments show that if we can get the correct logic for determining
when unrolling actually helps performance, the code size impact is
completely unimportant and we can unroll in all cases. But at least
we'll no longer burn code size on cold code.

One somewhat unrelated idea that I've had forever but not had time to
implement: mark all functions which are only reachable via the global
constructors rigging in the module as optsize. This would also decrease
the impact of any more aggressive heuristics here on code size.

llvm-svn: 200219
2014-01-27 13:11:50 +00:00
Benjamin Kramer 9e709bce86 ConstantHoisting: We can't insert instructions directly in front of a PHI node.
Insert before the terminating instruction of the dominating block instead.

llvm-svn: 200218
2014-01-27 13:11:43 +00:00
Kostya Serebryany 7fe86589f1 [sanitizer] revert r200197: the buggy kernel (https://bugzilla.kernel.org/show_bug.cgi?id=67651) is almost unusable with asan even with this workaround (too slow), so this workaround makes no sense. The asan/msan bootstrap bot was changed to use a non-buggy kernel
llvm-svn: 200217
2014-01-27 13:05:09 +00:00
Benjamin Kramer 9d9907924d XCore: Fix typo in function name.
llvm-svn: 200216
2014-01-27 11:50:13 +00:00
Chandler Carruth edfa37effa [vectorizer] Add an override for the target instruction cost and use it
to stabilize a test that really is trying to test generic behavior and
not a specific target's behavior.

llvm-svn: 200215
2014-01-27 11:41:50 +00:00
Chandler Carruth 2bb03ba605 [vectorizer] Simplify code to use existing helpers on the Function
object and fewer pointless variables.

Also, add a clarifying comment and a FIXME because the code which
disables *all* vectorization if we can't use implicit floating point
instructions just makes no sense at all.

llvm-svn: 200214
2014-01-27 11:27:37 +00:00
Chandler Carruth 147c23278f [vectorizer] Teach the loop vectorizer's unroller to only unroll by
powers of two. This is essentially always the correct thing given the
impact on alignment, scaling factors that can be used in addressing
modes, etc. Also, fix the management of the unroll vs. small loop cost
to more accurately model things with this world.

Enhance a test case to actually exercise more of the unroll machinery if
using synthetic constants rather than a specific target model. Before
this change, with the added flags this test will unroll 3 times instead
of either 2 or 4 (the two sensible answers).

While I don't expect this to make a huge difference, if there are lots
of loops sitting right on the edge of hitting the 'small unroll' factor,
they might change behavior. However, I've benchmarked moving the small
loop cost up and down in many various ways and by a huge factor (2x)
without seeing more than 0.2% code size growth. Small adjustments such
as the series that led up here have led to about 1% improvement on some
benchmarks, but it is very close to the noise floor so I mostly checked
that nothing regressed. Let me know if you see bad behavior on other
targets but I don't expect this to be a sufficiently dramatic change to
trigger anything.

llvm-svn: 200213
2014-01-27 11:12:24 +00:00