298797 Commits

Author SHA1 Message Date
Chris Lattner
08b2c3638d Void and Label values cannot be acted on directly so they have zero size
llvm-svn: 2481
2002-05-06 15:10:15 +00:00
Chris Lattner
6022ad064c More testcases I don't want to forget about
llvm-svn: 2480
2002-05-06 05:51:26 +00:00
Chris Lattner
74e95476d4 New testcases so I don't forget about these algebraic simplifications
llvm-svn: 2479
2002-05-06 05:43:36 +00:00
Chris Lattner
8170e8f397 New testcase so I don't forget about this.
llvm-svn: 2478
2002-05-06 05:35:20 +00:00
Chris Lattner
5fc509b008 Testcase for missed merge opportunity
llvm-svn: 2477
2002-05-06 03:11:32 +00:00
Chris Lattner
878bbb2f1c Run DCE AFTER SCCP and GCSE!
llvm-svn: 2476
2002-05-06 03:04:17 +00:00
Chris Lattner
fed6d77c43 Build CFGsimplify directory
llvm-svn: 2475
2002-05-06 03:03:55 +00:00
Chris Lattner
095735d42e Updated documentation a _LOT_
llvm-svn: 2474
2002-05-06 03:03:22 +00:00
Chris Lattner
638fa9385d Remove dead code
llvm-svn: 2473
2002-05-06 03:03:09 +00:00
Chris Lattner
66e25b8b62 Merge blocks like this:
void "test3"(bool %T) {
        br bool %T, label %BB1, label %BB1
BB1:
        ret void
}

llvm-svn: 2472
2002-05-06 03:02:02 +00:00
Chris Lattner
940daedc22 Implement constant propogation of shift instructions
llvm-svn: 2471
2002-05-06 03:01:37 +00:00
Chris Lattner
6670d86b0b Implement constant propogation of shifts
llvm-svn: 2470
2002-05-06 03:00:54 +00:00
Chris Lattner
b2f02e5952 Print functions with curly braces instead of begin/end
llvm-svn: 2469
2002-05-06 03:00:40 +00:00
Chris Lattner
94121c9409 Add a range remove method
llvm-svn: 2468
2002-05-06 02:59:52 +00:00
Chris Lattner
4ba780d26e Implement two iterator remove method
llvm-svn: 2467
2002-05-06 02:59:34 +00:00
Chris Lattner
dac95a012b Initial testcases for CFG simplify (which is part of DCE for now)
llvm-svn: 2466
2002-05-06 02:37:38 +00:00
Chris Lattner
1890ef5cd7 Test moved to SCCP test directory
llvm-svn: 2465
2002-05-06 00:52:06 +00:00
Chris Lattner
0a144ad555 Implement remainder
Fix implementation of Not

llvm-svn: 2464
2002-05-03 21:41:07 +00:00
Chris Lattner
fcc96e582f Implement remainder
llvm-svn: 2463
2002-05-03 21:40:37 +00:00
Chris Lattner
37c4d69860 New testcase for bugs in the constant propogator
llvm-svn: 2462
2002-05-03 20:25:40 +00:00
Chris Lattner
7ad7bf0071 Add tests for floating point remainder elimination
llvm-svn: 2461
2002-05-03 20:16:29 +00:00
Chris Lattner
f91d56355f New testcase to see if constant propogation of remainder is implemented
llvm-svn: 2460
2002-05-03 20:14:21 +00:00
Chris Lattner
177dac4d92 This testcase is a sanity check
llvm-svn: 2459
2002-05-03 20:12:31 +00:00
Chris Lattner
62af86eca8 Fix bug: test/Regression/Transforms/SCCP/2002-05-03-NotOperator.ll
by using the ~ operator instead of !

llvm-svn: 2458
2002-05-03 20:09:52 +00:00
Chris Lattner
40acfe3554 Add new testcase for general constant prop.
llvm-svn: 2457
2002-05-03 19:58:17 +00:00
Chris Lattner
8a1313ba26 Add const prop pass to eliminate dead branches
llvm-svn: 2456
2002-05-03 19:57:16 +00:00
Chris Lattner
79baf91f17 Implement the NOT operator.
llvm-svn: 2455
2002-05-03 19:52:30 +00:00
Chris Lattner
eb164bc1fb We currently don't allow unresolved opaque types!
llvm-svn: 2453
2002-05-03 18:32:40 +00:00
Chris Lattner
4f9a452284 Add -d switch to test AsmWriter as well
llvm-svn: 2452
2002-05-03 18:31:30 +00:00
Chris Lattner
1e1a9b4166 Allow open/closing curly braces instead of begin/end to define the body of a function
llvm-svn: 2451
2002-05-03 18:23:48 +00:00
Chris Lattner
732c209e83 Eliminate usage of function level constant pool
llvm-svn: 2450
2002-05-02 21:52:35 +00:00
Chris Lattner
b01e5db513 Use unified diffs with gnu diff instead of old diffs
llvm-svn: 2449
2002-05-02 21:51:55 +00:00
Chris Lattner
7b80b53ab9 Ok, really it only takes me 3 times to get this right!
Now use #if 0 instead of #ifdef 0

llvm-svn: 2448
2002-05-02 21:49:50 +00:00
Chris Lattner
dd390e1736 Oops, disable debugging code all the way. :)
llvm-svn: 2447
2002-05-02 21:47:40 +00:00
Chris Lattner
fe6c9eeae3 * 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.

llvm-svn: 2446
2002-05-02 21:44:00 +00:00
Chris Lattner
13b52e71d8 * 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

llvm-svn: 2445
2002-05-02 21:18:01 +00:00
Chris Lattner
830b5290d0 More testcases for SCCP
llvm-svn: 2444
2002-05-02 20:41:39 +00:00
Chris Lattner
5364d1a74a * 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

llvm-svn: 2443
2002-05-02 20:32:51 +00:00
Chris Lattner
39e976d83a Additional testcase
llvm-svn: 2442
2002-05-02 20:19:11 +00:00
Chris Lattner
af5cdf3c1a Run the SCCP test
llvm-svn: 2441
2002-05-02 20:18:53 +00:00
Chris Lattner
f124e8ff35 First testcase for SCCP pass
llvm-svn: 2440
2002-05-02 20:18:37 +00:00
Chris Lattner
3f6b8335d5 Simplify the testcase a bit
llvm-svn: 2439
2002-05-02 19:58:05 +00:00
Chris Lattner
ed1228aedf New testcase
llvm-svn: 2438
2002-05-02 19:54:58 +00:00
Chris Lattner
45243fa9b7 Implement cast operations on booleans to allow casting bools to ints, f.e.
llvm-svn: 2437
2002-05-02 19:28:45 +00:00
Chris Lattner
18489fb61f * 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.

llvm-svn: 2436
2002-05-02 19:27:42 +00:00
Chris Lattner
624fe0b0ba New testcase for assembler failure
llvm-svn: 2435
2002-05-02 19:12:21 +00:00
Chris Lattner
293e186645 The implementation keyword is no longer neccesary
llvm-svn: 2434
2002-05-02 19:11:29 +00:00
Chris Lattner
7b804d6195 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.

llvm-svn: 2433
2002-05-02 19:11:13 +00:00
Chris Lattner
05cd52199d ExprTypeConvert will already do this transformation, no need to specialize
it here.

llvm-svn: 2431
2002-05-02 17:38:55 +00:00
Chris Lattner
39db871f86 Be a little more efficient, do not generate loads and stores with indices in them.
llvm-svn: 2430
2002-05-02 17:38:14 +00:00