Commit Graph

2658 Commits

Author SHA1 Message Date
Misha Brukman
7e302d2f5f If we're going to make the braces of functions line up for ease of readability
and aesthetic reasons, might as well finish the job


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17140 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-19 05:50:34 +00:00
Misha Brukman
938d53e143 Remove unnecessary spaces in function signature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17139 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-19 05:49:46 +00:00
Misha Brukman
e196516fa7 * Fit constructor initializer on a single line
* Delete blank chars at end of line to fit into 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-19 00:29:16 +00:00
Misha Brukman
e42aeece6c Move code to redefine INT64_{MIN,MAX} on AIX/PowerPC to a separate header,
because #undef becomes commented out in DataTypes.h.in due to autoheader


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17135 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 22:14:48 +00:00
Nate Begeman
eaa13851a7 Initial implementation of the strength reduction for GEP instructions in
loops.  This optimization is not turned on by default yet, but may be run
with the opt tool's -loop-reduce flag.  There are many FIXMEs listed in the
code that will make it far more applicable to a wide range of code, but you
have to start somewhere :)

This limited version currently triggers on the following tests in the
MultiSource directory:
pcompress2: 7 times
cfrac: 5 times
anagram: 2 times
ks: 6 times
yacr2: 2 times


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 21:08:22 +00:00
Misha Brukman
103f2eede3 * AIX on Power defines INT64_MIN and INT64_MAX in ways that annoy GCC, so
special-case those definitions
* Add comments in #ifdef/#else/#endif clauses for ease of reading


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 18:35:21 +00:00
Chris Lattner
4caf5d563d Fix miscompilations in the SparcV9 backend that were induced by this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041011/019311.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17130 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 17:19:20 +00:00
Reid Spencer
0998afdc1e Declare a function in the correct namespace.
Patch contributed by Morten Ofstad. Thanks Morten!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 14:43:45 +00:00
Reid Spencer
394855a87d Add HAVE_BZLIB_H and HAVE_ZLIB_H tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17092 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 17:07:29 +00:00
Chris Lattner
c8717b1624 Add support for the unreachable instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17039 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:06:43 +00:00
Chris Lattner
7eb8a52332 Add new UndefValueVal type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17038 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:06:07 +00:00
Chris Lattner
076b3f1693 Add new UnreachableInst class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17037 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:05:54 +00:00
Chris Lattner
731cde9447 Add new unreachable instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17036 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:05:37 +00:00
Chris Lattner
e1e922e090 Add new UndefValue class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17035 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:05:25 +00:00
Chris Lattner
58fa099475 UndefValue's are constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17034 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:05:10 +00:00
Chris Lattner
f319e832e7 Move the implementation of the clone method for these classes to
Instructions.cpp, so that a vtable is not emitted into every translation unit
that uses the classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 23:52:05 +00:00
Chris Lattner
ca4f6ebefc Allow machine operands to represent global variables with offsets. This is
useful when you have a reference like:

int A[100];

void foo() { A[10] = 1; }

In this case, &A[10] is a single constant and should be treated as such.

Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no
other operand type is.

