Commit Graph

1118 Commits

Author SHA1 Message Date
Bill Wendling
380c3ca093 Temporarily revert r65994. It was causing rdar://6646455.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 22:02:09 +00:00
Devang Patel
7f6179d1d8 If a global constant is dead then global's debug info should not prevent the optimizer in deleting the global. And while deleting global, delete global's debug info also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65994 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 01:22:23 +00:00
Devang Patel
9adb01cbc3 Recursively remove dead argument while removing llvm.dbg.declare intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 21:31:02 +00:00
Devang Patel
cd11991203 Ignore debug info intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 00:28:44 +00:00
Devang Patel
73df3c9721 Remove all dbg symobls, including those with circular references.
This is ugly, but I can't figure out a quick way out of this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 22:50:58 +00:00
Duncan Sands
95c5d0fb0a In theory the aliasee may have dead constant users
here.  Since we only do the transform if there is
one use, strip off any such users in the hope of
making the transform fire more often.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 17:55:38 +00:00
Dan Gohman
38deef9ce5 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64915 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 16:37:45 +00:00
Duncan Sands
cdf5ffb7fb If an alias is dead and so is its aliasee, then globaldce would
crash because the alias would still be using the aliasee when the
aliasee was deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64844 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 23:05:26 +00:00
Duncan Sands
7ae5b9e1eb This transform also applies to private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 17:50:04 +00:00
Duncan Sands
a37d119f63 Make this more useful for cleaning up after the
one-definition-rule llvm-gcc changes (coming soon
to a tree near you!).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 11:54:49 +00:00
Duncan Sands
4782b305c2 If the target of an alias has internal linkage, then the
alias can be morphed into the target.  Implement this
transform, and fix a crash in the existing transform at
the same time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 09:56:08 +00:00
Duncan Sands
1465d61bdd Rename getAnalysisToUpdate to getAnalysisIfAvailable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 13:14:17 +00:00
Nick Lewycky
9d4979123e The function that does nothing but call malloc is noalias return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-25 07:59:57 +00:00
Gabor Greif
40b65c898d use CallSite::isCalle instead of slow getOperandNo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62877 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-23 21:17:04 +00:00
Gabor Greif
a36791da41 Simplify the logic of getting hold of a PHI predecessor block.
There is now a direct way from value-use-iterator to incoming block in PHINode's API.
This way we avoid the iterator->index->iterator trip, and especially the costly
getOperandNo() invocation. Additionally there is now an assertion that the iterator
really refers to one of the PHI's Uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-23 19:40:15 +00:00
Gabor Greif
edc4d69917 introduce a useful abstraction to find out if a Use is in the call position of an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62788 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-22 21:35:57 +00:00
Duncan Sands
8556d2a7f1 BasicAliasAnalysis and FunctionAttrs were both
doing very similar pointer capture analysis.
Factor out the common logic.  The new version
is from FunctionAttrs since it does a better
job than the version in BasicAliasAnalysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 12:19:30 +00:00
Rafael Espindola
bb46f52027 Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 20:18:42 +00:00
Chris Lattner
92c6bd2c45 rewrite OptimizeAwayTrappingUsesOfLoads to 1) avoid a temporary
vector and extraneous loop over it, 2) not delete globals used by
phis/selects etc which could actually be useful.  This fixes PR3321.
Many thanks to Duncan for narrowing this down.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62201 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 00:12:58 +00:00
Duncan Sands
b502440164 Correct a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 13:48:44 +00:00
Dale Johannesen
cbfdf9644c Enable recursive inlining. Reduce inlining threshold
back to 200; 400 seems to be too high, loses more than
it gains.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 22:11:50 +00:00
Duncan Sands
ceb4d1aecb Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 20:38:59 +00:00
Dale Johannesen
c344371854 Increase default inlining aggressiveness in partial
compensation for turning off gcc's inliner.  This gets
us closer to the amount of inlining we were getting before.
It is not a win on everything, of course, but seems to
gain overall.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 23:11:00 +00:00
Misha Brukman
9b8f542e27 Removed trailing whitespace from Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 16:44:42 +00:00
Dale Johannesen
e345566f8e Adjustments to last patch based on review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 01:30:11 +00:00
Duncan Sands
177d84e048 Whitespace - correct formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 20:01:06 +00:00
Duncan Sands
b0cea8ff39 Remove alloca tracking from nocapture analysis. Not only
was it not very helpful, it was also wrong!  The problem
is shown in the testcase: the alloca might be passed to
a nocapture callee which dereferences it and returns the
original pointer.  But because it was a nocapture call we
think we don't need to track its uses, but we do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 19:39:06 +00:00
Duncan Sands
acf984417f Reorder these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 19:17:02 +00:00
Duncan Sands
00e7ea98c0 Use a switch rather than a sequence of "isa" tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61872 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 19:10:21 +00:00
Duncan Sands
b18715acb5 The verifier checks that the aliasee is not null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61870 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 18:45:53 +00:00
Duncan Sands
27a53009ef Teach the internalize pass to also internalize
global aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 21:24:45 +00:00
Duncan Sands
de77ebcbb9 Not having an aliasee is a theoretical possibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:47:56 +00:00
Duncan Sands
15b5750664 Format more neatly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:39:50 +00:00
Duncan Sands
2631ac3b5b Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:38:27 +00:00
Duncan Sands
1da5f2dd2e Delete unused global aliases with internal linkage.
In fact this also deletes those with linkonce linkage,
however this is currently dead because for the moment
aliases aren't allowed to have this linkage type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 20:37:33 +00:00
Nick Lewycky
3b3b4e3f0f Any void readonly functions are provably dead, don't waste time adding
nocapture attributes to them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-03 17:05:32 +00:00
Duncan Sands
9c5a5b01b4 Load tracking means that the value analyzed may
not have pointer type.  In particular, it may
be the condition argument for a select or a GEP
index.  While I was unable to construct a testcase
for which some bits of the original pointer are
captured due to one of these, it's very very close
to being possible - so play safe and exclude these
possibilities.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61580 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 15:16:38 +00:00
Duncan Sands
338cd6ba6e When calculating 'nocapture' argument attributes, allow
the argument to be stored to an alloca by tracking uses
of the alloca.  This occurs 4 times (out of 7121, 0.05%)
in MultiSource/Applications, so may not be worth it.  On
the other hand, it is easy to do and fairly cheap.  The
functions it helps are: W_addcom and W_addlit in spiff;
process_args (argv) in d (make_dparser); ercPixConcealIMB
in JM/ldecod.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 11:54:37 +00:00
Duncan Sands
b2f2279056 Improve comments and reorganize a bit - no functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61569 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 11:46:24 +00:00
Nick Lewycky
6b05686283 Make adding nocapture a bit stronger. FreeInst is nocapture. Also,
functions that don't write can't leak a pointer except through 
the return value, so a void readonly function is implicitly nocapture.

