Commit Graph

47335 Commits

Author SHA1 Message Date
Steve Naroff 081c7422b2 Add type checking for blocks.
llvm-svn: 55767
2008-09-04 15:10:53 +00:00
Andrew Lenharth 95d573a7f0 cleanup as per Duncan's review
llvm-svn: 55766
2008-09-04 14:34:22 +00:00
Mon P Wang 74b3207e67 Generate error if we try to implicit cast between different address
spaces

llvm-svn: 55765
2008-09-04 08:38:01 +00:00
Owen Anderson 4f948bd87a Add a first attempt at implementing stores for X86 fast isel using target hooks.
Dan or Evan, please review.

llvm-svn: 55764
2008-09-04 07:08:58 +00:00
Evan Cheng 8d8f47d50b Load from GV stub should be locally CSE'd.
llvm-svn: 55763
2008-09-04 06:18:33 +00:00
Evan Cheng 93d40ae1e1 Fix an overly strict assertion. Source register of a copy may not be killed, it may be killed by an implicit super-register use.
llvm-svn: 55762
2008-09-04 05:43:55 +00:00
Daniel Dunbar c01f56c8de Add some Objective-C code generation tests.
- Note that these don't really test anything other than that code
   generation doesn't fail or crash. Better than nothing though!

llvm-svn: 55761
2008-09-04 04:36:23 +00:00
Daniel Dunbar 7050c55415 NeXT: Emit lazy reference to Protocol class for forward protocol
references (to match gcc).

llvm-svn: 55760
2008-09-04 04:33:15 +00:00
Daniel Dunbar f2cf6d16e6 Avoid superfluous errors regarding variable-length arrays (casts).
llvm-svn: 55759
2008-09-04 03:43:08 +00:00
Daniel Dunbar 8cde00a510 Implement codegen of aggregates as lvalues in binary expressions,
e.g. "(a = b).somefield".

llvm-svn: 55758
2008-09-04 03:20:13 +00:00
Ted Kremenek 82aa5aba93 Updated checker build.
llvm-svn: 55757
2008-09-04 02:36:37 +00:00
Evan Cheng 3152edf474 Remove code that pad number of bytes to pop for X86_FastCall CC. The code doesn't do the "aligning" for Cygwin, Mingw, and Windows. But aligning it on Darwin and Linux breaks gcc compatibility. That ruled out all the platforms we support!
llvm-svn: 55756
2008-09-04 01:04:15 +00:00
Dale Johannesen da2d80688b Add intrinsics for log, log2, log10, exp, exp2.
No functional change (and no FE change to generate them).

llvm-svn: 55753
2008-09-04 00:47:13 +00:00
Ted Kremenek 3cbb3b2920 Capture 'uname' and 'gcc -v' output to .info files.
llvm-svn: 55752
2008-09-04 00:41:45 +00:00
Daniel Dunbar 0f99912868 Update TestRunner to not report failure for XFAIL tests
llvm-svn: 55751
2008-09-04 00:30:11 +00:00
Ted Kremenek 5047f71f3e Output "ANALYZE:" diagnostics to STDOUT instead of STDERR.
llvm-svn: 55750
2008-09-04 00:02:50 +00:00
Ted Kremenek 370de84b50 ccc-analyzer:
- Capture the STDERR output of 'clang' to a file for use with crash reporting.

llvm-svn: 55749
2008-09-04 00:02:34 +00:00
Dan Gohman e039d5580e Do trivial local CSE for constants and other non-Instruction values
in FastISel.

llvm-svn: 55748
2008-09-03 23:32:19 +00:00
Dan Gohman 45df9951f5 Put RegsForValue in the llvm namespace to avoid warnings about
classes in the llvm namespace having members with types from
anonymous namespaces.

llvm-svn: 55747
2008-09-03 23:18:39 +00:00
Dan Gohman 7bda51f5a4 Create HandlePHINodesInSuccessorBlocksFast, a version of
HandlePHINodesInSuccessorBlocks that works FastISel-style. This
allows PHI nodes to be updated correctly while using FastISel.

This also involves some code reorganization; ValueMap and
MBBMap are now members of the FastISel class, so they needn't
be passed around explicitly anymore. Also, SelectInstructions
is changed to SelectInstruction, and only does one instruction
at a time.

llvm-svn: 55746
2008-09-03 23:12:08 +00:00
Devang Patel a26e2075b8 Update inline threshold for current function if the notes say, optimize for size.
llvm-svn: 55745
2008-09-03 23:06:09 +00:00
Owen Anderson 2fbfb70530 Fix a bug that prevented PRE from applying in some cases.
llvm-svn: 55744
2008-09-03 23:06:07 +00:00
Devang Patel 397d895bb8 Avoid extra comma.
llvm-svn: 55742
2008-09-03 22:55:40 +00:00
Devang Patel 3771a1281f Parse and print opt_size note.
llvm-svn: 55740
2008-09-03 22:10:21 +00:00
Daniel Dunbar 0ff4192f3a Set register storage class correctly for function parameters.
- PR2730

