platform/upstream/llvm.git
11 years agoRemove an unused #include.
Jim Ingham [Wed, 13 Mar 2013 01:52:33 +0000 (01:52 +0000)]
Remove an unused #include.

llvm-svn: 176920

11 years agoDon't use the fact that we stopped with a "Breakpoint" stop reason to decide to step...
Jim Ingham [Wed, 13 Mar 2013 01:52:09 +0000 (01:52 +0000)]
Don't use the fact that we stopped with a "Breakpoint" stop reason to decide to step over the breakpoint.  It's
better to check directly whether there is a breakpoint site at the PC.

llvm-svn: 176919

11 years agoAdd a missing check for getting a NULL oso module back from GetModuleByCompUnitInfo.
Jim Ingham [Wed, 13 Mar 2013 01:34:14 +0000 (01:34 +0000)]
Add a missing check for getting a NULL oso module back from GetModuleByCompUnitInfo.

llvm-svn: 176918

11 years ago[mips] Define two subclasses of MipsTargetLowering. Mips16TargetLowering is for
Akira Hatanaka [Wed, 13 Mar 2013 00:54:29 +0000 (00:54 +0000)]
[mips] Define two subclasses of MipsTargetLowering. Mips16TargetLowering is for
mips16 and MipsSETargetLowering is for mips32/64.

No functionality changes.

llvm-svn: 176917

11 years ago[ELF][Writer] Let std::vector handle allocating space instead of reserving tiny portions.
Michael J. Spencer [Wed, 13 Mar 2013 00:30:08 +0000 (00:30 +0000)]
[ELF][Writer] Let std::vector handle allocating space instead of reserving tiny portions.

llvm-svn: 176916

11 years agoVarious fixes for armv7 floating point/vector register support.
Jason Molenda [Wed, 13 Mar 2013 00:14:30 +0000 (00:14 +0000)]
Various fixes for armv7 floating point/vector register support.
Drop the old f registers from debugserver's register list.  Add the
NEON 128-bit q registers to debugserver, support reading and writing.
Add the new contains / invalidates mappings for the s, d, and q
registers so lldb will know what registers overlay what other registers.
Change the default format of s and d registers to be floating point
instead of hex.  Remove some UTF-8 hyphen chars in comments in the ARM
register number definition headers.
<rdar://problem/13121797>

llvm-svn: 176915

11 years agoAdd a missing call to GetFileRangeMap. It's absence was causing debug info from...
Jim Ingham [Wed, 13 Mar 2013 00:07:18 +0000 (00:07 +0000)]
Add a missing call to GetFileRangeMap.  It's absence was causing debug info from .o files to sometimes
not get processed.

<rdar://problem/13406310>

llvm-svn: 176914

11 years agoRefactor filename/directory in DICompileUnit into a DIFile
David Blaikie [Wed, 13 Mar 2013 00:01:35 +0000 (00:01 +0000)]
Refactor filename/directory in DICompileUnit into a DIFile

This is the next step towards making the metadata for DIScopes have a common
prefix rather than having to delegate based on their tag type.

llvm-svn: 176913

11 years agoTest for LLVM r176911
Matt Beaumont-Gay [Tue, 12 Mar 2013 23:56:16 +0000 (23:56 +0000)]
Test for LLVM r176911

llvm-svn: 176912

11 years agoDon't crash if write_impl() leaves less buffer space available than expected.
Matt Beaumont-Gay [Tue, 12 Mar 2013 23:55:24 +0000 (23:55 +0000)]
Don't crash if write_impl() leaves less buffer space available than expected.

This was tickled by a Clang diagnostic; Clang test case to follow.

llvm-svn: 176911

11 years agoRemove unused "isMain" field from DICompileUnit
David Blaikie [Tue, 12 Mar 2013 22:43:04 +0000 (22:43 +0000)]
Remove unused "isMain" field from DICompileUnit

llvm-svn: 176910

11 years ago[Support][Path] Don't inf loop if creating the parent directory fails.
Michael J. Spencer [Tue, 12 Mar 2013 22:32:39 +0000 (22:32 +0000)]
[Support][Path] Don't inf loop if creating the parent directory fails.

Patch by Paul Robinson.

llvm-svn: 176908

11 years agoUpdate debug info test cases with empty SplitDebugFilename field.
David Blaikie [Tue, 12 Mar 2013 22:25:36 +0000 (22:25 +0000)]
Update debug info test cases with empty SplitDebugFilename field.

This could be 'null' or the empty string, DIDescriptor::getStringField
coalesces the two cases anyway so it's just a matter of legible/efficient
representation.

The change in behavior of the DICompileUnit::get* functions could be
subsumed by the full verification check - but ideally that should just be an
assertion if we could front-load the actual debug info metadata failure paths.

llvm-svn: 176907

