Commit Graph

85208 Commits

Author SHA1 Message Date
Daniel Dunbar e22295e8a6 fpcmp: Fix bug where fpcmp wouldn't early exit when files obviously differ and
no tolerance is set.

llvm-svn: 106033
2010-06-15 19:20:30 +00:00
Daniel Dunbar b645fa13a9 fpcmp: Fix a possible infinite loop when comparing something like:
1..19 ok
to
  1..20 o k
(yes, the odd space is necessary).

llvm-svn: 106032
2010-06-15 19:20:28 +00:00
Chris Lattner 874c92bd47 fix fastisel to handle GS and FS relative pointers. Patch by
Nelson Elhage!

llvm-svn: 106031
2010-06-15 19:08:40 +00:00
Bob Wilson f3f7a770b7 Add basic support for NEON modified immediates besides VMOV.
llvm-svn: 106030
2010-06-15 19:05:35 +00:00
Rafael Espindola 5a24a56e1e Remove the arm_aapcscc marker from the tests. It is the default
for the linux targets.

llvm-svn: 106029
2010-06-15 19:04:29 +00:00
Chris Lattner 146f130d1f disable SmallVectorImpl's copy constructor. This prevents a class
of base class slicing bugs reported on irc

llvm-svn: 106028
2010-06-15 18:59:43 +00:00
Bob Wilson fc7d739422 IfConversion's AnalyzeBlocks method always returns false; clean it up.
llvm-svn: 106027
2010-06-15 18:57:15 +00:00
Chris Lattner 58efac6120 add a testcase, from Michael Spencer
llvm-svn: 106026
2010-06-15 18:56:20 +00:00
Chris Lattner 4e18a2bc97 fix an uninitialized variable, patch by Michael Spencer!
llvm-svn: 106025
2010-06-15 18:55:23 +00:00
Jim Grosbach c964585ff8 fix naming
llvm-svn: 106024
2010-06-15 18:53:34 +00:00
Jim Ingham 64f78a310d Fix a typo in a comment...
llvm-svn: 106022
2010-06-15 18:50:32 +00:00
Jakob Stoklund Olesen 6e54c908e0 Fix an exotic bug that only showed up in an internal test case.
SimpleRegisterCoalescing::JoinIntervals() uses CoalescerPair to determine if a
copy is coalescable, and in very rare cases it can return true where LHS is not
live - the coalescable copy can come from an alias of the physreg in LHS.

llvm-svn: 106021
2010-06-15 18:49:14 +00:00
Jim Ingham 8651121c11 Change the Options parser over to use a mask rather than an ordinal for option sets.
Fixed the Disassemble arguments so you can't specify start address or name in multiple ways.
Fixed the command line input so you can specify the filename without "-f" even if you use other options.

llvm-svn: 106020
2010-06-15 18:47:14 +00:00
Bob Wilson 5947573f39 Fix a comment typo.
llvm-svn: 106015
2010-06-15 18:19:27 +00:00
Chris Lattner c548be9ab3 Remove a dead argument to ProcessUCNEscape.
Fix string concatenation to treat escapes in concatenated strings that
are wide because of other string chunks to process the escapes as wide
themselves.  Before we would warn about and miscompile the attached testcase.

This fixes rdar://8040728 - miscompile + warning: hex escape sequence out of range

llvm-svn: 106012
2010-06-15 18:06:43 +00:00
Chris Lattner a8687ae490 tidy up
llvm-svn: 106011
2010-06-15 18:05:34 +00:00
Daniel Dunbar c1b1729b66 Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen.  This is suboptimal for
clients which only wish to make use of the frontend.  CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries.  The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
 - Fixed some copy-paste mistakes in the header files
 - Modified certain aspects of the coding to comply with the LLVM
   Coding Standards

llvm-svn: 106010
2010-06-15 17:48:49 +00:00
Daniel Dunbar a8b941c21b Remove stray semi-colon.
llvm-svn: 106009
2010-06-15 17:47:24 +00:00
Douglas Gregor 20527e2c83 Allocate template parameter lists for out-of-line definitions via the
ASTContext rather than via the normal heap.

