Commit Graph

174948 Commits

Author SHA1 Message Date
Eric Christopher dc3e9c75fe This command line option is only used in one place. Move it there and
rename it to something more descriptive.

llvm-svn: 209263
2014-05-21 00:20:01 +00:00
Eric Christopher a6342c581e Add a comment here.
llvm-svn: 209262
2014-05-21 00:02:50 +00:00
Eric Christopher 4015e124e3 Update for paired llvm commit with AsmVerbose.
llvm-svn: 209261
2014-05-21 00:00:03 +00:00
Eric Christopher 6c553d6240 Remove test. Replacing it with a backend test with the optimized IR.
llvm-svn: 209260
2014-05-21 00:00:01 +00:00
Eric Christopher 12a7155f60 Move this test to the backend from the frontend.
llvm-svn: 209259
2014-05-20 23:59:54 +00:00
Eric Christopher eb71972887 Move the verbose asm option to be part of the options struct and
set appropriately.

llvm-svn: 209258
2014-05-20 23:59:50 +00:00
Justin Bogner 5719614b77 libclang: Give each VirtualFileOverlay unit test its own name
llvm-svn: 209257
2014-05-20 23:52:11 +00:00
Greg Fitzgerald 1733b5e263 XFAIL ptrace test on arm
The patch adds better target_triple and target_arch defaults for lit tests,
which allows us to XFAIL tests based on architecture.

Was:
  target_triple = LLVM_DEFAULT_TARGET_TRIPLE
  target_arch = HOST_ARCH

Now:
  target_triple = COMPILER_RT_TEST_TARGET_TRIPLE
                , otherwise LLVM_DEFAULT_TARGET_TRIPLE
  target_arch = first item in COMPILER_RT_TEST_TARGET_TRIPLE

Differential Revision: http://reviews.llvm.org/D3855

llvm-svn: 209256
2014-05-20 23:31:26 +00:00
Eric Christopher bd8652d272 Make this test emit llvm IR rather than assembly.
llvm-svn: 209255
2014-05-20 23:23:51 +00:00
Rui Ueyama 9b0a69d6dc [PECOFF] Acquire mutex before accessing shared objects.
addResolvableSymbols() queues input files, and readAllSymbols() reads
from them. In practice it's currently safe because they are called from
a single thread. But it's not guaranteed.

Also, acquiring the same mutex is needed not to see inconsistent memory
contents that is allowed in the C++ memory model.

llvm-svn: 209254
2014-05-20 23:05:09 +00:00
Kevin Enderby 1b985af0ba Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress
does.  This allows llvm-nm to print spaces instead of 0’s for the value
of undefined symbols in Mach-O files.

To make this change other uses of MachOObjectFile::getSymbolAddress
are updated to handle when the Value is returned as UnknownAddressOrSize.
Which is needed to keep two of the ExecutionEngine tests working for example.

llvm-svn: 209253
2014-05-20 23:04:47 +00:00
Alexey Samsonov 60354bd3cf Fix test added in r209242: llc shouldn't create files in source tree
llvm-svn: 209252
2014-05-20 22:40:31 +00:00
David Blaikie 374af662e9 Revert "DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed."
This reverts commit r209178.

This seems to be asserting in an LTO build on some internal Apple
buildbots. No upstream reproduction (and I don't have an LLVM-aware gold
built right now to reproduce it personally) but it's a small patch & the
failure's semi-plausible so I'm going to revert first while I try to
reproduce this.

llvm-svn: 209251
2014-05-20 22:33:09 +00:00
Justin Bogner 1c078f2b1f VirtualFileSystem: Fix false positives in YAMLVFSWriter::containedIn
Checking if a path starts with another path isn't sufficient for
determining if one is contained within the heirarchy of the other.
We need to ensure that the substring ends at a directory boundary.

llvm-svn: 209250
2014-05-20 22:12:58 +00:00
Greg Fitzgerald 38ff567743 [ubsan] fix vptr test on ARM
Differential Revision: http://reviews.llvm.org/D3751

llvm-svn: 209249
2014-05-20 22:07:58 +00:00
Greg Fitzgerald 40a6401b1f Run common and profile tests in cross-compiled builds.
Route target_cflags to common and profile tests

llvm-svn: 209248
2014-05-20 22:04:27 +00:00
Alp Toker 6883743fd8 Reduce string duplication
If we're so keen on saving a dynamic allocation to add the trailing space, we
might as well do it in style.

llvm-svn: 209247
2014-05-20 22:03:47 +00:00
Alp Toker fdafb94f01 RAV reunification: merge Lambda body visitation to DRAV
llvm-svn: 209246
2014-05-20 22:03:39 +00:00
Alp Toker 8425c43c2a RAV reunification: merge DISPATCH_STMT() macro back to standard RAV
Also add the missing undef in both files.