Test these, and add a test that verifies that f1 calling f2 with an 
otherwise dead pointer gets both of them marked nocapture.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 03:46:56 +00:00
Duncan Sands
88e76757de Mention that this pass does escape analysis in the
leading comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-01 20:45:19 +00:00
Duncan Sands
1010941954 Look through phi nodes and select instructions when
calculating nocapture attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61535 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 20:21:34 +00:00
Duncan Sands
17da06ffbd Don't analyze arguments already marked 'nocapture'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61532 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 18:08:59 +00:00
Duncan Sands
9e89ba31f1 Rename AddReadAttrs to FunctionAttrs, and teach it how
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape.  Mark such arguments 'nocapture'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 16:14:43 +00:00
Duncan Sands
2964fe37ae Experiments show that looking through phi nodes
and select instructions doesn't buy anything here
except extra complexity: the only difference in
the entire testsuite was that a readonly function
became readnone in MiBench/consumer-typeset.  Add
a comment about this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61478 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-29 20:51:17 +00:00
Duncan Sands
516ec62bfe Allow readnone functions to read (and write!) global
constants, since doing so is irrelevant for aliasing
purposes.  While this doesn't increase the total number
of functions marked readonly or readnone in MultiSource/
Applications (3089), it does result in 12 functions being
marked readnone rather than readonly.
Before:
  readnone: 820
  readonly: 2269