11 years agoObjective-C: In my last path, also check
Fariborz Jahanian [Tue, 12 Mar 2013 22:22:38 +0000 (22:22 +0000)]
Objective-C: In my last path, also check
for existence of user setter before
issuing the warning about non-synthesizable
property. // rdar://13388503

llvm-svn: 176906

11 years agoMake modules.m test portable, now that autolinking is dependent on whether or not...
Ted Kremenek [Tue, 12 Mar 2013 21:49:29 +0000 (21:49 +0000)]
Make modules.m test portable, now that autolinking is dependent on whether or not the target uses the integrated assembler.

llvm-svn: 176902

11 years agoEliminate backend dependency in CFE testcase.
Adrian Prantl [Tue, 12 Mar 2013 21:40:00 +0000 (21:40 +0000)]
Eliminate backend dependency in CFE testcase.

llvm-svn: 176901

11 years agotests: Properly check if asserts are available
Tobias Grosser [Tue, 12 Mar 2013 21:27:39 +0000 (21:27 +0000)]
tests: Properly check if asserts are available

In my previous commits I failed to realise that my new requires lines fully
disabled these tests. We now properly check if we are in an asserts build and
only disable the tests if assertions are not available.

Reported-by: Sean Silva <silvas@purdue.edu>
llvm-svn: 176900

11 years agoSwitch from CreateTypeSourceInfo, which allocates
Sean Callanan [Tue, 12 Mar 2013 21:22:00 +0000 (21:22 +0000)]
Switch from CreateTypeSourceInfo, which allocates
uninitialized memory, to getTrivialTypeSourceInfo,
which initializes its memory, when creating trivial
TypeSourceInfos.

<rdar://problem/13332253>

llvm-svn: 176899

11 years agoARM cost model: Increase the cost for vector casts that use the stack
Arnold Schwaighofer [Tue, 12 Mar 2013 21:19:22 +0000 (21:19 +0000)]
ARM cost model: Increase the cost for vector casts that use the stack

Increase the cost of v8/v16-i8 to v8/v16-i32 casts and truncates as the backend
currently lowers those using stack accesses.

This was responsible for a significant degradation on
MultiSource/Benchmarks/Trimaran/enc-pc1/enc-pc1
where we vectorize one loop to a vector factor of 16. After this patch we select
a vector factor of 4 which will generate reasonable code.

unsigned char cle[32];

void test(short c) {
  unsigned short compte;
  for (compte = 0; compte <= 31; compte++) {
    cle[compte] = cle[compte] ^ c;
  }
}

radar://13220512

llvm-svn: 176898

11 years ago[driver] Only enable -fmodules-autolink if we are using the integrated assembler.
Ted Kremenek [Tue, 12 Mar 2013 21:08:08 +0000 (21:08 +0000)]
[driver] Only enable -fmodules-autolink if we are using the integrated assembler.

Fixes <rdar://problem/13289240>

llvm-svn: 176897

11 years agoWhitespace cleanup.
Rafael Espindola [Tue, 12 Mar 2013 21:06:00 +0000 (21:06 +0000)]
Whitespace cleanup.

llvm-svn: 176896

11 years agoForce column info to be generated for call expressions so we can
Adrian Prantl [Tue, 12 Mar 2013 20:43:25 +0000 (20:43 +0000)]
Force column info to be generated for call expressions so we can
differentiate multiple inlined call sites on the same line
in the debug info.

Fixes rdar://problem/13036237

llvm-svn: 176895

11 years agoDriver: -ccc-install-dir should affect cc1 -resource-dir
Jim Grosbach [Tue, 12 Mar 2013 20:17:58 +0000 (20:17 +0000)]
Driver: -ccc-install-dir should affect cc1 -resource-dir

-ccc-install-dir is supposed to cause the compiler to behave as-if it
were installed in the indicated location. It almost does, but misses
anything that's relying on the resource directory (libc++ header search,
in particular). The resource dir is resolved too early, before command
line args are handled.

The fix is simply to move handling of the resource dir until after we
know if a -ccc-install-dir is present.

rdar://13402696

llvm-svn: 176894

11 years agoDebug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and MCDwarfFil...
Manman Ren [Tue, 12 Mar 2013 20:17:00 +0000 (20:17 +0000)]
Debug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and MCDwarfFilesCUMap

llvm-svn: 176893

11 years agoRevert "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."
Bob Wilson [Tue, 12 Mar 2013 20:00:34 +0000 (20:00 +0000)]
Revert "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."

This reverts commit 176887.  Nico asked for more time to move to Xcode 4.6.

llvm-svn: 176892

11 years agoMake C++11 status page more consistent: we mark entries as "done" if we
Richard Smith [Tue, 12 Mar 2013 19:56:09 +0000 (19:56 +0000)]
Make C++11 status page more consistent: we mark entries as "done" if we
implement correct functionality, even if it's not optimal. On this basis, mark
"data dependency ordering" as done. Add footnotes for cases where our
implementation is known to be suboptimal.

