Commit Graph

78997 Commits

Author SHA1 Message Date
Douglas Gregor de550355c1 When we decide to re-use an existing CXXConstructExpr node, make sure
to mark the constructor as referenced. Fixes the narrow issue reported
in PR6424, but there are a few other places that I'll fix before
closing out that PR.

llvm-svn: 97185
2010-02-26 00:01:57 +00:00
Bill Wendling 24c74f1d9c Catch a corner case where adding the padding to the "TType base offset" field
will eliminate the need for padding in the "Call site table length". E.g., if
we have this:

    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0x7f  ## @TType base offset
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

with padding of 1. We want to emit the padding like this:
 
    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0xff  ## @TType base offset
        .space  1,0   ## Padding
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

and not with padding on the "Call site table length" entry.

llvm-svn: 97183
2010-02-25 23:52:44 +00:00
Dan Gohman d0c7fd8598 Fix a few more typos.
llvm-svn: 97182
2010-02-25 23:51:27 +00:00
Dan Gohman f804f182d0 Fix a typo.
llvm-svn: 97181
2010-02-25 23:41:41 +00:00
John Criswell 4d377d8c59 Added SAFECode (safecode) to the list of projects to automatically configure.
llvm-svn: 97179
2010-02-25 22:57:19 +00:00
Chris Lattner 7939f795f5 rewrite OptimizeGlobalAddressOfMalloc to fix PR6422, some bugs
introduced when mallocinst was eliminated. 

llvm-svn: 97178
2010-02-25 22:33:52 +00:00
Douglas Gregor 6f5f642ca2 When computing the composite pointer type for relational comparisons,
equality comparisons, and conditional operators, produce a composite
pointer type with the appropriate additional "const" qualifiers if the
pointer types would otherwise be incompatible. This is a small
extension (also present in GCC and EDG in a slightly different form)
that permits code like:

  void** i; void const** j; 
  i == j; 

with the following extwarn:

t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and
      'void const **') uses non-standard composite pointer type
      'void const *const *' [-pedantic]
  i == j; 
  ~ ^  ~

Fixes PR6346, and I'll be filing a core issue about this with the C++
committee.

llvm-svn: 97177
2010-02-25 22:29:57 +00:00
Anders Carlsson 9e3b3a3bbe Improve vcall offset handling.
llvm-svn: 97174
2010-02-25 22:23:13 +00:00
Anders Carlsson ed7d0e8be8 Fux a bug where we were trying to add overriders for non-virtual bases of virtual bases more than once.
llvm-svn: 97173
2010-02-25 22:18:35 +00:00
Daniel Dunbar de277d48f5 tests: Propogate the HOME environment variable through to tests. I'm ambivalent
about this, but it can be useful for users who use ccache, since the LLVMC tests
are fond of calling gcc.

llvm-svn: 97171
2010-02-25 22:09:09 +00:00
Bill Wendling bc4024f72c Fix HTML.
llvm-svn: 97170
2010-02-25 21:23:24 +00:00
Bill Wendling 60aa4dfb53 Make comment more meaningful.
llvm-svn: 97169
2010-02-25 21:19:47 +00:00
Dan Gohman 5c9d333039 Add svn:ignore.
llvm-svn: 97167
2010-02-25 20:56:25 +00:00
Daniel Dunbar e8ecf9a0db Move ~CodeGenAction out-of-line.
llvm-svn: 97166
2010-02-25 20:37:44 +00:00
Dan Gohman 2a8e3777b4 Fix ExpandVectorBuildThroughStack for the case where the
operands are themselves vectors. Based on a patch by
Micah Villmow for PR6338.

llvm-svn: 97165
2010-02-25 20:30:49 +00:00
Johnny Chen 3adff378cc Added the following 32-bit Thumb instructions for disassembly only: SMC, RFE,
and SRS.

llvm-svn: 97164
2010-02-25 20:25:24 +00:00
Johnny Chen 871e5b0926 Added the 32-bit Thumb instructions (BXJ) for disassembly only.
llvm-svn: 97163
2010-02-25 19:05:29 +00:00
Douglas Gregor a2fbc94458 Restore Zhongxing's commits r97122 r97127 r97129 r97131 which were reverted due to a Clang-on-Clang failure
llvm-svn: 97162
2010-02-25 19:01:53 +00:00
Douglas Gregor 83af86a6bc Allow us to compare derived-to-base conversions between a reference
binding and a copy-construction. Fixes an overloading problem in the
Clang-on-Clang build.

