Commit Graph

4753 Commits

Author SHA1 Message Date
Chris Lattner
8b70b78ba4 Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 20:21:15 +00:00
Chris Lattner
179bc7dcb1 Implement a small optimization to handling of GEP's that are equivalent to casts.
This results in substantially reduced collapsing for some testcases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10002 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-14 17:09:46 +00:00
Chris Lattner
db9546e324 I can't believe the incompetence of the people I have to deal with around here.
These fools don't even wrap code at 80 columns.

Oh wait, _I_ wrote that.  That explains a lot!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9999 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-14 16:34:25 +00:00
Chris Lattner
8dc6ba9a12 Fix PR 110: the constant folding code assumes that if something is not a
constant expression, but is of (for example) ubyte type, then it is a
ConstantUInt.  This was not true for placeholders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9994 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-14 06:38:46 +00:00
Chris Lattner
5158aaf20e Expose the verifier to opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9984 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 19:47:29 +00:00
Chris Lattner
917e804253 Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9981 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 19:17:02 +00:00
Chris Lattner
a366c98077 Trying to get the dsgraph for an external function is bad for DSA's health
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9979 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 18:48:11 +00:00
Brian Gaeke
8da17489aa Change LLI's internal representation of va_list to a pointer to the next
argument to be returned by va_arg. This allows va_lists to be passed
between different LLVM procedures (though it is unlikely that an LLI
va_list would make sense to an external function, except by chance.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9965 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 06:06:01 +00:00
Chris Lattner
79390d48d0 Implement the CompleteBU pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9964 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 05:05:41 +00:00
Chris Lattner
6acfe92b32 Minor code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9962 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 05:04:19 +00:00
Chris Lattner
a190766a54 Disable integer tracking by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9960 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 03:10:49 +00:00
Chris Lattner
95724a4aec Add an initial version of the CompleteBUDataStructures class, which is currently
identical to the BU pass, but has an accurate call graph


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9956 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 01:43:00 +00:00
Misha Brukman
c6b1584de6 Include the file before we close the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9954 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:23:05 +00:00
Misha Brukman
6275a04768 Substantially re-organized this file:
* There is now only one pass to print out assembly instead of two
* It is a FunctionPass
* The Module-level printing of globals is now in doFinalization() method of the
  FunctionPass
* The code has been reformatted to follow LLVM coding standards
* Some comments, not all, were doxygenified
* Last but not least, the function to create an instance of this pass is also no
  longer a method in the UltraSparc class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9953 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:22:19 +00:00
Misha Brukman
661a571053 The function to create an instance of this pass is no longer a method of
the UltraSparc class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9952 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:19:02 +00:00
Misha Brukman
7e060be881 The functions to create new instances of passes are no longer methods in the
UltraSparc class. Comments are also doxygen-compatible now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9951 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:17:20 +00:00
Misha Brukman
1be1a235d7 * Put command-line switches in their own namespace
* Pass creation functions are no longer in the UltraSparc class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9950 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:16:28 +00:00
Misha Brukman
bede635646 Force a dependency on the .inc file, which must be generated!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9949 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 00:05:09 +00:00
Chris Lattner
9a92729581 Fine-grainify namespaces for this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9948 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 23:11:14 +00:00
Chris Lattner
afc1dbafb4 Add new argument to disable checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9922 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 17:58:22 +00:00
Chris Lattner
579de71d08 Detect problems with PHI node operands!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9916 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 07:13:37 +00:00
Chris Lattner
d8ea8a5027 Print return nodes for graphs with multiple functions in them correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9914 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 04:58:19 +00:00
Chris Lattner
9dc4185763 Don't crash if no gg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9913 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 04:57:58 +00:00
Chris Lattner
15b697214e Fix bug PR107, patch contributed by Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9911 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 04:40:30 +00:00
Chris Lattner
c5f0afad2c Cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9907 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 00:40:34 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
0d723acf15 Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9902 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:54:01 +00:00
Brian Gaeke
a2302ffe78 Move IsArchive and IsBytecode here from gccld. Refactor into CheckMagic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9901 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:53:50 +00:00
Chris Lattner
413406c068 Compute node offsets correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9895 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 20:12:32 +00:00
Brian Gaeke
ee8adb1955 This version of Linker.cpp works a lot better, but it's a little messy. Sorry.
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9893 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:37 +00:00
Brian Gaeke
56be7ffe58 Add implementation of FileOpenable().
Refactor MakeFileExecutable() & MakeFileExecutable() into AddPermissionsBits().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9892 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:21 +00:00
Chris Lattner
400433dfea Add new method for computing node mappings. This is used by the pool allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9880 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 05:08:59 +00:00
Brian Gaeke
e9414cab00 Fix problems linking against the reoptimizer; _llvm_regAllocState must have
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9858 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 07:12:01 +00:00
Chris Lattner
363ca610d1 Reorganize code for locality, improve comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9857 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 04:42:42 +00:00
Chris Lattner
d23520cd94 Adjust to new critical edge interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9853 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 04:10:50 +00:00
Brian Gaeke
213904133d Operand numbers are now ints. Save the register allocation of the value
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 00:05:26 +00:00
Chris Lattner
ccc4b1a2d3 More additions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9834 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:54:30 +00:00
Chris Lattner
d5b1245e8c Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up.  Thanks!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9832 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:39:48 +00:00
Chris Lattner
54baafd286 Add an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9831 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 15:51:07 +00:00
Brian Gaeke
1654bdba0b Fix PR103
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9830 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 07:08:34 +00:00
Chris Lattner
d77922f1a2 Do NOT inline self recursive calls into other functions. This is causing the
pool allocator no end of trouble, and doesn't make a lot of sense anyway.  This
does not solve the problem with mutually recursive functions, but they are much less common.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9828 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 05:05:36 +00:00
Chris Lattner
b045e14111 Untypo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9827 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 05:04:25 +00:00
Chris Lattner
cda2347bcd Add more functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9826 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 04:10:41 +00:00
Chris Lattner
4d728e867a None of the __llvm_* functions call into the program. This makes the
callgraph MUCH simpler for eh using program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9825 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 04:00:59 +00:00
Chris Lattner
67ce57ac49 Add support for memmove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9824 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 03:32:52 +00:00
Brian Gaeke
0bb3c2b854 Remove #include of PassManager.h which was marked FIXME, and apparently is no
longer used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9823 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 03:15:40 +00:00
Chris Lattner
fb8c61056f Handle bzero and memset in the local analysis, because we were missing the fact
that memset returns its argument!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9811 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 21:55:50 +00:00
Chris Lattner
492dda9fd5 This doesn't use DSCallSiteIterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9809 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 21:17:37 +00:00
Brian Gaeke
641271df3c Fix two typos I found in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9806 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 18:12:24 +00:00
Misha Brukman
6d2670de22 For some reason, LICM and GCSE like to crash the FunctionPassManager when they
are being added as FunctionPasses... Sigh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9798 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 00:01:39 +00:00