Chris Lattner
b6a0873bd8
Add Module::dump() method
...
llvm-svn: 3374
2002-08-17 23:32:42 +00:00
Chris Lattner
1c26440b54
Add a simple testcase that just uses a CPR instead of a CPR & ConstExpr
...
llvm-svn: 3373
2002-08-17 23:20:37 +00:00
Chris Lattner
db748de8d2
New testcase
...
llvm-svn: 3372
2002-08-17 22:57:52 +00:00
Chris Lattner
dded107d64
Do not leak memory for passes when using -stopAfterNPasses or -stopraise
...
llvm-svn: 3371
2002-08-17 22:40:03 +00:00
Chris Lattner
325c1ce8f3
Run GlobalDCE before deadtypeelim so that we do not retain types for global
...
variables that are obviously dead. The most common case is %FILE
llvm-svn: 3370
2002-08-17 22:38:02 +00:00
Chris Lattner
e910ab899c
Include a basic simple test.
...
llvm-svn: 3369
2002-08-17 22:36:45 +00:00
Chris Lattner
c59af1d257
Promote getelementptr instructions to constexprs if we can.
...
llvm-svn: 3368
2002-08-17 22:21:59 +00:00
Chris Lattner
c8d952ebba
Fix stupid oversight of missing #include.
...
llvm-svn: 3367
2002-08-17 22:02:41 +00:00
Chris Lattner
51fa0ef925
- Finally nailed: test/Regression/Assembler/2002-08-16-ConstExprInlined.llx
...
- ParseConstantPool was resolving reference to value using the function
slot # instead of the global slot #.
- Bytecode reader changes:
- Remove the failure<> template from Bytecode Reader
- Remove extraneous #includes
- s/method/function/ a bit
- Eliminate the fwdRefs class that just added abstraction where it was not
needed, making things more complex.
- Use a vector instead of a list for function signatures.
llvm-svn: 3366
2002-08-17 22:01:27 +00:00
Chris Lattner
56b56d90f0
Throw purify temporary files into /shared if we have it.
...
llvm-svn: 3365
2002-08-17 21:39:58 +00:00
Chris Lattner
3afbe3aa49
Add new testcase for gep instruction -> get constexpr promotion
...
llvm-svn: 3364
2002-08-16 21:18:21 +00:00
Chris Lattner
cfe8f53a4b
Changed parser to always use parenthesis on ConstExprs to be consistent
...
llvm-svn: 3363
2002-08-16 21:17:11 +00:00
Chris Lattner
7f325cd0bc
- Remove unused STRING token from lexer & parser
...
- Changed parser to always use parenthesis on ConstExprs to be consistent
- Parser now passes TRUE and FALSE tokens as a special case of the ConstExpr
machinery instead of a special case of constant int stuff
- Fix the AsmParser to use ValueRef ::= ConstExpr, and remove
ResolvedVal ::= ConstExpr this allows constexprs to be used in PHI nodes
llvm-svn: 3362
2002-08-16 21:14:40 +00:00
Chris Lattner
d0ded9899b
Fix typo
...
llvm-svn: 3361
2002-08-16 19:34:33 +00:00
Chris Lattner
75c34870ac
New testcase distilled from much larger problem
...
llvm-svn: 3360
2002-08-16 16:54:52 +00:00
Chris Lattner
e9e30c6b5a
Convert constexpr over to new syntax
...
llvm-svn: 3359
2002-08-15 21:14:39 +00:00
Chris Lattner
0dff9cb61d
New testcase
...
llvm-svn: 3358
2002-08-15 21:08:38 +00:00
Chris Lattner
dbeb10fce0
Make 'features' testsuite work with the /shared changes.
...
llvm-svn: 3357
2002-08-15 19:49:06 +00:00
Chris Lattner
39c284caf7
Convert testcase to use correct syntax
...
llvm-svn: 3356
2002-08-15 19:48:48 +00:00
Chris Lattner
4a16110da7
Add another testcase
...
llvm-svn: 3355
2002-08-15 19:38:03 +00:00
Chris Lattner
83b396b830
Write constexpr casts using the cast X to Y notation, not using the implicit
...
type result
llvm-svn: 3354
2002-08-15 19:37:43 +00:00
Chris Lattner
d8ecff793a
Parse const expr cast instruction the same way the instruction is formed
...
llvm-svn: 3353
2002-08-15 19:37:11 +00:00
Chris Lattner
d81cc45169
Add a note mentioning that bools promote to 0 or 1
...
llvm-svn: 3352
2002-08-15 19:36:05 +00:00
Chris Lattner
7f1c98d060
Move ConstExpr production to unify ConstVal stuff
...
llvm-svn: 3351
2002-08-15 18:17:28 +00:00
Chris Lattner
61643a01c3
Fix bug: test/Regression/Assembler/2002-08-15-UnresolvedGlobalReference.ll
...
llvm-svn: 3350
2002-08-15 17:58:33 +00:00
Chris Lattner
6e3f31d072
There seem to be issues with constant exprs
...
llvm-svn: 3349
2002-08-15 17:04:40 +00:00
Chris Lattner
7f8e677715
Simplify the code
...
llvm-svn: 3348
2002-08-15 16:15:36 +00:00
Chris Lattner
3732acab85
Handle more cases of cast-of-cast in more general forms.
...
llvm-svn: 3347
2002-08-15 16:15:25 +00:00
Chris Lattner
8d1118fd8f
Remove the last traces of the NOT instruction
...
llvm-svn: 3346
2002-08-15 16:14:49 +00:00
Chris Lattner
47744689d0
Add a bunch of testcases for cast-of-casts that should be removed.
...
llvm-svn: 3345
2002-08-15 16:13:29 +00:00
Vikram S. Adve
2ba6b60374
Change opLabel numbers for Not and BNot.
...
Also, these tree nodes are now binary, not unary.
llvm-svn: 3344
2002-08-15 14:20:45 +00:00
Vikram S. Adve
3db97eb499
Unary Not (boolean and bitwise) is no longer a separate LLVM instruction
...
but is instead implemented with XOR. Note that the InstrForest opLabels
for Not and BNot remain the same, i.e., the XOR is recognized and
represented as a (boolean or bitwise) Not when building the instruction
trees. But these tree nodes are now binary, not unary.
llvm-svn: 3343
2002-08-15 14:19:22 +00:00
Vikram S. Adve
caed269085
Revise code generation for unary Not (boolean and bitwise), which is
...
no longer a separate instruction but is instead implemented with XOR.
llvm-svn: 3342
2002-08-15 14:17:37 +00:00
Vikram S. Adve
243f187791
Added more helper functions for binary instructions emulating
...
unary Neg and Not: isNeg, isNot, getNegArgument, and getNotArgument.
llvm-svn: 3341
2002-08-15 14:15:48 +00:00
Vikram S. Adve
f352eaf351
Add tests for unary NOT operations.
...
llvm-svn: 3340
2002-08-15 14:09:56 +00:00
Chris Lattner
0bb75910e2
Implement capability to fold this:
...
uint %test4(int %A, int %B) {
%COND = setlt int %A, %B ; <bool> [#uses=1]
%result = cast bool %COND to uint ; <uint> [#uses=1]
ret uint %result
}
into a single cast instruction.
llvm-svn: 3339
2002-08-14 23:21:10 +00:00
Chris Lattner
ac4e8c6ea4
Fix testcase to actually test what we think we are
...
llvm-svn: 3338
2002-08-14 23:01:19 +00:00
Chris Lattner
768c2b6bfe
Avoid creating 'load X, 0' instead of just 'load X'
...
This _trivial_ change causes GCSE and LICM to be much more effective at
hoisting loads. Before it would not be able to eliminate 'load X' if there
was just a dominating 'load X, 0' because the expressions were not identical.
llvm-svn: 3337
2002-08-14 22:11:52 +00:00
Chris Lattner
313fd77767
Avoid inserting an entry block unless we need it
...
llvm-svn: 3336
2002-08-14 21:35:02 +00:00
Chris Lattner
0c5e293a4a
Gross, some whitespace escaped
...
llvm-svn: 3335
2002-08-14 20:07:01 +00:00
Chris Lattner
eb4ba3cd53
Fix bug in documentation
...
llvm-svn: 3334
2002-08-14 20:06:13 +00:00
Chris Lattner
6499ee2e7a
*** empty log message ***
...
llvm-svn: 3333
2002-08-14 19:29:38 +00:00
Chris Lattner
c652333636
This file does not belong here.
...
llvm-svn: 3332
2002-08-14 19:29:32 +00:00
Chris Lattner
1115d58b7c
Fix tests that use the now dead not instruction
...
llvm-svn: 3331
2002-08-14 19:28:22 +00:00
Chris Lattner
07a5218b6e
Fix testcases that used to now dead 'not' instruction
...
llvm-svn: 3330
2002-08-14 19:28:09 +00:00
Chris Lattner
94126ed044
Change not's to xors
...
llvm-svn: 3329
2002-08-14 19:26:34 +00:00
Chris Lattner
330b7ac76c
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
b80b69cc3e
Fix bug introduced in last checkin due to CastInst not being visible
...
llvm-svn: 3327
2002-08-14 18:22:19 +00:00
Chris Lattner
8fd96fcdaf
Remove support for unary operators.
...
llvm-svn: 3326
2002-08-14 18:19:46 +00:00
Chris Lattner
9c968aaa5a
Remove reference to GenericUnaryInst class
...
llvm-svn: 3325
2002-08-14 18:18:50 +00:00