llvm-svn: 97161
2010-02-25 19:01:05 +00:00
Chris Lattner f7fc2d8b86 change the scope node to include a list of children to be checked
instead of to have a chained series of scope nodes.  This makes
the generated table smaller, improves the efficiency of the
interpreter, and make the factoring optimization much more 
reasonable to implement.

llvm-svn: 97160
2010-02-25 19:00:39 +00:00
Johnny Chen e285f70a42 Added the 32-bit Thumb instructions (MRS and MSR) for disassembly only.
llvm-svn: 97159
2010-02-25 18:46:43 +00:00
Kevin Enderby 7f99302dc9 This is a patch to the assembler frontend to detect when aligning a text
section with TextAlignFillValue and calls EmitCodeAlignment() instead of
calling EmitValueToAlignment().  This allows x86 assembly code to be aligned
with optimal nops.

llvm-svn: 97158
2010-02-25 18:46:04 +00:00
Fariborz Jahanian 8e3b9db27f Forgot to include nested protocols in collection, resulting in
bogus warning. Fixes radar 7682116.

llvm-svn: 97157
2010-02-25 18:24:33 +00:00
Dan Gohman 048b6485b7 stkrc is gone.
llvm-svn: 97156
2010-02-25 18:18:49 +00:00
Dan Gohman 22d11ee6bb Add the union keyword.
llvm-svn: 97155
2010-02-25 18:17:58 +00:00
Dan Gohman 2c50e05587 Merge the advanced getelementptr FAQ into the regular
getelementptr FAQ.

llvm-svn: 97154
2010-02-25 18:16:03 +00:00
Douglas Gregor 422f155ca3 Don't try to finalize an ill-formed variable or one whose class type is ill-formed. Fixes PR6421
llvm-svn: 97152
2010-02-25 18:11:54 +00:00
Daniel Dunbar 68e22cb5a0 Fix TextAlignFillValue in a few places
llvm-svn: 97151
2010-02-25 18:07:10 +00:00
Daniel Dunbar ce33de5b98 Add simple script for finding most-recent-rev-before-N in a git-svn repo; useful
when bisecting multiple repos in sync.

llvm-svn: 97150
2010-02-25 18:07:07 +00:00
Johnny Chen 74cca5a989 Added the following 16-bit Thumb instructions for disassembly only: YIELD, WFE,
WFI, SEV, SETEND.

llvm-svn: 97149
2010-02-25 17:51:03 +00:00
Chris Lattner 36b5414c4e remove a dead PatLeaf, I previously changed all uses to use -1 instead.
llvm-svn: 97148
2010-02-25 17:39:34 +00:00
Dan Gohman 1ad1499d14 Fix a typo.
llvm-svn: 97144
2010-02-25 16:51:31 +00:00
Dan Gohman 8848111952 Clarify the description of pointer types, and move the
address space content to its own paragraph.

llvm-svn: 97143
2010-02-25 16:50:07 +00:00
Dan Gohman a2684dbff0 Teach the constant folder about union types.
llvm-svn: 97142
2010-02-25 16:45:19 +00:00
Dan Gohman 935faff0bd Remove code which assumes it knows how vectors are stored in memory.
llvm-svn: 97141
2010-02-25 16:05:33 +00:00
Dan Gohman e790b61ebd Add more information to the getSizeOf comment.
llvm-svn: 97140
2010-02-25 15:55:28 +00:00
Dan Gohman 91bf1914da Remove this paragraph. Vectors may not always have the same layout as
arrays now.

llvm-svn: 97139
2010-02-25 15:53:42 +00:00
Jakob Stoklund Olesen 5a8f9acaa8 Revert patches r97122 r97127 r97129 r97131.
They were breaking clang-x86_64-darwin10-selfhost

llvm-svn: 97138
2010-02-25 15:47:53 +00:00
Dan Gohman 9b80f86e5b Revert r97064. Duncan pointed out that bitcasts are defined in
terms of store and load, which means bitcasting between scalar
integer and vector has endian-specific results, which undermines
this whole approach.