llvm-svn: 176891

11 years agoAdd an interesting testcase we already handle correctly.
Rafael Espindola [Tue, 12 Mar 2013 19:50:10 +0000 (19:50 +0000)]
Add an interesting testcase we already handle correctly.

llvm-svn: 176890

11 years agoObjective-C: Issue warning in couple of obscure cases
Fariborz Jahanian [Tue, 12 Mar 2013 19:46:17 +0000 (19:46 +0000)]
Objective-C: Issue warning in couple of obscure cases
when property autosynthesis does not synthesize a property.
When property is declared 'readonly' in a super class and
is redeclared 'readwrite' in a subclass. When a property
autosynthesis causes it to share 'ivar' with another property.
// rdar://13388503

llvm-svn: 176889

11 years agoMove the extern "C" sema tests to a new file.
Rafael Espindola [Tue, 12 Mar 2013 19:45:57 +0000 (19:45 +0000)]
Move the extern "C" sema tests to a new file.

llvm-svn: 176888

11 years agoRevert r166370 and r166540 now that Xcode 4.6 has been available for a while.
Bob Wilson [Tue, 12 Mar 2013 19:39:19 +0000 (19:39 +0000)]
Revert r166370 and r166540 now that Xcode 4.6 has been available for a while.

Those changes were added as a temporary workaround for Xcode 4.5 passing the
-Wno-arc-abi option.  Xcode 4.6 does not pass that option so this should no
longer be necessary.

llvm-svn: 176887

11 years ago[Support][MemoryBuffer] Use sys::fs::mapped_file_region instead of sys::Path::MapInFi...
Michael J. Spencer [Tue, 12 Mar 2013 19:28:19 +0000 (19:28 +0000)]
[Support][MemoryBuffer] Use sys::fs::mapped_file_region instead of sys::Path::MapInFilePages.

This gives us memory mapped file I/O on Windows.

llvm-svn: 176886

11 years agoCorrect invalid debug info metadata
David Blaikie [Tue, 12 Mar 2013 19:04:24 +0000 (19:04 +0000)]
Correct invalid debug info metadata

Code review feedback on r176838 by Patrik Hägglund.

llvm-svn: 176884

11 years agoReview feedback change per Edwin: Move non-public members to end of classes.
John Thompson [Tue, 12 Mar 2013 18:51:47 +0000 (18:51 +0000)]
Review feedback change per Edwin: Move non-public members to end of classes.

llvm-svn: 176883

11 years agoDebug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
Manman Ren [Tue, 12 Mar 2013 18:27:15 +0000 (18:27 +0000)]
Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIE
belongs to a different compile unit.

DW_FORM_ref_addr should be used for cross compile-unit reference.

When compiling a large application, we got a dwarfdump verification error where
abstract_origin points to nowhere.

This error can't be reproduced on any testing case in MultiSource.
We may have other cases where we use DW_FORM_ref4 unconditionally.

rdar://problem/13370501

llvm-svn: 176882

11 years agoAvoid generating ISD::SELECT for vector operands to SIGN_EXTEND
Richard Relph [Tue, 12 Mar 2013 18:17:18 +0000 (18:17 +0000)]
Avoid generating ISD::SELECT for vector operands to SIGN_EXTEND

llvm-svn: 176881

11 years agoRemove the assert()'s from the LLVMCreateDisasmCPU() library API and just
Kevin Enderby [Tue, 12 Mar 2013 18:12:17 +0000 (18:12 +0000)]
Remove the assert()'s from the LLVMCreateDisasmCPU() library API and just
return 0 to indicate failure to create the disassembler.  A library routine
should not assert and just let the caller handler the error.  For example
darwin's otool(1) will simply print an error if it ends up using a library
that is not configured for a target it wants:

% otool -tv ViewController.o
ViewController.o:
(__TEXT,__text) section
can't create arm llvm disassembler

This is much better than an abort which appears as a crash to the user or
even the assert when using a Debug+Asserts built library:

Assertion failed: (MAI && "Unable to create target asm info!"), function LLVMCreateDisasmCPU, file /Volumes/SandBox/llvm/lib/MC/MCDisassembler/Disassembler.cpp, line 47.

radr://12539918

llvm-svn: 176880

11 years agoMisc. clang build warning fixes.
Matt Kopec [Tue, 12 Mar 2013 17:45:38 +0000 (17:45 +0000)]
Misc. clang build warning fixes.

llvm-svn: 176879

11 years agoObjective-C: Fixes a comment.
Fariborz Jahanian [Tue, 12 Mar 2013 17:43:00 +0000 (17:43 +0000)]
Objective-C: Fixes a comment.

llvm-svn: 176878