After:
  readnone: 832
  readonly: 2257


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61469 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-29 11:34:09 +00:00
Chris Lattner
f49a28cd02 insert some sequence points and preincrement an iterator to avoid
iterator invalidation problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61124 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 05:42:08 +00:00
Chris Lattner
bce4afe839 Enhance heap sra to be substantially more aggressive w.r.t PHI
nodes.  This allows it to do fairly general phi insertion if a 
load from a pointer global wants to be SRAd but the load is used
by (recursive) phi nodes.  This fixes a pessimization on ppc
introduced by Load PRE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61123 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 05:28:49 +00:00
Chris Lattner
85d3d4f35d Fix another crash found by inspection. If we have a PHI node merging
the load multiple times, make sure the check the uses of the PHI to 
ensure they are transformable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61102 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-16 21:24:51 +00:00
Chris Lattner
542dc1a0de fix a crash found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61101 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-16 21:04:51 +00:00
Chris Lattner
5a6bb6ae78 switch some std::set/std::map to SmallPtrSet/DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-16 07:34:30 +00:00
Chris Lattner
101f44e81f enhance heap-sra to apply to fixed sized array allocations, not just
variable sized array allocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61051 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 21:44:34 +00:00
Chris Lattner
344b41cfbd Use stripPointerCasts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61047 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 21:20:32 +00:00
Chris Lattner
49b6d4ae9e minor tweaks for formatting, allow bitcast in ValueIsOnlyUsedLocallyOrStoredToOneGlobal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 21:08:54 +00:00
Chris Lattner
e61d0a626e refactor some code into a new TryToOptimizeStoreOfMallocToGlobal function.
Use GetElementPtrInst::hasAllZeroIndices where possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61045 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 21:02:25 +00:00
Bill Wendling
66c75aaa02 Fix error where it wasn't getting the correct caller function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59758 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 00:09:21 +00:00
Bill Wendling
8c1604e7d6 If the function being inlined has a higher stack protection level than the
inlining function, then increase the stack protection level on the inlining
function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59757 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 00:06:32 +00:00
Devang Patel
f23de86fa3 Do not forget llvm.dbg.declare's first argument while removing debugging information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-20 01:20:42 +00:00
Devang Patel
fb5fd5a0bb Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59570 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 00:22:02 +00:00
Devang Patel
b876cc193c Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-19 00:19:18 +00:00
Devang Patel
f17fc461d1 Add new helper pass that strips all symbol names except debugging information.
This pass makes it easier to test wheter debugging info. influences optimization passes or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 21:34:39 +00:00
Devang Patel
4460a7e90c Remove even more llvm.dbg variables.
Remove all dead globals from llvm.metadata.
Ignore linkonce linkage for selected llvm.dbg values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59547 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 21:13:41 +00:00
Torok Edwin
b079a391c8 If SI->size() is 0, we are not allowed to dereference ->begin().
This fixed PR3078.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59416 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 17:21:25 +00:00
Chris Lattner
3f914f0138 simplify loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59406 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 06:35:18 +00:00
Devang Patel
229de95eab Refactor code.
Strip debug information before stripping symbol names. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59328 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-14 22:49:37 +00:00
Devang Patel
bf5db817f4 Really remove all debug information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59208 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 01:28:40 +00:00
Devang Patel
772777e105 Use actual function name in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59063 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 19:16:41 +00:00
Devang Patel
b7c6bf1e07 Do now allow InlineAlways pass to remove dead functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-05 01:39:16 +00:00
Andrew Lenharth
06a1242207 add a period at the end of the comment, ignoring the fact that the comment would be hard pressed to be considered a sentence, but if it makes Bill happy...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 19:29:29 +00:00
Andrew Lenharth
97bd9a914b Ensure that we are checking only calls to the function we are interested in specializing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-03 16:05:35 +00:00
Nick Lewycky
6feb333695 Changes from Duncan's review:
* merge two weak functions by making them both alias a third non-weak fn
 * don't reimplement CallSite::hasArgument
 * whitelist the safe linkage types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 16:46:26 +00:00
Duncan Sands
5baf8ece83 Get this building on 64 bit machines (error:
cast from ‘const llvm::PointerType*’ to ‘unsigned int’
loses precision).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 09:00:33 +00:00
Oscar Fuentes
2b82b7e77e CMake: added a source file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58559 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 06:01:39 +00:00
Nick Lewycky
579a024661 Add a new MergeFunctions pass. It finds identical functions and merges them.
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58557 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02 05:52:50 +00:00
Daniel Dunbar
c5e1ec47c7 Add InlineCost class for represent the estimated cost of inlining a
function.
 - This explicitly models the costs for functions which should
   "always" or "never" be inlined. This fixes bugs where such costs
   were not previously respected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30 19:26:59 +00:00
