Chris Lattner
966112323f
We currently don't allow unresolved opaque types!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2453 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 18:32:40 +00:00
Chris Lattner
2e055ed08c
Add -d switch to test AsmWriter as well
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2452 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 18:31:30 +00:00
Chris Lattner
9b02cc365c
Allow open/closing curly braces instead of begin/end to define the body of a function
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2451 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 18:23:48 +00:00
Chris Lattner
8fba3a0f3a
Eliminate usage of function level constant pool
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2450 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 21:52:35 +00:00
Chris Lattner
978d57f6a7
Use unified diffs with gnu diff instead of old diffs
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2449 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 21:51:55 +00:00
Chris Lattner
904ec289c2
Ok, really it only takes me 3 times to get this right!
...
Now use #if 0 instead of #ifdef 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2448 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 21:49:50 +00:00
Chris Lattner
52a9a1def8
Oops, disable debugging code all the way. :)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2447 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 21:47:40 +00:00
Chris Lattner
b9a6634466
* Finish the implementation of isEdgeFeasible this fixes bug:
...
test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll
* SCCP now preserves the CFG: It leaves conditional branches the way they
are in the program, not simplifying them. A seperate pass should eliminate
the potentially dead basic blocks and edges in the CFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2446 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 21:44:00 +00:00
Chris Lattner
59f0ce2a41
* Enable SCCP debugging to be turned on with a simple change of #define
...
* Change worklist to a set so that duplicates cannot happen
* Add support for the invoke instruction
* Avoid marking store and free instructions as overdefined, since they
cannot produce a value anyway.
* Inline the OperandChangedState implementation
* Add isEdgeFeasible in preparation to fix a bug. Right now it behaves
exactly as before.
* Remove obsolete comment about constant pools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2445 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 21:18:01 +00:00
Chris Lattner
a1ab959de3
More testcases for SCCP
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2444 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 20:41:39 +00:00
Chris Lattner
0e9c515439
* Simplify the code by not bothering to name the folded constant
...
* Do not skip the instruction immediately after a folded instruction. This
was causing the testcase failure:
test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2443 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 20:32:51 +00:00
Chris Lattner
fecfa61009
Additional testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2442 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 20:19:11 +00:00
Chris Lattner
66333632a8
Run the SCCP test
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2441 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 20:18:53 +00:00
Chris Lattner
f36c34f625
First testcase for SCCP pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2440 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 20:18:37 +00:00
Chris Lattner
17c48f7337
Simplify the testcase a bit
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2439 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 19:58:05 +00:00
Chris Lattner
e23a7e99b3
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2438 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 19:54:58 +00:00
Chris Lattner
f4dca807d8
Implement cast operations on booleans to allow casting bools to ints, f.e.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2437 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 19:28:45 +00:00
Chris Lattner
9705a15b1a
* Fix a bug (test/Regression/Assembler/2002-05-02-InvalidForwardRef.ll)
...
introduced in the 1.66 revision of this file.
* Convert a hard coded constant to a symbolic value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2436 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 19:27:42 +00:00
Chris Lattner
7dd79b6a62
New testcase for assembler failure
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2435 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 19:12:21 +00:00
Chris Lattner
b05ca44eb9
The implementation keyword is no longer neccesary
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2434 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 19:11:29 +00:00
Chris Lattner
0e73ce6d94
The "implementation" is now allowed but not required by the parser. All type
...
definitions must still occur before function bodies, but the wierd keyword is
no longer neccesary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2433 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 19:11:13 +00:00
Chris Lattner
872265ee1b
ExprTypeConvert will already do this transformation, no need to specialize
...
it here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2431 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 17:38:55 +00:00
Chris Lattner
1f8d13c361
Be a little more efficient, do not generate loads and stores with indices in them.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2430 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 17:38:14 +00:00
Chris Lattner
bbad858b3a
Fix bug: test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2429 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 17:37:34 +00:00
Chris Lattner
a1be566213
* Add ability to eliminate a bunch of different cascading cast variations
...
* Allow elimination of getelementptr X, uint 0 (which is a noop)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2428 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 17:06:02 +00:00
Chris Lattner
fa49f810c2
Intitial checkin of cast tests
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2427 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 17:01:39 +00:00
Chris Lattner
a38ef97d0b
New testcase for bug found by Vikram
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2426 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 16:16:39 +00:00
Chris Lattner
01853e8773
Check another case
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2424 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-02 15:24:40 +00:00
Chris Lattner
68d024dde4
Fixed bug: test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2423 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-01 15:38:23 +00:00
Chris Lattner
5061263285
New bug testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2422 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-01 15:33:12 +00:00
Chris Lattner
e23476a027
Remove unneccesary pass.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2421 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-30 20:53:05 +00:00
Chris Lattner
71d3934bad
Remove unneccesary pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2420 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-30 20:52:49 +00:00
Chris Lattner
fdc7c29679
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2419 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-30 19:50:47 +00:00
Chris Lattner
ee37bb34d1
Fix problem where subpasses would invalidate all analyses outstanding
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2418 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-30 18:50:17 +00:00
Chris Lattner
6c1ce21ee6
Add folding rules for mul X, 0 and mul X, 2
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2417 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 22:24:47 +00:00
Chris Lattner
efc01f62c6
New test cases for mul folding
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2416 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 22:24:24 +00:00
Chris Lattner
0dbfc05a2a
Significantly clean up SCCP pass. Now the two classes are merged and in
...
an anonymous namespace where they belong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2415 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 21:26:08 +00:00
Chris Lattner
f737121054
Range insertion now returns an iterator
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2414 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 21:25:34 +00:00
Chris Lattner
ea1e8c70eb
Make the range insert operation return an iterator, even though the STL
...
range insert doesn't
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2413 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 21:23:30 +00:00
Chris Lattner
91b078dd54
These aren't tools
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2412 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 20:29:30 +00:00
Chris Lattner
94cf3b1c67
Remove unused files: This is the old induction varaible cannonicalization
...
pass built on top of interval analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2411 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 20:18:00 +00:00
Chris Lattner
8ac58a83eb
Move constant merging pass earlier
...
Include the SCCP pass in gccas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2410 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 20:11:38 +00:00
Chris Lattner
4840146b46
Fix for problem when allocating something like this:
...
malloc(100-i);
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2409 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 20:09:21 +00:00
Chris Lattner
868cb7da08
Merge Chris's script with the one already checked in
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2408 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 19:11:01 +00:00
Chris Lattner
e2cbbce6aa
Fix #include broken by iMemory.h not including DerivedTypes.h
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2407 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:56:45 +00:00
Chris Lattner
86e9187dcc
Add neccesary #include
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2406 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:48:55 +00:00
Chris Lattner
72a1d4e126
changes because iMemory.h no longer #includes DerivedTypes.h
...
This only requires Type.h anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2405 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:48:30 +00:00
Chris Lattner
3eb59c0074
Changes so that iMemory.h doesn't include DerivedTypes.h
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2404 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:46:50 +00:00
Chris Lattner
ee9c7d528d
Change to allow iMemory.h to avoid including DerivedTypes.h
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2403 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:46:22 +00:00
Chris Lattner
924025e9ad
Fix bug: test/Regression/Other/2002-04-29-NameBinding.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2402 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 18:25:33 +00:00