1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

5476 Commits

Author SHA1 Message Date
Misha Brukman
98b046b64a Simple arithmetic loop-based test case for modulo scheduling.
llvm-svn: 5774
2003-04-10 22:01:15 +00:00
Misha Brukman
1eff1188c7 Adding a simple test case in the hope that commit-diffs.pl will pick this up.
llvm-svn: 5773
2003-04-10 21:49:13 +00:00
Misha Brukman
be989359cb 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:

llvm-svn: 5772
2003-04-10 21:43:58 +00:00
Chris Lattner
0ac391e6c8 * 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.

llvm-svn: 5771
2003-04-10 19:41:13 +00:00
Chris Lattner
d1975e8f59 New testcase
llvm-svn: 5770
2003-04-10 19:21:07 +00:00
Misha Brukman
127a46eeba 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.

llvm-svn: 5769
2003-04-10 19:19:23 +00:00
Misha Brukman
1db4cefc28 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.

llvm-svn: 5768
2003-04-09 21:51:34 +00:00
Misha Brukman
71aef01e7e Must use std::pair instead of just 'pair'.
llvm-svn: 5767
2003-04-07 00:25:09 +00:00
Guochun Shi
59e61c4ce2 added a function and a member to the TargetSchedInfo class
which is used  by Modulo Scheduling pass

llvm-svn: 5766
2003-04-07 00:00:36 +00:00
Guochun Shi
62370b42ad added some memory for clone function
llvm-svn: 5765
2003-04-06 23:58:44 +00:00
Guochun Shi
478533bb86 change the include file names and some class names to make it compile
llvm-svn: 5764
2003-04-06 23:56:19 +00:00
Chris Lattner
7bfad931b8 Implement scanf and fix sscanf to actually endian swap the results correctly
llvm-svn: 5763
2003-03-31 22:12:37 +00:00
Chris Lattner
57bc07ffc3 Update to work with newer versions of bison
llvm-svn: 5762
2003-03-31 21:26:06 +00:00
Chris Lattner
6ada1ae97e Initial checkin of PRE test
llvm-svn: 5761
2003-03-31 21:19:23 +00:00
Chris Lattner
40465a2f77 Initial checkin of PRE tests
llvm-svn: 5760
2003-03-31 19:57:36 +00:00
Chris Lattner
731913bab3 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.

llvm-svn: 5759
2003-03-31 19:55:43 +00:00
Chris Lattner
6024ecfc43 Minor tweak
llvm-svn: 5758
2003-03-31 17:30:35 +00:00
Chris Lattner
44370a85d9 * We now preserve the no-critical-edge pass (because we cannot insert critical edges)
* Small modification to be more efficient

llvm-svn: 5757
2003-03-31 17:30:25 +00:00
Chris Lattner
190480ecfe Add getAnalysisUsage method
llvm-svn: 5756
2003-03-31 17:29:18 +00:00
Guochun Shi
9ba51857c1 *** empty log message ***
llvm-svn: 5755
2003-03-27 17:57:44 +00:00
Chris Lattner
b215db890f Move BreakCriticalEdges pass to lib/Transforms/Utils
llvm-svn: 5754
2003-03-21 21:43:19 +00:00
Chris Lattner
8696069d85 Add helper method
llvm-svn: 5753
2003-03-21 21:41:02 +00:00
Chris Lattner
f472a964a9 Update comment
llvm-svn: 5752
2003-03-21 21:40:39 +00:00
Chris Lattner
cf6eb5232a Add more graph traits specializations for dominator tree nodes
llvm-svn: 5751
2003-03-20 21:21:05 +00:00
Chris Lattner
03fab572fb * Change the order that globals and constants are processed in
* Add support for implicit zero initializers

llvm-svn: 5750
2003-03-19 20:57:22 +00:00
Chris Lattner
839f5a9077 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.

llvm-svn: 5749
2003-03-19 20:56:46 +00:00
Chris Lattner
dd194d3844 * 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.

llvm-svn: 5748
2003-03-19 20:54:26 +00:00
Chris Lattner
8c1c878dcb Add new chunk type
llvm-svn: 5747
2003-03-19 20:48:27 +00:00
Chris Lattner
8424f9d454 Fix testcase
llvm-svn: 5746
2003-03-18 22:53:19 +00:00
Chris Lattner
0381679b6e Fix problems with BitSetVector that makes it not compile under GCC 3.0 and 2.95
llvm-svn: 5745
2003-03-17 18:11:27 +00:00
Chris Lattner
63975f1a26 Fix several bugs in the build system, including the use of the Debug version of Burg no matter what configuration is currently configured.
llvm-svn: 5744
2003-03-14 20:25:22 +00:00
Chris Lattner
c51d7871ee 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

llvm-svn: 5743
2003-03-11 00:12:48 +00:00
Chris Lattner
5b6745ef74 Test limited reassociation
llvm-svn: 5742
2003-03-11 00:10:59 +00:00
Chris Lattner
d0ab973bd2 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

llvm-svn: 5741
2003-03-10 23:52:54 +00:00
Chris Lattner
6eededc41f Implement: -A*-B == A*B
llvm-svn: 5740
2003-03-10 23:23:04 +00:00
Chris Lattner
ca896e1827 Add testcases for negated multiplies
llvm-svn: 5739
2003-03-10 23:22:50 +00:00
Chris Lattner
715b592fc4 Add new transformation: // (~A | ~B) == (~(A & B))
llvm-svn: 5738
2003-03-10 23:13:59 +00:00
Chris Lattner
83c86fad17 Add test for demorgans law with constants
Add test for other form of demorgans

llvm-svn: 5737
2003-03-10 23:13:32 +00:00
Chris Lattner
0f5ab645eb 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
}

llvm-svn: 5736
2003-03-10 23:06:50 +00:00
Chris Lattner
54c0282641 * Add testcases for associative operators
* Add testcase for or ubyte, 255 which was broken before

llvm-svn: 5735
2003-03-10 22:43:56 +00:00
Chris Lattner
5e5950b7e0 Fix ConstantUInt::isAllOnesValue
llvm-svn: 5734
2003-03-10 22:39:02 +00:00
Chris Lattner
3eca9aaa0a Generalize (A+c1)+c2 optimization to work with all associative operators
llvm-svn: 5733
2003-03-10 21:43:22 +00:00
Chris Lattner
b45735f426 Modernize testcase
llvm-svn: 5732
2003-03-10 19:44:01 +00:00
Chris Lattner
9dec4368c0 Minor change, no functionality diff
llvm-svn: 5731
2003-03-10 19:20:30 +00:00
Chris Lattner
1dc15593c3 Add a bunch of new tests
llvm-svn: 5730
2003-03-10 19:16:20 +00:00
Chris Lattner
5fbfe9b9a8 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.

llvm-svn: 5729
2003-03-10 19:16:08 +00:00
Chris Lattner
5e6fb8b8d5 Implement: (A|B)^B == A & (~B)
llvm-svn: 5728
2003-03-10 18:24:17 +00:00
Chris Lattner
0c461ded59 Add test for: (A|B)^B == A & (~B)
llvm-svn: 5727
2003-03-10 18:24:04 +00:00
Chris Lattner
56c37efeaa Modernize testcase
llvm-svn: 5726
2003-03-10 18:20:53 +00:00
Misha Brukman
ce470d48df The word 'independent' has no 'a'.
llvm-svn: 5724
2003-03-08 23:59:05 +00:00