oota-llvm.git
21 years agoRefactor CloneFunction to expose the new CloneBasicBlock function
Chris Lattner [Fri, 18 Apr 2003 03:50:09 +0000 (03:50 +0000)]
Refactor CloneFunction to expose the new CloneBasicBlock function

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

21 years agoNew const_cast instead of c style cast
Chris Lattner [Fri, 18 Apr 2003 03:49:49 +0000 (03:49 +0000)]
New const_cast instead of c style cast

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

21 years agoAdd prototype for new CloneBasicBlock function
Chris Lattner [Fri, 18 Apr 2003 03:49:22 +0000 (03:49 +0000)]
Add prototype for new CloneBasicBlock function

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

21 years agoAdd a simple test for hex constant integers
Chris Lattner [Thu, 17 Apr 2003 22:19:23 +0000 (22:19 +0000)]
Add a simple test for hex constant integers

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

21 years agoAllow hexadecimal integer constants to be used
Chris Lattner [Thu, 17 Apr 2003 22:17:32 +0000 (22:17 +0000)]
Allow hexadecimal integer constants to be used

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

21 years agoDon't build constantexprs that could be folded
Chris Lattner [Thu, 17 Apr 2003 19:24:48 +0000 (19:24 +0000)]
Don't build constantexprs that could be folded

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

21 years agoAllow constant folding of GEP instructions, even if we don't do a whole lot yet.
Chris Lattner [Thu, 17 Apr 2003 19:24:18 +0000 (19:24 +0000)]
Allow constant folding of GEP instructions, even if we don't do a whole lot yet.
Fold ConstExpr casts better
castToPointer shouldn't be forced to return a constantpointer

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

21 years agoDon't force a ConstantPointer to be returned
Chris Lattner [Thu, 17 Apr 2003 19:22:47 +0000 (19:22 +0000)]
Don't force a ConstantPointer to be returned

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

21 years agoTest case to make sure that constexprs are automatically folded
Chris Lattner [Thu, 17 Apr 2003 19:21:22 +0000 (19:21 +0000)]
Test case to make sure that constexprs are automatically folded

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

21 years agoDon't support codegen passes in opt
Chris Lattner [Wed, 16 Apr 2003 23:02:16 +0000 (23:02 +0000)]
Don't support codegen passes in opt

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

21 years agoRemove codegen libraries to speed up linking opt
Chris Lattner [Wed, 16 Apr 2003 22:55:55 +0000 (22:55 +0000)]
Remove codegen libraries to speed up linking opt

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

21 years agoFix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
Chris Lattner [Wed, 16 Apr 2003 22:50:19 +0000 (22:50 +0000)]
Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll

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

21 years agoNew testcase
Chris Lattner [Wed, 16 Apr 2003 22:46:16 +0000 (22:46 +0000)]
New testcase

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

21 years agoChange the interface to constant expressions to allow automatic folding
Chris Lattner [Wed, 16 Apr 2003 22:40:51 +0000 (22:40 +0000)]
Change the interface to constant expressions to allow automatic folding

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

21 years agoAllow the user to disable the internalize pass
Chris Lattner [Wed, 16 Apr 2003 21:43:22 +0000 (21:43 +0000)]
Allow the user to disable the internalize pass

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

21 years agoAdd tests for linker and linkonce globals
Chris Lattner [Wed, 16 Apr 2003 21:21:35 +0000 (21:21 +0000)]
Add tests for linker and linkonce globals

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

21 years agoAdd support to the bytecode reader/writer for the new linkage types
Chris Lattner [Wed, 16 Apr 2003 21:16:05 +0000 (21:16 +0000)]
Add support to the bytecode reader/writer for the new linkage types

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

21 years agoGive verbose error messages if bytecode file cannot be parsed
Chris Lattner [Wed, 16 Apr 2003 20:51:36 +0000 (20:51 +0000)]
Give verbose error messages if bytecode file cannot be parsed

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

