Commit Graph

129180 Commits

Author SHA1 Message Date
Benjamin Kramer 83aa94711b Emit TableGen's header comment with C-style comments, so it can be used from C89 code.
Should silence warnings when compiling the X86 disassembler.

llvm-svn: 158723
2012-06-19 17:04:16 +00:00
Jan Wen Voung 7f5d79f864 Have ARM ELF use correct reloc for "b" instr.
The condition code didn't actually matter for arm "b" instructions,
unlike "bl".  It should just use the R_ARM_JUMP24 reloc.

llvm-svn: 158722
2012-06-19 16:03:02 +00:00
Hal Finkel d465810f7c Mark most PPC register classes to avoid write-after-write.
For processors with the G5-like instruction-grouping scheme, this helps avoid
early group termination due to a write-after-write dependency within the group.
It should also help on pipelined embedded cores.

On POWER7, over the test suite, this gives an average 0.5% speedup. The largest
speedups are:

SingleSource/Benchmarks/Stanford/Quicksort - 33%
MultiSource/Applications/d/make_dparser - 21%
MultiSource/Benchmarks/FreeBench/analyzer/analyzer - 12%
MultiSource/Benchmarks/MiBench/telecomm-FFT/telecomm-fft - 12%

Largest slowdowns:

SingleSource/Benchmarks/Stanford/Bubblesort - 23%
MultiSource/Benchmarks/Prolangs-C++/city/city - 21%
MultiSource/Benchmarks/BitBench/uuencode/uuencode - 16%
MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode - 13%

llvm-svn: 158719
2012-06-19 13:57:17 +00:00
Aaron Ballman f98d813948 Updating the credits after r158717
llvm-svn: 158718
2012-06-19 13:52:33 +00:00
Aaron Ballman 38c9ad9e72 Improves parsing and semantic analysis for MS __declspec attributes. This includes support for the align (which fixes PR12631).
llvm-svn: 158717
2012-06-19 13:49:26 +00:00
Alexis Hunt abc99d8d04 Stop abusing StringRef. Fixes the Windows build.
I've also removed the duplicate check for PARSED_ATTR since it seems
unnecessary, and would have made the code more complicated.