11 years agoAdd a doFinalization method to the DataLayout pass.
Pete Cooper [Tue, 12 Mar 2013 17:37:31 +0000 (17:37 +0000)]
Add a doFinalization method to the DataLayout pass.

This pass is meant to be immutable, however it holds mutable state to cache StructLayouts.
This method will allow the pass manager to clear the mutable state between runs.

Note that unfortunately it is still necessary to have the destructor, even though it does the
same thing as doFinalization.  This is because most TargetMachines embed a DataLayout on which
doFinalization isn't run as its never added to the pass manager.

I also didn't think it was necessary to complication things with a deInit method for which
doFinalization and ~DataLayout both call as there's only one field of mutable state.  If we had
more fields to finalize i'd have added this.

llvm-svn: 176877

11 years agoRevert "Disallow using -fmodules with -no-integrated-as."
Ted Kremenek [Tue, 12 Mar 2013 17:02:12 +0000 (17:02 +0000)]
Revert "Disallow using -fmodules with -no-integrated-as."

Per comment from Benjamin Kramer, this isn't portable (yet).  I'll come up
with a better fix.

llvm-svn: 176876

11 years agoWe already reported an error for
Rafael Espindola [Tue, 12 Mar 2013 16:45:13 +0000 (16:45 +0000)]
We already reported an error for

extern "C" {
  void test5_f() {
    extern int test5_b;
  }
}
static float test5_b;

This patch makes us report one for

extern "C" {
  void test6_f() {
    extern int test6_b;
  }
}
extern "C" {
  static float test6_b;
}

Not because we think the declaration would be extern C, but because of the rule:

An entity with C language linkage shall not be declared with the same name as an entity in global scope...

We were just not looking past the extern "C" to see if the decl was in global
scope.

llvm-svn: 176875

11 years agoImplemented formatting of rvalue references
Alexander Kornienko [Tue, 12 Mar 2013 16:28:18 +0000 (16:28 +0000)]
Implemented formatting of rvalue references

Summary:
Handle "&&" usage as rvalue reference, added tests and fixed incorrect
tests that interfere with this feature.

http://llvm.org/bugs/show_bug.cgi?id=15051

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D531

llvm-svn: 176874

11 years agoRevert the test moves from 176733. Use "REQUIRES: asserts" instead.
Jan Wen Voung [Tue, 12 Mar 2013 16:27:52 +0000 (16:27 +0000)]
Revert the test moves from 176733.  Use "REQUIRES: asserts" instead.

llvm-svn: 176873

11 years agoChange the order of the operands in patchAndReplaceAllUsesWith so
Dan Gohman [Tue, 12 Mar 2013 16:22:56 +0000 (16:22 +0000)]
Change the order of the operands in patchAndReplaceAllUsesWith so
that they're more consistent with Value::replaceAllUsesWith.

llvm-svn: 176872

11 years ago[docs] Add rtags to the external examples.
Sean Silva [Tue, 12 Mar 2013 16:07:31 +0000 (16:07 +0000)]
[docs] Add rtags to the external examples.

llvm-svn: 176871

11 years agoModify comment in user test.
Fariborz Jahanian [Tue, 12 Mar 2013 15:53:46 +0000 (15:53 +0000)]
Modify comment in user test.

llvm-svn: 176870

11 years agoCorrectly compute linkage of decls forward declared extern C.
Rafael Espindola [Tue, 12 Mar 2013 15:22:39 +0000 (15:22 +0000)]
Correctly compute linkage of decls forward declared extern C.

This fixes a crash in

namespace {
  struct X {};
}
extern "C" X test2_b;
X test2_b

before we would assign different linkages to each of the test2_b decls.

llvm-svn: 176869

11 years agoDon't reserve R2 on Darwin/PPC
Hal Finkel [Tue, 12 Mar 2013 15:18:14 +0000 (15:18 +0000)]
Don't reserve R2 on Darwin/PPC

Now that only the register-scavenger version of the CR spilling code remains,
we no longer need the Darwin R2 hack. Darwin can use R0 as a spare register in
any case where the System V ABI uses it (R0 is special architecturally, and so
is reserved under all common ABIs).

A few test cases needed to be updated to reflect the register-allocation changes.

llvm-svn: 176868

11 years agoError if an extern C declaration matches a previous hidden extern C declaration.
Rafael Espindola [Tue, 12 Mar 2013 15:13:56 +0000 (15:13 +0000)]
Error if an extern C declaration matches a previous hidden extern C declaration.

Without this patch we produce an error for

extern "C" {
  void f() {
    extern int b;
  }
}
extern "C" {
  extern float b;
}

but not for

extern "C" {
  void f() {
    extern int b;
  }
}
extern "C" {
  float b;
}

llvm-svn: 176867

