Chris Lattner
88a9a3e6e3
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
2003-03-31 21:26:06 +00:00
Chris Lattner
7341178c5d
Initial checkin of PRE test
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5761 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 21:19:23 +00:00
Chris Lattner
7cd2fff2fd
Initial checkin of PRE tests
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5760 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 19:57:36 +00:00
Chris Lattner
e941291a7a
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
2003-03-31 19:55:43 +00:00
Chris Lattner
0e08e1beda
Minor tweak
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 17:30:35 +00:00
Chris Lattner
6c0e0496dc
* 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
2003-03-31 17:30:25 +00:00
Chris Lattner
d76370b306
Add getAnalysisUsage method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5756 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 17:29:18 +00:00
Guochun Shi
f1c154f5e6
*** empty log message ***
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5755 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-27 17:57:44 +00:00
Chris Lattner
c277eaa41e
Move BreakCriticalEdges pass to lib/Transforms/Utils
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-21 21:43:19 +00:00
Chris Lattner
f1ab454b71
Add helper method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5753 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-21 21:41:02 +00:00
Chris Lattner
6f2ec7f59d
Update comment
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5752 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-21 21:40:39 +00:00
Chris Lattner
e33b796851
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
2003-03-20 21:21:05 +00:00
Chris Lattner
3413d150dc
* 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
2003-03-19 20:57:22 +00:00
Chris Lattner
186a1f71e6
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
2003-03-19 20:56:46 +00:00
Chris Lattner
52e20b0977
* 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
2003-03-19 20:54:26 +00:00
Chris Lattner
1b079f9685
Add new chunk type
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-19 20:48:27 +00:00
Chris Lattner
056e84c5b6
Fix testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5746 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-18 22:53:19 +00:00
Chris Lattner
8fb1fe16b7
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
2003-03-17 18:11:27 +00:00
Chris Lattner
760da06489
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
2003-03-14 20:25:22 +00:00
Chris Lattner
c8802d2c16
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
2003-03-11 00:12:48 +00:00
Chris Lattner
be0fe12f72
Test limited reassociation
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5742 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-11 00:10:59 +00:00
Chris Lattner
8408add00a
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
2003-03-10 23:52:54 +00:00
Chris Lattner
a4f445b28c
Implement: -A*-B == A*B
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5740 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 23:23:04 +00:00
Chris Lattner
533741a764
Add testcases for negated multiplies
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5739 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 23:22:50 +00:00
Chris Lattner
a27231acc0
Add new transformation: // (~A | ~B) == (~(A & B))
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5738 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 23:13:59 +00:00
Chris Lattner
0cec701eb2
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
2003-03-10 23:13:32 +00:00
Chris Lattner
8d96964e29
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
2003-03-10 23:06:50 +00:00
Chris Lattner
1b77300154
* 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
2003-03-10 22:43:56 +00:00
Chris Lattner
1680312867
Fix ConstantUInt::isAllOnesValue
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5734 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 22:39:02 +00:00
Chris Lattner
4f98c56936
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
2003-03-10 21:43:22 +00:00
Chris Lattner
2bd37807d0
Modernize testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5732 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 19:44:01 +00:00
Chris Lattner
28ba1aad99
Minor change, no functionality diff
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5731 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 19:20:30 +00:00
Chris Lattner
c232870b6f
Add a bunch of new tests
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5730 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 19:16:20 +00:00
Chris Lattner
ea34005404
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
2003-03-10 19:16:08 +00:00
Chris Lattner
cb40a3749a
Implement: (A|B)^B == A & (~B)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5728 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 18:24:17 +00:00
Chris Lattner
63a9548591
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
2003-03-10 18:24:04 +00:00
Chris Lattner
a66e2fa195
Modernize testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5726 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-10 18:20:53 +00:00
Misha Brukman
3d87b42bf9
The word 'independent' has no 'a'.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-08 23:59:05 +00:00
Chris Lattner
10f22cb1a0
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
2003-03-07 18:17:13 +00:00
Chris Lattner
3a43837d85
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
2003-03-07 18:13:41 +00:00
Chris Lattner
5db057fbb0
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5721 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-07 17:42:55 +00:00
Chris Lattner
38d8773650
Clean up cruft
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5720 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-06 23:23:32 +00:00
Chris Lattner
a5ae71a137
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
2003-03-06 21:02:43 +00:00
Chris Lattner
27accf7692
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
2003-03-06 21:02:18 +00:00
Chris Lattner
42289a3010
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
2003-03-06 19:59:08 +00:00
Chris Lattner
036b8aa030
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
2003-03-06 17:55:45 +00:00
Chris Lattner
6e5a0e4e89
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
2003-03-06 17:18:14 +00:00
Chris Lattner
2a7b6bab7a
Continue simplifying error handling, s/method/function
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5714 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-06 17:15:19 +00:00
Chris Lattner
b6c46959fd
Cleanup error handling constructs
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5713 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-06 17:03:28 +00:00
Chris Lattner
09abe6aba3
Pull common code out
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5712 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-06 16:50:32 +00:00