Commit Graph

52149 Commits

Author SHA1 Message Date
Chris Lattner ce473c7be0 diagnose PR3281:crash02.ll with:
llvm-as: crash02.ll:1:62: invalid function return type
declare { <{ <{}>, void ([1898 x { void ()* }], opaque, ...) (), fp128 * }>, opaque } @t ()
                                                             ^

llvm-svn: 61679
2009-01-05 08:04:33 +00:00
Chris Lattner fae73dd27f reject PR3281:crash01.ll with:
llvm-as: crash01.ll:1:9: invalid function return type
declare opaque @t()
        ^

llvm-svn: 61678
2009-01-05 08:00:30 +00:00
Chris Lattner 654695b7b5 tighten up return type check
llvm-svn: 61677
2009-01-05 07:58:59 +00:00
Chris Lattner 998fa0a2a2 fix PR3281:accepted0[02].ll: represent empty arrays distinctly, and
diagnose attempts to initialize non-empty arrays with them.  This 
produces:
llvm-as: accepted02.ll:1:28: invalid empty array initializer
@"o" = global [5 x double] []
                           ^
llvm-as: accepted00.ll:1:32: invalid empty array initializer
@"za" = thread_local global {} []
                               ^
[

llvm-svn: 61676
2009-01-05 07:52:51 +00:00
Chris Lattner d11f514739 PR3281:crash00.ll: produce this diagnostic instead of crashing:
@t = global i8 0, align 3
                        ^

llvm-svn: 61675
2009-01-05 07:46:05 +00:00
Dan Gohman d32ec016cc Handle weak_extern in the JIT. This fixes
SingleSource/UnitTests/2007-04-25-weak.c in JIT mode. The test
now passes on systems which are able to produce a correct
reference output to compare with.

llvm-svn: 61674
2009-01-05 05:32:42 +00:00
Scott Michel 74f249517e CellSPU:
- Teach SPU64InstrInfo.td about the remaining signed comparisons, update tests
  accordingly.

llvm-svn: 61672
2009-01-05 04:05:53 +00:00
Chris Lattner 8a7d10d753 remove optimization to avoid looking ahead for cases like ::foo. This
isn't worth the complexity and the code already does a ton of lookahead.

llvm-svn: 61671
2009-01-05 03:55:46 +00:00
Dan Gohman 2c4353d04b gc is not an obsolete keyword.
llvm-svn: 61670
2009-01-05 03:22:02 +00:00
Dan Gohman 7f5ce10172 Update polygen grammar for recent language changes.
llvm-svn: 61669
2009-01-05 03:21:23 +00:00
Chris Lattner 6b87b9d84e simplify some code.
llvm-svn: 61668
2009-01-05 02:07:19 +00:00
Chris Lattner da0300870f Rearrange some code in TryAnnotateTypeOrScopeToken to make it
early exit for C and avoid template lookup for C.

llvm-svn: 61667
2009-01-05 01:49:50 +00:00
Chris Lattner c69537feb5 Fix a bug where we'd try to look beyond the current cached tokens when
not in backtracking mode.  This was just using the wrong predicate.

llvm-svn: 61666
2009-01-05 01:42:04 +00:00
Scott Michel f87d41d8b9 CellSPU:
- Add an 8-bit operation test, which doesn't do much at this point.

llvm-svn: 61665
2009-01-05 01:35:22 +00:00
Scott Michel a664240476 CellSPU:
- Fix (brcond (setq ...)) bug, where BRNZ should have been used vice BRZ.
- Kill unused/unnecessary nodes in SPUNodes.td
- Beef out the i64operations.c test harness to use a lot of unaligned
  loads, test loops and LLVM loop/basic block optimizations; run the
  test harness successfully on real Cell hardware.

llvm-svn: 61664
2009-01-05 01:34:35 +00:00
Anders Carlsson e298a1775d Pass '-undefined- to the linker
llvm-svn: 61663
2009-01-05 01:24:39 +00:00
Chris Lattner b5134c05b9 TryAnnotateTypeOrScopeToken and TryAnnotateCXXScopeToken can
only be called when they might be needed now, so make them assert
that their current token is :: or identifier.

llvm-svn: 61662
2009-01-05 01:24:05 +00:00
Anders Carlsson d8cd7b6c34 Generate debug info for VLA types
llvm-svn: 61661
2009-01-05 01:23:29 +00:00
Chris Lattner 6fead6e33b add a testcase
llvm-svn: 61660
2009-01-05 00:59:08 +00:00
Chris Lattner 45ddec319e ParseCXXSimpleTypeSpecifier can only be called on things that are
verified to be simple type specifiers, so there is no need for it
to call TryAnnotateTypeOrScopeToken.

Make MaybeParseCXXScopeSpecifier reject ::new and ::delete with a 
hard error now that it may never be transitively called in a 
context where these are legal.  This allows me to start 
disentangling things more.

llvm-svn: 61659
2009-01-05 00:13:00 +00:00
Nick Lewycky e4e5532e05 Move the libcall annotating part from doFinalization to doInitialization.
Finalization occurs after all the FunctionPasses in the group have run, which
is clearly not what we want.

This also means that we have to make sure that we apply the right param 
attributes when creating a new function.

Also, add a missed optimization: strdup and strndup. NoCapture and 
NoAlias return!

llvm-svn: 61658
2009-01-05 00:07:50 +00:00
Chris Lattner bd31aa3b05 sink a call to TryAnnotateCXXScopeToken down into the
applicable cases in ParseDeclarationSpecifiers. 

llvm-svn: 61657
2009-01-05 00:07:25 +00:00
Chris Lattner a21db61ed9 Simplify some control flow and remove a call to TryAnnotateCXXScopeToken
that isn't doing what is desired. It was annotating the current token
not the 'next' token.  This code should be fixed.

llvm-svn: 61656
2009-01-04 23:51:17 +00:00
Dan Gohman 7a5acb5be5 A few more whitespace tidyments.
llvm-svn: 61655
2009-01-04 23:49:44 +00:00
Chris Lattner 1f69ebb5fa code simplification
llvm-svn: 61654
2009-01-04 23:46:59 +00:00
Dan Gohman 623806eb2b Tidy whitespace.
llvm-svn: 61653
2009-01-04 23:44:43 +00:00
Chris Lattner 020bab992e sink calls to TryAnnotateTypeOrScopeToken down into the only cases that they
can interact with.

llvm-svn: 61652
2009-01-04 23:41:41 +00:00
Chris Lattner b7895c4180 push the call in isCXXDeclarationSpecifier to TryAnnotateTypeOrScopeToken
down into the two cases that it can possibly affect.  This avoids calls
to it that obviously can't do anything.

llvm-svn: 61651
2009-01-04 23:33:56 +00:00
Chris Lattner 9a8968b50d my previous patch caused sema to drop the global qualifier, make
sure to pass it down.  This makes the code a bit gross, I will clean
it up in subsequent commits.

llvm-svn: 61650
2009-01-04 23:23:14 +00:00
Bill Wendling 7c53a18a08 Regenerate.
llvm-svn: 61649
2009-01-04 23:12:30 +00:00
Bill Wendling 8790e3260d Modify the unittests Makefiles so that they don't rebuild parts of LLVM just to
run the tests. Most of this was stolen from the llvm/test Makefiles.

llvm-svn: 61648
2009-01-04 23:12:21 +00:00
Dan Gohman 634a3bd68d The .llx suffix is obsolete.
llvm-svn: 61647
2009-01-04 23:10:00 +00:00
Dan Gohman 29ad9bf5c3 Update VIM LLVM IR syntax highlighting.
- Add several new keywords
 - Clean up some obsolete keywords
 - Improve the patterns for constants.
 - Add syntax-highlighting for dejagnu test command comments

llvm-svn: 61646
2009-01-04 23:09:38 +00:00
Nick Lewycky 3a0c106979 Add a mechanism to specify attributes in getOrInsertFunction.
llvm-svn: 61645
2009-01-04 22:54:40 +00:00
Chris Lattner 122db26b28 sink the call to TryAnnotateTypeOrScopeToken in
ParseCastExpression into the switch.  This gets it out of the hot
path through ParseCastExpression for all the non-identifier and 
non-:: tokens.

llvm-svn: 61643
2009-01-04 22:52:14 +00:00
Chris Lattner dfa1a45abd use early exits to reduce nesting.
llvm-svn: 61642
2009-01-04 22:32:19 +00:00
Chris Lattner 8a38aa83da simplify control flow by removing a goto.
llvm-svn: 61641
2009-01-04 22:28:21 +00:00
Chris Lattner 109faf2b8b eliminate lookahead when parsing ::new / ::delete.
llvm-svn: 61638
2009-01-04 21:25:24 +00:00
Chris Lattner f9b2cd4d92 minor simplifications.
llvm-svn: 61637
2009-01-04 21:14:15 +00:00
Chris Lattner ad6f3355a7 Refactor some parser interfaces to fix PR3278 and a FIXME:
ParseAssemblyString with a specified module would not parse
into the module, it would create and return a new one.

llvm-svn: 61635
2009-01-04 20:44:11 +00:00
Nick Lewycky 959af7ba30 Run a post-pass that marks known function declarations by name.
llvm-svn: 61632
2009-01-04 20:27:34 +00:00
Chris Lattner 8f561c9c97 elf writer really wants the size of the global, not the size
of the pointer to the global.

llvm-svn: 61630
2009-01-04 20:19:20 +00:00
Dan Gohman be631a3cd1 Set a few more vimrc indentation options.
llvm-svn: 61628
2009-01-04 18:59:55 +00:00
Nick Lewycky 6e447c571e Add utility functions for marking parameters as noalias or nocapture.
Clean up some of the existing code by making it use hasFnAttr/addFnAttr 
and round it off by creating removeFnAttr.

llvm-svn: 61627
2009-01-04 18:21:35 +00:00
Bill Wendling 0a09d2de13 XFAIL this test. The xform was removed.
llvm-svn: 61624
2009-01-04 06:32:28 +00:00
Bill Wendling 0c04f9fdc3 Revert this transform. It was causing some dramatic slowdowns in a few tests. See PR3266.
llvm-svn: 61623
2009-01-04 06:19:11 +00:00
Dan Gohman a0979b24d3 Add several more unimplemented operator overloads to ilist_iterator
to help catch errors.

llvm-svn: 61622
2009-01-04 03:22:42 +00:00
Anders Carlsson 762e162284 Fix the bug that would cause Python to crash at startup.
When emitting the static variables we need to make sure that the order is preserved. 
Fix this by making StaticDecls a std::list which has O(1) random removal.

llvm-svn: 61621
2009-01-04 02:08:04 +00:00
Bill Wendling ac79602005 The llvm::ELFWriter::EmitGlobal() method is calling the
llvm::PATypeHolder::get() method when LLVM is self-hosted in Release
mode. Before the parser changed, there was a definition of llvm::PAHolder::get()
in llvmAsmParser.y. This was probably a bug that no-one noticed.

Explicitly #include the Type.h file as a temporary fix for now.

llvm-svn: 61620
2009-01-04 01:47:14 +00:00
Chris Lattner f7044e3010 add #include guards, thanks Dan.
llvm-svn: 61619
2009-01-04 01:28:00 +00:00