llvm-svn: 55739
2008-09-03 21:54:21 +00:00
Ted Kremenek b44763456c Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' is
specified, or -std is set to a conforming mode.

llvm-svn: 55738
2008-09-03 21:22:16 +00:00
Daniel Dunbar 6626a2c51c Add svn:ignore on SemaObjC/Output.
llvm-svn: 55737
2008-09-03 21:18:38 +00:00
Daniel Dunbar 20e5db77a3 Add two test cases for builtins (mostly related to object size
builtins).

llvm-svn: 55736
2008-09-03 21:17:21 +00:00
Daniel Dunbar b0d34c8e4a Add __builtin_object_size support.
- Currently CodeGen always returns a conservative value for this (-1
   or 0 depending on the context).

llvm-svn: 55735
2008-09-03 21:13:56 +00:00
Andrew Lenharth 9fed8f5b9c Initial version of a Partial Specialization IPO pass. It triggers a couple hundred times on 176.gcc. I don't know the performance impact yet, the heuristic is quite simple still.
llvm-svn: 55734
2008-09-03 21:00:28 +00:00
Dale Johannesen 5c1ff11fc3 Do not emit a UsedDirective for things in the llvm.used
list that have internal linkage; the linker doesn't need
or want this.  (These objects must still be preserved
at compile time, so just removing them from the llvm.used
list doesn't work.)  Should affect only Darwin.

llvm-svn: 55722
2008-09-03 20:34:58 +00:00
Daniel Dunbar bec27e2c8b Modify object size checking builtins to lower to libc calls.
llvm-svn: 55721
2008-09-03 20:28:50 +00:00
Devang Patel a563d24e5d Fix typo in a comment.
llvm-svn: 55720
2008-09-03 20:25:40 +00:00
Devang Patel f58f96f810 Add missing decls.
llvm-svn: 55719
2008-09-03 20:24:05 +00:00
Devang Patel a4211876e5 Add parentheses to make code more readable.
llvm-svn: 55717
2008-09-03 19:57:15 +00:00
Devang Patel 50c66cdb0d Fix comments.
llvm-svn: 55716
2008-09-03 19:52:17 +00:00
Duncan Sands b86a788862 Testcase for commits 55700 and 55714.
llvm-svn: 55715
2008-09-03 19:38:41 +00:00
Duncan Sands ee088a7093 If a SCC has a node without a function, then the SCC
analysis would bail out without removing function
records for other members of the SCC (which may exist
if those functions read or wrote global variables).
Since these are initialized to "readnone", this
resulted in incorrect alias analysis results.

llvm-svn: 55714
2008-09-03 19:37:16 +00:00
Devang Patel 924d9084d8 Add custom inliner that handles only functions that are marked as always_inline.
llvm-svn: 55713
2008-09-03 18:50:53 +00:00
Devang Patel 0d442ffa2b Handle "always inline" note during inline cost analysis.
llvm-svn: 55712
2008-09-03 18:47:45 +00:00
Devang Patel 79661994b1 Check noinline note and ignore other notes.
llvm-svn: 55711
2008-09-03 18:46:35 +00:00
Steve Naroff c540d66940 Add semantic analysis for "blocks".
Highlights...

- 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr.
- Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt().

Next steps...

- hack Sema::ActOnIdentifierExpr() to deal with block decl refs.
- add attribute handler for byref decls.
- add test cases.

llvm-svn: 55710
2008-09-03 18:15:37 +00:00
Devang Patel 62be9ad270 Handle "noinline" note inside the simple inliner.
llvm-svn: 55708
2008-09-03 18:10:21 +00:00
Ted Kremenek 3060d98ad0 Fix 80 col violations.
llvm-svn: 55707
2008-09-03 18:03:35 +00:00
Ted Kremenek f4fd23f635 Added --use-cxx option to scan-build.
llvm-svn: 55706
2008-09-03 17:59:35 +00:00
Daniel Dunbar de1ec9cdcd Improve type-checking of ?: for Objective-C types.
- Allow any Objective-C object types to devolve to type id in a ?:
   expression. This matches gcc behavior more closely.

llvm-svn: 55705
2008-09-03 17:53:25 +00:00
Owen Anderson b1b9398ea7 Oops, I accidentally broke the fallback case with my last commit.
llvm-svn: 55704
2008-09-03 17:51:57 +00:00
Owen Anderson ea666816c2 Fix an issue where we were reusing materializations of constants in blocks not dominated by the materialization. This is
the simple fix, materializing the constant before every use.  It might be better to either track domination of uses or
to materialize all constants and the beginning of the function and let remat sort when to do materialization at uses.

llvm-svn: 55703
2008-09-03 17:37:03 +00:00
Devang Patel 167adebb3f Update test to check call instruction.
llvm-svn: 55702
2008-09-03 17:05:49 +00:00
Dan Gohman 575fad337c Split the SelectionDAG-building code, including the FunctionLoweringInfo
and SelectionDAGLowering classes, out of SelectionDAGISel.cpp and put
it in a separate file, SelectionDAGBuild.cpp.

llvm-svn: 55701
2008-09-03 16:12:24 +00:00