oota-llvm.git
20 years agoMore cassert inclusion for GCC 3.3
Chris Lattner [Fri, 25 Jul 2003 18:06:53 +0000 (18:06 +0000)]
More cassert inclusion for GCC 3.3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7318 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange reference to assert.h to mention cassert
Chris Lattner [Fri, 25 Jul 2003 18:05:51 +0000 (18:05 +0000)]
Change reference to assert.h to mention cassert

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7317 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBrian implemented the static compiler, take it off the list
Chris Lattner [Fri, 25 Jul 2003 18:05:38 +0000 (18:05 +0000)]
Brian implemented the static compiler, take it off the list

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7316 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago#include <cassert> as necessary...
Chris Lattner [Fri, 25 Jul 2003 17:58:41 +0000 (17:58 +0000)]
#include <cassert> as necessary...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7315 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix another accessibility problem illuminated by GCC 3.3
Chris Lattner [Fri, 25 Jul 2003 17:49:28 +0000 (17:49 +0000)]
Fix another accessibility problem illuminated by GCC 3.3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7314 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix visibility problem exposed by GCC 3.3
Chris Lattner [Fri, 25 Jul 2003 17:46:25 +0000 (17:46 +0000)]
Fix visibility problem exposed by GCC 3.3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7313 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove inline declarations that GCC 3.3 doesn't like without a body
Chris Lattner [Fri, 25 Jul 2003 17:39:33 +0000 (17:39 +0000)]
Remove inline declarations that GCC 3.3 doesn't like without a body

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7312 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegardless of whether C provides assert.h, C++ source can always include
Chris Lattner [Fri, 25 Jul 2003 17:35:03 +0000 (17:35 +0000)]
Regardless of whether C provides assert.h, C++ source can always include
<cassert>, making this header unneeded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7311 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse the C++ <cassert> header, not the C <assert.h> header
Chris Lattner [Fri, 25 Jul 2003 17:34:17 +0000 (17:34 +0000)]
Use the C++ <cassert> header, not the C <assert.h> header

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7310 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThis header works with GCC 3.3
Chris Lattner [Fri, 25 Jul 2003 17:33:45 +0000 (17:33 +0000)]
This header works with GCC 3.3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7309 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse C++ headers, not C headers
Chris Lattner [Fri, 25 Jul 2003 17:32:51 +0000 (17:32 +0000)]
Use C++ headers, not C headers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7308 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd includes of assert
Chris Lattner [Fri, 25 Jul 2003 17:23:27 +0000 (17:23 +0000)]
Add includes of assert

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7307 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix accessibility problems GCC 3.3
Chris Lattner [Fri, 25 Jul 2003 17:23:13 +0000 (17:23 +0000)]
Fix accessibility problems GCC 3.3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7306 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd assert.h include
Chris Lattner [Fri, 25 Jul 2003 16:47:07 +0000 (16:47 +0000)]
Add assert.h include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7305 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoConvert to C++ style comments
Chris Lattner [Fri, 25 Jul 2003 15:08:08 +0000 (15:08 +0000)]
Convert to C++ style comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7304 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoInclude vector into these two files to ensure that specializations like
Vikram S. Adve [Fri, 25 Jul 2003 14:06:13 +0000 (14:06 +0000)]
Include vector into these two files to ensure that specializations like
stl_bvector.h are correctly included into *anything* that includes hash_map
or hash_set.  ext/hash_map includes stl_vector.h directly and leaves
out the specializations, causing truly nasty bugs due to inconsistent
versions of vector<> being used for vector<bool> in different files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7303 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMade a bunch of cleanups, as per Chris' recommendations:
Misha Brukman [Thu, 24 Jul 2003 21:59:10 +0000 (21:59 +0000)]
Made a bunch of cleanups, as per Chris' recommendations:
* Removed unused global and member variables
* Fixed comments (CodeGeneratorBug.cpp)
* Check for possibly failing GCC::create() and CBE::create()
* Remove generated files after diffing the output (e.g., shared object)
* Instead of using std::for_each, use explicit loops as std::for_each may
  duplicate the functor, and ours carries state
* Changed member var from cl::opt<std::string> to just std::string
* Fixed doxygen comments
* Fixed string comparisons to use [ str.empty() ] instead of [ str == "" ]
* Cache instances of CBE and GCC in BugDriver across compilations and executions
  while testing tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7302 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCleanups:
Brian Gaeke [Thu, 24 Jul 2003 21:37:57 +0000 (21:37 +0000)]
Cleanups:

Mangler.cpp: Constify parameter to makeNameProper, and use const_iterator.
 Make Count an unsigned int, and use utostr().
 Don't name parameters things that start with underscore.
