1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

6727 Commits

Author SHA1 Message Date
Brian Gaeke
9de468d398 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.

llvm-svn: 7265
2003-07-23 18:37:06 +00:00
Chris Lattner
76c1da471c 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.

llvm-svn: 7264
2003-07-23 18:29:44 +00:00
Chris Lattner
1bfbaa842e New testcases
llvm-svn: 7263
2003-07-23 18:28:42 +00:00
Chris Lattner
4b43cd9700 IC: (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)
Minor code cleanup

llvm-svn: 7262
2003-07-23 17:57:01 +00:00
Chris Lattner
3847a79aa0 New testcase
llvm-svn: 7261
2003-07-23 17:56:34 +00:00
Chris Lattner
ae691a3068 InstCombine: (X ^ 4) == 8 --> X == 12
llvm-svn: 7260
2003-07-23 17:26:36 +00:00
Chris Lattner
be67ac6543 New testcase
llvm-svn: 7259
2003-07-23 17:25:55 +00:00
Chris Lattner
04652336b2 Add support for ~ operator on constants
llvm-svn: 7258
2003-07-23 17:21:17 +00:00
Chris Lattner
b07de65646 IC: (X & 5) == 13 --> false
IC: (X | 8) == 4  --> false

llvm-svn: 7257
2003-07-23 17:02:11 +00:00
Chris Lattner
eaf43bbfae New tests
llvm-svn: 7256
2003-07-23 17:01:18 +00:00
John Criswell
8a92405de7 Renamed libtool to mklib for your tab completion pleasure.
llvm-svn: 7255
2003-07-23 16:52:50 +00:00
Chris Lattner
dd48c4b1e4 Remove redundant const qualifier
llvm-svn: 7254
2003-07-23 15:30:32 +00:00
Chris Lattner
1351c304dc Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
6ad460b336 Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting

llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Chris Lattner
9c569f48a0 Remove unnecessary casts
llvm-svn: 7250
2003-07-23 15:17:51 +00:00
Chris Lattner
bfe70df7fc Fit code into 80 columns
llvm-svn: 7249
2003-07-23 15:17:01 +00:00
Chris Lattner
0fce06e40e Eliminate old-style cast
llvm-svn: 7248
2003-07-23 15:16:40 +00:00
Chris Lattner
c1049acba1 Random cleanups
llvm-svn: 7247
2003-07-23 14:59:40 +00:00
Chris Lattner
67138b2c59 Remove using decl
llvm-svn: 7246
2003-07-23 14:55:59 +00:00
Chris Lattner
63ea851f94 Remove explicit const qualifiers
llvm-svn: 7245
2003-07-23 14:54:33 +00:00
Chris Lattner
913c260d94 Add more doxygen comments, add new ConstantInt::getRawValue method
llvm-svn: 7244
2003-07-23 14:49:06 +00:00
Chris Lattner
74a266d229 Fix bug: TailDup/2003-07-22-InfiniteLoop.ll
llvm-svn: 7243
2003-07-23 03:32:41 +00:00
Chris Lattner
5ff1500e85 New testcase that caused infinite loop in taildup
llvm-svn: 7242
2003-07-23 03:32:11 +00:00
Chris Lattner
7594fa7280 - InstCombine (cast (xor A, B) to bool) ==> (setne A, B)
- InstCombine (cast (and X, (1 << size(X)-1)) to bool) ==> x < 0

llvm-svn: 7241
2003-07-22 21:46:59 +00:00
Chris Lattner
e1ab6bb4de New testcases
llvm-svn: 7240
2003-07-22 21:44:06 +00:00
John Criswell
9d03ea2e11 Repaired the --enable and --disable options.
llvm-svn: 7239
2003-07-22 21:00:24 +00:00
John Criswell
ba5a656e6c 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.

llvm-svn: 7238
2003-07-22 20:59:52 +00:00
Brian Gaeke
5779654cfc Add documentation for runOnMachineFunction()
llvm-svn: 7237
2003-07-22 20:53:20 +00:00
John Criswell
dc0ddfbbb0 Made some corrections to the enable-llc_diffs option.
This should keep it from breaking for now.

llvm-svn: 7236
2003-07-22 20:07:49 +00:00
John Criswell
84b1b5a35a 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.

llvm-svn: 7235
2003-07-22 19:18:09 +00:00
John Criswell
86c560ed20 Updated to use files within the autoconf subdirectory.
llvm-svn: 7234
2003-07-22 19:17:35 +00:00
John Criswell
24031b974c These are the autoconf files in their new home.
llvm-svn: 7233
2003-07-22 19:13:20 +00:00
John Criswell
9b5b343796 Moving these files to the llvm/autoconf directory.
llvm-svn: 7232
2003-07-22 19:12:02 +00:00
John Criswell
8683d69423 Moved configure.ac to the autoconf directory.
llvm-svn: 7231
2003-07-22 19:10:58 +00:00
Brian Gaeke
c8a0278ab8 turn off DISABLE_LLC_DIFFS for x86.
llvm-svn: 7230
2003-07-22 18:28:17 +00:00
Chris Lattner
f71891f2e0 Add new testcase
llvm-svn: 7229
2003-07-22 16:18:09 +00:00
Vikram S. Adve
f5e0c07db6 (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.

llvm-svn: 7228
2003-07-22 12:35:28 +00:00
Vikram S. Adve
420ec0bb0f Fix comment.
llvm-svn: 7227
2003-07-22 12:08:58 +00:00
John Criswell
681385594f Updated from the discussion on July 21, 2003.
Expanded upon testing priorities.

llvm-svn: 7225
2003-07-21 22:22:48 +00:00
Misha Brukman
f5b33e92c2 Fixed misspelling.
llvm-svn: 7223
2003-07-21 21:58:16 +00:00
Chris Lattner
9f501f98c8 Simplify code a bit
llvm-svn: 7217
2003-07-21 19:56:49 +00:00
John Criswell
98946bac5b 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.

llvm-svn: 7216
2003-07-21 19:42:57 +00:00
John Criswell
b62eacd2bb Regression test for the Instruction Combining optimizization.
This test helps to see if the optimization correctly handles variables that
are declared constant and external.

llvm-svn: 7215
2003-07-21 19:41:51 +00:00
Chris Lattner
ac8e9ebce9 Remove unneccesary #ifdefs
llvm-svn: 7214
2003-07-21 19:23:31 +00:00
Chris Lattner
425abc04ab Fix warnings
llvm-svn: 7213
2003-07-21 19:20:44 +00:00
Chris Lattner
7f36f7e9f0 Remove instloops library
llvm-svn: 7210
2003-07-21 19:07:27 +00:00
Misha Brukman
f7ca33f163 Eliminated dead code.
llvm-svn: 7209
2003-07-21 16:34:35 +00:00
Anand Shukla
351c0f6342 Added special consideration for instrumentation strategy
llvm-svn: 7208
2003-07-20 15:39:30 +00:00
Misha Brukman
582cf5be31 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.

llvm-svn: 7207
2003-07-18 22:21:40 +00:00
Anand Shukla
d02a20b947 Added check for inlinable function
llvm-svn: 7206
2003-07-18 20:55:26 +00:00