Chris Lattner [Wed, 23 Jul 2003 21:37:07 +0000 (21:37 +0000)]
Remove explicit check for: not (not X) = X, it is already handled because xor is commutative
- InstCombine: (X & C1) ^ C2 --> (X & C1) | C2 iff (C1&C2) == 0
- InstCombine: (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7282
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 21:36:01 +0000 (21:36 +0000)]
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7281
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 21:11:56 +0000 (21:11 +0000)]
Renumber tests sequentially
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7280
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 21:10:55 +0000 (21:10 +0000)]
Split the or and xor tests into two separate files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7279
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 21:06:34 +0000 (21:06 +0000)]
Remove obscure test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7278
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 20:48:03 +0000 (20:48 +0000)]
Check in old testcase sitting in my tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7277
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 20:45:31 +0000 (20:45 +0000)]
Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7276
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Wed, 23 Jul 2003 20:25:08 +0000 (20:25 +0000)]
Printer.cpp: Ditch addRequired/getAnalysis, because they leave
Printer::doFinalization() out in the cold. Now we pass in a TargetMachine
to Printer's constructor and get the TargetData from the TargetMachine.
Don't pass TargetMachine or MRegisterInfo objects around in the Printer.
Constify TargetData references.
X86.h: Update comment and prototype of createX86CodePrinterPass().
X86TargetMachine.cpp: Update callers of createX86CodePrinterPass().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7275
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 20:21:30 +0000 (20:21 +0000)]
Make Module::getNamedFunction prefer non-external functions if there is more than
one function of the same name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7274
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 20:21:06 +0000 (20:21 +0000)]
Fix space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7273
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 19:36:21 +0000 (19:36 +0000)]
InstCombine: (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7272
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 19:35:51 +0000 (19:35 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7271
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 19:25:52 +0000 (19:25 +0000)]
- InstCombine: (X | C1) & C2 --> X & C2 iff C1 & C1 == 0
- InstCombine: (X | C) & C --> C
- InstCombine: (X | C1) & C2 --> (X | (C1&C2)) & C2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7269
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 19:24:34 +0000 (19:24 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7267
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 19:05:29 +0000 (19:05 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7266
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Wed, 23 Jul 2003 18:37:06 +0000 (18:37 +0000)]
Add, rewrite, and/or reformat many comments.
Stop passing ostreams around: we already have one perfectly good ostream
and we can all share it.
Stop stashing a pointer to TargetData in the Pass object, because that will
lead to a crash if there are no functions in the module (ouch!) Instead,
use addRequired() and getAnalysis(), like we always should have done.
Move the check for ConstantExpr up before the check for isPrimitiveType,
because we need to be able to catch e.g. ubyte (cast bool false to ubyte),
whose type is primitive but which is nevertheless a ConstantExpr, by calling
our specialized handler instead of the AsmWriter. This would result in
assembler errors when we would try to output something like ".byte (cast
bool false to ubyte)".
GC some unused variable declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7265
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 18:29:44 +0000 (18:29 +0000)]
IC: (X & C1) | C2 --> (X | C2) & (C1|C2)
IC: (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2)
We are now guaranteed that all 'or's will be inside of 'and's, and all 'and's
will be inside of 'xor's, if the second operands are constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7264
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 18:28:42 +0000 (18:28 +0000)]
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7263
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 17:57:01 +0000 (17:57 +0000)]
IC: (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)
Minor code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7262
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 17:56:34 +0000 (17:56 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7261
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 17:26:36 +0000 (17:26 +0000)]
InstCombine: (X ^ 4) == 8 --> X == 12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7260
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 17:25:55 +0000 (17:25 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7259
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 17:21:17 +0000 (17:21 +0000)]
Add support for ~ operator on constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7258
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 17:02:11 +0000 (17:02 +0000)]
IC: (X & 5) == 13 --> false
IC: (X | 8) == 4 --> false
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7257
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 17:01:18 +0000 (17:01 +0000)]
New tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7256
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Wed, 23 Jul 2003 16:52:50 +0000 (16:52 +0000)]
Renamed libtool to mklib for your tab completion pleasure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7255
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 15:30:32 +0000 (15:30 +0000)]
Remove redundant const qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7254
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 15:30:06 +0000 (15:30 +0000)]
Remove redundant const qualifiers from cast<> expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 15:22:26 +0000 (15:22 +0000)]
Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7252
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 15:17:51 +0000 (15:17 +0000)]
Remove unnecessary casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7250
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 15:17:01 +0000 (15:17 +0000)]
Fit code into 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7249
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 15:16:40 +0000 (15:16 +0000)]
Eliminate old-style cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 14:59:40 +0000 (14:59 +0000)]
Random cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7247
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 14:55:59 +0000 (14:55 +0000)]
Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7246
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 14:54:33 +0000 (14:54 +0000)]
Remove explicit const qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7245
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 14:49:06 +0000 (14:49 +0000)]
Add more doxygen comments, add new ConstantInt::getRawValue method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7244
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 03:32:41 +0000 (03:32 +0000)]
Fix bug: TailDup/2003-07-22-InfiniteLoop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7243
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 23 Jul 2003 03:32:11 +0000 (03:32 +0000)]
New testcase that caused infinite loop in taildup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7242
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 22 Jul 2003 21:46:59 +0000 (21:46 +0000)]
- InstCombine (cast (xor A, B) to bool) ==> (setne A, B)
- InstCombine (cast (and X, (1 << size(X)-1)) to bool) ==> x < 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7241
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 22 Jul 2003 21:44:06 +0000 (21:44 +0000)]
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7240
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 21:00:24 +0000 (21:00 +0000)]
Repaired the --enable and --disable options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7239
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 20:59:52 +0000 (20:59 +0000)]
Fixed the enable/disable options. The AC_ARG_ENABLE macro does not perform
the *action-if-not-given* code when the --disable option is used.
Rather, the AC_ARG_ENABLE macro sets the $enableval variable, which then needs
to be checked to determine if --enable, --disable, or neither was specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7238
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 22 Jul 2003 20:53:20 +0000 (20:53 +0000)]
Add documentation for runOnMachineFunction()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7237
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 20:07:49 +0000 (20:07 +0000)]
Made some corrections to the enable-llc_diffs option.
This should keep it from breaking for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7236
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 19:18:09 +0000 (19:18 +0000)]
Generated a new configure script.
This script uses files within the new autoconf subdirectory and includes
changes from Brian Gaeke's recent changes to configure.ac.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7235
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 19:17:35 +0000 (19:17 +0000)]
Updated to use files within the autoconf subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7234
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 19:13:20 +0000 (19:13 +0000)]
These are the autoconf files in their new home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7233
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 19:12:02 +0000 (19:12 +0000)]
Moving these files to the llvm/autoconf directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7232
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Tue, 22 Jul 2003 19:10:58 +0000 (19:10 +0000)]
Moved configure.ac to the autoconf directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7231
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 22 Jul 2003 18:28:17 +0000 (18:28 +0000)]
turn off DISABLE_LLC_DIFFS for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7230
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 22 Jul 2003 16:18:09 +0000 (16:18 +0000)]
Add new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7229
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Tue, 22 Jul 2003 12:35:28 +0000 (12:35 +0000)]
(1) Pass 'VAR=string' arguments to gmake
(2) Detect LLVMDIR using the LEVEL variable in Makefile.
(3) To perform #2 propertly, use the same Makefile search rules as gmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7228
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Tue, 22 Jul 2003 12:08:58 +0000 (12:08 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7227
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 21 Jul 2003 22:22:48 +0000 (22:22 +0000)]
Updated from the discussion on July 21, 2003.
Expanded upon testing priorities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7225
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 21 Jul 2003 21:58:16 +0000 (21:58 +0000)]
Fixed misspelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7223
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2003 19:56:49 +0000 (19:56 +0000)]
Simplify code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7217
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 21 Jul 2003 19:42:57 +0000 (19:42 +0000)]
Added code that checks to see if a global variable is external before replacing
a load of the global variable with the variable's constant value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7216
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 21 Jul 2003 19:41:51 +0000 (19:41 +0000)]
Regression test for the Instruction Combining optimizization.
This test helps to see if the optimization correctly handles variables that
are declared constant and external.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2003 19:23:31 +0000 (19:23 +0000)]
Remove unneccesary #ifdefs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7214
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2003 19:20:44 +0000 (19:20 +0000)]
Fix warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7213
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2003 19:07:27 +0000 (19:07 +0000)]
Remove instloops library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7210
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 21 Jul 2003 16:34:35 +0000 (16:34 +0000)]
Eliminated dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7209
91177308-0d34-0410-b5e6-
96231b3b80d8
Anand Shukla [Sun, 20 Jul 2003 15:39:30 +0000 (15:39 +0000)]
Added special consideration for instrumentation strategy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7208
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jul 2003 22:21:40 +0000 (22:21 +0000)]
Initialize the target architecture based on compiler defines, so if compiled on
x86 or Sparc, LLC will automatically default to that platform, no guessing
required. On another platform, it will default to `noarch' and will have to
guess which architecture to compile to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7207
91177308-0d34-0410-b5e6-
96231b3b80d8
Anand Shukla [Fri, 18 Jul 2003 20:55:26 +0000 (20:55 +0000)]
Added check for inlinable function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7206
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jul 2003 20:23:43 +0000 (20:23 +0000)]
Please, save your applause^H^H^H^H^H^H^H^Hflames for the end...
Avoid a fall-through in the (stubby) treatment of the longjmp intrinsic
call which causes llc & lli to core-dump.
Add a sort-of treatment of cast double to ulong. I am not really sure
what a user should expect to see upon casting a negative FP value to
unsigned long long. But with what is given here, I was able to write
a program that could cast -123.456 to ulong and back and get -123.0,
which seems like a step in the right direction. GCC seems to give you
0. I don't know if I'd consider that useful.
These cases were coming up in GNU coreutils-5.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7205
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jul 2003 18:33:38 +0000 (18:33 +0000)]
Cleaned up the code which chooses the appropriate value for the file descriptor
to pass to dlsym() -- Linux/x86 wants 0 while Sparc/Solaris wants RTLD_SELF,
which is not zero. Thanks to Chris for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7204
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jul 2003 18:03:45 +0000 (18:03 +0000)]
Added a DEBUG() guard to a debug information printout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7203
91177308-0d34-0410-b5e6-
96231b3b80d8
Anand Shukla [Fri, 18 Jul 2003 16:25:40 +0000 (16:25 +0000)]
Added pass to instrument backedges for lightweight tracing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7202
91177308-0d34-0410-b5e6-
96231b3b80d8
Anand Shukla [Fri, 18 Jul 2003 16:08:32 +0000 (16:08 +0000)]
A pass to combine multiple backedges that go to same target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7201
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jul 2003 21:30:06 +0000 (21:30 +0000)]
Use getClassB for load and store; we don't want to abort when we
try to load or store through a bool*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7195
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jul 2003 19:07:46 +0000 (19:07 +0000)]
Fix typo in call to isUnresolvableFunc, which was breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7194
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Thu, 17 Jul 2003 19:06:55 +0000 (19:06 +0000)]
Dinakar and I fixed a bug where we were trying to get the initializer of
an external constant. Since external constants don't have initializers, we
were failing on an assert() call in llvm/GlobalVariable.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7193
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jul 2003 18:53:20 +0000 (18:53 +0000)]
Added bits about MachineFunctionPass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7192
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Wed, 16 Jul 2003 21:48:38 +0000 (21:48 +0000)]
Tests for globals with different kinds of behavior in DS Analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7191
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Wed, 16 Jul 2003 21:45:15 +0000 (21:45 +0000)]
(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
to clone the subgraph reachable from a set of root nodes, into the
current graph, merging the global nodes into those in the current graph.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
globals graph into the current graph in both BU and TD passes.
(3) Added hash_set<const GlobalValue*> InlinedGlobals: a set of globals to
track which globals have been inlined into the current graph from
callers or callees. In the TD pass, such globals are up-to-date and
do not need to be rematerialized from the GlobalsGraph.
(4) Added StripIncompleteBit/KeepIncompleteBit to remove incomplete bit
when cloning nodes into the globals graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7190
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Wed, 16 Jul 2003 21:42:03 +0000 (21:42 +0000)]
Rematerialize nodes from the globals graph into the current graph
after all callees are inlined into the current graph.
NOTE: There's also a major bug fix for the BU pass in DataStructure.cpp,
which ensures that resolvable indirect calls are not moved out to the
globals graph, so that they are eventually inlined (if possible).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7189
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Wed, 16 Jul 2003 21:40:28 +0000 (21:40 +0000)]
(1) Rematerialize nodes from the globals graph into the current graph
after all callers are inlined into the current graph.
(2) Optimize the way a graph is inlined into its callees in the TD phase:
(a) Use DSGraph::cloneReachableSubgraph to clone only a subgraph at
each call site, for faster inlining.
(b) Clone separately for the same callee at different call sites,
since only the reachable subgraph is being cloned, not the entire
caller graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7188
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Wed, 16 Jul 2003 21:36:31 +0000 (21:36 +0000)]
Implement 2 important changes: (1) rematerialization from the globals graph,
and (2) faster inlining by cloning only reachable nodes. In particular:
(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
to clone the subgraph reachable from a set of root nodes, into the
current graph, merging the global nodes into thos in the current graph.
The TD pass now uses this for faster inlining, and so does the
next function.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
globals graph into the current graph in both BU and TD passes.
(3) `I' flags are removed from all nodes in the globals graph, because they
are difficult to maintain correctly and are not needed anyway.
(4) Aux. function calls are only removed to the globals graph if they
will never be resovled. (This is what fixed gap.) The immediate
reason is that if we took these out of a function (and moved them to
the globals graph) we would need to rematerialize these nodes into the
function graph for every function in the BU pass. The longer term
problem is that we would need to find a way to remove them from the
globals graph iff they have been resolved on all paths through the
call graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7187
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Wed, 16 Jul 2003 21:25:17 +0000 (21:25 +0000)]
Factor out the test for unresolvable external functions into
isUnresolvableFunc() (I thought I needed this externally.
I don't, but it's still nicer this way.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7186
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 16 Jul 2003 20:30:40 +0000 (20:30 +0000)]
Fixed the number translation scheme for the integer condition code registers: it
now works in instructions which require a 2-bit or 3-bit INTcc code.
Incidentally, that means that the representation of INTcc registers is now the
same in both integer and FP instructions. Thus, code became much simpler and
cleaner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7185
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Wed, 16 Jul 2003 20:27:44 +0000 (20:27 +0000)]
The name should really be `simm11' to follow the naming convention, but this has
no change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7184
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Wed, 16 Jul 2003 20:26:06 +0000 (20:26 +0000)]
Marked some of the phony targets are PHONY. This will hopefully speed
up builds a little bit since it will prevent GNU make from matching these
phony targets against implicit rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7183
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 15 Jul 2003 21:27:14 +0000 (21:27 +0000)]
No need for a second immediate field if the class already inherits one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7182
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 15 Jul 2003 21:26:49 +0000 (21:26 +0000)]
Encode predict = 1 by default, because the Sparc assembler does this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7181
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 15 Jul 2003 21:26:09 +0000 (21:26 +0000)]
Fixed a bug: outputting name of variable instead of its value.
Also, placed DEBUG() guards around debug information so that the generated file
is much smaller and hence should be faster to preprocess/compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7180
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 15 Jul 2003 21:00:32 +0000 (21:00 +0000)]
This optimization greatly enhances efficiency of creating new instructions by
masking and shifting operands directly into their place in the instruction,
instead of the old-fashioned way of ORing in each bit separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7179
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 15 Jul 2003 19:09:43 +0000 (19:09 +0000)]
Correctly handle calls to functions which are further away than 2**32 bits will
allow, i.e. make a sequence of instructions to enable an indirect call using
jump-and-link and 2 temporary registers (which we save and ultimately restore).
Warning: if the delay slot of a function call is used to do meaningful work and
not just a NOP, this behavior is incorrect. However, the Sparc backend does not
yet utilize the delay slots effectively, so it is not necessary to make an
overly complicated algorithm for something that's not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7178
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 15 Jul 2003 15:58:26 +0000 (15:58 +0000)]
Clean up my last checkin: code is easier to read and explains the differences in
usage of the special file handle RTLD_SELF on Sparc/Solaris vs. 0 on Linux/x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7177
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 15 Jul 2003 15:55:32 +0000 (15:55 +0000)]
On Sparc/Solaris, the special handle RTLD_SELF is used as a handle referring to
the program's executing image, not 0 as it is on Linux/x86 and possibly other
systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7176
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 14 Jul 2003 23:26:03 +0000 (23:26 +0000)]
* Added support for the %ccr register
* FP double registers are now coded correctly
* Removed function which converted registers based on register types, it was
broken (because regTypes are broken)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7175
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 14 Jul 2003 17:26:34 +0000 (17:26 +0000)]
The word `separate' only has one `e'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7174
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 14 Jul 2003 17:20:40 +0000 (17:20 +0000)]
The word `separate' only has one `e'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 14 Jul 2003 17:05:20 +0000 (17:05 +0000)]
Fixed: </pre</p> => </pre></p>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7172
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 14 Jul 2003 16:52:07 +0000 (16:52 +0000)]
Merged in changes from PRE101 in the prerelease branch.
Specifically, this updates libtool to version 1.5 and adds the following:
- Added the -only-static option that we added in our previous libtool.
- Modified the autoconf macros so that libtool uses the -G option when
linking on Solaris. This allows libraries with global variables with
constructors to automatically run those constructors when the
library is dlopened().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7171
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Fri, 11 Jul 2003 22:02:28 +0000 (22:02 +0000)]
Use uint32_t for table index and size: table will never be > 4GB.
Also, make Pointer type depend on architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7170
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Fri, 11 Jul 2003 21:57:43 +0000 (21:57 +0000)]
Trace loads and stores as they happen (stores were being
remembered in valuesStoredInFunction, but never traced at function return,
and that's too late to be finding the error anyway).
Stores trace both the value and the address being stored to,
but after some experience I think only values should be traced.
The pointer hash table just fills up far too quickly if every
store address were traced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7169
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 11 Jul 2003 21:57:01 +0000 (21:57 +0000)]
If we have a constant pointer reference to a function, we were printing
out the entire llvm disassembly for the function at global constant-output
time, which caused the assembler to barf in 164.gzip. This fixes that
particular problem (though 164.gzip has other problems with X86 llc.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7168
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 11 Jul 2003 18:18:35 +0000 (18:18 +0000)]
Fix some serious floating-point bugs (fixes test cases such as Oscar,
Fhourstones, McCat-vor, and many others...)
Printer.cpp: Print implicit uses for AddRegFrm instructions. Break gas
bug workarounds up into separate stanzas of code for each bug. Add new
workarounds for fild and fistp.
X86InstrInfo.def: Add O_ST0 implicit uses for more FP instrs where they
obviously apply. Also add PrintImplUses flags for FP instrs where they
are necessary for gas to understand the output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7165
91177308-0d34-0410-b5e6-
96231b3b80d8
Anand Shukla [Thu, 10 Jul 2003 21:55:57 +0000 (21:55 +0000)]
Added functionality to instrmentation pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7161
91177308-0d34-0410-b5e6-
96231b3b80d8