Daniel Dunbar
1a99dbfe3b Factor shouldInline method out of Inliner.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58355 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 01:02:02 +00:00
Daniel Dunbar
f184c66e71 Assorted comment/naming fixes, 80-col violations, and reindentation.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58352 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28 23:24:26 +00:00
Dan Gohman
b9a31a15f9 Fix a bug that prevented llvm-extract -delete from working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57864 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 01:08:07 +00:00
Nuno Lopes
7a85a62f50 dont specialize weak functions and the like
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57305 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-08 18:45:59 +00:00
Duncan Sands
c82b6a1ed2 Ignore loads from and stores to local memory (i.e. allocas)
when deciding whether to mark a function readnone/readonly.
Since the pass is currently run before SROA, this may be
quite helpful.  Requested by Chris on IRC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 13:24:24 +00:00
Dan Gohman
792e1e92c7 Clean up some multiple-return-value code that is no longer
applicable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 22:21:24 +00:00
Duncan Sands
a2582da44d Teach internalize to preserve the callgraph.
Why?  Because it was there!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 07:36:09 +00:00
Nuno Lopes
86364023e6 revert the addition of Preverves(CallGraph), per Duncan's comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56917 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-01 09:13:40 +00:00
Nuno Lopes
0483d018c4 add preserversCFG() + preservers(CallGraph)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56887 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 22:04:30 +00:00
Nuno Lopes
dd7c3e4e56 add AU.setPreservesCFG() since this pass only adds and removes function attributes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 18:34:38 +00:00
Duncan Sands
6cccf03d02 Speed up these passes when the callgraph has
huge simply connected components.  Suggested
by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 14:59:04 +00:00
Nuno Lopes
5ed3b894c9 remove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 14:40:32 +00:00
Duncan Sands
224c86ee77 Tweak some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 13:35:31 +00:00
Duncan Sands
5df3186f59 Rename isWeakForLinker to mayBeOverridden. Use it
instead of hasWeakLinkage in a bunch of optimization
passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56782 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 11:25:42 +00:00
Devang Patel
2c9c3e7368 Implement function notes as function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56716 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 23:51:19 +00:00
Devang Patel
19c874638d Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn

Return attributes use 0 as the index.
Function attributes use ~0U as the index.

This patch requires corresponding changes in llvm-gcc and clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56704 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 22:53:05 +00:00
Devang Patel
0598866c05 Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage 
- to implement function notes as function attributes and 
- to distinguish between function attributes and return value attributes.