21 years agoAdd code to verify correctly linkages
Chris Lattner [Wed, 16 Apr 2003 20:42:40 +0000 (20:42 +0000)]
Add code to verify correctly linkages

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

21 years agoRevert modulo scheduling change that should be part of the modulo-sched pass itself,
Chris Lattner [Wed, 16 Apr 2003 20:30:02 +0000 (20:30 +0000)]
Revert modulo scheduling change that should be part of the modulo-sched pass itself,
not part of the Instruction class.

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

21 years agoAdd new linkage types to support a real frontend
Chris Lattner [Wed, 16 Apr 2003 20:28:45 +0000 (20:28 +0000)]
Add new linkage types to support a real frontend

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

21 years agoAdd missing keyword, add new linkage keywords
Chris Lattner [Wed, 16 Apr 2003 20:26:11 +0000 (20:26 +0000)]
Add missing keyword, add new linkage keywords

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

21 years agoAdd new linkage keywords. Spell uninitialized correctly
Chris Lattner [Wed, 16 Apr 2003 20:25:57 +0000 (20:25 +0000)]
Add new linkage keywords.  Spell uninitialized correctly

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

21 years agoAdd PRE directory
Chris Lattner [Wed, 16 Apr 2003 20:23:42 +0000 (20:23 +0000)]
Add PRE directory

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

21 years agoImprove the efficiency and cleanup writing a bit
Chris Lattner [Wed, 16 Apr 2003 20:20:02 +0000 (20:20 +0000)]
Improve the efficiency and cleanup writing a bit

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

21 years agoDon't allow declaring an external internal variable
Chris Lattner [Wed, 16 Apr 2003 18:13:57 +0000 (18:13 +0000)]
Don't allow declaring an external internal variable

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

21 years agoImprove compatibility with system AS further by allowing input from stdin
Chris Lattner [Wed, 16 Apr 2003 17:49:18 +0000 (17:49 +0000)]
Improve compatibility with system AS further by allowing input from stdin

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

21 years ago* Get rid of using declaration
Chris Lattner [Wed, 16 Apr 2003 17:41:08 +0000 (17:41 +0000)]
* Get rid of using declaration
* Add two compatibility options to work better with new GCC frontend

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

21 years agoNamespacify command line options
Chris Lattner [Wed, 16 Apr 2003 17:34:29 +0000 (17:34 +0000)]
Namespacify command line options

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

21 years agoFix bug: Assember2003-04-15-ConstantInitAssertion.llx
Chris Lattner [Tue, 15 Apr 2003 16:09:31 +0000 (16:09 +0000)]
Fix bug: Assember2003-04-15-ConstantInitAssertion.llx

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

21 years agoNew testcase that triggered assertion failure.
Chris Lattner [Tue, 15 Apr 2003 16:07:05 +0000 (16:07 +0000)]
New testcase that triggered assertion failure.

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

21 years agoMake help message more clear
Chris Lattner [Sun, 13 Apr 2003 03:50:14 +0000 (03:50 +0000)]
Make help message more clear

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

21 years agoSimple arithmetic loop-based test case for modulo scheduling.
Misha Brukman [Thu, 10 Apr 2003 22:01:15 +0000 (22:01 +0000)]
Simple arithmetic loop-based test case for modulo scheduling.

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

21 years agoAdding a simple test case in the hope that commit-diffs.pl will pick this up.
Misha Brukman [Thu, 10 Apr 2003 21:49:13 +0000 (21:49 +0000)]
Adding a simple test case in the hope that commit-diffs.pl will pick this up.

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

21 years agoNot only is this the first test case for ModuloScheduing, it's also the first
Misha Brukman [Thu, 10 Apr 2003 21:43:58 +0000 (21:43 +0000)]
Not only is this the first test case for ModuloScheduing, it's also the first
test case for the CVS commit-diffs.pl script which should show the entire
contents of this file below:

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

21 years ago* Fix bug: Mem2Reg/2003-04-10-DFNotFound.ll
Chris Lattner [Thu, 10 Apr 2003 19:41:13 +0000 (19:41 +0000)]
* Fix bug: Mem2Reg/2003-04-10-DFNotFound.ll
* Make Mem2Reg assign version numbers now for renamed variables instead of
  .mem2reg suffixes.  This produces what people think of as SSA.

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