llvm-svn: 209245
2014-05-20 22:03:27 +00:00
Alp Toker d92674ce81 RAV reunification: merge r190728
llvm-svn: 209244
2014-05-20 22:03:18 +00:00
Rui Ueyama 1255496271 [PECOFF] Do not use anonymous namespace in a header.
llvm-svn: 209243
2014-05-20 21:58:34 +00:00
Adam Nemet 2ba6492b7b [ARM64] PR19792: Fix cycle in DAG after performPostLD1Combine
Povray and dealII currently assert with "Overran sorted position" in
AssignTopologicalOrder.  The problem is that performPostLD1Combine can
introduce cycles.

Consider:

(insert_vector_elt (INSERT_SUBREG undef,
                                  (load (add %vreg0, Constant<8>), undef),  <= A
                                  TargetConstant<2>),
                   (load %vreg0, undef),                                    <= B
                   Constant<1>)

This is turned into a LD1LANEpost node.  However the address in A is not a
valid user of the post-incremented address of B in LD1LANEpost.

llvm-svn: 209242
2014-05-20 21:47:07 +00:00
Justin Bogner 9c785294fb VirtualFileSystem: Add YAMLVFSWriter to generate VFS mapping files
This moves the logic to write a JSON VFS mapping from the C api into
VirtualFileSystem, so that we can use it internally.

No functional change.

llvm-svn: 209241
2014-05-20 21:43:27 +00:00
David Blaikie 93ef46b02a Unbreak the sanitizer buildbots after r209226 due to SROA issue described in http://reviews.llvm.org/D3714
Undecided whether this should include a test case - SROA produces bad
dbg.value metadata describing a value for a reference that is actually
the value of the thing the reference refers to. For now, loosening the
assert lets this not assert, but it's still bogus/wrong output...

If someone wants to tell me to add a test, I'm willing/able, just
undecided. Hopefully we'll get SROA fixed soon & we can tighten up this
assertion again.

llvm-svn: 209240
2014-05-20 21:40:13 +00:00
Eric Christopher acca0085c1 Update for llvm change to avoid having global flag setting in TargetMachine.
llvm-svn: 209239
2014-05-20 21:25:41 +00:00
Eric Christopher 2feed5fd68 Move the function and data section flags into the options struct and
make the functions to set them non-static.
Move and rename the llvm specific backend options to avoid conflicting
with the clang option.

Paired with a backend commit to update.

llvm-svn: 209238
2014-05-20 21:25:34 +00:00
Reid Kleckner 64976a2a23 Update .arcconfig to point to reviews.llvm.org
Mostly a test review and commit.

Reviewers: tfiala

Differential Revision: http://reviews.llvm.org/D3834

llvm-svn: 209237
2014-05-20 21:24:59 +00:00
Kevin Enderby fcbed5af67 Revert r209235 as it broke two tests:
Failing Tests (2):
	    LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
	    LLVM :: ExecutionEngine/MCJIT/stubs.ll

llvm-svn: 209236
2014-05-20 21:10:15 +00:00
Kevin Enderby 1126d02c0c Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols.  Allowing llvm-nm to print spaces instead of 0’s for
the value of undefined symbols in Mach-O files.

llvm-svn: 209235
2014-05-20 20:32:18 +00:00
Todd Fiala 4e53f9e1fe Change gdb remote test support multi-request format.
The multi request-response test infrastructure support was adding
the optional request suffix iteration index as decimal but it needed
to be hex per spec.  This change fixes that.

llvm-svn: 209234
2014-05-20 20:02:08 +00:00
Aaron Ballman 2f22b94201 Cleaning up some range-based for loops so that the automatic type deduction is more explicit about pointers and const. Did some minor drive-by const correctness fixes and identifier updates as well. No functional changes.
llvm-svn: 209233
2014-05-20 19:47:14 +00:00
Peter Collingbourne 786283734a Revert r209231, "Update AttributeReference.rst."
According to Aaron, this is being generated on the server now.

llvm-svn: 209232
2014-05-20 19:38:07 +00:00
Peter Collingbourne 450a0b1dc9 Update AttributeReference.rst.
llvm-svn: 209231
2014-05-20 19:27:39 +00:00
Quentin Colombet c88baa5c10 [LSR] Canonicalize reg1 + ... + regN into reg1 + ... + 1*regN.
This commit introduces a canonical representation for the formulae.
Basically, as soon as a formula has more that one base register, the scaled
register field is used for one of them. The register put into the scaled
register is preferably a loop variant.
The commit refactors how the formulae are built in order to produce such
representation.
This yields a more accurate, but still perfectible, cost model.

<rdar://problem/16731508>

llvm-svn: 209230
2014-05-20 19:25:04 +00:00
Duncan P. N. Exon Smith 6f782b12aa Fix testcase from r209228
llvm-svn: 209229
2014-05-20 19:20:23 +00:00
Duncan P. N. Exon Smith d22b97c30b GlobalValue: Testcase for hidden visibility and local linkage
This is a testcase for r209227, a change in LLVM that automatically sets
visibility to default when the linkage is changed to local (rather than
asserting).

What this testcase triggers is hard to reproduce otherwise:  the
`GlobalValue` is created (with non-local linkage), the visibility is set
to hidden, and then the linkage is set to local.

