Commit Graph

40347 Commits

Author SHA1 Message Date
Nate Begeman f3c89be368 Ident mnemonics appropriately
llvm-svn: 46746
2008-02-05 08:49:09 +00:00
Chris Lattner b1537ebdd4 rewrite some of the type refinement code to eliminate dangling pointers
simplify the code and generally make it more robust.

llvm-svn: 46745
2008-02-05 08:06:13 +00:00
Ted Kremenek d8902e06ba Overhauling of "ValueState" so that it represents its own functional data
structure that can contain several maps, not just one.

llvm-svn: 46744
2008-02-05 07:17:49 +00:00
Chris Lattner 86964a9653 Change the key of CGRecordLayouts from being an llvm type* to being a decl*. LLVM
Type*'s can change as types are refined, so we can't use them as a stable key in
the map.  Decls don't change, so use them instead.

This patch was written by Anders, but he's too shy to commit it himself :)

llvm-svn: 46743
2008-02-05 06:55:31 +00:00
Chris Lattner b977b6a59b Relax an assertion, fixing PR1968
llvm-svn: 46742
2008-02-05 06:37:34 +00:00
Chris Lattner f4ed277135 dump the module *before* we delete it, not after.
llvm-svn: 46741
2008-02-05 06:18:42 +00:00
Ted Kremenek 0a04690fda ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.
llvm-svn: 46740
2008-02-05 05:15:51 +00:00
Chris Lattner 682a7dc653 Fix a bug compiling PR1978 (perhaps not the only one though) which
was incorrectly simplifying "x == (gep x, 1, i)" into false, even 
though i could be negative.  As it turns out, all the code to 
handle this already existed, we just need to disable the incorrect
optimization case and let the general case handle it.

llvm-svn: 46739
2008-02-05 04:45:32 +00:00
Owen Anderson 1de5997119 Fix an obscure read-after-free bug that Duncan found.
llvm-svn: 46738
2008-02-05 04:34:03 +00:00
Devang Patel 6c037da51c Update outdated comment.
llvm-svn: 46737
2008-02-05 03:17:42 +00:00
Devang Patel a703a67384 Cleanup InitListExpr code generation code.
Handle padding fields while initializing struct (fix PR 1962)

llvm-svn: 46736
2008-02-05 02:39:50 +00:00
Eli Friedman 26a6dd0877 Fix memory corruption from the type map being modified while a reference
to a cell is being held.

llvm-svn: 46735
2008-02-05 02:18:07 +00:00
Devang Patel 86e7166522 Keep track of padding fields.
llvm-svn: 46734
2008-02-05 01:40:48 +00:00
Dale Johannesen 969104db55 Missed one.
llvm-svn: 46733
2008-02-05 01:12:10 +00:00
Ted Kremenek 4894c56ba7 Simplified transfer functions for '++' and '--'
llvm-svn: 46732
2008-02-05 00:43:43 +00:00
Ted Kremenek 3f2f1ade4c Implemented initial transfer function support for '&&', '||', '?', and
__builtin_choose.

llvm-svn: 46731
2008-02-05 00:26:40 +00:00
Evan Cheng baba47f1ea This should also work on x86 now.
llvm-svn: 46730
2008-02-05 00:25:31 +00:00
Evan Cheng eefc0a2410 Unbreak teh build.
llvm-svn: 46729
2008-02-05 00:25:13 +00:00
Dale Johannesen b53713f26b Do not unconditionally redefine vec_ext_v16qi and
vec_ext_v4si builtins.  This is a hack; they should
be defined here, then resolved in the X86 BE.
However there is enough other stuff missing in the
X86 BE for SSE41 that this will do for now.

