Commit Graph

115102 Commits

Author SHA1 Message Date
Bill Wendling 7b7d077c29 Update to disable asserts. Build a phase 3 compiler, and compare phase 2 files against phase 3.
llvm-svn: 142173
2011-10-17 04:46:54 +00:00
Hal Finkel 7ccb391d21 Test case for CanLowerReturn fix (r141981)
llvm-svn: 142172
2011-10-17 04:03:59 +00:00
Hal Finkel ad677b64db Add PPC 440 scheduler and some associated tests (new files)
llvm-svn: 142171
2011-10-17 04:03:55 +00:00
Hal Finkel 6fa5697af0 Add PPC 440 scheduler and some associated tests
llvm-svn: 142170
2011-10-17 04:03:49 +00:00
Chandler Carruth 3e8aa65bc2 Add a routine to swap branch instruction operands, and update any
profile metadata at the same time. Use it to preserve metadata attached
to a branch when re-writing it in InstCombine.

Add metadata to the canonicalize_branch InstCombine test, and check that
it is tranformed correctly.

Reviewed by Nick Lewycky!

llvm-svn: 142168
2011-10-17 01:11:57 +00:00
Richard Smith 00ab3ae72b Slightly simplify a constant expression check. No functional change.
llvm-svn: 142167
2011-10-16 23:01:09 +00:00
Bill Wendling 9aa3943d9e Overhaul the 'test-release' script.
This removes support for building llvm-gcc. It will eventually add support for
building other projects.

llvm-svn: 142165
2011-10-16 22:44:08 +00:00
Chandler Carruth 91f4faf877 Delete a dead member. Dunno if this was ever used, but the current code
directly manipulates the weights inside of the BranchProbabilityInfo
that is passed in.

llvm-svn: 142163
2011-10-16 22:27:54 +00:00
Chandler Carruth 47e1db1e59 Add a proper LLVM banner to this file.
llvm-svn: 142162
2011-10-16 22:15:07 +00:00
Chandler Carruth 01ca696581 Add a testcase for r142121 based on an idea from Richard Smith. Thanks!
llvm-svn: 142160
2011-10-16 21:33:06 +00:00
Richard Smith 725810a2bb Split apart the state accumulated during constant expression evaluation and the
end result. Use this split to propagate state information and diagnostics
through more of constant expression evaluation.

llvm-svn: 142159
2011-10-16 21:26:27 +00:00
Nadav Rotem 053a7358d6 Add tripple and stabalize a few more tests.
llvm-svn: 142158
2011-10-16 21:20:54 +00:00
Peter Collingbourne 5aa6ecb619 Add sema checks for calls to functions taking static array parameters
llvm-svn: 142157
2011-10-16 21:17:32 +00:00
Bill Wendling ef22c60abd Update the tree before applying patch.
llvm-svn: 142155
2011-10-16 20:59:25 +00:00
Nadav Rotem a6b6566db6 Add triple to tests.
llvm-svn: 142154
2011-10-16 20:53:20 +00:00
Nadav Rotem 9513104d2a fix a typo in the test
llvm-svn: 142153
2011-10-16 20:43:41 +00:00
Nadav Rotem 486ff59a9f Enable element promotion type legalization by deafault.
Changed tests which assumed that vectors are legalized by widening them.

llvm-svn: 142152
2011-10-16 20:31:33 +00:00
Nick Lewycky 84baea77ea Oops! Fix testcase.
llvm-svn: 142151
2011-10-16 20:20:15 +00:00
Nick Lewycky 0a7e9ccf04 When looking for dependencies on the src pointer, scan the src pointer. Scanning
on the memcpy call will pull up other unrelated stuff. Fixes PR11142.

llvm-svn: 142150
2011-10-16 20:13:32 +00:00
Nadav Rotem 2130a07687 Remove the the test which checks the saving of a vector of booleans into memory.
The decision was to pack the bits. Currently no codegen supports this.
Currently, all of the bits in the vector are saved into the same address
in memory.

llvm-svn: 142149
2011-10-16 19:06:06 +00:00
Sebastian Redl b17be8dcfe Implement overload resolution from init lists for scalar parameter types.
llvm-svn: 142148
2011-10-16 18:19:34 +00:00
Sebastian Redl 8b6412af46 Diagnose when omitting braces in direct list-initialization in C++0x.
This also applies to C99-style aggregate literals, should they be used in C++11, since they are effectively identical to constructor call list-initialization syntax.

