Peter Collingbourne [Mon, 16 Mar 2015 22:00:04 +0000 (22:00 +0000)]
CFI: Make check-cfi depend on libLTO on Darwin.
llvm-svn: 232426
Richard Trieu [Mon, 16 Mar 2015 21:49:43 +0000 (21:49 +0000)]
Take the non-reference type when constructing a dummy expression.
Otherwise, Expr will assert during construction with a reference type.
llvm-svn: 232425
David Blaikie [Mon, 16 Mar 2015 21:48:46 +0000 (21:48 +0000)]
Add testing for mismatched explicit type on a load instruction when loading from bitcode
llvm-svn: 232424
Rafael Espindola [Mon, 16 Mar 2015 21:43:42 +0000 (21:43 +0000)]
There is only one Asm streamer, there is no need for targets to register it.
Instead, have the targets register a TargetStreamer to be use with the
asm streamer (if any).
llvm-svn: 232423
Justin Bogner [Mon, 16 Mar 2015 21:40:18 +0000 (21:40 +0000)]
InstrProf: Fix CoverageMappingReader on big endian
This makes the reader check the endianness of the object file its
given and behave appropriately. For the test I dug up a really old
linker and created a ppc-apple-darwin file for llvm-cov to read.
llvm-svn: 232422
David Majnemer [Mon, 16 Mar 2015 21:36:38 +0000 (21:36 +0000)]
CodeGen: @llvm.eh.typeid.for replaced @llvm.eh.typeid.for.i32
We removed @llvm.eh.typeid.for.i32 and replaced it with
@llvm.eh.typeid.for quite some time ago. Fix up some test cases which
never got updated.
llvm-svn: 232421
David Blaikie [Mon, 16 Mar 2015 21:35:48 +0000 (21:35 +0000)]
Test bitcode parsing error-handling for incorrect explicit type
(turns out I had regressed this when sinking handling of this type down
into GetElementPtrInst::Create - since that asserted before the error
handling was performed)
llvm-svn: 232420
Shankar Easwaran [Mon, 16 Mar 2015 21:27:32 +0000 (21:27 +0000)]
[Core] Add parallel_for_each
This adds a parallel_for_each similar to functionality in MSVC concurrency
library.
This was very patiently reviewed by Rui and credits go to him for this patch.
Differential Revision: http://reviews.llvm.org/D8348
llvm-svn: 232419
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:23:56 +0000 (21:23 +0000)]
Verifier: Don't call debug info verifier if the module is broken
If `Verifier` has already found a failure, don't call
`DebugInfoVerifier`. The latter sometimes crashes in `DebugInfoFinder`
when the former would give a nice message. The only two cases I found
it crashing are explicit verifier tests I've added:
- test/Verifier/llvm.dbg.declare-expression.ll
- test/Verifier/llvm.dbg.value-expression.ll
However, I assume frontends with bugs will create invalid IR as well.
IMO, the `DebugInfoVerifier` should never crash (instead, it should fail
to verify), but subtleties like that will be easier to work out once
it's enabled again.
This is part of PR22777.
llvm-svn: 232418
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:21:10 +0000 (21:21 +0000)]
AsmWriter: Handle broken metadata nodes
Print out temporary `MDNode`s so we don't crash in the verifier (or
during `dump()` output).
llvm-svn: 232417
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:10:12 +0000 (21:10 +0000)]
DebugInfo: Fix testcases that fail -verify-debug-info=true
As part of PR22777, fix testcases that fail the debug info verifier.
The changes fall into the following categories:
- Empty `filename:` fields in `MDFile`s. Compile units and some types
require non-empty filenames. A number of testcases have empty
filenames, probably due to hand-reduction of testcases.
- Not-quite empty arrays: `!{i32 0}`. This used to be equivalent in
the debug info schema to `!{}`. They cause problems for
`!MDSubroutineType`'s `types:` array, since it requires all operands
to be valid types. (Note that `!{null}` is the correct type array
for functions that take no arguments and return `void`.)
- Significantly bitrotted testcases. Nodes got left behind a few
upgrades ago because of missing or invalid tags.
llvm-svn: 232415
Simon Atanasyan [Mon, 16 Mar 2015 21:07:46 +0000 (21:07 +0000)]
[ELF] Use pcrel format for eh_frame_ptr field encoding
The `eh_frame_ptr` field in the `.eh_frame_hdr` section contains an address
of the `.eh_frame` section. Using an absolute 32-bit format for encoding
of this field does not work for 64-bit targets. It is better to use a
relative format because it covers both 32-bit and 64-bit cases. Sure
this work if a distance between `.eh_frame_hdr` and `.eh_frame` sections
is less than 4 Gb but it is a rather correct assumption.
http://reviews.llvm.org/D8352
llvm-svn: 232414
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:05:33 +0000 (21:05 +0000)]
Verifier: Simplify logic in processCallInst(), NFC
No need for local variables here.
llvm-svn: 232413
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 21:03:55 +0000 (21:03 +0000)]
IR: Take advantage of -verify checks for MDExpression
Now that we check `MDExpression` during `-verify` (r232299), make
the `DIExpression` wrapper more strict:
- remove redundant checks in `DebugInfoVerifier`,
- overload `get()` to `cast_or_null<MDExpression>` (superseding
`getRaw()`),
- stop checking for null in any accessor, and
- remove `DIExpression::Verify()` entirely in favour of
`MDExpression::isValid()`.
There is still some logic in this class, mostly to do with high-level
iterators; I'll defer cleaning up those until the rest of the wrappers
are similarly strict.
llvm-svn: 232412
Richard Smith [Mon, 16 Mar 2015 20:54:07 +0000 (20:54 +0000)]
[modules] If we find more formerly-canonical declarations of an entity while
building its redecl chains, make sure we pull in the redeclarations of those
canonical declarations.
It's pretty difficult to reach a situation where we can find more canonical
declarations of an entity while building its redecl chains; I think the
provided testcase (4 modules and 7 declarations) cannot be reduced further.
llvm-svn: 232411
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 20:46:27 +0000 (20:46 +0000)]
DebugInfo: Simplify logic in DIType::Verify(), NFC
Clarify the logic in `DIType::Verify()` by checking `isBasicType()`
earlier, by skipping `else` after `return`s, and by documenting an
otherwise opaque check.
No functionality change.
llvm-svn: 232410
Rafael Auler [Mon, 16 Mar 2015 20:39:07 +0000 (20:39 +0000)]
[LinkerScript] Handle symbols defined in linker scripts
Puts symbols defined in linker script expressions in a runtime file that is
added as input to the resolver, making the input object files see symbols
defined in linker scripts.
http://reviews.llvm.org/D8263
llvm-svn: 232409
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 20:24:02 +0000 (20:24 +0000)]
Verifier: Remove unnecessary double-checks
Turns out `visitIntrinsicFunctionCall()` descends into all operands
already, so explicitly descending in `visitDbgIntrinsic()` (part of
r232296) isn't useful.
Updating a testcase that doesn't really need `-verify-debug-info` (since
r231082) as confirmation.
llvm-svn: 232408
Richard Smith [Mon, 16 Mar 2015 20:11:03 +0000 (20:11 +0000)]
Lambdaify some helper functions. No functionality change.
llvm-svn: 232407
Kevin Enderby [Mon, 16 Mar 2015 20:08:09 +0000 (20:08 +0000)]
Add the options, -dylibs-used and -dylib-id to llvm-objdump used with -macho
to print the Mach-O dynamic shared libraries used by a linked image or the
library id of a shared library.
llvm-svn: 232406
Rafael Espindola [Mon, 16 Mar 2015 20:02:28 +0000 (20:02 +0000)]
Don't repeat names in comments. Remove unused default value.
llvm-svn: 232405
Rafael Auler [Mon, 16 Mar 2015 19:56:42 +0000 (19:56 +0000)]
[LinkerScript] Adding test cases for SECTIONS semantics
llvm-svn: 232404
Siva Chandra [Mon, 16 Mar 2015 19:56:36 +0000 (19:56 +0000)]
Skip TestDataFormatterStdMap on linux instead of xfailing.
Summary:
After
7181dae1248cc1b03505cca1b7c6e3dfeffefc0a, this test progresses
much further but crashes. Will skip this test while I fix this properly.
Test Plan: dotest.py -p TestDataFormatterStdMap
Reviewers: vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8361
llvm-svn: 232403
Rafael Auler [Mon, 16 Mar 2015 19:55:15 +0000 (19:55 +0000)]
[LinkerScript] Implement semantics for simple sections mappings
This commit implements the behaviour of the SECTIONS linker script directive,
used to not only define a custom mapping between input and output sections, but
also order input sections in the output file. To do this, we modify
DefaultLayout with hooks at important places that allow us to re-order input
sections according to a custom order. We also add a hook in SegmentChunk to
allow us to calculate linker script expressions while assigning virtual
addresses to the input sections that live in a segment.
Not all SECTIONS constructs are currently supported, but only the ones that do
not use special sort orders. It adds two LIT test as practical examples of
which sections directives are currently supported.
In terms of high-level changes, it creates a new class "script::Sema" that owns
all linker script ASTs and the logic for linker script semantics as well.
ELFLinkingContext owns a single copy of Sema, which will be used throughout
the object file writing process (to layout sections as proposed by the linker
script).
Other high-level change is that the writer no longer uses a "const" copy of
the linking context. This happens because linker script expressions must be
calculated *while* calculating final virtual addresses, which is a very late
step in object file writing. While calculating these expressions, we need to
update the linker script symbol table (inside the semantics object), and, thus,
we are "modifying our context" as we prepare to write the file.
http://reviews.llvm.org/D8157
llvm-svn: 232402
Greg Clayton [Mon, 16 Mar 2015 19:54:22 +0000 (19:54 +0000)]
Added an Python operating system plug-in test to verify that python can be used to add threads to an existing process.
The test does the following:
1 - runs a program to main without the OS plug-in and verifies no OS threads are in the process
2 - loads the OS plug-in and verifies the 3 OS plug-in threads are now in the current process
3 - verify the register contents of each thread that shows up
4 - unload the python OS plug-in and verify that the OS threads are gone.
llvm-svn: 232401
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 19:01:54 +0000 (19:01 +0000)]
AsmParser: Stop requiring 'name:' when it's not printed
r230877 optimized which fields are written out for `CHECK`-ability, but
apparently missed changing some of them to optional in `LLParser`.
Fixes PR22921.
llvm-svn: 232400
Siva Chandra [Mon, 16 Mar 2015 19:01:33 +0000 (19:01 +0000)]
Handle PyLong return values in LLDBSwigPython_CalculateNumChildren.
Summary:
Also, change its return type to size_t to match the return types of
its callers.
With this change, std::vector and std::list data formatter tests
pass on Linux (when using libstdc++) with clang as well as with gcc.
These tests have also been enabled in this patch.
Test Plan: dotest.py -p <TestDataFormatterStdVector|TestDataFormatterStdList>
Reviewers: vharron, clayborg
Reviewed By: clayborg
Subscribers: zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D8337
llvm-svn: 232399
Sanjay Patel [Mon, 16 Mar 2015 18:24:28 +0000 (18:24 +0000)]
fixed to test feature, not CPU
llvm-svn: 232398
David Blaikie [Mon, 16 Mar 2015 18:18:32 +0000 (18:18 +0000)]
Remove dead file (was only used by the C backend)
llvm-svn: 232397
Hafiz Abid Qadeer [Mon, 16 Mar 2015 18:18:18 +0000 (18:18 +0000)]
Remove redundant comments from lldb-mi source files.
Most of lldb-mi files have comments about environement, copyright etc which were neither needed nor uptodate.
This commit removes those comments.
llvm-svn: 232396
Joerg Sonnenberger [Mon, 16 Mar 2015 18:15:27 +0000 (18:15 +0000)]
Tom is also responsible for the 3.6 branch.
llvm-svn: 232395
David Blaikie [Mon, 16 Mar 2015 18:06:57 +0000 (18:06 +0000)]
Fix uses of reserved identifiers starting with an underscore followed by an uppercase letter
This covers essentially all of llvm's headers and libs. One or two weird
cases I wasn't sure were worth/appropriate to fix.
llvm-svn: 232394
Akira Hatanaka [Mon, 16 Mar 2015 18:02:16 +0000 (18:02 +0000)]
[AsmPrinter] Use the per-function subtarget to emit inline asm instructions that
are not at the file level.
Previously, the default subtarget created from the target triple was used to
emit inline asm instructions. Compilation would fail in cases where the feature
bits necessary to assemble an inline asm instruction in a function weren't set.
llvm-svn: 232392
Sanjay Patel [Mon, 16 Mar 2015 17:59:07 +0000 (17:59 +0000)]
add CHECK-LABELs for more reliable testing
llvm-svn: 232391
Ed Schouten [Mon, 16 Mar 2015 17:56:04 +0000 (17:56 +0000)]
Don't attempt to validate the output of %p.
In one of the ostream tests we attempt to validate whether the output of
%p is correct. This is actually outside the scope of libc++, for the
%reason that the format of %p is implementation defined. Change the test
%to validate that the output of %p is non-empty and is different when
%given two unequal addresses.
Differential Revision: http://reviews.llvm.org/D8354
Reviewed by: marshall
llvm-svn: 232390
Joerg Sonnenberger [Mon, 16 Mar 2015 17:54:54 +0000 (17:54 +0000)]
Global inline assembler blocks are merged before parsing, so no specific
location data is available. If pragma handling wants to look up the
position, it finds the LLVM buffer and wants to compare it with the
special built-in buffer, failing badly. Extend to the special handling
of the built-in buffer to also check for the inline asm buffer. Expect
only a single asm buffer. Sort it between the built-in buffers and the
normal file buffers.
Fixes the assert part of PR 22576.
llvm-svn: 232389
Duncan P. N. Exon Smith [Mon, 16 Mar 2015 17:49:03 +0000 (17:49 +0000)]
Fix doxygen comments from r232268
llvm-svn: 232388
Sanjay Patel [Mon, 16 Mar 2015 17:01:34 +0000 (17:01 +0000)]
fixed to test feature, not CPU; removed unnecessary declaration
llvm-svn: 232387
Tom Stellard [Mon, 16 Mar 2015 15:53:55 +0000 (15:53 +0000)]
R600/SI: don't try min3/max3/med3 with f64
There are no opcodes for this. This also adds a test case.
v2: make test more robust
Patch by: Grigori Goronzy
llvm-svn: 232386
Sanjay Patel [Mon, 16 Mar 2015 15:38:48 +0000 (15:38 +0000)]
fix comments to match code; NFC
llvm-svn: 232385
Marshall Clow [Mon, 16 Mar 2015 15:10:28 +0000 (15:10 +0000)]
Fix a problem when calling throw_with_nested with a class marked 'final'. Thanks to STL @ Microsoft for the bug report.
llvm-svn: 232384
Ed Schouten [Mon, 16 Mar 2015 15:09:15 +0000 (15:09 +0000)]
Don't hardcode the Czech locale name.
We already have a definition for the Czech locale name in
platform_support.h. Use this one instead.
While there, respect the common format of the tests. For most other
tests it's the case that test_iterators.h is placed right underneath the
other #includes (without an empty line). platform_support.h is included
after an empty line.
llvm-svn: 232383
Petar Jovanovic [Mon, 16 Mar 2015 15:01:09 +0000 (15:01 +0000)]
[MIPS] Fix justify error for small structures
Fix justify error for small structures bigger than 32 bits in fixed
arguments for MIPS64 big endian. There was a problem when small structures
are passed as fixed arguments. The structures that are bigger than 32 bits
but smaller than 64 bits were not left justified properly on MIPS64 big
endian. This is fixed by shifting the value to make it left justified when
appropriate.
Patch by Aleksandar Beserminji.
Differential Revision: http://reviews.llvm.org/D8174
llvm-svn: 232382
Viktor Kutuzov [Mon, 16 Mar 2015 14:42:21 +0000 (14:42 +0000)]
[Tsan] Do not sanitize memcpy() during thread initialization on FreeBSD
Differential Revision: http://reviews.llvm.org/D8324
llvm-svn: 232381
Hafiz Abid Qadeer [Mon, 16 Mar 2015 14:28:18 +0000 (14:28 +0000)]
Enabling the lldb-mi tests on Linux.
I think the issue that caused the random failure has been fixed. So I am enabling the tests again on Linux.
There are still some tests that are skipped on Linux due to different output. Those will be handled separately.
Tested with dotest.py and with "make check-lldb" and there was no MI related failure.
llvm-svn: 232380
Ed Schouten [Mon, 16 Mar 2015 14:27:44 +0000 (14:27 +0000)]
Make *abs() and *div() work on CloudABI.
According to POSIX, *abs() and *div() are allowed to be macros (in
addition to being functions). Make sure we undefine these, so that
std::*abs() and std::*div() work as expected.
llvm-svn: 232379
Rafael Espindola [Mon, 16 Mar 2015 14:25:08 +0000 (14:25 +0000)]
Use the i8 immediate cmp instructions when possible.
llvm-svn: 232378
Timur Iskhodzhanov [Mon, 16 Mar 2015 14:22:53 +0000 (14:22 +0000)]
[ASan] NFC: Factor out platform-specific interceptors
Reviewed at http://reviews.llvm.org/D8321
llvm-svn: 232377
Daniel Sanders [Mon, 16 Mar 2015 14:21:22 +0000 (14:21 +0000)]
Revert r232374: [hexagon] Distinguish the 'o', 'v', and 'm' inline assembly memory constraints.
2007-12-17-InvokeAsm.ll fails on the buildbot but not on my own system. Will investigate.
llvm-svn: 232376
Rafael Espindola [Mon, 16 Mar 2015 14:05:49 +0000 (14:05 +0000)]
Don't repeat names in comments and clang-format this function.
llvm-svn: 232375
Daniel Sanders [Mon, 16 Mar 2015 13:54:19 +0000 (13:54 +0000)]
[hexagon] Distinguish the 'o', 'v', and 'm' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: kparzysz, adasgupt
Reviewed By: kparzysz, adasgupt
Subscribers: colinl, llvm-commits
Differential Revision: http://reviews.llvm.org/D8204
llvm-svn: 232374
Daniel Sanders [Mon, 16 Mar 2015 13:13:41 +0000 (13:13 +0000)]
Make each target map all inline assembly memory constraints to InlineAsm::Constraint_m. NFC.
Summary:
This is instead of doing this in target independent code and is the last
non-functional change before targets begin to distinguish between
different memory constraints when selecting code for the ISD::INLINEASM
node.
Next, each target will individually move away from the idea that all
memory constraints behave like 'm'.
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D8173
llvm-svn: 232373
Hafiz Abid Qadeer [Mon, 16 Mar 2015 12:16:19 +0000 (12:16 +0000)]
Fix the test for gcc.
Following 3 changes were made.
1. Test was assuming that function name will have () in the end. I dont know why lldb is generating function name like this but it looks like a bug. For this test, I have removed it.
2. Step instruction test was assuming that function call will not be the first instruction in the range of the line. This assumption failed with gcc. So I had fixed this.
3. Some minor adjustments with the line number.
Test with bot gcc and clang and all tests pass.
This test is still very fragile. We should be removing hardcoded line number.
llvm-svn: 232372
Toma Tabacu [Mon, 16 Mar 2015 12:03:39 +0000 (12:03 +0000)]
[mips] [IAS] Outline NOP creation. NFC.
Summary: Make the code more readable by outlining NOP creation.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8320
llvm-svn: 232371
Hafiz Abid Qadeer [Mon, 16 Mar 2015 11:47:24 +0000 (11:47 +0000)]
Check that RestartedFromEvent flag before processing the state changed event.
Not checking for this flags caused lldb-mi to issue stop notification when target
has started running again. It also tried to get stack when target was running and
this caused randon failure.
Approved in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-March/006953.html
llvm-svn: 232370
Gabor Horvath [Mon, 16 Mar 2015 10:19:53 +0000 (10:19 +0000)]
Fix build failure on MSVC compilers.
llvm-svn: 232368
Gabor Horvath [Mon, 16 Mar 2015 09:59:54 +0000 (09:59 +0000)]
[clang] Replacing asserts with static_asserts where appropriate
Summary: This patch consists of the suggestions of clang-tidy/misc-static-assert check.
Reviewers: alexfh
Subscribers: dblaikie, xazax.hun, cfe-commits
Differential Revision: http://reviews.llvm.org/D8344
Patch by Szabolcs Sipos!
llvm-svn: 232367
Gabor Horvath [Mon, 16 Mar 2015 09:53:42 +0000 (09:53 +0000)]
[llvm] Replacing asserts with static_asserts where appropriate
Summary:
This patch consists of the suggestions of clang-tidy/misc-static-assert check.
Reviewers: alexfh
Reviewed By: alexfh
Subscribers: xazax.hun, llvm-commits
Differential Revision: http://reviews.llvm.org/D8343
llvm-svn: 232366
Ed Schouten [Mon, 16 Mar 2015 09:44:37 +0000 (09:44 +0000)]
Don't hardcode the locale name string.
The rest of the test uses the #defines for the locale names properly. In
this single spot we do hardcode the string. This causes this test to
fail on CloudABI, where this locale is called en_US.UTF-8@UTC.
llvm-svn: 232365
Simon Atanasyan [Mon, 16 Mar 2015 09:14:47 +0000 (09:14 +0000)]
[Mips] clang-format the code
No functional changes.
llvm-svn: 232364
Simon Atanasyan [Mon, 16 Mar 2015 09:14:40 +0000 (09:14 +0000)]
[Mips] Do not check the relocation type twice
No functional changes.
llvm-svn: 232363
Simon Atanasyan [Mon, 16 Mar 2015 09:14:34 +0000 (09:14 +0000)]
[Mips] Add `const` qualifier to some member functions
No functional changes.
llvm-svn: 232362
Simon Atanasyan [Mon, 16 Mar 2015 09:14:28 +0000 (09:14 +0000)]
[Mips] Implement R_MIPS_TLS_xxx relocation handling in case of N64 ABI
llvm-svn: 232361
Simon Atanasyan [Mon, 16 Mar 2015 09:14:17 +0000 (09:14 +0000)]
[Mips] Implement R_MIPS_GOT_DISP/PAGE/OFST relocations handling
llvm-svn: 232360
Simon Atanasyan [Mon, 16 Mar 2015 09:14:06 +0000 (09:14 +0000)]
[Mips] Group some cases in the switch statement
No functional changes.
llvm-svn: 232359
Dmitry Vyukov [Mon, 16 Mar 2015 08:04:26 +0000 (08:04 +0000)]
asan: fix overflows in isSafeAccess
As pointed out in http://reviews.llvm.org/D7583
The current checks can cause overflows when object size/access offset cross Quintillion bytes.
http://reviews.llvm.org/D8193
llvm-svn: 232358
Michael Gottesman [Mon, 16 Mar 2015 08:00:27 +0000 (08:00 +0000)]
One more try with unused.
llvm-svn: 232357
Michael Gottesman [Mon, 16 Mar 2015 07:46:34 +0000 (07:46 +0000)]
Add in an unreachable after a covered switch to appease certain bots.
llvm-svn: 232356
Michael Gottesman [Mon, 16 Mar 2015 07:34:17 +0000 (07:34 +0000)]
Remove a used that snuck in that seems to be triggering the MSVC buildbots.
llvm-svn: 232355
Justin Bogner [Mon, 16 Mar 2015 07:29:49 +0000 (07:29 +0000)]
InstrProf: Remove xfails for big-endian from coverage tests
This still doesn't actually work correctly for big endian input files,
but since these tests all use little endian input files they don't
actually fail. I'll be committing a real fix for big endian soon, but
I don't have proper tests for it yet.
llvm-svn: 232354
Alexander Musman [Mon, 16 Mar 2015 07:14:41 +0000 (07:14 +0000)]
[OPENMP] Enable codegen of the ‘private’ clause for ‘omp simd’ directive
llvm-svn: 232353
Michael Gottesman [Mon, 16 Mar 2015 07:02:39 +0000 (07:02 +0000)]
[objc-arc] Fix indentation of debug logging so it is easy to read the output.
llvm-svn: 232352
Michael Gottesman [Mon, 16 Mar 2015 07:02:36 +0000 (07:02 +0000)]
[objc-arc] Make the ARC optimizer more conservative by forcing it to be non-safe in both direction, but mitigate the problem by noting that we just care if there was a further use.
The problem here is the infamous one direction known safe. I was
hesitant to turn it off before b/c of the potential for regressions
without an actual bug from users hitting the problem. This is that bug ;
).
The main performance impact of having known safe in both directions is
that often times it is very difficult to find two releases without a use
in-between them since we are so conservative with determining potential
uses. The one direction known safe gets around that problem by taking
advantage of many situations where we have two retains in a row,
allowing us to avoid that problem. That being said, the one direction
known safe is unsafe. Consider the following situation:
retain(x)
retain(x)
call(x)
call(x)
release(x)
Then we know the following about the reference count of x:
// rc(x) == N (for some N).
retain(x)
// rc(x) == N+1
retain(x)
// rc(x) == N+2
call A(x)
call B(x)
// rc(x) >= 1 (since we can not release a deallocated pointer).
release(x)
// rc(x) >= 0
That is all the information that we can know statically. That means that
we know that A(x), B(x) together can release (x) at most N+1 times. Lets
say that we remove the inner retain, release pair.
// rc(x) == N (for some N).
retain(x)
// rc(x) == N+1
call A(x)
call B(x)
// rc(x) >= 1
release(x)
// rc(x) >= 0
We knew before that A(x), B(x) could release x up to N+1 times meaning
that rc(x) may be zero at the release(x). That is not safe. On the other
hand, consider the following situation where we have a must use of
release(x) that x must be kept alive for after the release(x)**. Then we
know that:
// rc(x) == N (for some N).
retain(x)
// rc(x) == N+1
retain(x)
// rc(x) == N+2
call A(x)
call B(x)
// rc(x) >= 2 (since we know that we are going to release x and that that release can not be the last use of x).
release(x)
// rc(x) >= 1 (since we can not deallocate the pointer since we have a must use after x).
…
// rc(x) >= 1
use(x)
Thus we know that statically the calls to A(x), B(x) can together only
release rc(x) N times. Thus if we remove the inner retain, release pair:
// rc(x) == N (for some N).
retain(x)
// rc(x) == N+1
call A(x)
call B(x)
// rc(x) >= 1
…
// rc(x) >= 1
use(x)
We are still safe unless in the final … there are unbalanced retains,
releases which would have caused the program to blow up anyways even
before optimization occurred. The simplest form of must use is an
additional release that has not been paired up with any retain (if we
had paired the release with a retain and removed it we would not have
the additional use). This fits nicely into the ARC framework since
basically what you do is say that given any nested releases regardless
of what is in between, the inner release is known safe. This enables us to get
back the lost performance.
<rdar://problem/
19023795>
llvm-svn: 232351
Michael Gottesman [Mon, 16 Mar 2015 07:02:32 +0000 (07:02 +0000)]
[objc-arc] Treat memcpy, memove, memset as just using pointers, not decrementing them.
This will be tested in the next commit (which required it). The commit
is going to update a bunch of tests at the same time.
llvm-svn: 232350
Michael Gottesman [Mon, 16 Mar 2015 07:02:30 +0000 (07:02 +0000)]
[objc-arc] Rename ConnectTDBUTraversals => PairUpRetainsReleases.
This is a name that is more descriptive of what the method really does. NFC.
llvm-svn: 232349
Michael Gottesman [Mon, 16 Mar 2015 07:02:27 +0000 (07:02 +0000)]
[objc-arc] Move initialization of ARCMDKindCache into the class itself. I also made it lazy.
llvm-svn: 232348
Michael Gottesman [Mon, 16 Mar 2015 07:02:24 +0000 (07:02 +0000)]
[objc-arc] Change EntryPointType to an enum class outside of ARCRuntimeEntryPoints called ARCRuntimeEntryPointKind.
llvm-svn: 232347
Justin Bogner [Mon, 16 Mar 2015 06:55:45 +0000 (06:55 +0000)]
InstrProf: Do a better job of reading coverage mapping data.
This code was casting regions of a memory buffer to a couple of
different structs. This is wrong in a few ways:
1. It breaks aliasing rules.
2. If the buffer isn't aligned, it hits undefined behaviour.
3. It completely ignores endianness differences.
4. The structs being defined for this aren't specifying their padding
properly, so this doesn't even represent the data properly on some
platforms.
This commit is mostly NFC, except that it fixes reading coverage for
32 bit binaries as a side effect of getting rid of the mispadded
structs. I've included a test for that.
I've also baked in that we only handle little endian more explicitly,
since that was true in practice already. I'll fix this to handle
endianness properly in a followup commit.
llvm-svn: 232346
Vince Harron [Mon, 16 Mar 2015 03:54:22 +0000 (03:54 +0000)]
Added nullptr to fix build
llvm-svn: 232345
Alexander Kornienko [Mon, 16 Mar 2015 03:14:16 +0000 (03:14 +0000)]
And one more empty directory.
llvm-svn: 232344
Alexander Kornienko [Mon, 16 Mar 2015 02:27:24 +0000 (02:27 +0000)]
Remove an empty directory.
llvm-svn: 232343
Frederic Riss [Mon, 16 Mar 2015 02:05:10 +0000 (02:05 +0000)]
[dsymutil] Add support to generate .debug_pubnames and .debug_pubtypes
The information gathering part of the patch stores a bit more information
than what is strictly necessary for these 2 sections. The rest will
become useful when we start emitting __apple_* type accelerator tables.
llvm-svn: 232342
Shankar Easwaran [Mon, 16 Mar 2015 00:54:03 +0000 (00:54 +0000)]
[ELF][ARM] Make gotSymbol a member.
The gotSymbol need not be a global static variable. Apart from this reason, This
variable was creating an issue with self hosting lld, as there seems to be an
issue running global initializers, when initializing the guard for this static
variable.
Program received signal SIGTRAP, Trace/breakpoint trap.
llvm-svn: 232341
Alexander Kornienko [Mon, 16 Mar 2015 00:43:57 +0000 (00:43 +0000)]
Fix ./configure build after r232338.
llvm-svn: 232340
NAKAMURA Takumi [Mon, 16 Mar 2015 00:40:47 +0000 (00:40 +0000)]
Rework r232337. Let llvm/test/tools/dsymutil/X86/basic-linking-x86.test dospath-tolerant.
llvm-svn: 232339
Alexander Kornienko [Mon, 16 Mar 2015 00:32:25 +0000 (00:32 +0000)]
Move remove-cstr-calls from a standalone executable to a clang-tidy check readability-redundant-string-cstr
http://reviews.llvm.org/D7318
Patch by Richard Thomson!
llvm-svn: 232338
NAKAMURA Takumi [Sun, 15 Mar 2015 23:07:16 +0000 (23:07 +0000)]
Suppress llvm/test/tools/dsymutil/X86/basic-linking-x86.test for now. Will fix later.
llvm-svn: 232337
NAKAMURA Takumi [Sun, 15 Mar 2015 23:07:05 +0000 (23:07 +0000)]
llvm/test/tools/dsymutil/X86/basic-lto-*-linking-x86.test: Relax expressions to meet dos path.
llvm-svn: 232336
Frederic Riss [Sun, 15 Mar 2015 22:20:28 +0000 (22:20 +0000)]
[dsymutil] Add missing raw_svector_stream::resync() calls.
Also, after looking at the raw_svector_stream internals, increase the
size of the SmallString used with it to prevent heap allocation.
Issue found by the Asan bot.
llvm-svn: 232335
Renato Golin [Sun, 15 Mar 2015 21:15:48 +0000 (21:15 +0000)]
Adding commit msg guidelines to dev policy
After much bike shed discussions, we seem to agree to a few loose
but relevant guidelines on how to prepare a commit message. It also
points the attribution section to the new commit messages section
to deduplicate information.
llvm-svn: 232334
Frederic Riss [Sun, 15 Mar 2015 20:45:43 +0000 (20:45 +0000)]
[dsymutil] Add support for linking line tables.
This code comes with a lot of cruft that is meant to mimic darwin's
dsymutil behavior. A much simpler approach (described in the numerous
FIXMEs that I put in there) gives the right output for the vast
majority of cases. The extra corner cases that are handled differently
need to be investigated: they seem to correctly handle debug info that
is in the input, but that info looks suspicious in the first place.
Anyway, the current code needs to handle this, but I plan to revisit it
as soon as the big round of validation against the classic dsymutil is
over.
llvm-svn: 232333
Frederic Riss [Sun, 15 Mar 2015 20:45:39 +0000 (20:45 +0000)]
[MCDwarf] Do not emit useless line table opcode.
No need to emit a DW_LNS_advance_pc with a 0 increment. Found out while
comparing dsymutil's and LLVM's line table encoding. Not a correctenss
fix, just a small encoding size optimization.
I'm not sure how to generate a sequence that triggers this, and moreover
llvm-dwardump doesn't dump the line table program, thus the effort
involved in creating a testcase for this trivial patch seemed out of
proportion.
llvm-svn: 232332
Simon Pilgrim [Sun, 15 Mar 2015 19:47:42 +0000 (19:47 +0000)]
Use SDValue bool check to tidyup some possible combines. NFC.
llvm-svn: 232331
Benjamin Kramer [Sun, 15 Mar 2015 18:47:26 +0000 (18:47 +0000)]
SimpleArray: Provide reverse iteration via std::reverse_iterator.
NFC intended.
llvm-svn: 232330
Ed Schouten [Sun, 15 Mar 2015 18:36:31 +0000 (18:36 +0000)]
Remove unneeded initialisation of fenv_t and fexcept_t.
Though common, there is no requirement that fenv_t and fexcept_t are
structure and integer types, respectively. fexcept_t is a structure on
CloudABI.
llvm-svn: 232329
Sanjay Patel [Sun, 15 Mar 2015 18:16:04 +0000 (18:16 +0000)]
remove function names from comments; NFC
llvm-svn: 232328
Sanjay Patel [Sun, 15 Mar 2015 18:11:35 +0000 (18:11 +0000)]
fix typo: NFC
llvm-svn: 232327
Vince Harron [Sun, 15 Mar 2015 18:05:53 +0000 (18:05 +0000)]
Use -fno-limit-debug-info instead of -fstandalone-debug in tests
This fixes tests on clang-3.4
AFAICT, these flags have the same affect and -fstandalone-debug wasn't
added until after clang-3.4
Committed to try to fix buildbot
Differential Revision: http://reviews.llvm.org/D8347
llvm-svn: 232326
Simon Pilgrim [Sun, 15 Mar 2015 17:21:35 +0000 (17:21 +0000)]
Use SDValue bool check to tidyup some possible combines. NFC.
llvm-svn: 232325
Simon Pilgrim [Sun, 15 Mar 2015 16:19:15 +0000 (16:19 +0000)]
[SSE} Added tests for float4-float3 conversions (PR11580)
llvm-svn: 232324