Commit Graph

40348 Commits

Author SHA1 Message Date
Evan Cheng a3395a61cc Treat the label for the first @llvm.dbg.stoppoint the same way as the dbg_func_start label. Make sure nothing else is inserted before them.
Note this solution might be somewhat fragile since ISD::LABEL may be used for other
purposes. If that ends up to be an issue, we may need to introduce a different node
for debug labels.

llvm-svn: 46571
2008-01-30 20:08:35 +00:00
Fariborz Jahanian ca2565ce9a Typo.
llvm-svn: 46570
2008-01-30 20:03:29 +00:00
Dale Johannesen 19cf69ff9d Adjust loop per review feedback.
llvm-svn: 46569
2008-01-30 19:44:39 +00:00
Evan Cheng a3ff8e6110 A semi-gross fix for a debug info issue. When inserting the "function start" label (i.e. first label in the entry block) take care to insert it at the beginning of the block.
llvm-svn: 46568
2008-01-30 19:35:32 +00:00
Devang Patel 540d03bda9 Supply appropriate arch info to darwin assembler.
llvm-svn: 46567
2008-01-30 19:19:31 +00:00
Steve Naroff 7b3579b8de Abolish a bunch of Xcode inserted tabs.
llvm-svn: 46566
2008-01-30 19:17:43 +00:00
Dale Johannesen 56d4903db5 Accept getelementptr starting at GV with all 0 indices as a
legitimate way of representing global variable GV in debug info.

llvm-svn: 46565
2008-01-30 19:00:21 +00:00
Ted Kremenek 90962af0e8 Minor cosmetic cleanups: replaced some integer literals with constants and
more cleanups with pretty-printing of analysis results.

llvm-svn: 46564
2008-01-30 18:54:06 +00:00
Devang Patel ebde4b34aa Always put version numbers at the end because they are optional.
llvm-svn: 46563
2008-01-30 18:30:11 +00:00
Evan Cheng 29cfb67e28 Even though InsertAtEndOfBasicBlock is an ugly hack it still deserves a proper name. Rename it to EmitInstrWithCustomInserter since it does not necessarily insert
instruction at the end.

llvm-svn: 46562
2008-01-30 18:18:23 +00:00
Devang Patel 57412cacb6 Add TODO marker so that it is easier to search.
llvm-svn: 46561
2008-01-30 18:00:07 +00:00
Devang Patel b432c9e866 Enable exception handling if it is supported.
llvm-svn: 46560
2008-01-30 17:43:03 +00:00
Eli Friedman 3780d35306 Ignore __aligned__ with zero arguments in addition to __aligned__ with
one argument.  Lets stuff using pthread.h compile.

llvm-svn: 46559
2008-01-30 17:38:42 +00:00
Fariborz Jahanian 049fa58d0d Fixed misc. issues raised by Chris L. on @synchronized implementation.
llvm-svn: 46558
2008-01-30 17:38:29 +00:00
Eli Friedman 1bc0fed9a5 Fix codegen for conditionals with incommpatible pointer types. Code
that causes this isn't really correct, but if we're going to accept 
this, it should come up with a consistent AST.

llvm-svn: 46557
2008-01-30 17:02:03 +00:00
Dan Gohman 02b6792dd4 Add a new PseudoSourceValue class, which will be used to help track
memory reference information in the backend. Most of this was written by
Florian Brander, cleanup and updating to TOT by me.

llvm-svn: 46556
2008-01-30 16:35:31 +00:00
Nick Lewycky 6b016703a9 Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
list just to see if whether the list is empty.

llvm-svn: 46555
2008-01-30 08:01:28 +00:00
Nick Lewycky 625e89c8b0 Use empty() instead of comparing size() with zero.
llvm-svn: 46554
2008-01-30 07:54:16 +00:00
Nick Lewycky 0e3a5cb14a Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.
llvm-svn: 46553
2008-01-30 07:45:37 +00:00
Chris Lattner 05ba4cbe17 fix a problem reported by Eli, caused by not keeping bool as i1
when in a register.

llvm-svn: 46552
2008-01-30 07:01:17 +00:00
Chris Lattner e850fa2452 make this pass by adding an expected error, add some tests.
llvm-svn: 46551
2008-01-30 06:46:30 +00:00
Chris Lattner dd830b9c8b Eli points out this can only happen for scalar elements.
llvm-svn: 46550
2008-01-30 06:08:20 +00:00
Chris Lattner 6ebd38deae Be more explicit about what flavors of initlistexpr's we can see. I don't
know if all of this is exactly right, but it seems like the right thing to
aim for.  Steve, please review.

llvm-svn: 46549
2008-01-30 05:53:56 +00:00
Tanya Lattner cee9d51be9 Pointers change size depending upon the target. Remove them to make the test more stable.
llvm-svn: 46548
2008-01-30 05:15:15 +00:00
Chris Lattner 86f5e13224 move some constructors out of line and fix indentation in ObjCAtThrowStmt::getSourceRange.
llvm-svn: 46547
2008-01-30 05:01:46 +00:00
Evan Cheng ed17ef7e18 Skip over the label which marks the beginning of the function before inserting prologue code.
llvm-svn: 46546
2008-01-30 03:57:33 +00:00
Scott Michel cd2bb20b5f Back out mods to llvmAsmParser, incorrectly committed
llvm-svn: 46545
2008-01-30 03:10:00 +00:00
Scott Michel bb713ae0c7 More cleanups for CellSPU:
- Expand tabs... (poss 80-col violations, will get them later...)
- Consolidate logic for SelectDFormAddr and SelectDForm2Addr into a single
  function, simplifying maintenance. Also reduced custom instruction
  generation for SPUvecinsert/INSERT_MASK.

