Commit Graph

5475 Commits

Author SHA1 Message Date
Dan Gohman 68659280fa Add constructor overloads for LoadInst and StoreInst that insert at the
end of a BasicBlock and have an alignment parameter.

llvm-svn: 40016
2007-07-18 20:51:11 +00:00
Reid Spencer 5060fd0fa3 Unbreak the build by putting calls to free into the implementation file and
having that implementation file #include <cstdlib>.

llvm-svn: 39952
2007-07-17 02:16:12 +00:00
Owen Anderson 7fcaaadf1c Add support for walking up memory def chains, which enables finding many more
dead stores on 400.perlbench.

llvm-svn: 39929
2007-07-16 21:52:50 +00:00
Owen Anderson 81990a3fc3 Use realloc() to (potentially) resize the contents of SmallPtrSet in place.
llvm-svn: 39926
2007-07-16 21:27:44 +00:00
Dan Gohman 06c60b6032 Fix comments about vectors to use the current wording.
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Nick Lewycky 5246026c8c Handle decrementing loops properly. Fixes PR1533.
Always pass the constant as the second parameter to HowManyLessThans.

Remove obsolete "isSigned" parameter.

llvm-svn: 39893
2007-07-16 02:08:00 +00:00
Chris Lattner 0f0adc6b9d add a helper method.
llvm-svn: 39885
2007-07-15 23:32:03 +00:00
Nick Lewycky ddc2f9ba57 Clarify the language. Pointed out by Duncan Sands.
llvm-svn: 39857
2007-07-14 17:41:03 +00:00
Anton Korobeynikov 383a324735 Long live the exception handling!
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.

In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.

After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be 
thought as 'finished': I expect many small and not so small glitches
everywhere.

llvm-svn: 39855
2007-07-14 14:06:15 +00:00
Nick Lewycky 61b4a265ee Add alternate ConstantRange intersection algorithm.
llvm-svn: 39851
2007-07-14 02:51:34 +00:00
Devang Patel 4cd1413f15 Make LCSSA a loop pass.
llvm-svn: 39844
2007-07-13 23:57:11 +00:00
Dale Johannesen 2182f06f2d Skeleton of post-RA scheduler; doesn't do anything yet.
Change name of -sched option and DEBUG_TYPE to
pre-RA-sched; adjust testcases.

llvm-svn: 39816
2007-07-13 17:13:54 +00:00
Reid Spencer df523644c9 Regenerate to pick up Gabor's changes.
llvm-svn: 39802
2007-07-13 10:05:30 +00:00
Tanya Lattner ccecbcd779 Adding ability to demote phi to stack.
llvm-svn: 39744
2007-07-11 18:41:34 +00:00
Owen Anderson 5e72db3f7f Add FastDSE, a new algorithm for doing dead store elimination. This algorithm is not as accurate
as the current DSE, but it only a linear scan over each block, rather than quadratic.  Eventually
(once it has been improved somewhat), this will replace the current DSE.

NOTE: This has not yet been extensively tested.
llvm-svn: 38517
2007-07-11 00:46:18 +00:00
Evan Cheng ff025e4fc9 Add OptionalDefOperand. Remove clobbersPred. Also add DefinesPredicate to be used by if-converter.
llvm-svn: 38499
2007-07-10 18:06:29 +00:00
Owen Anderson 9c88457abe Add support for finding the dependencies of call and invoke instructions.
llvm-svn: 38497
2007-07-10 17:59:22 +00:00
Owen Anderson 47352db672 Fix a bunch of things from Chris' feedback
llvm-svn: 38493
2007-07-10 17:08:11 +00:00
Evan Cheng ff6f279adf When a node value is only used by a CopyToReg, use the user's dest. This should not be restricted to nodes that produce only a single value.
llvm-svn: 38485
2007-07-10 07:08:32 +00:00
Evan Cheng 32aad49b24 Move DenseMapKeyInfo<SDOperand> from LegalizeDAG.cpp to SelectionDAGNodes.h
llvm-svn: 38484
2007-07-10 06:59:55 +00:00
Owen Anderson 7ff09810a8 Evidently my earlier fix did not go far enough. When resizing a zero-sized
BitVector, make sure to set or clear ALL of the bits.

llvm-svn: 38481
2007-07-10 02:01:16 +00:00
Owen Anderson c3bd1db42d When resizing a BitVector with size 0, be sure to clear the low word before using it.
llvm-svn: 38476
2007-07-09 23:39:39 +00:00
Devang Patel e8ec7661ea Expose struct size threhold to allow users to tweak their own setting.
llvm-svn: 38472
2007-07-09 21:19:23 +00:00
Owen Anderson 3364abbb36 Make the assignment operator for SmallPtrSet return a reference, and fix a long-standing bug in the copy
ctor while I'm at it.