Mangler.h: All of the above, and also: Add Emacs mode-line.  Include <set>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7301 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFactor out name-mangling from X86/Printer, which is derived from CWriter,
Brian Gaeke [Thu, 24 Jul 2003 20:20:58 +0000 (20:20 +0000)]
Factor out name-mangling from X86/Printer, which is derived from CWriter,
into this new support class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7300 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse unified CWriter-X86/Printer name mangler. Do not bother using
Brian Gaeke [Thu, 24 Jul 2003 20:20:44 +0000 (20:20 +0000)]
Use unified CWriter-X86/Printer name mangler.  Do not bother using
SlotCalculator in CWriter.  (Unfortunately, all this means a lot of
X86/Printer's methods have to be de-constified again.  Oh well.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7299 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMore testcases, which I'll implement later
Chris Lattner [Thu, 24 Jul 2003 19:44:51 +0000 (19:44 +0000)]
More testcases, which I'll implement later

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7298 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoModernize testcase
Chris Lattner [Thu, 24 Jul 2003 19:42:28 +0000 (19:42 +0000)]
Modernize testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7297 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Thu, 24 Jul 2003 19:31:08 +0000 (19:31 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7296 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoInstcombine: (A >> c1) << c2 for signed integers
Chris Lattner [Thu, 24 Jul 2003 18:38:56 +0000 (18:38 +0000)]
Instcombine: (A >> c1) << c2 for signed integers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7295 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcases for signed shifts
Chris Lattner [Thu, 24 Jul 2003 18:38:09 +0000 (18:38 +0000)]
New testcases for signed shifts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7294 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMajor addition to bugpoint: ability to debug code generators (LLC and LLI).
Misha Brukman [Thu, 24 Jul 2003 18:17:43 +0000 (18:17 +0000)]
Major addition to bugpoint: ability to debug code generators (LLC and LLI).
The C backend is assumed correct and is used to generate shared objects to be
loaded by the other two code generators.

LLC debugging should be functional now, LLI needs a few more additions to work,
the major one is renaming of external functions to call the JIT lazy function
resolver.

Bugpoint now has a command-line switch -mode with options 'compile' and
'codegen' to debug appropriate portions of tools.

ExecutionDriver.cpp: Added implementations of AbstractInterpreter for LLC and
GCC, broke out common code within other tools, and added ability to generate C
code with CBE individually, without executing the program, and the GCC tool can
generate executables shared objects or executables.

If no reference output is specified to Bugpoint, it will be generated with CBE,
because it is already assumed to be correct for the purposes of debugging using
this method. As a result, many functions now accept as an optional parameter a
shared object to be loaded in, if specified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7293 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoReorganization of code, no functional changes.
Chris Lattner [Thu, 24 Jul 2003 17:52:58 +0000 (17:52 +0000)]
Reorganization of code, no functional changes.
Now it shoudl be a bit more efficient

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7292 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIt doesn't appear that we need to #include these.
Brian Gaeke [Thu, 24 Jul 2003 17:48:53 +0000 (17:48 +0000)]
It doesn't appear that we need to #include these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7291 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAllow folding several instructions into casts, which can simplify a lot
Chris Lattner [Thu, 24 Jul 2003 17:35:25 +0000 (17:35 +0000)]
Allow folding several instructions into casts, which can simplify a lot
of codes.  For example,
short kernel (short t1) {
  t1 >>= 8; t1 <<= 8;
  return t1;
}

became:

short %kernel(short %t1.1) {
        %tmp.3 = shr short %t1.1, ubyte 8               ; <short> [#uses=1]
        %tmp.5 = cast short %tmp.3 to int               ; <int> [#uses=1]
        %tmp.7 = shl int %tmp.5, ubyte 8                ; <int> [#uses=1]
        %tmp.8 = cast int %tmp.7 to short               ; <short> [#uses=1]
        ret short %tmp.8
}

before, now it becomes:
short %kernel(short %t1.1) {
        %tmp.3 = shr short %t1.1, ubyte 8               ; <short> [#uses=1]
        %tmp.8 = shl short %tmp.3, ubyte 8              ; <short> [#uses=1]
        ret short %tmp.8
}

which will become:
short %kernel(short %t1.1) {
        %tmp.3 = and short %t1.1, 0xFF00
        ret short %tmp.3
}

This implements cast-set.ll:test4 and test5

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7290 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMinor cleanups
Chris Lattner [Thu, 24 Jul 2003 17:31:56 +0000 (17:31 +0000)]
Minor cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7289 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoConstify most methods. We could have constified doInitialization and
Brian Gaeke [Thu, 24 Jul 2003 17:30:45 +0000 (17:30 +0000)]
Constify most methods. We could have constified doInitialization and
doFinalization too except that would have made them shadow, not override,
the parent class :-P.

Allow *any* constant cast expression between pointers and longs,
or vice-versa, or any widening (not just same-size) conversion that
isLosslesslyConvertibleTo approves. This fixes oopack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7288 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDisable sample project until it works
Chris Lattner [Wed, 23 Jul 2003 23:28:57 +0000 (23:28 +0000)]
Disable sample project until it works

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7287 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd new tests, make existing tests more difficult
Chris Lattner [Wed, 23 Jul 2003 23:21:08 +0000 (23:21 +0000)]
Add new tests, make existing tests more difficult

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7286 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix bug: FunctionResolve/2003-07-23-CPR-Reference.ll
Chris Lattner [Wed, 23 Jul 2003 22:03:18 +0000 (22:03 +0000)]
Fix bug: FunctionResolve/2003-07-23-CPR-Reference.ll

This fixes a long time annoyance which caused prototypes for bzero, bcopy,
bcmp, fputs, and fputs_unlocked to never get deleted.  Grr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7285 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Wed, 23 Jul 2003 22:02:39 +0000 (22:02 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7284 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd comments
Chris Lattner [Wed, 23 Jul 2003 21:41:57 +0000 (21:41 +0000)]
Add comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7283 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove explicit check for: not (not X) = X, it is already handled because xor is...
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

20 years agoNew testcases
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

20 years agoRenumber tests sequentially
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

20 years agoSplit the or and xor tests into two separate files
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

20 years agoRemove obscure test
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

20 years agoCheck in old testcase sitting in my tree
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

20 years agoFix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBE
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

20 years agoPrinter.cpp: Ditch addRequired/getAnalysis, because they leave
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

20 years agoMake Module::getNamedFunction prefer non-external functions if there is more than
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

20 years agoFix space
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

20 years agoInstCombine: (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0
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

20 years agoNew testcase
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

20 years ago - InstCombine: (X | C1) & C2 --> X & C2 iff C1 & C1 == 0
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

20 years agoNew testcase
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

20 years agoNew testcase
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

20 years agoAdd, rewrite, and/or reformat many comments.
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

20 years agoIC: (X & C1) | C2 --> (X | C2) & (C1|C2)
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

20 years agoNew testcases
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

20 years agoIC: (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)
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

20 years agoNew testcase
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

20 years agoInstCombine: (X ^ 4) == 8 --> X == 12
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

20 years agoNew testcase
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

20 years agoAdd support for ~ operator on constants
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

20 years agoIC: (X & 5) == 13 --> false
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

20 years agoNew tests
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

20 years agoRenamed libtool to mklib for your tab completion pleasure.
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

20 years agoRemove redundant const qualifier
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

20 years agoRemove redundant const qualifiers from cast<> expressions
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

20 years agoSimplify code by using ConstantInt::getRawValue instead of checking to see
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

20 years agoRemove unnecessary casts
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

20 years agoFit code into 80 columns
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

20 years agoEliminate old-style cast
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

20 years agoRandom cleanups
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

20 years agoRemove using decl
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

20 years agoRemove explicit const qualifiers
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

20 years agoAdd more doxygen comments, add new ConstantInt::getRawValue method
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

20 years agoFix bug: TailDup/2003-07-22-InfiniteLoop.ll
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

20 years agoNew testcase that caused infinite loop in taildup
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

20 years ago - InstCombine (cast (xor A, B) to bool) ==> (setne A, B)
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

20 years agoNew testcases
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

20 years agoRepaired the --enable and --disable options.
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

20 years agoFixed the enable/disable options. The AC_ARG_ENABLE macro does not perform
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

20 years agoAdd documentation for runOnMachineFunction()
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

20 years agoMade some corrections to the enable-llc_diffs option.
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

20 years agoGenerated a new configure script.
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

20 years agoUpdated to use files within the autoconf subdirectory.
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

20 years agoThese are the autoconf files in their new home.
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

20 years agoMoving these files to the llvm/autoconf directory.
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

20 years agoMoved configure.ac to the autoconf directory.
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

20 years agoturn off DISABLE_LLC_DIFFS for x86.
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

20 years agoAdd new testcase
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

20 years ago(1) Pass 'VAR=string' arguments to gmake
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

20 years agoFix comment.
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

20 years agoUpdated from the discussion on July 21, 2003.
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

20 years agoFixed misspelling.
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

20 years agoSimplify code a bit
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

20 years agoAdded code that checks to see if a global variable is external before replacing
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

20 years agoRegression test for the Instruction Combining optimizization.
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

20 years agoRemove unneccesary #ifdefs
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

20 years agoFix warnings
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

20 years agoRemove instloops library
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

20 years agoEliminated dead code.
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

20 years agoAdded special consideration for instrumentation strategy
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

20 years agoInitialize the target architecture based on compiler defines, so if compiled on
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