llvm-svn: 97137
2010-02-25 15:20:39 +00:00
Gabor Greif 5c07926d44 Add "template" keyword at strategic position to fix
compilation using g++ v3.4.

I'll watch the buildbots and back out if necessary.
Feel free to do the same if something breaks.

Without this patch I get (on g++ 3.4.6) following error:

In file included from clang/lib/Sema/SemaTemplate.cpp:14:
clang/lib/Sema/TreeTransform.h: In member function `clang::ASTOwningResult<&clang::ActionBase::DeleteExpr> clang::TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(clang::ASTOwningResult<&clang::ActionBase::DeleteExpr>, clang::SourceLocation, bool, clang::NestedNameSpecifier*, clang::SourceRange, clang::TypeSourceInfo*, clang::SourceLocation, clang::SourceLocation, clang::PseudoDestructorTypeStorage)':
clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before '>' token
clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before ')' token
make[4]: *** [clang/lib/Sema/Release/SemaTemplate.o] Error 1

llvm-svn: 97136
2010-02-25 13:04:33 +00:00
John McCall 21b57fa4e5 When comparing two method overload candidates during overload diagnostics,
skip the object argument conversion if either of the candidates didn't
initialize it.

Fixes PR6421, which is such a very straightforward extension of PR6398 that I
should have worked it into the last test case (and therefore caught it then).
Ah well.

llvm-svn: 97135
2010-02-25 10:46:05 +00:00
Chandler Carruth b306bcc266 Fix a really trivial crasher and begin fleshing out one of the namespace test
cases.

llvm-svn: 97134
2010-02-25 09:32:59 +00:00
Daniel Dunbar 0076d94466 Add a minimal C interpreter example.
- Demonstrates how to build a standalone tool which loads source code using the
   Driver and Frontend libraries, and then uses CodeGen and the JIT to actually
   execute the code.

 - Still more complicated than it should be, but hey its only 153 lines. :)

--
ddunbar@ozzy:tmp$ cat hello.c
#include <stdio.h>
int main() { printf("hello world\n"); return 0; }
ddunbar@ozzy:tmp$ clang-interpreter hello.c
hello world
--

llvm-svn: 97133
2010-02-25 08:49:05 +00:00
Nick Lewycky a72e1af8bf Make the side-numbering of instructions used by metadata (which is needed to
keep track of instructions that return void) per-function. This fixes PR5278.

This breaks backwards compatibility with the metadata format. That's okay
because we haven't released the metadata bitcode yet.

llvm-svn: 97132
2010-02-25 08:30:17 +00:00
Zhongxing Xu ee29cc3b66 Move the GenerateCallExitNode logic completely into GREndPathNodeBuilder.
llvm-svn: 97131
2010-02-25 07:57:35 +00:00
Chris Lattner 62702da070 Implement the first half of redundancy factoring: efficiently
splitting all the patterns under scope nodes into equality sets
based on their first node.  The second step is to rewrite the
graph info a form that exposes the sharing.  Before I do this, 
I want to redesign the Scope node.

llvm-svn: 97130
2010-02-25 07:45:24 +00:00
Zhongxing Xu 9516feac36 Move the dead bindings removal logic from CallInliner to GRExprEngine::ProcessCallExit().
llvm-svn: 97129
2010-02-25 07:36:34 +00:00
Chandler Carruth 8fa1e7eec4 Add a new conversion rank to classify conversions between complex and scalar
types. Rank these conversions below other conversions. This allows overload
resolution when the only distinction is between a complex and scalar type. It
also brings the complex overload resolutin in line with GCC's.

llvm-svn: 97128
2010-02-25 07:20:54 +00:00
Zhongxing Xu 2fa52b06d0 Add comments.
llvm-svn: 97127
2010-02-25 07:03:08 +00:00
Dan Gohman a9c205cc88 Make LoopSimplify change conditional branches in loop exiting blocks
which branch on undef to branch on a boolean constant for the edge
exiting the loop. This helps ScalarEvolution compute trip counts for
loops.

Teach ScalarEvolution to recognize single-value PHIs, when safe, and
ForgetSymbolicName to forget such single-value PHI nodes as apprpriate
in ForgetSymbolicName.

llvm-svn: 97126
2010-02-25 06:57:05 +00:00