11 years agoRemove a bogus assert so we don't crash in
Rafael Espindola [Tue, 12 Mar 2013 15:06:22 +0000 (15:06 +0000)]
Remove a bogus assert so we don't crash in

namespace {
  struct X {};
}
extern "C" {
  X b = X();
}

llvm-svn: 176866

11 years agoPPC should always use the register scavenger for CR spilling
Hal Finkel [Tue, 12 Mar 2013 14:12:16 +0000 (14:12 +0000)]
PPC should always use the register scavenger for CR spilling

This removes the -disable-ppc[32|64]-regscavenger options; the code
that uses the register scavenger has been working well (and has been the default)
for some time, and we don't need options to enable the old (broken) CR spilling code.

llvm-svn: 176865

11 years agoMissed on test case in the last commit
Tobias Grosser [Tue, 12 Mar 2013 13:39:40 +0000 (13:39 +0000)]
Missed on test case in the last commit

llvm-svn: 176864

11 years agoSmall fix for cost analysis of ptrtoint.
Patrik Hagglund [Tue, 12 Mar 2013 13:18:30 +0000 (13:18 +0000)]
Small fix for cost analysis of ptrtoint.

This seems to be a "copy-paste error" introducecd in r156140.

llvm-svn: 176863

11 years agoIn r169695, the address space limit for tests was replaced with a data
Patrik Hagglund [Tue, 12 Mar 2013 12:38:10 +0000 (12:38 +0000)]
In r169695, the address space limit for tests was replaced with a data
segment limit. Now, as a complement, add a stack space limit.

Otherwise, tests may grow undesirable large at inifinite
recursion. (Seen at r176838,
test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll)

llvm-svn: 176862

11 years agoRemove bad space after "default".
Daniel Jasper [Tue, 12 Mar 2013 12:26:55 +0000 (12:26 +0000)]
Remove bad space after "default".

Before:
switch (x) {
default : {}
}

After:
switch (x) {
default: {}
}

llvm-svn: 176861

11 years agoReleaseNotes: Add Hexagon Target section
Matthew Curtis [Tue, 12 Mar 2013 12:20:51 +0000 (12:20 +0000)]
ReleaseNotes: Add Hexagon Target section

And mention removal of hexagonv2 and hexagonv3 support (r176859).

llvm-svn: 176860

11 years agoRemove driver support for Hexagon V2 and V3
Matthew Curtis [Tue, 12 Mar 2013 11:52:09 +0000 (11:52 +0000)]
Remove driver support for Hexagon V2 and V3

Driver will now error when trying to compile for V2 or V3.

Removal of V2 and V3 support will allow us to simplify the hexagon
back-end.

llvm-svn: 176859

11 years agoReflect reality.
Bill Wendling [Tue, 12 Mar 2013 10:38:39 +0000 (10:38 +0000)]
Reflect reality.

llvm-svn: 176858

11 years ago[asan] use 4Tb of address space for the asan allocator instead of 1Tb. This increases...
Kostya Serebryany [Tue, 12 Mar 2013 09:04:49 +0000 (09:04 +0000)]
[asan] use 4Tb of address space for the asan allocator instead of 1Tb. This increases the memory available for a single size class from 16Gb to 64Gb. The total VM footprint becomes 20Tb

llvm-svn: 176857

11 years agoMove tests that depend on -stats under 'requires asserts'
Tobias Grosser [Tue, 12 Mar 2013 08:45:15 +0000 (08:45 +0000)]
Move tests that depend on -stats under 'requires asserts'

This fixes issues caused by the following commit:

  r176733 | jvoung | 2013-03-08 17:56:31 -0500
  Disable statistics on Release builds and move tests that depend on -stats.

Reported by: Jack Howarth <howarth@bromo.med.uc.edu>

llvm-svn: 176856

11 years ago[sanitizer] use fewer size classes in the allocator to reduce the memory footprint...
Kostya Serebryany [Tue, 12 Mar 2013 08:44:40 +0000 (08:44 +0000)]
[sanitizer] use fewer size classes in the allocator to reduce the memory footprint. There is no all-size-fits-all constant here, but this change is positive or neutral on several large apps I've tested

llvm-svn: 176855

11 years ago[msan] Use sptr instead of ptrdiff_t.
Evgeniy Stepanov [Tue, 12 Mar 2013 07:21:17 +0000 (07:21 +0000)]
[msan] Use sptr instead of ptrdiff_t.

llvm-svn: 176854

11 years ago[sanitizer] simplify the allocator's SizeClassMap: do not require an extra template...
Kostya Serebryany [Tue, 12 Mar 2013 07:01:27 +0000 (07:01 +0000)]
[sanitizer] simplify the allocator's SizeClassMap: do not require an extra template parameter, instead compute it in flight. No functionality change

llvm-svn: 176853

11 years ago[docs] Clarify wording.
Sean Silva [Tue, 12 Mar 2013 02:40:05 +0000 (02:40 +0000)]
[docs] Clarify wording.