llvm-svn: 106008
2010-06-15 17:44:38 +00:00
Bob Wilson de94e66234 Add some missing checks for the case where the extract_subregs are
combined to an insert_subreg, i.e., where the destination register is larger
than the source.  We need to check that the subregs can be composed for that
case in a symmetrical way to the case when the destination is smaller.

llvm-svn: 106004
2010-06-15 17:27:54 +00:00
Douglas Gregor 0832963acd Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>
llvm-svn: 106003
2010-06-15 17:05:35 +00:00
Jakob Stoklund Olesen 246e9a07a2 Avoid processing early clobbers twice in RegAllocFast.
Early clobbers defining a virtual register were first alocated to a physreg and
then processed as a physreg EC, spilling the virtreg.

This fixes PR7382.

llvm-svn: 105998
2010-06-15 16:20:57 +00:00
Jakob Stoklund Olesen 82eca35b3e Add CoalescerPair helper class.
Given a copy instruction, CoalescerPair can determine which registers to
coalesce in order to eliminate the copy. It deals with all the subreg fun to
determine a tuple (DstReg, SrcReg, SubIdx) such that:

- SrcReg is a virtual register that will disappear after coalescing.
- DstReg is a virtual or physical register whose live range will be extended.
- SubIdx is 0 when DstReg is a physical register.
- SrcReg can be joined with DstReg:SubIdx.

CoalescerPair::isCoalescable() determines if another copy instruction is
compatible with the same tuple. This fixes some NEON miscompilations where
shuffles are getting coalesced as if they were copies.

The CoalescerPair class will replace a lot of the spaghetti logic in JoinCopy
later.

llvm-svn: 105997
2010-06-15 16:04:21 +00:00
Daniel Dunbar e9c5e2cc71 Driver/FreeBSD: Add libexec to program search paths, to workaround some build
problem; patch by Ed Schouten.

llvm-svn: 105996
2010-06-15 15:03:31 +00:00
Daniel Dunbar be65fe860b Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.
llvm-svn: 105995
2010-06-15 14:50:52 +00:00
Daniel Dunbar 0904134252 Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.
llvm-svn: 105994
2010-06-15 14:50:42 +00:00
Benjamin Kramer ad36eb2911 Fix typo.
llvm-svn: 105993
2010-06-15 08:21:35 +00:00
Nick Lewycky a2fb98bfda When analyzing for member self-assignment, don't attempt to dereference null
Stmt* such as those which occur in ?: . Fixes PR7378.

Also, generally whip the code into shape fixing several coding style violations.

llvm-svn: 105992
2010-06-15 07:32:55 +00:00
Bob Wilson a55b8877e6 Generalize the pre-coalescing of extract_subregs feeding reg_sequences,
replacing the overly conservative checks that I had introduced recently to
deal with correctness issues.  This makes a pretty noticable difference
in our testcases where reg_sequences are used.  I've updated one test to
check that we no longer emit the unnecessary subreg moves.

llvm-svn: 105991
2010-06-15 05:56:31 +00:00
Bob Wilson 1478142485 VMOVQQ and VMOVQQQQ are pseudo instructions and not predicable.
llvm-svn: 105990
2010-06-15 05:51:27 +00:00
Dale Johannesen 3f253d2353 Revert 105986; looks like I'd better try bootstrapping.
llvm-svn: 105988
2010-06-15 04:55:06 +00:00
Ted Kremenek d52caa5244 Update CMake build.
llvm-svn: 105987
2010-06-15 04:08:14 +00:00
Dale Johannesen c338ef2b65 The form of BuildMI used for TAILJMPr was changing the register
containing the target address, an input, into an output.  I don't
think this actually broke anything on x86 (it does on ARM), but
it's wrong.

llvm-svn: 105986
2010-06-15 03:13:49 +00:00
Alexis Hunt 0684e33ba5 MinGW requires that wint_t be defined in stddef.h. In order to accomodate, we
won't define it unless specifically requested via the use of __need_wint_t.