PR19760

llvm-svn: 209228
2014-05-20 19:04:31 +00:00
Duncan P. N. Exon Smith e432c510dc GlobalValue: Automatically reset visibility when setting local linkage
r208264 started asserting in `setLinkage()` and `setVisibility()` that
visibility and linkage are compatible.  There are a few places in clang
where visibility is set first, and then linkage later, so the assert
fires.  In `setLinkage()`, it's clear what the visibility *should* be,
so rather than updating all the call sites just automatically fix the
visibility.

The testcase for this is for *clang*, so it'll follow separately in cfe.

PR19760

llvm-svn: 209227
2014-05-20 19:00:58 +00:00
David Blaikie 1d9aec67b0 Fix test breakage introduced in r209223.
Oops, broke the broken enum constants again.

llvm-svn: 209226
2014-05-20 18:36:35 +00:00
Alexey Samsonov dfcaf9c8d8 Rewrite calculateDbgValueHistory to make it (hopefully) more transparent.
This change preserves the original algorithm of generating history
for user variables, but makes it more clear.

High-level description of algorithm:
Scan all the machine basic blocks and machine instructions in the order
they are emitted to the object file. Do the following:
1) If we see a DBG_VALUE instruction, add it to the history of the
corresponding user variable. Keep track of all user variables, whose
locations are described by a register.
2) If we see a regular instruction, look at all the registers it clobbers,
and terminate the location range for all variables described by these registers.
3) At the end of the basic block, terminate location ranges for all
user variables described by some register.

Although this change shouldn't be user-visible (the contents of .debug_loc section
should be the same), it changes some internal assumptions about the set
of instructions used to track the variable locations. Watching the bots.

llvm-svn: 209225
2014-05-20 18:34:54 +00:00
Yaron Keren 065da7c53a Fixed spelling.
llvm-svn: 209224
2014-05-20 18:23:05 +00:00
David Blaikie 2af1c805b4 PR19767: DebugInfo emission of pointer constants.
In refactoring DwarfUnit::isUnsignedDIType I restricted it to only work
on values with signedness (unsigned or signed), asserting on anything
else (which did uncover some bugs). But it turns out that we do need to
emit constants of signless data, such as pointer constants - only null
pointer constants are known to need this so far, but it's conceivable
that there might be non-null pointer constants at some point (hardcoded
address offsets for device drivers?).

This patch just uses 'unsigned' for signless data such as pointer
constants. Arguably we could use signless representations
(DW_FORM_dataN) instead, allowing a trinary result from isUnsignedDIType
(signed, unsigned, signless), but this seems reasonable for now.

llvm-svn: 209223
2014-05-20 18:21:51 +00:00
Renato Golin e919fcac05 Avoids DCE on write_register
llvm-svn: 209222
2014-05-20 17:40:03 +00:00
Jordan Rose 7afd71e4ff Add a check for tautological bitwise comparisons to -Wtautological-compare.
This catches issues like:

if ((x & 8) == 4) { ... }
if ((x | 4) != 3) { ... }

Patch by Anders Rönnholm!

llvm-svn: 209221
2014-05-20 17:31:11 +00:00
Peter Collingbourne d2402470ee Make the wording for the flatten docs a little clearer.
llvm-svn: 209220
2014-05-20 17:30:03 +00:00
Adam Nemet 571eb5fc91 [PowerPC] PR19796: Also match ISD::TargetConstant in isIntS16Immediate
The SplitIndexingFromLoad changes exposed a latent isel bug in the PowerPC64
backend.  We matched an immediate offset with STWX8 even though it only
supports register offset.

The culprit is the complex-pattern predicate, SelectAddrIdx, which decides
that if the offset is not ISD::Constant it must be a register.

Many thanks to Bill Schmidt for testing this.

llvm-svn: 209219
2014-05-20 17:20:34 +00:00
Eric Christopher 4c08be18b1 Fix testcase for case.
llvm-svn: 209218
2014-05-20 17:15:31 +00:00
Peter Collingbourne 41af7c2fdc Implement the flatten attribute.
This is a GNU attribute that causes calls within the attributed function
to be inlined where possible. It is implemented by giving such calls the
alwaysinline attribute.

Differential Revision: http://reviews.llvm.org/D3816

llvm-svn: 209217
2014-05-20 17:12:51 +00:00
Eric Christopher 650c8f2a06 Clean up language and grammar.
Based on a patch by jfcaron3@gmail.com!
PR19806

llvm-svn: 209216
2014-05-20 17:11:11 +00:00
Eric Christopher c9e2a68905 Clean up language and grammar.
Based on a patch by jfcaron3@gmail.com!
PR19806

llvm-svn: 209215
2014-05-20 17:10:39 +00:00
Joerg Sonnenberger b1cc6d5603 Go via uintptr_t when casting away constness, otherwise GCC will warn
when using -Wcast-qual.

llvm-svn: 209214
2014-05-20 16:37:07 +00:00