This requires corresponding changes in llvm-gcc and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 21:00:45 +00:00
Devang Patel
e3d76d37e9 s/ParamAttrsWithIndex/FnAttributeWithIndex/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56535 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 00:55:02 +00:00
Devang Patel
20bcaff6a7 Put FN_NOTE_AlwaysInline and others in FnAttr namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 00:06:15 +00:00
Devang Patel
dd4924c564 Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.
Do not check isDeclaration() in hasNote(). It is clients' responsibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 23:52:03 +00:00
Devang Patel
eaf42abab6 s/ParameterAttributes/Attributes/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 23:03:40 +00:00
Devang Patel
d9b4a5f859 Use parameter attribute store (soon to be renamed) for
Function Notes also. Function notes are stored at index ~0.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 22:35:17 +00:00
Devang Patel
f3ba70861c Add hasNote() to check note associated with a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56477 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 22:32:29 +00:00
Oscar Fuentes
3d01fc7de8 Initial support for the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00
Duncan Sands
f95f945fb0 Implement review feedback from Devang: make use
of mayReadFromMemory and mayWriteToMemory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56387 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-20 16:45:58 +00:00
Duncan Sands
9f07a290b9 Add a new pass AddReadAttrs which works out which functions
can get the readnone/readonly attributes, and gives them it.
The plan is to remove markmodref (which did the same thing
by querying GlobalsModRef) and delete the analogous
functionality from GlobalsModRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56341 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-19 08:17:05 +00:00
Anton Korobeynikov
19e861a4ff Make safer variant of alias resolution routine to be default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 20:05:04 +00:00
Anton Korobeynikov
e4c6b61ebd Resolve aliases, when possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56001 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 19:04:59 +00:00
Duncan Sands
a9c3251e6b Update the callgraph correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55896 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 11:08:09 +00:00
Duncan Sands
34c8847b2d Update the callgraph correctly in ArgumentPromotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55895 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 11:07:35 +00:00
Duncan Sands
d7b9851c4e Reapply 55859. This doesn't change anything as
long as the callgraph is correct.  It checks
for wrong callgraphs more strictly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55894 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-08 11:05:51 +00:00
Duncan Sands
4cddaf77c4 Correct a comment and strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55883 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-07 09:54:09 +00:00
Nuno Lopes
b9baf31679 fix crash when the malloc/free function is defined or is a declaration with 0 parameters.
this pass doesnt seem to be used, but still it's now a little more correct

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-06 17:44:06 +00:00
Duncan Sands
fec2c2bf5e When PruneEH turned an invoke into an ordinary
call (thus changing the call site) it didn't
inform the callgraph about this.  But the
call site does matter - as shown by the testcase,
the callgraph become invalid after the inliner
ran (with an edge between two functions simply
missing), resulting in wrong deductions by
GlobalsModRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55872 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-06 17:19:29 +00:00
Owen Anderson
6e6074508c Revert r55859. This is breaking the build in the abscence of its companion commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 23:36:01 +00:00
Duncan Sands
c94fe21a56 Delete the removeCallEdgeTo callgraph method,
because it does not maintain a correct list
of callsites.  I discovered (see following
commit) that the inliner will create a wrong
callgraph if it is fed a callgraph with
correct edges but incorrect callsites.  These
were created by Prune-EH, and while it wasn't
done via removeCallEdgeTo, it could have been
done via removeCallEdgeTo, which is an accident
waiting to happen.  Use removeCallEdgeFor
instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55859 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 21:43:04 +00:00
Duncan Sands
6f0a7687ab Use removeAllCalledFunctions rather than removing
edges one by one by hand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55836 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 14:56:53 +00:00
Duncan Sands
cae62e3498 Make this pass return that it made a change if
it modifies a functions attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55831 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-05 09:08:37 +00:00
Andrew Lenharth
eb50479714 try to seperate the mechanism into something others can use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55785 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 18:51:26 +00:00
Dan Gohman
ae73dc1448 Tidy up several unbeseeming casts from pointer to intptr_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 17:05:41 +00:00
Andrew Lenharth
ef7803217a cleanup as per Duncan's review
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 14:34:22 +00:00
Devang Patel
7bbb4339f9 Update inline threshold for current function if the notes say, optimize for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 23:06:09 +00:00
Andrew Lenharth
cf996d4b56 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55734 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 21:00:28 +00:00
Devang Patel
7946e7b8a4 Fix typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55720 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 20:25:40 +00:00
Devang Patel
79cca4f49f Add parentheses to make code more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55717 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 19:57:15 +00:00
Devang Patel
3fb68373c4 Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55716 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 19:52:17 +00:00
Devang Patel
22ec199fa0 Add custom inliner that handles only functions that are marked as always_inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55713 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:50:53 +00:00
Devang Patel
67243399dd Handle "always inline" note during inline cost analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55712 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:47:45 +00:00
Devang Patel
5e06010462 Check noinline note and ignore other notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55711 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:46:35 +00:00
Devang Patel
910c120a7c Handle "noinline" note inside the simple inliner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03 18:10:21 +00:00
Devang Patel
cb7f483d8c s/FP_AlwaysInline/FN_NOTE_AlwaysInline/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 22:43:57 +00:00
Devang Patel
691e52445e respect inline=never and inline=always notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-02 22:16:13 +00:00
Dan Gohman
a8c763b307 Use empty() instead of begin() == end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 18:13:49 +00:00
Matthijs Kooijman
c1f1d46f00 Replace two for loops with while(!X->use_empty()) loops. This prevents
invalidating the iterator by deleting the current use. This fixes a segfault on
64 bit linux reported in PR2675.

Also remove an unneeded if.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-14 15:03:05 +00:00
Bill Wendling
f9e67aca52 Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54707 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 23:15:44 +00:00
Matthijs Kooijman
7d942001fa Let SRETPromotion properly preserve the function name instead of (implicitly)
postfixing it with a number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54468 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 16:01:23 +00:00
Matthijs Kooijman
a7bab2c81c Fix SRETPromotion, it was generating functions without returns statements since
r53941 (but this was not noticed due to the lack of a basic test for
SRETPromotion). 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54467 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 15:58:09 +00:00
Matthijs Kooijman
81ec2486b3 Add some debug output to SRETPromotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54464 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 15:14:04 +00:00
Matthijs Kooijman
477f5a2f11 Restructure ArgumentPromotion a bit. Instead of just having a single boolean
that says "unconditional loads from this argument are safe", we now keep track
of the safety per set of indices from which loads happen. This prevents
ArgPromotion from promoting loads that aren't really valid. As an added effect,
this will now disregard the the type of the indices passed to a GEP, so
"load GEP %A, i32 1" and "load GEP %A, i64 1" will result in a single argument,
not two.