This is another fine patch contributed by Jeff Cohen!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17007 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 04:38:41 +00:00
Misha Brukman
ee3d2c8bc8 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16988 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 18:47:56 +00:00
Chris Lattner
5fb00c5893 Make sure any client of Dominators.h links in Dominators.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 15:46:59 +00:00
Chris Lattner
15f47878e4 Remove unneeded typedef, patch by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 14:51:09 +00:00
Chris Lattner
fbb719c7f0 Use explicit std:: qualification to avoid relying on Koenig lookup, which
VC++ does not do properly.  Thanks to Morten Ofstad for the patch!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16955 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 15:11:23 +00:00
Chris Lattner
c87b1db927 Get rid of template templates that were preventing VC from compiling the
set_intersect template.  Thanks to Morten Ofstad and Jeff Cohen for the
patch!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16954 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 15:09:21 +00:00
Chris Lattner
86e100bd9b Update doco, make doxygen more, use standard dividers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 04:44:53 +00:00
Misha Brukman
c2ab5a2a63 Fix file comment header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 21:48:02 +00:00
Misha Brukman
481d56c5de On second thought, OpaqueType is not really a good first-class type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16941 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 20:35:04 +00:00
Chris Lattner
e004fd005d Add comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16937 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 17:08:44 +00:00
Misha Brukman
207f2d4056 Opaque types are considered to be first-class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16936 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 17:06:17 +00:00
Chris Lattner
5c3734e349 Add std:: prefix for compilers without correct koenig lookup implemented.
Patch contributed by Paolo Invernizzi


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16933 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 16:10:39 +00:00
Chris Lattner
84e48b860d Right, calls have Operand#0 == the called function, don't forget this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16930 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 04:45:20 +00:00
Chris Lattner
e80c8191c2 New header. Classes can be added as needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16928 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 04:20:46 +00:00
Chris Lattner
7fa6e666ec Allow creation of GEP constantexprs with a vector of value* operands as
well as a vector of constant*'s.  It turns out that this is more efficient
and all of the clients want to do that, so we should cater to them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16923 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 22:52:25 +00:00
Chris Lattner
b92f50fe60 Add long overdue methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16921 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 22:21:13 +00:00
Chris Lattner
d15165723c Get friendly with Type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16812 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 19:21:43 +00:00
Chris Lattner
485457f562 Change signature of this method again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16810 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 19:19:12 +00:00
Chris Lattner
93a00e4ceb Rename pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 04:12:02 +00:00
Misha Brukman
f5d9fa7e78 Undoxyfy internal method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16774 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 17:19:58 +00:00
Misha Brukman
0cbd1fbb0e Doxygen-ify comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 16:56:16 +00:00
Chris Lattner
df00115aa4 Rename method, change comment, add argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16771 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 16:34:23 +00:00
Chris Lattner
c441f1e1c7 Fix #include flavor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16658 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 18:10:18 +00:00
Reid Spencer
0fd3061a28 Add HAVE_BZIP2 and HAVE_ZLIB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16655 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 17:48:37 +00:00
Reid Spencer
469c34bdeb Add a context for the callback so different compression scenarios can be
distinguished. Tidy up documentation.  Thanks, Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16652 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 17:29:25 +00:00
Reid Spencer
ce4e6ade3e Minor corrections suggested by Chris' ever-watchful eye.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16651 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 17:26:26 +00:00
Reid Spencer
9737492204 First version of the MappedFile abstraction for operating system idependent
mapping of files. This first version uses mmap where its available. The
class needs to implement an alternate mechanism based on malloc'd memory
and file reading/writing for platforms without virtual memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16649 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 11:08:32 +00:00
Reid Spencer
460eb63612 First version of a support utility to provide generalized compression in
LLVM that handles availability and unavailability of bzip2 and zlib.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16648 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 10:49:41 +00:00
Alkis Evlogimenos
4b97f23a00 Add const version of getLastBlock() member function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16625 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 21:42:02 +00:00
Alkis Evlogimenos
30eed211c9 Remove whitespace from the end of the line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16624 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 21:39:47 +00:00
Brian Gaeke
f858f7f380 Add accessor function prototypes for reoptimizer support passes.
Make accessors return FunctionPass* as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16619 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 20:13:55 +00:00
Chris Lattner
70ca358b7d * Wrap some comments to 80 cols
* Add const_iterator stuff
* Add a print method, which means that I can now call dump() from the
  debugger.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16612 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-30 15:59:17 +00:00
Chris Lattner
49db6fe193 Be consistent with our naming
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16552 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28 18:37:00 +00:00
Chris Lattner
dcc4a6f705 Capture information about whether the target instructions have delay slots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16550 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28 18:33:50 +00:00