llvm-svn: 46727
2008-02-04 23:27:29 +00:00
Evan Cheng ac3cd69add Typo.
llvm-svn: 46725
2008-02-04 23:10:38 +00:00
Evan Cheng 2cb9068c78 Dwarf requires variable entries to be in the source order. Right now, since we are recording variable information at isel time this means parameters would appear in the reverse order. The short term fix is to issue recordVariable() at asm printing time instead.
llvm-svn: 46724
2008-02-04 23:06:48 +00:00
Nate Begeman 5420516b3f This method should be virtual
llvm-svn: 46723
2008-02-04 23:04:24 +00:00
Ted Kremenek 7746a6279b Added file that should have been in my previous commit.
llvm-svn: 46722
2008-02-04 21:59:22 +00:00
Ted Kremenek 723fe3f863 Created ValueStateManager, a full-blown class to manage the states
created for GRConstants.  Moved instances of ValueManager and SymbolManager
inside this class.  The goal is to gradually separate more of the state
management from the state transformation.

llvm-svn: 46721
2008-02-04 21:59:01 +00:00
Nate Begeman ef14d5f926 Eliminate some redundant code.
llvm-svn: 46720
2008-02-04 21:44:06 +00:00
Ted Kremenek b1e5bcb719 Modified 'Profile' method of ImmutableMap to use the 'Profile' method
of the contained ImutAVLTree root.

llvm-svn: 46719
2008-02-04 21:17:02 +00:00
Devang Patel 623df7620d Do not set time out, lets assume assembler will do its job in reasonable amount of time.
llvm-svn: 46718
2008-02-04 21:16:10 +00:00
Ted Kremenek e036344e21 Modified node creation of ImutAVLTree to do a hash lookup for an existing
node in the FoldingSet of nodes held by the Factory object.  If we
we find a node with a matching hash, we do a full structural comparison.
Nodes are also now inserted into the FoldingSet only when we mark them
Immutable, as their children can change during intermediate-rebalancing.

The 'Profile' method for ImutAVLTree is no longer used when looking up
existing ImutAVLTrees with a given set of contents; instead the Profile method
is used by other clients that wish to insert such a tree into a folding set.
This means that we are not using FoldingSet in ImutAVLTreeFactory in the way
it was intended, but instead are using it as an opaque hashtable.

llvm-svn: 46717
2008-02-04 21:15:24 +00:00
Ted Kremenek e288786356 Added "bucket_iterators" to FoldingSet. Bucket iterators allow iteration
over all the nodes in a particular bucket.

llvm-svn: 46716
2008-02-04 21:11:17 +00:00
Devang Patel 3d4f1b3695 Set error message.
Patch by Shantonu Sen.

llvm-svn: 46715
2008-02-04 20:57:54 +00:00
Duncan Sands 3342d4083f Crashes LegalizeTypes with "Do not know how to
expand the result of this operator!" (node: ctlz).

llvm-svn: 46713
2008-02-04 18:07:02 +00:00
Duncan Sands ff1a444879 Crashes LegalizeTypes with "Do not know how to split
this operator's operand" (node: extract_subvector).

llvm-svn: 46712
2008-02-04 18:05:42 +00:00
Chris Lattner 69f90ccb17 remove target triple to make this test more "generic"
llvm-svn: 46711
2008-02-04 18:02:37 +00:00
Ted Kremenek 726933a589 Fixed 80 col. violation.
llvm-svn: 46709
2008-02-04 17:14:20 +00:00
Ted Kremenek 2cdfd6670e Implemented transfer function for unary '~'.
llvm-svn: 46708
2008-02-04 16:58:30 +00:00
Ted Kremenek 0bf88b9a51 constified operator~().
llvm-svn: 46707
2008-02-04 16:57:26 +00:00
Duncan Sands 331cd706f5 Crashed the new type legalizer. Not likely to catch
any bugs in the future since to get the crash you also
need hacked in fake libcall support (which creates odd
but legal trees), but since adding it doesn't hurt...
Thanks to Chris for this ultimately reduced version.

llvm-svn: 46706
2008-02-04 09:40:27 +00:00
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