Commit Graph

40460 Commits

Author SHA1 Message Date
Duncan Sands 354e353220 I don't see how NodeUpdated can be called with a
ReadyToProcess node - add an assertion to check
this.  Add an assertion to NodeDeleted that checks
that processed/ready nodes are indeed not deleted.
It is because they are never deleted that none of
the maps can have a deleted node as the source of
a mapping.  It does however seem to be possible in
theory to have a deleted value as the target of a
mapping, however this has not yet been spotted in
the wild.  Still mulling on what to do about this.
[The theoretical situation is this: a node A is
expanded/promoted/whatever to a newly created node
B.  Thus A->B is added to a map.  When the subtree
rooted at B is legalized it is conceivable that B
is deleted due to RAUW on a node somewhere above
it].

llvm-svn: 46705
2008-02-04 09:29:17 +00:00
Nate Begeman e146c0e3fd The rest of the SSE4.1 intrinsic patterns that are obvious to me. Getting
Evan's help with the rest.

llvm-svn: 46697
2008-02-04 06:00:24 +00:00
Nate Begeman ccdfd4aa17 Some more SSE 4.1 intrinsic patterns.
llvm-svn: 46696
2008-02-04 05:34:34 +00:00
Owen Anderson 1a78ae76e4 Make this test more aggressive, to cover recent improvements.
llvm-svn: 46695
2008-02-04 04:55:24 +00:00
Owen Anderson a82c9931f4 Be more precise when eliminating pointers bue to memcpy's. This allows more
stores to be deleted in some cases.

llvm-svn: 46694
2008-02-04 04:53:00 +00:00
Owen Anderson c4a7c41869 Allow GVN to hack on memcpy's, making them open to further optimization.
llvm-svn: 46693
2008-02-04 02:59:58 +00:00
Christopher Lamb da8e5d979e Add ending newline to test.
llvm-svn: 46692
2008-02-04 02:35:11 +00:00
Christopher Lamb 025b5fb883 Add experimental support for address space qualified types. Address space
qualifiers use the __attribute__((address_space(id))) syntax.

llvm-svn: 46691
2008-02-04 02:31:56 +00:00
Bill Wendling e5b8b7db4a - ccc creates output objects in same directory as the source file, and
not in the current directory. This doesn't work with VPATH builds in
  autotooled builds.
- ccc now creates object files without an extension.
- Return exit code 1 if code > 255.

Patch by Torok!

llvm-svn: 46689
2008-02-03 21:27:46 +00:00
Nick Lewycky 56178bc6ad Tag this test with the PR reference.
llvm-svn: 46688
2008-02-03 16:35:19 +00:00
Nick Lewycky 3b59214320 There are some cases where icmp(add) can be folded into a new icmp. Handle them.
llvm-svn: 46687
2008-02-03 16:33:09 +00:00
Chris Lattner 3ac9699c44 Fix PR1966 by ignoring non-error diagnostics from system headers even if they are
*mapped* onto errors.

llvm-svn: 46686
2008-02-03 09:00:04 +00:00
Chris Lattner 15e4ad81c3 the macro start and macro end bits in source location are dead, remove them.
llvm-svn: 46685
2008-02-03 08:24:13 +00:00
Nick Lewycky c7a4ba044b Hack on vectors too.
llvm-svn: 46684
2008-02-03 08:19:11 +00:00
Nick Lewycky e6e3a7f6ea Fold away one multiply in instcombine. This would normally be caught in
reassociate anyways, but they could be generated during instcombine's run.

llvm-svn: 46683
2008-02-03 07:42:09 +00:00
Chris Lattner c41e535df1 Fix typo
llvm-svn: 46682
2008-02-03 07:30:27 +00:00
Nate Begeman e14fdfaecd SSE 4.1 Intrinsics and detection
llvm-svn: 46681
2008-02-03 07:18:54 +00:00
Chris Lattner 62f67ea73a handle the case where a node can become ready to process
multiple times due to a RAUW.

llvm-svn: 46680
2008-02-03 07:13:32 +00:00
Chris Lattner 4e9898825e Use the new infrastructure for listening to node updates to
keep the LegalizeTypes node flags up to date when doing a RAUW.
This fixes a nasty bug that Duncan ran into and makes the 
previous (nonbuggy case) more efficent.

llvm-svn: 46679
2008-02-03 07:08:51 +00:00
Chris Lattner d2d166ea9f the world doesn't need my debugging code.
llvm-svn: 46678
2008-02-03 07:01:05 +00:00
Chris Lattner b2b9d6f0fb Change the 'global modification' APIs in SelectionDAG to take a new
DAGUpdateListener object pointer instead of just returning a vector 
of deleted nodes.  This makes the interfaces more efficient (no more
allocating a vector [at least a malloc], filling it in, then walking
it) and more clean.  This also allows the client to be notified of
nodes that are *changed* but not deleted.

llvm-svn: 46677
2008-02-03 06:49:24 +00:00
Chris Lattner 1770fb883b explicitly include Compiler.h instead of getting it from tblgen in the middle of a class.
llvm-svn: 46676
2008-02-03 05:43:57 +00:00
Seo Sanghyeon 66de08bfb4 Make ccc work with older Python versions. Patch by Sam Bishop.
llvm-svn: 46675
2008-02-03 03:40:41 +00:00
Chris Lattner 7685891aa3 Generalize the SDOperand->SDOperand form of
SelectionDAG::ReplaceAllUsesWith to handle replacement of
an SDOperand with *any* sdoperand, not just one for a node with
a single result.  Note that this has a horrible FIXME'd hack in it
to work around PR1975.  This should be removed when PR1975 is fixed.