llvm-svn: 158716
2012-06-19 13:36:02 +00:00
Bill Wendling 6bf4417261 Put flag names on one line.
llvm-svn: 158715
2012-06-19 09:29:05 +00:00
Bill Wendling f0d91f3beb Fix italicized text.
llvm-svn: 158714
2012-06-19 09:27:54 +00:00
Bill Wendling b746402512 Use correct URL.
llvm-svn: 158713
2012-06-19 09:26:15 +00:00
Bill Wendling 5901a4e5f3 Fix numbering of list items.
llvm-svn: 158712
2012-06-19 09:25:04 +00:00
Bill Wendling f06ac97fd7 Fix some Sphinx mistakes.
llvm-svn: 158711
2012-06-19 09:23:23 +00:00
Alexey Samsonov e1cb524226 [Sanitizer] Renaming: SNPrintf -> internal_snprintf (and move it to sanitizer libc)
llvm-svn: 158710
2012-06-19 09:21:57 +00:00
Bill Wendling a84e2df4f9 First attempt at Sphinx. Convert the Projects.html file to Sphinx format.
llvm-svn: 158709
2012-06-19 09:18:34 +00:00
Alexey Samsonov b1c3991915 [TSan] Add a comment that tsan_flags.h may be included in the user code, and therefore shouldn't include other headers from TSan or common sanitizer runtime. User may need tsan_flags.h to provide its implementation of __tsan::OverrideFlags
llvm-svn: 158708
2012-06-19 08:57:53 +00:00
Alexey Samsonov af70c09b84 [Sanitizer] State that sanitizer_libc.h header can be included in the user code (and therefore it shouldn't include other sanitizer runtime headers).
llvm-svn: 158707
2012-06-19 08:52:02 +00:00
Alexey Samsonov b13ac747d4 [Sanitizer] use fully qualified type for placement new replacement
llvm-svn: 158706
2012-06-19 07:40:45 +00:00
Alexey Samsonov d9ae7adb84 [TSan] silence -Winternal-linkage-in-inlinewarning which is produced for gtest code
llvm-svn: 158705
2012-06-19 07:38:11 +00:00
Michael J. Spencer 96ebd91d6c [Support/PathV2] Fix out of bounds access in identify_magic when the file is empty.
llvm-svn: 158704
2012-06-19 05:29:57 +00:00
Anna Zaks 42908c7ac9 [analyzer] Allow pointers to escape into NSPointerArray.
(Fixes radar://11691035 PR13140)

llvm-svn: 158703
2012-06-19 05:10:32 +00:00
Akira Hatanaka 9f96bb8619 Make MipsLongBranch::runOnMachineFunction return true.
llvm-svn: 158702
2012-06-19 03:45:29 +00:00
Akira Hatanaka 9846239bbc Use MachineBasicBlock::instr_iterator instead of MachineBasicBlock::iterator in
MipsCodeEmitter.cpp.

llvm-svn: 158701
2012-06-19 03:39:45 +00:00
Alexis Hunt 7b28cdb3da Improve the specification of spellings in Attr.td.
Note that this is mostly a structural patch that handles the change from the old
spelling style to the new one. One consequence of this is that all AT_foo_bar
enum values have changed to not be based off of the first spelling, but rather
off of the class name, so they are now AT_FooBar and the like (a straw poll on
IRC showed support for this). Apologies for code churn.

Most attributes have GNU spellings as a temporary solution until everything else
is sorted out (such as a Keyword spelling, which I intend to add if someone else
doesn't beat me to it). This is definitely a WIP.

I've also killed BaseCheckAttr since it was unused, and I had to go through
every attribute anyway.

llvm-svn: 158700
2012-06-19 03:39:03 +00:00
Jordan Rose 8d63d5b8e6 Fix the location of the fixit for -Wnewline-eof.
It turns out SourceManager treating the "one-past-the-end" location as invalid,
but then failing to set the invalid flag properly.

llvm-svn: 158699
2012-06-19 03:09:38 +00:00
Hal Finkel 1cc27e44a4 Add support for generating reg+reg preinc stores on PPC.
PPC will now generate STWUX and friends.

llvm-svn: 158698
2012-06-19 02:34:32 +00:00
Argyrios Kyrtzidis a3fcbeb908 [objcmt] When checking whether the subscripting methods are declared use
ObjCInterfaceDec::lookupInstanceMethod to make sure we check categories as well
and update related tests.

rdar://11695288

llvm-svn: 158697
2012-06-19 02:22:02 +00:00
Rafael Espindola 31567515ed really add a triple :-(
llvm-svn: 158696
2012-06-19 02:17:35 +00:00
Rafael Espindola f2ae4075c8 Add a triple to the test.
llvm-svn: 158695
2012-06-19 01:42:34 +00:00
Rafael Espindola 66aa045fd9 Add a -fuse-init-array option to cc1 and map to the UseInitArray target
option. On the driver, check if we are using libraries from gcc 4.7 or newer
and if so pass -fuse-init-array to the frontend.
The crtbegin*.o files in gcc 4.7 no longer call the constructors listed in
.ctors, so we have to use .init_array.

llvm-svn: 158694
2012-06-19 01:26:10 +00:00
Johnny Chen 9a63cfaf8d rdar://problem/11649610
lldb confused by single quote in executable path

Also add a test case.

llvm-svn: 158693
2012-06-19 00:56:55 +00:00
Rafael Espindola ca3e0ee8b3 Move the support for using .init_array from ARM to the generic
TargetLoweringObjectFileELF. Use this to support it on X86. Unlike ARM,
on X86 it is not easy to find out if .init_array should be used or not, so
the decision is made via TargetOptions and defaults to off.

Add a command line option to llc that enables it.

llvm-svn: 158692
2012-06-19 00:48:28 +00:00
Kaelyn Uhrain 9ea8f7e6c5 Improve the error message when a function overload candidate is rejected
because it expects a reference and receives a non-l-value.

For example, given:

  int foo(int &);
  template<int x> void b() { foo(x); }

clang will now print "expects an l-value for 1st argument" instead of
"no known conversion from 'int' to 'int &' for 1st argument". The change
in wording (and associated code to detect the case) was prompted by
comment #5 in PR3104, and should be the last bit of work needed for the
bug.

llvm-svn: 158691
2012-06-19 00:37:47 +00:00
Ted Kremenek 9dcc0325de Sink definition of IBOutlet, IBOutletCollection, and IBAction into
the compiler predefines buffer.  These are essentially part of
the Objective-C language.

llvm-svn: 158690
2012-06-19 00:37:39 +00:00
Jordan Rose 8cea63c5cd Change -Winternal-linkage-in-inline from ExtWarn to Warning in C++.
Per post-commit review, it's not appropriate to use ExtWarn in C++, because
we can't prove that the inline function will actually be defined in more than
one place (and thus we can't prove that this violates the ODR).

This removes the warning entirely from uses in the main source file in C++.

llvm-svn: 158689
2012-06-18 23:58:49 +00:00
Nuno Lopes f9abcb7ba9 revert r158660, since Chris has some issues with this patch (namely using code to reprent information only used by the compiler)
Original commit msg:
add the 'alloc' metadata node to represent the size of offset of buffers pointed to by pointers.
This metadata can be attached to any instruction returning a pointer

llvm-svn: 158688
2012-06-18 23:34:26 +00:00
Michael J. Spencer c6ad2c4f03 XFAIL linker-opts.c on win32 now that it doesn't pretend that link.exe is ld.
llvm-svn: 158687
2012-06-18 23:00:44 +00:00
Tanya Lattner 794250474b Add language std for OpenCL 1.1 and 1.2.
llvm-svn: 158686
2012-06-18 22:55:02 +00:00
David Blaikie 2417379c63 Don't copy a potentially-uninitialized variable.
Based on review discussion of r158638 with Chandler Carruth, Tobias von Koch, and Duncan Sands and a -Wmaybe-uninitialized warning from GCC.

llvm-svn: 158685
2012-06-18 22:31:28 +00:00
Manman Ren 6e1fd46fdf ARM: use NOEN loads and stores if possible when handling struct byval.
This change is to be enabled in clang.

rdar://9877866

llvm-svn: 158684
2012-06-18 22:23:48 +00:00
Jordan Rose 28cd12f265 Support -Winternal-linkage-in-inline in C++ code.
This includes treating anonymous namespaces like internal linkage, and allowing
const variables to be used even if internal. The whole thing's been broken out
into a separate function to avoid nested ifs.

llvm-svn: 158683
2012-06-18 22:09:19 +00:00
Jordan Rose 2fa69ef934 Add new tool 'diag-build' for showing enabled warnings in a project.
diag-build acts as a wrapper for 'diagtool show-enabled', in the same way
that scan-build acts as a wrapper for the static analyzer. The common case is
simple: use 'diag-build make' or 'diag-build xcodebuild' to list the warnings
enabled for the first compilation command we see. Other build systems require
you to manually specify "dry-run" and "use $CC and $CXX"; if there is a build
system you are interested in, please add it to the switch statement.

diag-build is fairly stupid right now, but it serves its basic purpose.
Hopefully it can grow to meet any additional requirements.

llvm-svn: 158682
2012-06-18 21:31:37 +00:00
Jordan Rose 832c2134a9 [analyzer] Add a comment: why we treat array compound literals as lvalues.
llvm-svn: 158681
2012-06-18 21:31:27 +00:00
Hal Finkel 8eac009633 Allow up to 64 functional units per processor itinerary.
This patch changes the type used to hold the FU bitset from unsigned to uint64_t.
This will be needed for some upcoming PowerPC itineraries.

llvm-svn: 158679
2012-06-18 21:08:18 +00:00
Nick Kledzik 920ceddf80 Fix Sphinx warning. Patch by Sean Silva
llvm-svn: 158678
2012-06-18 20:24:47 +00:00
Michael J. Spencer 626a4ecf3a [docs] Port FAQ over to Sphinx.
Patch by Mikael Lyngvig!

llvm-svn: 158677
2012-06-18 20:21:38 +00:00
Matt Beaumont-Gay 50911a9d60 Move a few static functions from DiagnosticRenderer.cpp into SourceManager.
This simplifies the code a little bit, since these functions all took a
SourceManager parameter and called a bunch of methods on it, and makes
the functions available to other users.

llvm-svn: 158676
2012-06-18 20:12:05 +00:00
Marshall Clow d3e2a76ca4 Added accessors for getting coff_relocation info
llvm-svn: 158675
2012-06-18 19:47:16 +00:00
Jim Grosbach cb540f5cff ARM: Define generic HINT instruction.
The NOP, WFE, WFI, SEV and YIELD instructions are all hints w/
a different immediate value in bits [7,0]. Define a generic HINT
instruction and refactor NOP, WFI, WFI, SEV and YIELD to be
assembly aliases of that.

rdar://11600518

llvm-svn: 158674
2012-06-18 19:45:50 +00:00
Jim Grosbach 9ec06a15d6 TableGen: AsmMatcher missing-features list minimization.
When returning a 'cannot match due to missing CPU features' error code,
if there are multiple potential matches with different feature sets,
return the smallest set of missing features from the alternatives as
that's most likely to be the one that's desired.

llvm-svn: 158673
2012-06-18 19:45:46 +00:00
Simon Atanasyan 15c4aed428 Add mipsel-* to the list of targets recognized by configure script.
llvm-svn: 158670
2012-06-18 19:06:25 +00:00
Joerg Sonnenberger 8524f0ba2f Declare some variables unsigned to avoid signed vs unsigned mismatches.
This exploits the relative order of the arguments and/or checks already
made in the functions.

llvm-svn: 158669
2012-06-18 18:51:13 +00:00