Commit Graph

8360 Commits

Author SHA1 Message Date
Chris Lattner 97b07c2096 Extricate the "reverse" support from the depth-first iterator. This is really
a crappy form of post-order traversal which really does not belong here.  While
we are at it, improve documentation and use a vector instead of a stack.

This improves the post dominator analysis pass by ~5%, and probably also helps
other passes as well.

llvm-svn: 9084
2003-10-13 15:45:33 +00:00
Chris Lattner d6d5651acf Add operator= for type iterators to make them assignable
llvm-svn: 9083
2003-10-13 15:34:17 +00:00
Chris Lattner 78cab97abb Remove explicit inline qualifiers when the implicit ones work just as well
llvm-svn: 9082
2003-10-13 15:30:59 +00:00
Chris Lattner 0c068c097a Stop using "reverse depth first" order
llvm-svn: 9081
2003-10-13 15:21:58 +00:00
Chris Lattner e6f4e07706 Oops, forgot to commit this before: standardize header comments
llvm-svn: 9080
2003-10-13 14:58:11 +00:00
Chris Lattner aa78cc9e5d Minor cleanups
llvm-svn: 9079
2003-10-13 14:57:53 +00:00
Chris Lattner e859403772 Speed up TypesEqual by specializing it for all of the derived types, avoiding
a lot of virtual method dispatch overhead.

llvm-svn: 9078
2003-10-13 14:55:56 +00:00
Chris Lattner a785563692 Avoid calling getTypeSlot more
llvm-svn: 9077
2003-10-13 14:34:59 +00:00
Chris Lattner 1dc3f3fdc0 Avoid creating lots of pointless opaque types, with short lifetimes
llvm-svn: 9076
2003-10-13 14:03:36 +00:00
Chris Lattner c7bc3bb503 This is a header file, hear me roar
llvm-svn: 9075
2003-10-13 05:34:24 +00:00
Chris Lattner ab16a659d7 * Remove extraneous #includes
* Fix a nasty initializer ordering bug.  Any only-CFG passes which registered
  themselves before the CFGOnlyAnalysis vector initialized got forgotten and
  thus got invalidated and recomputed.

In particular, in my compiled version of gccas, the Loop information pass was
being recomputed unnecessarily.

llvm-svn: 9074
2003-10-13 05:33:01 +00:00
Chris Lattner 178957028b Wrap code at 80 columns
llvm-svn: 9073
2003-10-13 05:04:27 +00:00
Chris Lattner f0bf7cb739 This is a header file, thus it needs a -*-C++-*-
llvm-svn: 9072
2003-10-13 04:22:07 +00:00
Chris Lattner 44d2c3514a Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner c3ad6e0b1f make the indvar obviously non-canonical
llvm-svn: 9070
2003-10-13 03:31:42 +00:00
Chris Lattner 7cce14bfbf Regularize header file comment, eliminate using's
llvm-svn: 9069
2003-10-13 03:30:47 +00:00
Chris Lattner 3fe0b9646e Add new op_erase method
llvm-svn: 9068
2003-10-13 03:29:26 +00:00
Chris Lattner f7a60cd9fa Minor cleanups
llvm-svn: 9067
2003-10-13 01:02:33 +00:00
Chris Lattner 56b8526083 Checkin an improvement contributed by Bill:
Only transform call sites in a setjmp'ing function which are reachable from
the setjmp.  If the call dominates the setjmp (for example), the called
function cannot longjmp to the setjmp.

This dramatically reduces the number of invoke instructions created in some
large testcases.

llvm-svn: 9066
2003-10-13 00:57:16 +00:00
Chris Lattner c4622a6955 Add support to the loop canonicalization pass to make it transform loops to
have a SINGLE backedge.  This is useful to, for example, the -indvars pass.

This implements testcase LoopSimplify/single-backedge.ll and closes PR#34

llvm-svn: 9065
2003-10-13 00:37:13 +00:00
Chris Lattner 3e53700320 new testcase
llvm-svn: 9064
2003-10-12 22:26:42 +00:00
Chris Lattner e43629bad6 Make getNumBackEdges more efficient
llvm-svn: 9063
2003-10-12 22:14:27 +00:00
Chris Lattner 2a4080c140 Files moved to the LoopSimplify directory
llvm-svn: 9062
2003-10-12 21:57:11 +00:00
Chris Lattner 72272a70b8 Rename loop preheaders pass to loop simplify
llvm-svn: 9061
2003-10-12 21:52:28 +00:00
Chris Lattner efc15169f0 Rename -preheaders pass. Spelling fix
llvm-svn: 9060
2003-10-12 21:51:55 +00:00
Chris Lattner 55d4788397 File is renamed to LoopSimplify.cpp
llvm-svn: 9059
2003-10-12 21:44:18 +00:00
Chris Lattner 154e4d5dea First step in renaming the preheaders pass to loopsimplify
llvm-svn: 9058
2003-10-12 21:43:28 +00:00
Chris Lattner 9eb9fc8102 The -preheaders pass is now known as -loopsimplify
llvm-svn: 9057
2003-10-12 21:42:35 +00:00
Chris Lattner 9703c02ce4 The preheader insertion pass only depends on the CFG. Mark it as such, which
allows GCCAS to only run it once.

