Commit Graph

2335 Commits

Author SHA1 Message Date
Chris Lattner
03e2acb37f Print functions with curly braces instead of begin/end
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2469 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 03:00:40 +00:00
Chris Lattner
fac8a7052f Add a range remove method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2468 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 02:59:52 +00:00
Chris Lattner
cb6d70c6e0 Implement two iterator remove method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2467 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 02:59:34 +00:00
Chris Lattner
2077ffab85 Initial testcases for CFG simplify (which is part of DCE for now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2466 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 02:37:38 +00:00
Chris Lattner
11504fd62d Test moved to SCCP test directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2465 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-06 00:52:06 +00:00
Chris Lattner
44540ddaa0 Implement remainder
Fix implementation of Not


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2464 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 21:41:07 +00:00
Chris Lattner
bdd15ad565 Implement remainder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2463 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 21:40:37 +00:00
Chris Lattner
8a2e64ce87 New testcase for bugs in the constant propogator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2462 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 20:25:40 +00:00
Chris Lattner
6a7cd2206b Add tests for floating point remainder elimination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2461 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 20:16:29 +00:00
Chris Lattner
8e122e1148 New testcase to see if constant propogation of remainder is implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2460 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 20:14:21 +00:00
Chris Lattner
4f538507b6 This testcase is a sanity check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2459 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 20:12:31 +00:00
Chris Lattner
905f311d05 Fix bug: test/Regression/Transforms/SCCP/2002-05-03-NotOperator.ll
by using the ~ operator instead of !


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2458 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 20:09:52 +00:00
Chris Lattner
b6df79a6b2 Add new testcase for general constant prop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2457 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 19:58:17 +00:00
Chris Lattner
46d51f7ba8 Add const prop pass to eliminate dead branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2456 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 19:57:16 +00:00
Chris Lattner
2adcd83b89 Implement the NOT operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2455 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-03 19:52:30 +00:00
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