"This documentation" could be construed as the entire c-t-e docs
(despite being under a doxygen heading; people read "locally"
sometimes), which gives a bad impression.

llvm-svn: 176849

11 years ago[docs] Add SourceWeb as external example.
Sean Silva [Tue, 12 Mar 2013 02:11:17 +0000 (02:11 +0000)]
[docs] Add SourceWeb as external example.

llvm-svn: 176848

11 years agoInitial check in of Doug's modularize tool for checking header readiness for modules...
John Thompson [Tue, 12 Mar 2013 02:07:30 +0000 (02:07 +0000)]
Initial check in of Doug's modularize tool for checking header readiness for modules, plus some changes per review feedback:  Removed system headers, changed to use stream output, added file name in message.

llvm-svn: 176847

11 years agoFor file & line breakpoints, if there are subsets of contiguous line table entries...
Jim Ingham [Tue, 12 Mar 2013 01:25:22 +0000 (01:25 +0000)]
For file & line breakpoints, if there are subsets of contiguous line table entries for the specified line, set the
breakpoint on the first one of each of the contiguous sub-sets of entries, and not all the others.

llvm-svn: 176846

11 years agoThe default configuration should be Debug, not DebugClang.
Jim Ingham [Tue, 12 Mar 2013 01:19:42 +0000 (01:19 +0000)]
The default configuration should be Debug, not DebugClang.

llvm-svn: 176845

11 years ago[mips] Rename function and variable names to start with proper case. Fix typos.
Akira Hatanaka [Tue, 12 Mar 2013 00:16:36 +0000 (00:16 +0000)]
[mips] Rename function and variable names to start with proper case. Fix typos.
Delete commented-out code.

llvm-svn: 176844

11 years agoUpdated the register numbering base documentation for the "gcc", "dwarf", "container...
Greg Clayton [Tue, 12 Mar 2013 00:14:38 +0000 (00:14 +0000)]
Updated the register numbering base documentation for the "gcc", "dwarf", "container-regs" and "invalidate-regs" key/value responses to the "qRegisterInfo" packet.

llvm-svn: 176843

11 years ago[Pass][Layout] Make algorithm not n^2.
Michael J. Spencer [Tue, 12 Mar 2013 00:10:00 +0000 (00:10 +0000)]
[Pass][Layout] Make algorithm not n^2.

This reduces the time spent in this function while linking ASTMatchersTests
from %43 to %2.4 of total link time.

llvm-svn: 176842

11 years agoCreated a sample "jump" command that handles
Sean Callanan [Tue, 12 Mar 2013 00:08:40 +0000 (00:08 +0000)]
Created a sample "jump" command that handles
GDB-style linespecs.  This command allows changing
the PC without manually looking up the new address.

llvm-svn: 176841

11 years agoLibCallSimplifier: optimize speed for short-lived instances
Meador Inge [Tue, 12 Mar 2013 00:08:29 +0000 (00:08 +0000)]
LibCallSimplifier: optimize speed for short-lived instances

Nadav reported a performance regression due to the work I did to
merge the library call simplifier into instcombine [1].  The issue
is that a new LibCallSimplifier object is being created whenever
InstCombiner::runOnFunction is called.  Every time a LibCallSimplifier
object is used to optimize a call it creates a hash table to map from
a function name to an object that optimizes functions of that name.
For short-lived LibCallSimplifier instances this is quite inefficient.
Especially for cases where no calls are actually simplified.

This patch fixes the issue by dropping the hash table and implementing
an explicit lookup function to correlate the function name to the object
that optimizes functions of that name.  This avoids the cost of always
building and destroying the hash table in cases where the LibCallSimplifier
object is short-lived and avoids the cost of building the table when no
simplifications are actually preformed.

On a benchmark containing 100,000 calls where none of them are simplified
I noticed a 30% speedup.  On a benchmark containing 100,000 calls where
all of them are simplified I noticed an 8% speedup.