llvm-svn: 142147
2011-10-16 18:19:28 +00:00
Sebastian Redl 2b47b7a3e6 In the verify-only pass, check that items that don't have an initializer in an init list can be value-initialized, at least when designated initializers are not involved. No test case yet, since early failures cannot be distinguished from late failures until overload resolution works.
llvm-svn: 142146
2011-10-16 18:19:20 +00:00
Sebastian Redl 5999aec4e1 Check for unavailable declarations in Sema::CanUseDecl.
llvm-svn: 142145
2011-10-16 18:19:16 +00:00
Sebastian Redl b92a877e31 Prove that non-overloaded function calls using init list arguments work.
llvm-svn: 142144
2011-10-16 18:19:11 +00:00
Sebastian Redl cc152641c0 Drop the Diagnose parameter from Sema::PerformImplicitConversion again and instead use TryImplicitConversion in CheckSingleAssignmentConstraints when that function is in no-diagnostics mode.
llvm-svn: 142143
2011-10-16 18:19:06 +00:00
Sebastian Redl 47fa9a346d Make a C-style cast a const-cast, to suppress a GCC warning. I should fix the underlying issue eventually, but this interface will probably change anyway.
llvm-svn: 142142
2011-10-16 18:18:59 +00:00
Craig Topper 96fa597828 Add X86 PEXTR and PDEP instructions.
llvm-svn: 142141
2011-10-16 16:50:08 +00:00
Benjamin Kramer cc863b2bb6 Let printf do the formatting instead aligning strings ourselves.
While at it, merge some format strings.

llvm-svn: 142140
2011-10-16 16:30:34 +00:00
Benjamin Kramer cb6b02a086 Twinify better.
llvm-svn: 142139
2011-10-16 15:46:29 +00:00
David Blaikie e4e9766e3c Remove the leftover partial comment.
llvm-svn: 142138
2011-10-16 14:41:13 +00:00
Benjamin Kramer 1930b003fe Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.
<stdin>:1:12: error: register %rax is only available in 64-bit mode
   incl    %rax
           ^~~~

llvm-svn: 142137
2011-10-16 12:10:27 +00:00
NAKAMURA Takumi 46282e4a3e tools/CMakeLists.txt: Fixup r142103. I don't remember why I had missed the line.
llvm-svn: 142136
2011-10-16 11:50:37 +00:00
Benjamin Kramer d416bae5f2 X86AsmParser: Synthesize EndLoc for tokens out of StartLoc + Length and print ranges for invalid operands.
<stdin>:1:4: error: invalid instruction mnemonic 'abc'
   abc incl    %edi
   ^~~

llvm-svn: 142135
2011-10-16 11:28:29 +00:00
Chandler Carruth 5f9a44f3e9 Fix a silly bug introduced in r142133.
llvm-svn: 142134
2011-10-16 11:05:04 +00:00
Chandler Carruth a7b4414ac2 Clean up some cruft in the library path searching logic by making
'libdir' mean the actual library directory, not the GCC subdirectory of
the library directory. That was just a confusing pattern. Instead,
supply proper GCC subdirectories when scanning for various triple-based
subdirectories with a GCC installation in them. This also makes it much
more obvious how multiarch installations, which have a triple-based
prefix as well as suffix work.

Also clean up our handling of these triple-prefixed trees by using them
in both a multiarch pattern and a non-multiarch pattern whenever they
exist.

Note that this *does not* match what GCC does on Debian, the only truly
multiarch installation I've been able to get installed and test on. GCC
appears to have a bug, and ends up searching paths like
'/lib/../../lib32' which makes no sense what-so-ever. Instead, I've
tried to encode the rational logic that seems clearly intended by GCC's
pattern. GCC ends up with patterns like:

  /lib/../../lib32
  /usr/lib/../../lib32
  /usr/lib/x86_64-linux-gnu/../..lib32

Only the last one makes any sense having a '/../..' in it, so in Clang,
that's the only one which gets a '/../..' in it.

I *think* this will fix Debian multiarch links. I'm committing without
baking this logic into our test suite so I can test on a few different
systems. If all goes well (and no one screams) I'll check in some more
comprehensive tests for multiarch behavior tomorrow.

llvm-svn: 142133
2011-10-16 10:54:30 +00:00
Benjamin Kramer 47f5e30e78 PR11143: Save the old diagnostic handler and call it when munging diagnostics for #line directives.
This reenables proper inline asm diagnostics in clang

llvm-svn: 142132
2011-10-16 10:48:29 +00:00
Benjamin Kramer e06b2b7012 Convert inline asm source ranges into clang SourceRanges and print them with the instantiated note.
t.c:2:7: error: invalid operand for instruction
  asm("movl 0(%rax), 0(%edx)");
      ^
<inline asm>:1:16: note: instantiated into assembly here
        movl 0(%rax), 0(%edx)
                      ^~~~~~~