This fixes PR2598, for which a testcase has been added as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54159 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 10:00:13 +00:00
Dan Gohman
fc74abfba5 Enable first-class aggregates support.
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.

The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 00:34:11 +00:00
Matthijs Kooijman
bc1f989e3c Make GlobalOpt preserve address spaces when scalar replacing aggregate globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53716 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 11:59:53 +00:00
Matthijs Kooijman
4f72368529 Allow deadargelim to change return types even though now values were dead. This
again canonicalizes {i32} into i32 and {} into void.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53610 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 14:42:31 +00:00
Matthijs Kooijman
d1d1de7f39 Revert r53606. It turns out that explicitely tracking the liveness of the
return value as a whole in deadargelim is really not needed now that we simply
rebuild the old return value and actually prevents some canonicalization from
taking place.

This revert stops deadargelim from changing {i32} into i32 for now, but I'll
fix that next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53609 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 14:39:36 +00:00
Matthijs Kooijman
eb32b453b3 Make deadargelim a bit less smart, so it doesn't choke on nested structs as
return values that are still (partially) live. Instead of updating all uses of
a call instruction after removing some elements, it now just rebuilds the
original struct (With undef gaps where the unused values were) and leaves it to
instcombine to clean this up.

The added testcase still fails currently, but this is due to instcombine which
isn't good enough yet. I will fix that part next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53608 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 14:03:10 +00:00
Matthijs Kooijman
9c9418d0f3 Don't use isa when we can reuse a previous dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53607 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 13:39:08 +00:00
Matthijs Kooijman
ddd1a79b6d Make DeadArgElim keep liveness of the return value as a whole in addition to
only the liveness of partial return values (for functions returning a struct).
This is more explicit to prevent unwanted changes in the return value. 

In particular, deadargelim now canonicalizes a function returning {i32} to
returning i32 and {} to void, if the struct returned is not used in its
entirety, but only the single element is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 13:36:06 +00:00
Matthijs Kooijman
2bf5372d8a Let DAE keep a list of live functions, instead of simply marking all arguments
and return values live for those functions. This doesn't change anything yet,
but prepares for the coming commits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53601 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 09:11:16 +00:00
Matthijs Kooijman
3015652473 Split DAE::MarkLive into MarkLive and PropagateLiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53600 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 09:00:17 +00:00
Matthijs Kooijman
6cdd54b6f7 Pass around const RetOrArg references instead of copying values. Also, mark
RetOrArg::getDescription() as const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53599 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 08:56:49 +00:00
Matthijs Kooijman
03016ca361 Simplify debug code by using RetOrArg::getDescription().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 08:53:36 +00:00
Matthijs Kooijman
0d1730a14c Fix indentation (intentionally left out of the previous commit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53592 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 08:47:32 +00:00
Matthijs Kooijman
a3ec5d6ecc Move the deadargelim code for intrinsically alive functions into its own
method, to slightly simplify control flow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53591 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15 08:45:12 +00:00
Dan Gohman
c418bf3dd5 Use find instead of lower_bound.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53474 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11 20:58:19 +00:00
Matthijs Kooijman
d16918f843 Restructure dead argument elimination, try #3 :-)
Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of
dependencies between return values and/or arguments. Also make the handling of
arguments and return values the same.

The pass now looks properly inside returned structs, but only at the first
level (ie, not inside nested structs).

This version fixed a few more bugs and was cleaned up a bit. It now passes all
of LLVM's testing, and should still pass SPEC2006. There is still a minor bug
with regard to returning nested structs. Since there is currently nothing that
emits such IR, I will fix that in a seperate commit (partly because it requires
a non-trivial fix).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53400 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-10 10:24:08 +00:00
Evan Cheng
890aaa8710 Restore DeadArgElim back to 52570. It's breaking 447.dealII.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-25 18:10:09 +00:00