llvm-svn: 9056
2003-10-12 19:33:10 +00:00
Chris Lattner dd99f5bf8f Rename method
llvm-svn: 9055
2003-10-12 18:52:12 +00:00
Chris Lattner 2debdf6458 Rename method to indicate what it does
llvm-svn: 9054
2003-10-12 18:51:53 +00:00
Chris Lattner 1d243169d9 * Spell "necessary" correctly
* Print floating point values using C99 hexadecimal style FP if possible.
  This increases the number of floating point constants that may be emitted
  inline, and improves precision for global variable initializers which
  can not be emitted in integer form.

This fixes the Olden/Power benchmark with the CBE!!!!

llvm-svn: 9052
2003-10-12 08:12:58 +00:00
Chris Lattner 2e5cfa4fe8 Test that we can emit global initializers that are not normal FP values
llvm-svn: 9050
2003-10-12 07:31:25 +00:00
Chris Lattner 5d841b2de5 * Be TBAA safe
* Fix isFPCSafeToPrint to find more constants safe to print, which it was
  failing because ftostr was padding with leading space characters.
* Scan the entire module for global constants instead of each function at a
  time.  This has the advantage of allowing us to emit constants at global
  scope instead of function scope.  This speeds FP programs quite a bit.

llvm-svn: 9048
2003-10-12 04:36:29 +00:00
Brian Gaeke 91d16b3b3f Greatly expand documentation comment at head of file... I had to
try to understand it; maybe this will help someone else do so too.
Default CVSRootDir to $CVSROOT first, then the path in ~vadve only if $CVSROOT
 was not set.
Checkout with -z3 if we might be checking out over ssh/rsh.
Check the filename of gnuplot to see if it is executable; if not, as a
 last resort, try just plain "gnuplot", hoping it is in the path somewhere.
Remove a little extra whitespace.

llvm-svn: 9046
2003-10-11 05:34:00 +00:00
Brian Gaeke 74edce6f7c Make mmap's fd for anonymous memory acquisition default to -1, except on
Linux. This is consistent with what FreeBSD and Solaris both want.
This makes the JIT work on FreeBSD 5.1-RELEASE. Whee.

llvm-svn: 9045
2003-10-11 03:51:18 +00:00
Brian Gaeke bf7bbf1881 Quote qmtest args in $(CONTEXT).
I don't remember precisely what bug this fixed, but I remember that
it fixed a bug. Sorry. (I think one of these args had a Funny Shell Character
in it, or a space, or something, in my last build, and this seemed
like the obvious fix.)

llvm-svn: 9044
2003-10-11 00:10:05 +00:00
Chris Lattner 3f647b8bc0 Actually pass in a pointer to the thrown object, not a pointer to the
exception header.  This is the final missing piece from the PR#27 puzzle.

llvm-svn: 9043
2003-10-10 22:55:55 +00:00
Brian Gaeke 969378468e This seems to work around some unobvious bug in gcc on sparc which was
causing the build of lib/Target/X86 to fail.

llvm-svn: 9042
2003-10-10 21:55:29 +00:00
John Criswell c751a493af Removed the AnalyzeTest class.
llvm-svn: 9041
2003-10-10 20:24:56 +00:00
John Criswell 486035591f Make the clean target remove the QMTest temporary directory.
Remove QMTest python classes which are no longer used.

llvm-svn: 9040
2003-10-10 19:52:30 +00:00
John Criswell 75306b2fc3 Renamed the feature subtests so that they do not begin with 'f'. It was
never necessary to do that to denote them as feature tests.
Removed the Feature.asm tests as they are the same as the Feature.mc
tests.

llvm-svn: 9039
2003-10-10 19:50:53 +00:00
Brian Gaeke c4501c936f Don't include <stdlib.h>.
llvm-svn: 9038
2003-10-10 19:12:45 +00:00
Brian Gaeke 2797c131ef Don't include "Config/stdlib.h".
llvm-svn: 9037
2003-10-10 19:12:22 +00:00
Brian Gaeke bc12709888 Include <cctype> and <cstdlib> instead of <ctype.h> and "Config/stdlib.h".
llvm-svn: 9036
2003-10-10 19:12:08 +00:00
Brian Gaeke 56569e8a66 No longer used anywhere.
Dead.

This is a dead header.

It's not pining! It's passed on! This header is no more! It has ceased
to be!  It's expired and gone to meet its maker! It's a stiff! Bereft
of life, it rests in peace! If you hadn't nailed it to the perch it'd
be pushing up the daisies! Its metabolic processes are now history! It's
off the twig! It's kicked the bucket! It's shuffled off its mortal coil,
run down the curtain, and joined the bleeding choir invisibile!! THIS IS
AN EX-HEADER!!

llvm-svn: 9035
2003-10-10 18:58:07 +00:00
John Criswell 4d142dbf66 Fixed spelling.
llvm-svn: 9034
2003-10-10 18:51:11 +00:00
Brian Gaeke 81d153e37f Rewrite head-of-file comment.
Include <cstdio> instead of <stdio.h>.

llvm-svn: 9033
2003-10-10 18:47:08 +00:00
Brian Gaeke b8a4ed6543 Include <cstdio> instead of <stdio.h>.
llvm-svn: 9032
2003-10-10 18:46:52 +00:00
Brian Gaeke cc31fddf13 Don't include Config/stdio.h or <stdio.h>.
llvm-svn: 9031
2003-10-10 18:46:29 +00:00