llvm-svn: 46674
2008-02-03 03:35:22 +00:00
Chris Lattner e99faac423 don't do ReplaceUses on a result that doesn't exist.
llvm-svn: 46673
2008-02-03 03:20:59 +00:00
Chris Lattner f34dfe4f28 add a -view-legalize-types-dags option, for viewing the dags going into legalize types.
llvm-svn: 46672
2008-02-03 02:05:04 +00:00
Chris Lattner c43926fe67 Implement support for __extension__ which silences extwarnings in its
scope.  This is part of the fix for PR1966

llvm-svn: 46669
2008-02-02 20:20:10 +00:00
Evan Cheng 32e5347eb8 Get rid of the annoying blank lines before labels.
llvm-svn: 46667
2008-02-02 08:39:46 +00:00
Nick Lewycky f5b9938ef6 Don't use uninitialized values. Fixes vec_align.ll on X86 Linux.
llvm-svn: 46666
2008-02-02 08:29:58 +00:00
Evan Cheng 2aa360adf8 Unbreak ppc debug support.
llvm-svn: 46665
2008-02-02 05:06:29 +00:00
Chris Lattner 6cba8e9d66 minor tweak to anders patch: (only) ocu vectors support splatting, but
ocu vectors should not treat bitcasts from int <-> vector as a splat
unless it is of the element type.

llvm-svn: 46664
2008-02-02 04:51:41 +00:00
Anders Carlsson 6fa0813186 Add RUN line.
llvm-svn: 46663
2008-02-02 04:49:12 +00:00
Chris Lattner bfc2d8acd9 testcase for previous patch.
llvm-svn: 46662
2008-02-02 04:45:42 +00:00
Chris Lattner ce6ae5cb06 fix codegen on static variables which have multiple decl nodes. These
should be merged just like normal globals.  This fixes this testcase
that Anders provided:

static struct s a;
static struct s *ap1 = &a;
static struct s a =  { 10 };

llvm-svn: 46661
2008-02-02 04:43:11 +00:00
Evan Cheng efd142a920 SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.

llvm-svn: 46659
2008-02-02 04:07:54 +00:00
Devang Patel 8df7cc1119 Add comment explaining what is lower level analysis pass.
llvm-svn: 46658
2008-02-02 01:43:30 +00:00
Devang Patel 1a06334403 Do not strip symbols when EH is ON.
llvm-svn: 46657
2008-02-02 01:32:38 +00:00
Gordon Henriksen 931e121ad1 Fixing a bug creating floating point constants of type other
than double through the C bindings. Thanks to Tomas Lindquist
Olsen for reporting it.

llvm-svn: 46656
2008-02-02 01:07:50 +00:00
Evan Cheng 4e7ff941f1 Frame index can be negative.
llvm-svn: 46655
2008-02-02 00:17:00 +00:00
Steve Naroff 72df405dc5 Cleanup previous patch (based on feedback from Ted).
Since this behavior is useful for most classes, we might consider adding a simple 3 method class that implements the behavior. Ted said that Boost has such a class.

llvm-svn: 46654
2008-02-02 00:10:46 +00:00
Steve Naroff f7fe5b372f Make sure SourceManager/HeaderSearch don't support default copy constructors (since they result in bad runtime behavior).
I'm sure there are other classes that might need this "guard", however I was bitten by these 2 recently (so I thought I'd fix them).

llvm-svn: 46653
2008-02-01 23:31:13 +00:00
Anders Carlsson 53fef5d9d6 Add trailing newline.
llvm-svn: 46652
2008-02-01 23:27:51 +00:00
Anders Carlsson 0b05d041f2 Only OCU vectors can be splatted.
llvm-svn: 46651
2008-02-01 23:17:55 +00:00
Steve Naroff 0dffa442ea Rename diagnostic to reflect it's role...
llvm-svn: 46650
2008-02-01 22:44:48 +00:00
Steve Naroff e6b7ffd073 Minor API cleanup...
llvm-svn: 46649
2008-02-01 22:08:12 +00:00
Steve Naroff d9dc63f2c5 Remove temporary workaround (thanks to Ted for fixing ObjCAtCatchStmt so quickly:-).
llvm-svn: 46648
2008-02-01 21:51:39 +00:00
Ted Kremenek a496584c82 For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the next @catch)
and put the the next ObjcAtCatchStmt* as part of SubExprs.  This fixes a bug with
iterating over the children of ObjcAtCatch, where the next @catch was not
properly being iterated over as a child.

Altered serialization of ObjCAtCatchStmt to reflect this new layout of
its subexpressions, and fixed an ownership issue with the next @catch not
being serialized as an owned pointer.

llvm-svn: 46647
2008-02-01 21:28:59 +00:00
Lauro Ramos Venancio 192c07b727 CBackend: Implement unaligned load/store.
llvm-svn: 46646
2008-02-01 21:25:59 +00:00
Duncan Sands 9aa789fda3 Don't drop function/call return attributes like 'nounwind'.
llvm-svn: 46645
2008-02-01 20:37:16 +00:00
Steve Naroff edb5bc6f09 Fix two rewriter bugs with @catch.
- Support @catch(...), rather than crash:-)
- Make sure all catch bodies get rewritten. This "fix" is really a workaround until the iterator for the "try" AST is fixed. Will fix this in a separate commit.

llvm-svn: 46644
2008-02-01 20:02:07 +00:00