[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130304/167639.html

llvm-svn: 176840

11 years agoRemove support for versioned debug info.
David Blaikie [Mon, 11 Mar 2013 23:39:23 +0000 (23:39 +0000)]
Remove support for versioned debug info.

Versioned debug info support has been a burden to maintain & also compromised
current debug info verification by causing test cases testing old debug info to
remain rather than being updated to the latest. It also makes it hard to add or
change the metadata schema by requiring various backwards-compatibility in the
DI* hierarchy.

So it's being removed in preparation for new changes to the schema to tidy up
old/unnecessary fields and add new fields needed for new debug info (well, new
to LLVM at least).

The more surprising part of this is the changes to DI*::Verify - this became
necessary due to the changes to AsmWriter. AsmWriter was relying on the version
test to decide which bits of metadata were actually debug info when printing
the comment annotations. Without the version information the tag numbers were
too common & it would print debug info on random metadata that happened to
start with an integer that matched a tag number. Instead this change makes the
Verify functions more precise (just adding "number of operands" checks - not
type checking those operands yet) & relies on that to decide which metadata is
debug info metadata.

llvm-svn: 176838

11 years agoAdd asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.
David Blaikie [Mon, 11 Mar 2013 23:21:19 +0000 (23:21 +0000)]
Add asserts to DIBuilder & fix DINameSpace::Verify to allow unnamed namespaces.

llvm-svn: 176837

11 years agoResidual cleanup: live-out set is gone
Eli Bendersky [Mon, 11 Mar 2013 23:18:25 +0000 (23:18 +0000)]
Residual cleanup: live-out set is gone

llvm-svn: 176836

11 years agollvm/test/CodeGen/R600/schedule-*.ll: Let them require +Asserts.
NAKAMURA Takumi [Mon, 11 Mar 2013 23:16:30 +0000 (23:16 +0000)]
llvm/test/CodeGen/R600/schedule-*.ll: Let them require +Asserts.

llvm-svn: 176835

11 years agoUpgrading debug info test cases to be (more) compatible with the current debug info...
David Blaikie [Mon, 11 Mar 2013 22:37:40 +0000 (22:37 +0000)]
Upgrading debug info test cases to be (more) compatible with the current debug info format.

These cases were found by further work to remove support for debug info
versioning. Common cleanups (other than changing the version info in the tag
field) included adding the last parameter to compile_units (recently added for
fission support) and other cases of trailing fields in lexical blocks, compile
units, and subprograms.

llvm-svn: 176834

11 years agoChange Linux/POSIX to output inferior output in realtime.
Matt Kopec [Mon, 11 Mar 2013 22:31:31 +0000 (22:31 +0000)]
Change Linux/POSIX to output inferior output in realtime.

llvm-svn: 176833

11 years agoObjective-C: When using super.prop, property should be
Fariborz Jahanian [Mon, 11 Mar 2013 22:26:33 +0000 (22:26 +0000)]
Objective-C: When using super.prop, property should be
looked up the current class's super class.
// rdar://13349296

llvm-svn: 176832

11 years agoRemove duplicate test contents.
David Blaikie [Mon, 11 Mar 2013 22:10:14 +0000 (22:10 +0000)]
Remove duplicate test contents.

llvm-svn: 176831

11 years agoFix a crasher newly introduced in r176659/r176649, where fast-isel tries to
Nick Lewycky [Mon, 11 Mar 2013 21:44:37 +0000 (21:44 +0000)]
Fix a crasher newly introduced in r176659/r176649, where fast-isel tries to
lower an expect intrinsic that is a constant expression.

llvm-svn: 176830

11 years ago[analyzer] Look for calls along with lvalue nodes in trackNullOrUndefValue.
Jordan Rose [Mon, 11 Mar 2013 21:31:46 +0000 (21:31 +0000)]
[analyzer] Look for calls along with lvalue nodes in trackNullOrUndefValue.

r176737 fixed bugreporter::trackNullOrUndefValue to find nodes for an lvalue
even if the rvalue node had already been collected. This commit extends that
to call statement nodes as well, so that if a call is contained within
implicit casts we can still track the return value.

No test case because node reclamation is extremely finicky (dependent on
how the AST and CFG are built, and then on our current reclamation rules,
and /then/ on how many nodes were generated by the analyzer core and the
current set of checkers). I consider this a low-risk change, though, and
it will only happen in cases of reclamation when the rvalue node isn't
available.

<rdar://problem/13340764>

llvm-svn: 176829

11 years agoFixes disassembler crashes on 2013 Haswell RTM instructions.
Kevin Enderby [Mon, 11 Mar 2013 21:17:13 +0000 (21:17 +0000)]
Fixes disassembler crashes on 2013 Haswell RTM instructions.

rdar://13318048

llvm-svn: 176828

11 years agoDon't remove a landing pad if the invoke requires a table entry.
Bill Wendling [Mon, 11 Mar 2013 20:53:00 +0000 (20:53 +0000)]
Don't remove a landing pad if the invoke requires a table entry.

An invoke may require a table entry. For instance, when the function it calls
is expected to throw.
<rdar://problem/13360379>

llvm-svn: 176827

11 years agoDisallow using -fmodules with -no-integrated-as.
Ted Kremenek [Mon, 11 Mar 2013 20:51:52 +0000 (20:51 +0000)]
Disallow using -fmodules with -no-integrated-as.

Modules enables features such as auto-linking, and we simply do not want to
support a matrix of subtly enabled/disabled features depending on whether or
not a user is using the integrated assembler.

It isn't clear if this is the best place to do this check.  For one thing,
these kind of errors are not caught by the serialized diagnostics.

Fixes <rdar://problem/13289240>

llvm-svn: 176826

11 years agoBuildbot was failing to build. I guess classes declared in implementation files are...
Greg Clayton [Mon, 11 Mar 2013 20:02:03 +0000 (20:02 +0000)]
Buildbot was failing to build. I guess classes declared in implementation files are treated differently on various compilers causing a "friend class Foo;" to fail for forward declared classes in global namespace.

llvm-svn: 176823

11 years agoThis SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff...
Howard Hinnant [Mon, 11 Mar 2013 19:53:48 +0000 (19:53 +0000)]
This SO question:  stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin.  Added.  I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin.  The current testsuite setup does not have a way a good way to test std::cin.

llvm-svn: 176822

11 years ago<rdar://problem/13372857>
Greg Clayton [Mon, 11 Mar 2013 18:42:51 +0000 (18:42 +0000)]
<rdar://problem/13372857>

Fixed the exception breakpoints to always use a file filter to make setting exception breakpoint efficient.

llvm-svn: 176821

11 years agoImprove the caching of debuginfo Objective C interface types.
Adrian Prantl [Mon, 11 Mar 2013 18:33:46 +0000 (18:33 +0000)]
Improve the caching of debuginfo Objective C interface types.
Generate forward declarations that are RAUW'd by finalize().
We thus avoid outputting the same type several times in multiple
stages of completion.

llvm-svn: 176820

11 years agoR600: Fix JUMP handling so that MachineInstr verification can occur
Vincent Lejeune [Mon, 11 Mar 2013 18:15:06 +0000 (18:15 +0000)]
R600: Fix JUMP handling so that MachineInstr verification can occur

This allows R600 Target to use the newly created -verify-misched llc flag

llvm-svn: 176819

11 years ago[msan] intercept dlopen and clear shadow for it
Reid Kleckner [Mon, 11 Mar 2013 18:07:42 +0000 (18:07 +0000)]
[msan] intercept dlopen and clear shadow for it

Summary:
The loader does not call mmap() through the PLT because it has to
bootstrap the process before libc is present.  Hooking dlopen() isn't
enough either because the loader runs module initializers before
returning, and they could run arbitrary msan instrumented code.

If msandr is present, then we can intercept the mmaps from dlopen at the
syscall layer and clear the shadow there.  If msandr is missing, we
clear the shadow after dlopen() and hope any initializers are trivial.

Reviewers: eugenis

CC: kcc, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D509

llvm-svn: 176818

11 years agoAdd -Wc99-compat warning for C11 unicode string and character literals.
Richard Smith [Mon, 11 Mar 2013 18:01:42 +0000 (18:01 +0000)]
Add -Wc99-compat warning for C11 unicode string and character literals.

llvm-svn: 176817

11 years agoPartly revert "Move clang tests that depend on llvm/ADT/Statistic.h to a subdir".
Jan Wen Voung [Mon, 11 Mar 2013 17:48:03 +0000 (17:48 +0000)]
Partly revert "Move clang tests that depend on llvm/ADT/Statistic.h to a subdir".

This reverts commit 176730, and uses "REQUIRES: asserts" instead.

llvm-svn: 176815

11 years ago[docs] Add ellipsis.
Sean Silva [Mon, 11 Mar 2013 17:07:47 +0000 (17:07 +0000)]
[docs] Add ellipsis.

llvm-svn: 176810

11 years agoMissing period in doc
Eli Bendersky [Mon, 11 Mar 2013 16:51:15 +0000 (16:51 +0000)]
Missing period in doc

llvm-svn: 176809

11 years agollvm/test/CodeGen/X86/handle-move.ll: Mark it as XFAIL:cygming. Investigating.
NAKAMURA Takumi [Mon, 11 Mar 2013 16:30:26 +0000 (16:30 +0000)]
llvm/test/CodeGen/X86/handle-move.ll: Mark it as XFAIL:cygming. Investigating.

llvm-svn: 176808

11 years ago[docs] Remove explicit authorship.
Sean Silva [Mon, 11 Mar 2013 16:25:16 +0000 (16:25 +0000)]
[docs] Remove explicit authorship.

In the spirit of r172109. Version control keeps a far more detailed
record of authorship anyways.

llvm-svn: 176807

11 years ago[libclang] Fix a test and a warning on windows.
Argyrios Kyrtzidis [Mon, 11 Mar 2013 16:03:17 +0000 (16:03 +0000)]
[libclang] Fix a test and a warning on windows.

Patch by Guy Benyei!

llvm-svn: 176806

11 years ago[Sanitizer] Implement BlockingMutex::CheckLocked()
Alexey Samsonov [Mon, 11 Mar 2013 15:45:20 +0000 (15:45 +0000)]
[Sanitizer] Implement BlockingMutex::CheckLocked()

llvm-svn: 176805