21 years agoNew testcase
Chris Lattner [Thu, 10 Apr 2003 19:21:07 +0000 (19:21 +0000)]
New testcase

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

21 years agoFixed compilation errors, command-line argument declarations, cleaned up code to
Misha Brukman [Thu, 10 Apr 2003 19:19:23 +0000 (19:19 +0000)]
Fixed compilation errors, command-line argument declarations, cleaned up code to
look nicer and removed useless stuff.

Also renamed a few variables, moved them into namespaces, converted outputting
to a file into a print to std::cerr with a DEBUG() guard, as all passes should
do anyway.

No functional changes have been made. However, this code now compiles.

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

21 years agoMade the code readable:
Misha Brukman [Wed, 9 Apr 2003 21:51:34 +0000 (21:51 +0000)]
Made the code readable:

* Lines must be wrapped at 80 chars. This is a hard limit.
* Consistent style on functions, braces, if, for, etc. Code must be readable.

No functional changes have been made, even though I added a new typedef.

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

21 years agoMust use std::pair instead of just 'pair'.
Misha Brukman [Mon, 7 Apr 2003 00:25:09 +0000 (00:25 +0000)]
Must use std::pair instead of just 'pair'.

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

21 years agoadded a function and a member to the TargetSchedInfo class
Guochun Shi [Mon, 7 Apr 2003 00:00:36 +0000 (00:00 +0000)]
added a function and a member to the TargetSchedInfo class
which is used  by Modulo Scheduling pass

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

21 years agoadded some memory for clone function
Guochun Shi [Sun, 6 Apr 2003 23:58:44 +0000 (23:58 +0000)]
added some memory for clone  function

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

21 years agochange the include file names and some class names to make it compile
Guochun Shi [Sun, 6 Apr 2003 23:56:19 +0000 (23:56 +0000)]
change the include file names and some class names to make it compile

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

21 years agoImplement scanf and fix sscanf to actually endian swap the results correctly
Chris Lattner [Mon, 31 Mar 2003 22:12:37 +0000 (22:12 +0000)]
Implement scanf and fix sscanf to actually endian swap the results correctly

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

21 years agoUpdate to work with newer versions of bison
Chris Lattner [Mon, 31 Mar 2003 21:26:06 +0000 (21:26 +0000)]
Update to work with newer versions of bison

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

21 years agoInitial checkin of PRE test
Chris Lattner [Mon, 31 Mar 2003 21:19:23 +0000 (21:19 +0000)]
Initial checkin of PRE test

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

21 years agoInitial checkin of PRE tests
Chris Lattner [Mon, 31 Mar 2003 19:57:36 +0000 (19:57 +0000)]
Initial checkin of PRE tests

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

21 years agoInitial checkin of PRE on LLVM. This implementation is still lacking in
Chris Lattner [Mon, 31 Mar 2003 19:55:43 +0000 (19:55 +0000)]
Initial checkin of PRE on LLVM.  This implementation is still lacking in
several ways:

 * Load expressions are not PRE'd well.  Alias Analysis should be used to
   get accurate information when computing anticipatibility.
 * The expression collection implementation does not handle PHI nodes properly,
   thus the implementation misses many opportunities to PRE.
 * This code could be sped up quite a bit

Despite these flaws, the code seems to work well, and handles PR's as one
would expect.

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

21 years agoMinor tweak
Chris Lattner [Mon, 31 Mar 2003 17:30:35 +0000 (17:30 +0000)]
Minor tweak

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

21 years ago* We now preserve the no-critical-edge pass (because we cannot insert critical edges)
Chris Lattner [Mon, 31 Mar 2003 17:30:25 +0000 (17:30 +0000)]
* We now preserve the no-critical-edge pass (because we cannot insert critical edges)
* Small modification to be more efficient

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