llvm-svn: 46544
2008-01-30 02:55:46 +00:00
Eli Friedman 9d92ce8b3a Make sure to emit all the arguments to a function call. This fixes the
codegen of calls to functions without a prototype and varargs functions, 
including printf.

llvm-svn: 46543
2008-01-30 01:32:06 +00:00
Owen Anderson 4e4b116750 Make DSE much more aggressive by performing DCE earlier. Update a testcase to reflect this increased aggressiveness.
llvm-svn: 46542
2008-01-30 01:24:47 +00:00
Owen Anderson b255ada55b Fix an issue where, under very specific circumstances, memdep could end up dereferencing the end
of one of its internal maps.

llvm-svn: 46541
2008-01-30 01:24:05 +00:00
Steve Naroff 1e7873642b Many refinements to Sema::MergeVarDecl(). This routine still needs some re-work to fully handle tentative decls.
This includes a fix to bz1908.

llvm-svn: 46540
2008-01-30 00:44:01 +00:00
Chris Lattner b9e5b8fb9e Fix a bug where scalarrepl would discard offset if type would match.
In practice this can only happen on code with already undefined behavior, 
but this is still a good thing to handle correctly.

llvm-svn: 46539
2008-01-30 00:39:15 +00:00
Dan Gohman 47a7d6fafe Factor the addressing mode and the load/store VT out of LoadSDNode
and StoreSDNode into their common base class LSBaseSDNode. Member
functions getLoadedVT and getStoredVT are replaced with the common
getMemoryVT to simplify code that will handle both loads and stores.

llvm-svn: 46538
2008-01-30 00:15:11 +00:00
Ted Kremenek 162bb8060e Added method "markInfeasible" to GRBranchNodeBuilder to disable the
auto-propagation of state along a branch.

llvm-svn: 46537
2008-01-29 23:36:02 +00:00
Ted Kremenek 7ff1893f86 Implemented more boilerplate in GREngine for processing branches. Now
we automatically generate a new successor node along an edge if the checker
did not explicitly do so (i.e., we just propagate the current state).

llvm-svn: 46536
2008-01-29 23:32:35 +00:00
Ted Kremenek ee2d5a540c Fixed bit-setting bug for ExplodedNodeImpl::NodeGroup.
llvm-svn: 46535
2008-01-29 23:31:09 +00:00
Devang Patel 45a65d2ee1 Handle incomplete struct initializer.
llvm-svn: 46534
2008-01-29 23:23:18 +00:00
Fariborz Jahanian 284011b462 Rewriting of @synchronized. This has one FIXME in it. But this should allow @sychronized to be rewritten.
llvm-svn: 46533
2008-01-29 22:59:37 +00:00
Ted Kremenek 9b4211d25d Added boilerplate logic in GREngine for processing branches.
llvm-svn: 46532
2008-01-29 22:56:11 +00:00
Ted Kremenek b2cad31aae Renamed GRNodeBuilder to GRStmtNodeBuilder.
llvm-svn: 46531
2008-01-29 22:11:49 +00:00
Ted Kremenek 71b49503d8 Minor fix in transfer function of '!=' where a 'false' literal should
have been 'true'.

llvm-svn: 46530
2008-01-29 21:27:49 +00:00
Ted Kremenek 15ad4cf46b - Hooked up deserialization of ObjCAtSynchronizedStmt Stmt::Create().
- Some minor optimizations of the encoding format for ObjCAtSynchronizedStmt.
- Reordered methods so that the deserialization methods for 
  ObjCAtSynchronizedStmt appear in alphabetical order with the corresponding
  methods of the other AST nodes.

llvm-svn: 46529
2008-01-29 21:21:30 +00:00
Ted Kremenek 8d5bfe5844 Added preliminary transfer function support for '==' and '!='.
Made some internal API cleanups with creating ConcreteInt values, which lead to
some code reduction in implementing "++", "--".

llvm-svn: 46528
2008-01-29 19:43:15 +00:00
Evan Cheng 084a1cdcdd Work in progress. This patch *fixes* x86-64 calls which are modelled as StructRet but really should be return in registers, e.g. _Complex long double, some 128-bit aggregates. This is a short term solution that is necessary only because llvm, for now, cannot model i128 nor call's with multiple results.
Status: This only works for direct calls, and only the caller side is done. Disabled for now.

llvm-svn: 46527
2008-01-29 19:34:22 +00:00
Evan Cheng a13e5146d4 Update this test case.
llvm-svn: 46526
2008-01-29 19:30:05 +00:00
Duncan Sands 032a5d2690 When expanding an operand, it's not the result value
type that matters but the operand type.  This fixes
2008-01-08-IllegalCMP.ll which crashed with the new
legalize infrastructure because SETCC with result
type i8 and operand type i64 was being custom expanded
by the X86 backend.  With this fix, the gcc build gets
as far as the first libcall.

llvm-svn: 46525
2008-01-29 19:29:08 +00:00
Fariborz Jahanian 48085b86ae AST for @synchronized.
llvm-svn: 46524
2008-01-29 19:14:59 +00:00
Chris Lattner ade0abb498 Don't let globalopt hack on volatile loads or stores.
llvm-svn: 46523
2008-01-29 19:01:37 +00:00
Steve Naroff ddb1dd8c5f Tighten up ASTContext::typesAreCompatible()...it needs to make sure the qualifiers match. The comment and C99 citation for this routine were correct...the code needed to conform to the comment/spec. This fixes the test added below.
Tightening up this routine forced tweaks to Sema::CheckSubtractionOperands() and Sema::CheckCompareOperands(). For example, they both need to operate on the unqualified pointee...

llvm-svn: 46522
2008-01-29 18:58:14 +00:00