1 error generated.

llvm-svn: 142131
2011-10-16 10:48:28 +00:00
Nadav Rotem bc25b6eb67 Fix a bug in LowerV2I64Splat, which generated a BUILD_VECTOR for which there was
no pattern.

llvm-svn: 142130
2011-10-16 10:02:06 +00:00
Chandler Carruth 454de773e1 I fixed this with r142127; these notes now make sense even w/o the caret.
llvm-svn: 142129
2011-10-16 09:41:04 +00:00
Chandler Carruth 724a1ca207 Hoist the logic I added to compute the macro name into a helper
function. No functionality changed.

llvm-svn: 142128
2011-10-16 09:39:09 +00:00
Chandler Carruth 9e8ce4ccb9 Now that macro expansion notes are real notes and go through the same
formatting as any other diagnostic, they will be properly line wrapped and
otherwise pretty printed. Let's take advantage of that and the new factoring to
add some helpful information to them (much like template backtrace notes and
other notes): the name of the macro whose expansion is being noted. This makes
a world of difference if caret diagnostics are disabled, making the expansion
notes actually useful in this case. It also helps ensure that in edge cases the
information the user needs is present. Consider:

% nl -ba t5.cc
     1  #define M(x, y, z) \
     2    y
     3
     4  M(
     5    1,
     6    2,
     7    3);

We now produce:
% ./bin/clang -fsyntax-only t5.cc
t5.cc:6:3: error: expected unqualified-id
  2,
  ^
t5.cc:2:3: note: expanded from macro: M
  y
  ^
1 error generated.

Without the added information in the note, the name of the macro being expanded
would never be shown.

This also deletes a FIXME to use the diagnostic formatting. It's not yet clear
to me that we *can* do this reasonably, and the production of this message was
my primary goal here anyways.

I'd love any comments or suggestions on improving these notes, their wording,
etc. Currently, I need to make them provide more helpful information in the
presence of a token-pasting buffer, and I'm pondering adding something along
the lines of "expanded from argument N of macro: ...".

llvm-svn: 142127
2011-10-16 09:30:08 +00:00
Bill Wendling 3fafe6d3f8 Install the PNG file as well. PR4780.
llvm-svn: 142125
2011-10-16 08:24:30 +00:00
Bill Wendling 01e554f905 Update tutorial to reflect the current APIs. Also correct a small omission in
LangImpl6.html (it needed to defined the 'binary :' operator).
PR9052

llvm-svn: 142123
2011-10-16 08:06:54 +00:00
Craig Topper aea148c366 Add X86 BZHI instruction as well as BMI2 feature detection.
llvm-svn: 142122
2011-10-16 07:55:05 +00:00
Chandler Carruth 6679be8155 Fix the original bug in our diagnostic printing that got me started on
this long quest: actually use the note printing machinery for each macro
expansion note rather than a hacky version of it. This will colorize and
format the notes the same as any other. There is still some stuff to fix
here, but it's one step closer.

No test case changes because currently we don't do anything differently
that I can FileCheck for -- I don't really want to try matching the
color escape codes... Suggestions for how to test this are welcome. =]

llvm-svn: 142121
2011-10-16 07:36:11 +00:00
Chandler Carruth dc2f257680 Now that the structure of this is more reasonably laid out, fix a long
standing deficiency: we were providing no macro backtrace information
whenever caret diagnostics were turned off. This sinks the logic for
suppressing the code snippet and caret to the code that actually prints
tho code snippet and caret. Along the way, clean up the naming of
functions, remove some now fixed FIXMEs, and generally improve the
wording and logic of this process.

Add a test case exerecising this functionality. It is notable that the
resulting messages are extremely low quality. I'm working on a follow-up
patch that should address this and have left a FIXME in the test case.

llvm-svn: 142120
2011-10-16 07:20:28 +00:00
Chandler Carruth 5371981593 Add a prefix to the existing test to prepare for more tests of other
backtrace behavior.

llvm-svn: 142119
2011-10-16 07:20:23 +00:00
Chandler Carruth 33d64bf8e5 Fold two run lines into a single logical one, and move them down below
the important code in this test to make the test more stable. Now adding
further tests won't shift the line numbers occuring in the diagnostic
output.

llvm-svn: 142118
2011-10-16 07:20:21 +00:00
Craig Topper 0ae8d4d738 Add X86 INVPCID instruction. Add 32/64-bit predicates to INVEPT, INVVPID, VMREAD, and VMWRITE to remove hack from X86RecognizableInstr.
llvm-svn: 142117
2011-10-16 07:05:40 +00:00