21 years agoAdd getAnalysisUsage method
Chris Lattner [Mon, 31 Mar 2003 17:29:18 +0000 (17:29 +0000)]
Add getAnalysisUsage method

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

21 years ago*** empty log message ***
Guochun Shi [Thu, 27 Mar 2003 17:57:44 +0000 (17:57 +0000)]
*** empty log message ***

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

21 years agoMove BreakCriticalEdges pass to lib/Transforms/Utils
Chris Lattner [Fri, 21 Mar 2003 21:43:19 +0000 (21:43 +0000)]
Move BreakCriticalEdges pass to lib/Transforms/Utils

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

21 years agoAdd helper method
Chris Lattner [Fri, 21 Mar 2003 21:41:02 +0000 (21:41 +0000)]
Add helper method

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

21 years agoUpdate comment
Chris Lattner [Fri, 21 Mar 2003 21:40:39 +0000 (21:40 +0000)]
Update comment

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

21 years agoAdd more graph traits specializations for dominator tree nodes
Chris Lattner [Thu, 20 Mar 2003 21:21:05 +0000 (21:21 +0000)]
Add more graph traits specializations for dominator tree nodes

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

21 years ago* Change the order that globals and constants are processed in
Chris Lattner [Wed, 19 Mar 2003 20:57:22 +0000 (20:57 +0000)]
* Change the order that globals and constants are processed in
* Add support for implicit zero initializers

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

21 years agoChanges to the V2 bytecode format:
Chris Lattner [Wed, 19 Mar 2003 20:56:46 +0000 (20:56 +0000)]
Changes to the V2 bytecode format:
  - Null values are implicitly encoded instead of explicitly, this makes
    things more compact!
  - More compactly represent ConstantPointerRefs
  - Bytecode files are represented as:
      Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
    instead of
      Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
    which makes a lot of things simpler.

Writer changes:
  - We now explictly encode versioning information in the bytecode files.
  - This allows new code to read bytecode files produced by old code, but
    new bytecode files can have enhancements such as the above.  Although this
    makes the reader a bit more complex (having to deal with old formats), the
    writer only needs to be able to produce the most recent version.

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

21 years ago* Bug fixes:
Chris Lattner [Wed, 19 Mar 2003 20:54:26 +0000 (20:54 +0000)]
* Bug fixes:
  - Fix problems where the constant table would not get updated when
    resolving constants causes other constants to change.

Changes to the V2 bytecode format
  - Null values are implicitly encoded instead of explicitly, this makes
    things more compact!
  - More compactly represent ConstantPointerRefs
  - Bytecode files are represented as:
      Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
    instead of
      Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
    which makes a lot of things simpler.

Changes to the reader:
  - Function loading code is much simpler.  We now no longer make function
    PlaceHolderHelper objects to be replaced with real functions.

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

21 years agoAdd new chunk type
Chris Lattner [Wed, 19 Mar 2003 20:48:27 +0000 (20:48 +0000)]
Add new chunk type

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

21 years agoFix testcase
Chris Lattner [Tue, 18 Mar 2003 22:53:19 +0000 (22:53 +0000)]
Fix testcase

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

21 years agoFix problems with BitSetVector that makes it not compile under GCC 3.0 and 2.95
Chris Lattner [Mon, 17 Mar 2003 18:11:27 +0000 (18:11 +0000)]
Fix problems with BitSetVector that makes it not compile under GCC 3.0 and 2.95

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

21 years agoFix several bugs in the build system, including the use of the Debug version of Burg...
Chris Lattner [Fri, 14 Mar 2003 20:25:22 +0000 (20:25 +0000)]
Fix several bugs in the build system, including the use of the Debug version of Burg no matter what configuration is currently configured.

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