Thanks to Chris Lattner for help with this patch.

llvm-svn: 38470
2007-07-09 20:59:01 +00:00
Devang Patel 94d0fbe1a6 Fix memory leak.
llvm-svn: 38469
2007-07-09 20:52:39 +00:00
Chris Lattner a11b2c74f2 work around an aparent gcc name resolution bug by
detemplatizing this.

llvm-svn: 38461
2007-07-09 17:11:53 +00:00
Chris Lattner 85049a470e implement operator= for smallptrset
llvm-svn: 38460
2007-07-09 16:54:03 +00:00
Dan Gohman 0a76e7f678 Move the APInt form of SCEVUnknown::getIntegerSCEV to SCEVConstant::get, and
use SCEVConstant::get instead of SCEVUnknown::get when constructing a SCEV
for a ConstantInt.

llvm-svn: 38457
2007-07-09 15:25:17 +00:00
Dan Gohman 8e0b6099b9 Fix a typo in a comment.
llvm-svn: 38456
2007-07-09 15:15:24 +00:00
Gabor Greif 949ac3a930 missed this one
llvm-svn: 38454
2007-07-09 12:20:30 +00:00
Gabor Greif ef3d8362a3 fix typos
llvm-svn: 38453
2007-07-09 12:00:59 +00:00
Owen Anderson c0daf5fe53 A first stab at memory dependence analysis. This is an interface on top of
alias analysis, adding caching and lazy computation of queries.  This will
be used in planned improvements to memory access optimizations.

llvm-svn: 37958
2007-07-06 23:14:35 +00:00
Owen Anderson 81f07478b4 Add some accessors to improve consistency.
llvm-svn: 37957
2007-07-06 23:13:31 +00:00
Devang Patel d7767cc2a7 Add SplitEdge and SplitBlock utility routines.
llvm-svn: 37952
2007-07-06 21:39:20 +00:00
Gabor Greif 24027b584f finishing touches of bytecode -> bitcode changes. also unbreak Windows
llvm-svn: 37950
2007-07-06 20:28:40 +00:00
Dan Gohman 71ed4aaa31 Remove redundant declarations.
llvm-svn: 37946
2007-07-06 13:59:28 +00:00
Gabor Greif 3d3fc3296e eliminate residual cruft related to recognizing bytecode
files.
bitcode files are the only LLVM format left.

llvm-svn: 37945
2007-07-06 13:38:17 +00:00
Dan Gohman fd404813e8 Fix a comment so that the element numbering match the actual element
operand numbering.

llvm-svn: 37944
2007-07-06 13:27:33 +00:00
Rafael Espindola b567e3ffb0 Add the byval attribute
llvm-svn: 37940
2007-07-06 10:57:03 +00:00
Dan Gohman 929624f461 Add explicit keywords.
llvm-svn: 37925
2007-07-05 20:40:15 +00:00
Dan Gohman 83b095df36 Make MachineFunctionPass::runOnFunction non-virtual. Subclasses override
the virtual function runOnMachineFunction instead. And add access specifiers.

llvm-svn: 37924
2007-07-05 20:39:35 +00:00
Gabor Greif e16561cd5d Here is the bulk of the sanitizing.
Almost all occurrences of "bytecode" in the sources have been eliminated.

llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Duncan Sands 4836e3a6f8 Make sure only one copy of a filter is placed in the
exception handling table if we encounter it multiple
times.  Filters could be folded harder than this, but
that would mean a lot more work for not much gain.

llvm-svn: 37908
2007-07-05 15:15:01 +00:00
Duncan Sands fe80638417 Extend eh.selector to support both catches and filters.
Drop the eh.filter intrinsic.

llvm-svn: 37875
2007-07-04 20:52:51 +00:00
Devang Patel 24f9e2cf98 Remove unused method - getIDomBlock().
llvm-svn: 37865
2007-07-04 01:11:19 +00:00
Devang Patel 67c27ceac7 Fix typo in assertion check.
llvm-svn: 37864
2007-07-04 01:05:22 +00:00
Dan Gohman 32c3c19bed Remove declarations for code no longer in the tree, to avoid confusion.
llvm-svn: 37840
2007-07-02 15:06:26 +00:00
Dan Gohman 1eb8ed47f5 Add explicit keywords.
llvm-svn: 37839
2007-07-02 14:53:37 +00:00
Devang Patel 88197332e7 Add loop info verification mechanism.
llvm-svn: 37822
2007-06-29 23:13:42 +00:00
Dan Gohman 2e5e277cb3 Add an explicit keyword. Thanks Chris!
llvm-svn: 37819
2007-06-29 22:16:25 +00:00