Commit Graph

145362 Commits

Author SHA1 Message Date
Adrian Prantl 06e5e15ba4 Eliminate backend dependency in CFE testcase.
llvm-svn: 176901
2013-03-12 21:40:00 +00:00
Tobias Grosser 7f54714dcc 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
2013-03-12 21:27:39 +00:00
Sean Callanan 34cf820b8a Switch from CreateTypeSourceInfo, which allocates
uninitialized memory, to getTrivialTypeSourceInfo,
which initializes its memory, when creating trivial
TypeSourceInfos.

<rdar://problem/13332253>

llvm-svn: 176899
2013-03-12 21:22:00 +00:00
Arnold Schwaighofer 90774f3c8f 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
2013-03-12 21:19:22 +00:00
Ted Kremenek acd31db0ce [driver] Only enable -fmodules-autolink if we are using the integrated assembler.
Fixes <rdar://problem/13289240>

llvm-svn: 176897
2013-03-12 21:08:08 +00:00
Rafael Espindola bf5c33b752 Whitespace cleanup.
llvm-svn: 176896
2013-03-12 21:06:00 +00:00
Adrian Prantl c782242a12 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
2013-03-12 20:43:25 +00:00
Jim Grosbach 061dabf7df 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
2013-03-12 20:17:58 +00:00
Manman Ren 5ce24ffca2 Debug Info: use SmallVector instead of std::vector in MCDwarfDirsCUMap and MCDwarfFilesCUMap
llvm-svn: 176893
2013-03-12 20:17:00 +00:00
Bob Wilson 897ce8c8bb 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
2013-03-12 20:00:34 +00:00
Richard Smith 9deb9d9d42 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
2013-03-12 19:56:09 +00:00
Rafael Espindola 1736f74669 Add an interesting testcase we already handle correctly.
llvm-svn: 176890
2013-03-12 19:50:10 +00:00
Fariborz Jahanian 9d25a48b41 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
2013-03-12 19:46:17 +00:00
Rafael Espindola f67ef79820 Move the extern "C" sema tests to a new file.
llvm-svn: 176888
2013-03-12 19:45:57 +00:00
Bob Wilson 8859471c51 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
2013-03-12 19:39:19 +00:00
Michael J. Spencer 2343a74aeb [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
2013-03-12 19:28:19 +00:00
David Blaikie 854b2af17f Correct invalid debug info metadata
Code review feedback on r176838 by Patrik Hägglund.

llvm-svn: 176884
2013-03-12 19:04:24 +00:00
John Thompson 1f67ccb3fd Review feedback change per Edwin: Move non-public members to end of classes.
llvm-svn: 176883
2013-03-12 18:51:47 +00:00
Manman Ren 14a029d9f3 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
2013-03-12 18:27:15 +00:00
Richard Relph 61046a9727 Avoid generating ISD::SELECT for vector operands to SIGN_EXTEND
llvm-svn: 176881
2013-03-12 18:17:18 +00:00
Kevin Enderby f536c6af39 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
2013-03-12 18:12:17 +00:00
Matt Kopec 787d1623b0 Misc. clang build warning fixes.
llvm-svn: 176879
2013-03-12 17:45:38 +00:00
Fariborz Jahanian e92f54a010 Objective-C: Fixes a comment.
llvm-svn: 176878
2013-03-12 17:43:00 +00:00
Pete Cooper 6308a828a3 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
2013-03-12 17:37:31 +00:00
Ted Kremenek 6209366e81 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
2013-03-12 17:02:12 +00:00
Rafael Espindola cfd2528a46 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
2013-03-12 16:45:13 +00:00
Alexander Kornienko a5151271e6 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
2013-03-12 16:28:18 +00:00
Jan Wen Voung 6dc3076080 Revert the test moves from 176733. Use "REQUIRES: asserts" instead.
llvm-svn: 176873
2013-03-12 16:27:52 +00:00
Dan Gohman 00253592c7 Change the order of the operands in patchAndReplaceAllUsesWith so
that they're more consistent with Value::replaceAllUsesWith.

llvm-svn: 176872
2013-03-12 16:22:56 +00:00
Sean Silva 983caaacbb [docs] Add rtags to the external examples.
llvm-svn: 176871
2013-03-12 16:07:31 +00:00
Fariborz Jahanian 969d30c087 Modify comment in user test.
llvm-svn: 176870
2013-03-12 15:53:46 +00:00
Rafael Espindola b22b91c3e4 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
2013-03-12 15:22:39 +00:00
Hal Finkel 01271c6022 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
2013-03-12 15:18:14 +00:00
Rafael Espindola 15770b2f3d 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
2013-03-12 15:13:56 +00:00
Rafael Espindola b3f4b978bb Remove a bogus assert so we don't crash in
namespace {
  struct X {};
}
extern "C" {
  X b = X();
}

llvm-svn: 176866
2013-03-12 15:06:22 +00:00
Hal Finkel e154c8f23e 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
2013-03-12 14:12:16 +00:00
Tobias Grosser ee9423920e Missed on test case in the last commit
llvm-svn: 176864
2013-03-12 13:39:40 +00:00
Patrik Hagglund 3eaa4b932a Small fix for cost analysis of ptrtoint.
This seems to be a "copy-paste error" introducecd in r156140.

llvm-svn: 176863
2013-03-12 13:18:30 +00:00
Patrik Hagglund ba6f3221d6 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
2013-03-12 12:38:10 +00:00
Daniel Jasper 181046566c Remove bad space after "default".
Before:
switch (x) {
default : {}
}

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

llvm-svn: 176861
2013-03-12 12:26:55 +00:00
Matthew Curtis e2228a7048 ReleaseNotes: Add Hexagon Target section
And mention removal of hexagonv2 and hexagonv3 support (r176859).

llvm-svn: 176860
2013-03-12 12:20:51 +00:00
Matthew Curtis 7808cf1a39 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
2013-03-12 11:52:09 +00:00
Bill Wendling b04d7fa463 Reflect reality.
llvm-svn: 176858
2013-03-12 10:38:39 +00:00
Kostya Serebryany 67b1478914 [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
2013-03-12 09:04:49 +00:00
Tobias Grosser c9a72919a5 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
2013-03-12 08:45:15 +00:00
Kostya Serebryany 138b155042 [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
2013-03-12 08:44:40 +00:00
Evgeniy Stepanov 26d5bc7fdf [msan] Use sptr instead of ptrdiff_t.
llvm-svn: 176854
2013-03-12 07:21:17 +00:00
Kostya Serebryany ba56c8d4f9 [sanitizer] simplify the allocator's SizeClassMap: do not require an extra template parameter, instead compute it in flight. No functionality change
llvm-svn: 176853
2013-03-12 07:01:27 +00:00
Sean Silva a7aedfa5db [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
2013-03-12 02:40:05 +00:00
Sean Silva 03bfc678c5 [docs] Add SourceWeb as external example.
llvm-svn: 176848
2013-03-12 02:11:17 +00:00