21 years agoAdd the following instcombine xforms:
Chris Lattner [Tue, 11 Mar 2003 00:12:48 +0000 (00:12 +0000)]
Add the following instcombine xforms:
  - Implement simple reassociation: (A|c1)|(B|c2) == (A|B)|(c1|c2)
  - (A & C1)+(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
  - (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0

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

21 years agoTest limited reassociation
Chris Lattner [Tue, 11 Mar 2003 00:10:59 +0000 (00:10 +0000)]
Test limited reassociation

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

21 years agoAdd optimizations:
Chris Lattner [Mon, 10 Mar 2003 23:52:54 +0000 (23:52 +0000)]
Add optimizations:
 - (A & C1)+(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
 - (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0

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

21 years agoImplement: -A*-B == A*B
Chris Lattner [Mon, 10 Mar 2003 23:23:04 +0000 (23:23 +0000)]
Implement: -A*-B == A*B

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

21 years agoAdd testcases for negated multiplies
Chris Lattner [Mon, 10 Mar 2003 23:22:50 +0000 (23:22 +0000)]
Add testcases for negated multiplies

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

21 years agoAdd new transformation: // (~A | ~B) == (~(A & B))
Chris Lattner [Mon, 10 Mar 2003 23:13:59 +0000 (23:13 +0000)]
Add new transformation: // (~A | ~B) == (~(A & B))

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

21 years agoAdd test for demorgans law with constants
Chris Lattner [Mon, 10 Mar 2003 23:13:32 +0000 (23:13 +0000)]
Add test for demorgans law with constants
Add test for other form of demorgans

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

21 years agoGeneralize not and neg comparison testers to allow constant to be considered not...
Chris Lattner [Mon, 10 Mar 2003 23:06:50 +0000 (23:06 +0000)]
Generalize not and neg comparison testers to allow constant to be considered not'able and neg'able.  This
allows optimization of this:
int %test4(int %A, int %B) {
        %a = xor int %A, -1
        %c = and int %a, 5    ; 5 = ~c2
        %d = xor int %c, -1
        ret int %d
}

into this:
int %test4(int %A, int %B) {            ; No predecessors!
        %c.demorgan = or int %A, -6             ; <int> [#uses=1]
        ret int %c.demorgan
}

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

21 years ago* Add testcases for associative operators
Chris Lattner [Mon, 10 Mar 2003 22:43:56 +0000 (22:43 +0000)]
* Add testcases for associative operators
* Add testcase for or ubyte, 255 which was broken before

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

21 years agoFix ConstantUInt::isAllOnesValue
Chris Lattner [Mon, 10 Mar 2003 22:39:02 +0000 (22:39 +0000)]
Fix ConstantUInt::isAllOnesValue

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

21 years agoGeneralize (A+c1)+c2 optimization to work with all associative operators
Chris Lattner [Mon, 10 Mar 2003 21:43:22 +0000 (21:43 +0000)]
Generalize (A+c1)+c2 optimization to work with all associative operators

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

21 years agoModernize testcase
Chris Lattner [Mon, 10 Mar 2003 19:44:01 +0000 (19:44 +0000)]
Modernize testcase

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

21 years agoMinor change, no functionality diff
Chris Lattner [Mon, 10 Mar 2003 19:20:30 +0000 (19:20 +0000)]
Minor change, no functionality diff

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

21 years agoAdd a bunch of new tests
Chris Lattner [Mon, 10 Mar 2003 19:16:20 +0000 (19:16 +0000)]
Add a bunch of new tests

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

21 years agoFix bug: (x << 100) wasn't folded to 0, but (x >> 100) was (when x is unsigned)
Chris Lattner [Mon, 10 Mar 2003 19:16:08 +0000 (19:16 +0000)]
Fix bug: (x << 100) wasn't folded to 0, but (x >> 100) was (when x is unsigned)

Implement new shift optimizations for shifting the result of a shift.

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

21 years agoImplement: (A|B)^B == A & (~B)
Chris Lattner [Mon, 10 Mar 2003 18:24:17 +0000 (18:24 +0000)]
Implement:  (A|B)^B == A & (~B)

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

21 years agoAdd test for: (A|B)^B == A & (~B)
Chris Lattner [Mon, 10 Mar 2003 18:24:04 +0000 (18:24 +0000)]
Add test for: (A|B)^B == A & (~B)

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

21 years agoModernize testcase
Chris Lattner [Mon, 10 Mar 2003 18:20:53 +0000 (18:20 +0000)]
Modernize testcase

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

21 years agoThe word 'independent' has no 'a'.
Misha Brukman [Sat, 8 Mar 2003 23:59:05 +0000 (23:59 +0000)]
The word 'independent' has no 'a'.

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

21 years agoMake sure that intermediate code is verifier clean to avoid wierd problems.
Chris Lattner [Fri, 7 Mar 2003 18:17:13 +0000 (18:17 +0000)]
Make sure that intermediate code is verifier clean to avoid wierd problems.

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

21 years agoFix bug: SimplifyCFG/2003-03-07-DominateProblem.ll
Chris Lattner [Fri, 7 Mar 2003 18:13:41 +0000 (18:13 +0000)]
Fix bug: SimplifyCFG/2003-03-07-DominateProblem.ll

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

21 years agoNew testcase
Chris Lattner [Fri, 7 Mar 2003 17:42:55 +0000 (17:42 +0000)]
New testcase

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

21 years agoClean up cruft
Chris Lattner [Thu, 6 Mar 2003 23:23:32 +0000 (23:23 +0000)]
Clean up cruft

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

21 years agoExtend struct and array constants to support isNullValue
Chris Lattner [Thu, 6 Mar 2003 21:02:43 +0000 (21:02 +0000)]
Extend struct and array constants to support isNullValue

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

21 years agoRemove #include
Chris Lattner [Thu, 6 Mar 2003 21:02:18 +0000 (21:02 +0000)]
Remove #include
Extend getNullValue to work with struct and array types

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

21 years agoUpdate testcases to use long to index gep
Chris Lattner [Thu, 6 Mar 2003 19:59:08 +0000 (19:59 +0000)]
Update testcases to use long to index gep

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

21 years agoInfrastructure for more compact bytecode files and REAL support for versioning
Chris Lattner [Thu, 6 Mar 2003 17:55:45 +0000 (17:55 +0000)]
Infrastructure for more compact bytecode files and REAL support for versioning

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

21 years agos/Method/Function in variable and method names
Chris Lattner [Thu, 6 Mar 2003 17:18:14 +0000 (17:18 +0000)]
s/Method/Function in variable and method names

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

21 years agoContinue simplifying error handling, s/method/function
Chris Lattner [Thu, 6 Mar 2003 17:15:19 +0000 (17:15 +0000)]
Continue simplifying error handling, s/method/function

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

21 years agoCleanup error handling constructs
Chris Lattner [Thu, 6 Mar 2003 17:03:28 +0000 (17:03 +0000)]
Cleanup error handling constructs

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

21 years agoPull common code out
Chris Lattner [Thu, 6 Mar 2003 16:50:32 +0000 (16:50 +0000)]
Pull common code out

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

21 years agoGeneralize interface a bit
Chris Lattner [Thu, 6 Mar 2003 16:50:21 +0000 (16:50 +0000)]
Generalize interface a bit

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

21 years agoRemove unneccesary forward decl
Chris Lattner [Thu, 6 Mar 2003 16:37:29 +0000 (16:37 +0000)]
Remove unneccesary forward decl

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

21 years agoAdd new getIncomingValueForBlock method
Chris Lattner [Thu, 6 Mar 2003 16:36:28 +0000 (16:36 +0000)]
Add new getIncomingValueForBlock method
Relax a bit about constness

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

21 years agoUse the std namespace explicitly
Chris Lattner [Thu, 6 Mar 2003 16:32:25 +0000 (16:32 +0000)]
Use the std namespace explicitly

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

21 years agoAdd a link to source of inspiration
Chris Lattner [Wed, 5 Mar 2003 23:02:25 +0000 (23:02 +0000)]
Add a link to source of inspiration

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

21 years agoNew testcase for pow builtin recognition
Chris Lattner [Wed, 5 Mar 2003 22:56:59 +0000 (22:56 +0000)]
New testcase for pow builtin recognition

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