llvm-svn: 105985
2010-06-15 02:36:48 +00:00
Ted Kremenek 4c721bf892 Change AnalysisConsumer to analyze functions created by instantiantiating a macro. Fixes PR 7361.
llvm-svn: 105984
2010-06-15 00:55:40 +00:00
Jim Grosbach f14e08b01b Make sure to skip dbg_value instructions when finding an insertion point for
the combined load/store instruction. rdar://7797940

llvm-svn: 105982
2010-06-15 00:41:09 +00:00
Chris Lattner c7ed7ea390 fix the inline asm diagnostics to emit the error on the primary
source code location instead of on the note.  Previously we generated:

<inline asm>:1:2: error: unrecognized instruction
        barf
        ^
t.c:4:8: note: generated from here
  asm ("barf");
       ^

Now we generate:

t.c:4:8: error: unrecognized instruction
  asm ("barf");
       ^
<inline asm>:1:2: note: instantated into assembly here
        barf
        ^

llvm-svn: 105978
2010-06-15 00:03:12 +00:00
Douglas Gregor 4f6e8deec4 Make sure to set the visible on a vtable; VTTs and typeinfo already
handle visibility properly. Fixes <rdar://problem/8091955>. 

llvm-svn: 105977
2010-06-14 23:41:45 +00:00
Douglas Gregor 1726d1517e Add name mangling for address spaces. We use the vendor-extension
mangling for types, where the <source-name> is ASxxx (xxx is the
address-space number).

llvm-svn: 105975
2010-06-14 23:15:08 +00:00
Alexis Hunt c8c2efa7f7 Add missing include to unbreak the build.
llvm-svn: 105971
2010-06-14 22:44:26 +00:00
Chris Lattner 24fdd22766 generate better code in CheckComplexPattern
llvm-svn: 105970
2010-06-14 22:33:34 +00:00
Bob Wilson 5b2b504038 Rename functions referring to VMOV immediates to refer to NEON "modified
immediate" operands.  These functions have so far only been used for VMOV
but they also apply to other NEON instructions with modified immediate
operands.  No functional changes.

llvm-svn: 105969
2010-06-14 22:19:57 +00:00
Douglas Gregor c9d2682df3 Warn when a 'typename' or a 'template' keyword refers to a
non-dependent type or template name, respectively, in C++98/03. Fixes
PR7111 and <rdar://problem/8002682>.

llvm-svn: 105968
2010-06-14 22:07:54 +00:00
Daniel Dunbar 5a9d1835be Driver: Fix PR4062 by dissecting one particular -Wp, form.
llvm-svn: 105966
2010-06-14 21:37:09 +00:00
Jim Grosbach 412800d346 More dbg_value cleanup so the presence of debug info doesn't affect code-gen.
Make sure to skip the dbg_value instructions when moving dups out of the
diamond. rdar://7797940

llvm-svn: 105965
2010-06-14 21:30:32 +00:00
Daniel Dunbar fb3d747fc6 Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
collect2 option that is passed by some projects (notably WebKit).

llvm-svn: 105964
2010-06-14 21:23:12 +00:00
Daniel Dunbar 3f1a1ffd95 Driver: Eliminate uses of Arg::getIndex.
Also, fix a memory leak.

llvm-svn: 105963
2010-06-14 21:23:08 +00:00
Rafael Espindola 77b6d01906 Don't produce output only if *all* files are unused.
llvm-svn: 105962
2010-06-14 21:20:52 +00:00
Douglas Gregor 067ad670b1 Put warnings about designated initializations overridding prior
initializations into their own warning group, initializer-overrides,
which is part of -Wextra. Patch by william@25thandClement.com, fixes
PR6934!

llvm-svn: 105961
2010-06-14 21:15:09 +00:00
Evan Cheng 078f4cec21 - Do away with SimpleHazardRecognizer.h. It's not used and offers little value.
- Rename ExactHazardRecognizer to PostRAHazardRecognizer and move its header to include to allow targets to extend it.

llvm-svn: 105959
2010-06-14 21:06:53 +00:00