Chris Lattner
78fac3b8b6
There is nothing special about noops now
...
llvm-svn: 7567
2003-08-04 05:11:19 +00:00
Chris Lattner
9fb7e0a425
Transition to using 'let X = y' instead of 'set X = y'.
...
llvm-svn: 7565
2003-08-04 05:03:18 +00:00
Chris Lattner
2551080937
transition to using let instead of set
...
llvm-svn: 7564
2003-08-04 04:59:56 +00:00
Chris Lattner
cb7489c102
Transition to using let instead of set
...
llvm-svn: 7563
2003-08-04 04:58:12 +00:00
Chris Lattner
796684b8c7
Fix Bug: test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx
...
llvm-svn: 7558
2003-08-04 02:12:48 +00:00
Chris Lattner
fdd6784e1d
Simplify some constant expressions
...
llvm-svn: 7556
2003-08-04 01:04:59 +00:00
Chris Lattner
876353b107
Remove illegal, unsupported escapes. This fixes program: Ptrdist-bc
...
llvm-svn: 7552
2003-08-03 23:42:17 +00:00
Chris Lattner
5dcb654662
* Sort #includes, remove dupliates
...
* Use .zero to emit padding between struct elements
* Emit .comm symbols when we can, this dramatically reduces the amount of gunk we have to print
* Print global variable identifiers next to initializer more nicely.
llvm-svn: 7551
2003-08-03 23:37:09 +00:00
Chris Lattner
0b2c347eac
Specify custom name for registers to get the ()'s in the name.
...
llvm-svn: 7547
2003-08-03 22:12:47 +00:00
Chris Lattner
9c66ed8503
Allow specifying custom names for registers
...
llvm-svn: 7546
2003-08-03 22:12:37 +00:00
Chris Lattner
bb8bdc04a7
Start using tablegen'd instruction enum list
...
llvm-svn: 7542
2003-08-03 21:57:05 +00:00
Chris Lattner
637eebbfc1
Resort tables
...
llvm-svn: 7541
2003-08-03 21:56:36 +00:00
Chris Lattner
df14300577
Lump the base opcode in with the X86 TargetSpecific flags
...
llvm-svn: 7540
2003-08-03 21:56:22 +00:00
Chris Lattner
05e2f385a7
* Start using tablegen'd instruction descriptions
...
* Fix bug in the createNOP method, which was not marking the operands of the
generated XCHG as useanddef. I don't think this method is actually used,
so it wasn't breaking anything, but it should be fixed anyway...
llvm-svn: 7539
2003-08-03 21:55:55 +00:00
Chris Lattner
553f6c1e1d
Start using tablegenerated instruction descriptions
...
llvm-svn: 7538
2003-08-03 21:54:59 +00:00
Chris Lattner
59a4a91703
Add new TableGen instruction definitions
...
llvm-svn: 7537
2003-08-03 21:54:21 +00:00
Chris Lattner
1d4d4f0d8b
Remove the old .def file, it is now obsolete
...
llvm-svn: 7536
2003-08-03 21:54:06 +00:00
Chris Lattner
6c8a40895b
Rearrange fields yet again: Don't instantiate these lists ONCE PER INSTRUCTION.
...
llvm-svn: 7535
2003-08-03 21:52:28 +00:00
Chris Lattner
41a894de77
Simplify code, eliminating the need for the X86 isVoid target instr flag
...
llvm-svn: 7534
2003-08-03 21:51:45 +00:00
Chris Lattner
74e4e9b44f
Set debug types
...
llvm-svn: 7533
2003-08-03 21:47:31 +00:00
Chris Lattner
3663901941
Set debug types
...
llvm-svn: 7532
2003-08-03 21:14:38 +00:00
Chris Lattner
1789d23990
Remove using decl
...
llvm-svn: 7531
2003-08-03 20:24:29 +00:00
Chris Lattner
a8c3cff30f
Add Target class for X86 target
...
llvm-svn: 7523
2003-08-03 18:19:37 +00:00
Chris Lattner
aad0d9c6ef
The RegisterInfo class is obsolete
...
llvm-svn: 7522
2003-08-03 18:18:48 +00:00
Chris Lattner
6a7439fb42
Remove the RegisterInfo class in favor of a general Target class. Add instrinfo stuff
...
llvm-svn: 7521
2003-08-03 18:18:31 +00:00
Chris Lattner
e1453c3afc
Tell CVS to ignore all .inc files
...
llvm-svn: 7513
2003-08-03 15:50:17 +00:00
Chris Lattner
8b31688bb1
Switch over to tablegen generated header files
...
llvm-svn: 7512
2003-08-03 15:48:55 +00:00
Chris Lattner
a4741a94ff
Switch over to TableGen generated register file description
...
llvm-svn: 7511
2003-08-03 15:48:14 +00:00
Chris Lattner
5da8e80c46
Initial checkin of X86.td file
...
llvm-svn: 7510
2003-08-03 15:47:49 +00:00
Chris Lattner
731953bc5c
Initial checkin of X86 Register File description
...
llvm-svn: 7509
2003-08-03 15:47:25 +00:00
Chris Lattner
b6bcc0689c
Fix typeos in comments
...
llvm-svn: 7505
2003-08-03 13:50:14 +00:00
Chris Lattner
58cbc61516
Make it easier to debug by exposing a temporary
...
llvm-svn: 7504
2003-08-03 13:49:25 +00:00
Chris Lattner
6cce665888
Wrap at 80 columns
...
llvm-svn: 7503
2003-08-03 13:49:03 +00:00
Chris Lattner
d20486a0d9
Rename fields
...
llvm-svn: 7498
2003-08-01 22:21:49 +00:00
Chris Lattner
1007f033d4
Move DEBUG to Debug.h
...
llvm-svn: 7497
2003-08-01 22:21:34 +00:00
Chris Lattner
fea54c2511
DEBUG got moved to Debug.h
...
llvm-svn: 7495
2003-08-01 22:19:03 +00:00
Chris Lattner
8fb754a5b9
Move debug functionality to Debug.cpp/Debug.h
...
llvm-svn: 7494
2003-08-01 22:15:41 +00:00
Chris Lattner
f1afe32353
Describe the value name
...
llvm-svn: 7493
2003-08-01 22:15:15 +00:00
Chris Lattner
8abcd56c74
DEBUG got moved to Support/Debug.h
...
llvm-svn: 7492
2003-08-01 22:15:03 +00:00
Chris Lattner
f0c6964470
DEBUG got moved to Debug.h
...
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
802b0e2a6e
Check in the implementation of the FileUtilities!
...
llvm-svn: 7487
2003-08-01 21:16:14 +00:00
Chris Lattner
c0eb77c24c
Remove makefile complexity by always running tablegen with its final output
...
directory.
llvm-svn: 7485
2003-08-01 20:34:56 +00:00
Chris Lattner
238ec53e70
Use the C++, more portable, deleter
...
llvm-svn: 7483
2003-08-01 20:29:18 +00:00
Chris Lattner
958f47b9f7
Move #include from a header to here
...
llvm-svn: 7480
2003-08-01 19:16:29 +00:00
Vikram S. Adve
89f9397668
Add all arithmetic operators to ConstantExprToString().
...
Note that some generated operators (like &, | or ^) may
not be supported by the assembler -- but if they've got
this far, it's better to generate them and let the assembler decide.
llvm-svn: 7476
2003-08-01 15:55:53 +00:00
Vikram S. Adve
16c2b62d13
*Both* operands of divide need sign-extension before divide (if smaller
...
than machine register size), not just the second operand.
llvm-svn: 7475
2003-08-01 15:54:38 +00:00
Vikram S. Adve
36fcc5d8b3
Put back the separate pass to decompose multi-dimensional references
...
since it is *necessary* for correct code generation. Only optional
transformations belong in the PreOpts pass (which needs to be renamed
from PreSelection to PreOpts).
llvm-svn: 7474
2003-08-01 15:53:24 +00:00
Chris Lattner
75c817a482
encode size information into each ValueType
...
Add new RegisterInfo class
llvm-svn: 7469
2003-08-01 05:18:03 +00:00
Chris Lattner
238dadc37c
This method is long dead
...
llvm-svn: 7460
2003-08-01 03:48:42 +00:00
Chris Lattner
c4bbc7109d
Fix the JIT in the Nightly tester. This was not a fun bug to track down.
...
See the comments in the patch for details.
llvm-svn: 7457
2003-07-31 19:38:34 +00:00
Chris Lattner
eaee325932
Trivial cleanups: no need to include header twice. Global variable is local to file
...
llvm-svn: 7456
2003-07-31 19:31:21 +00:00
Chris Lattner
a0e679e299
Remove more obsolete comments
...
llvm-svn: 7455
2003-07-31 17:56:05 +00:00
Misha Brukman
d02051b512
Changed pointer to the JIT code to its current location, under LLI.
...
llvm-svn: 7454
2003-07-31 17:50:35 +00:00
Chris Lattner
9fabe8dddf
Unbreak the CBE output
...
llvm-svn: 7453
2003-07-31 17:47:24 +00:00
Brian Gaeke
a2d9f40693
I think local symbols in X86 GAS have to start with .L, not just
...
.; so I have changed the basic block markers to start with .L. I also
broke up a >80char line.
llvm-svn: 7452
2003-07-31 17:38:52 +00:00
John Criswell
6e264f078a
Modified the code so that it generates (0) for setjmp() and abort() for
...
longjmp() (and does not include setjmp.h).
This is to fix some problems on Sparc while non-local jumps are still
unimplemented.
llvm-svn: 7449
2003-07-31 15:11:08 +00:00
Tanya Lattner
f8c563f76c
*** empty log message ***
...
llvm-svn: 7447
2003-07-31 05:06:09 +00:00
Tanya Lattner
a93c7aeb7e
Added function to determine if an Instruction may trap.
...
llvm-svn: 7442
2003-07-31 04:05:50 +00:00
Chris Lattner
2b3ac6be6a
Add comments
...
Make the register classes optionally take code fragments for allocation_order_*
llvm-svn: 7441
2003-07-30 22:16:41 +00:00
Chris Lattner
a979d4dd27
We no longer need to preprocess SparcV9.td before sending it through tablegen
...
llvm-svn: 7437
2003-07-30 21:00:37 +00:00
Chris Lattner
3a5c2826d5
Fix a bug that brian reported
...
llvm-svn: 7428
2003-07-30 19:04:37 +00:00
Chris Lattner
2da046f055
Add support for "named positional arguments"
...
llvm-svn: 7421
2003-07-30 17:34:02 +00:00
Vikram S. Adve
4f6b98900c
When emitting a constant, check for ConstantExpr before
...
ordinary (primitive) types since ConstantExprs may be of primitive type!
llvm-svn: 7418
2003-07-30 12:54:47 +00:00
Chris Lattner
33a3edad1b
Conform to the new interface for describing target registers... even though
...
it's currently not used.
llvm-svn: 7416
2003-07-30 05:51:34 +00:00
Chris Lattner
e45b699cf6
Add all of the necessary classes to describe the contents of the MRegister.h implementation
...
for a target.
llvm-svn: 7415
2003-07-30 05:50:12 +00:00
Chris Lattner
3f368e3432
Only regenerate the .inc file if IT has changed, not just if the .td files
...
have changed.
llvm-svn: 7414
2003-07-30 05:49:17 +00:00
Chris Lattner
ea6aac412d
Use target specific interface instead of forcing it to be target-generic
...
llvm-svn: 7413
2003-07-30 05:33:48 +00:00
Chris Lattner
8418e36143
No this file is not actually Sparc.td :)
...
llvm-svn: 7405
2003-07-29 23:07:13 +00:00
Chris Lattner
4f94bedfa6
Do not use 'cpp' directly
...
llvm-svn: 7404
2003-07-29 23:04:41 +00:00
Chris Lattner
6a561beb35
Add namespace specifier, add flags used by the X86 BE
...
llvm-svn: 7403
2003-07-29 23:02:49 +00:00
Misha Brukman
0f918540b6
* Cleaned up and corrected comments wrt instruction formats
...
* Enabled STXFSR instructions
llvm-svn: 7400
2003-07-29 21:21:20 +00:00
Misha Brukman
fb8f64a590
Make emitFarCall() public, and add a few comments to functions.
...
llvm-svn: 7399
2003-07-29 20:52:56 +00:00
Vikram S. Adve
e895c2e241
Unify all constant evaluations that depend on register size
...
in ConvertConstantToIntType.
llvm-svn: 7395
2003-07-29 19:59:23 +00:00
Vikram S. Adve
2b630b4ec2
Rename 'dump-asm' to 'dump-input' and really print it just before code-gen.
...
llvm-svn: 7394
2003-07-29 19:58:00 +00:00
Vikram S. Adve
dbc0eb6a2d
Bug fix: don't unnecessarily pretty-print control-characters, some of
...
which were wrong (particularly, '\a' for '\007').
llvm-svn: 7393
2003-07-29 19:57:34 +00:00
Vikram S. Adve
648ce40adf
Add ConvertConstantToIntType() to unify all constant handling
...
that depends on machine register size.
Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall to TargetRegInfo: they are all
machine independent. Remove several dead functions.
llvm-svn: 7392
2003-07-29 19:54:41 +00:00
Vikram S. Adve
2353584afc
Add code to support stack spill/temp offsets that don't fit in the
...
immed. field. Moved insertCallerSavingCode() to PhyRegAlloc: it is
now machine independent. Remove all uses of PhyRegAlloc.
llvm-svn: 7391
2003-07-29 19:53:21 +00:00
Vikram S. Adve
9143f1962e
All constant-evaluation code now unified into
...
TargetInstrInfo::ConvertConstantToIntType().
llvm-svn: 7390
2003-07-29 19:50:12 +00:00
Vikram S. Adve
c9cb319bcb
1. Bug fix: Don't use branch operand reg. as temp. reg. when
...
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).
2. Bug fix: Delete the delay slot instr, not the branch instr, when
moving delay slot instr. out!!!!
3. Move code to insert caller-saves moved here from SparcRegInfo:
it is now machine-independent.
llvm-svn: 7389
2003-07-29 19:49:21 +00:00
Vikram S. Adve
09091ee782
Don't require a BB to look-up live variables, unless they may need to
...
be recomputed.
llvm-svn: 7388
2003-07-29 19:42:32 +00:00
Vikram S. Adve
e2ef34a818
Add const version of getLiveRangeForValue().
...
llvm-svn: 7386
2003-07-29 19:38:22 +00:00
Vikram S. Adve
91e75d87d2
Code to insert caller-saves moved here from SparcRegInfo: it is now
...
machine-independent.
Fix problem with using branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).
llvm-svn: 7385
2003-07-29 19:37:41 +00:00
Misha Brukman
0db560d8f6
* Correctly emit a far call if the target address does not fit into 30 bits
...
instead of assert()ing
* Fixed a nasty bug where '07' was used instead of register 'o7'
llvm-svn: 7382
2003-07-29 19:00:58 +00:00
Misha Brukman
e47f069855
* Stop hard-coding a value for beginning of emitted code on Sparc since we can
...
now handle far calls (i.e., beyond the 30-bit limit in call instructions).
* As a side-effect, this allows us to unify and clean up the mmap() call and
code around it.
llvm-svn: 7381
2003-07-29 16:57:16 +00:00
Chris Lattner
bbc8db5266
Move "register flags" definition the type of registers to be fully fledged
...
value types
llvm-svn: 7377
2003-07-29 05:14:16 +00:00
Chris Lattner
60104f00c7
Add support for Alpha intrinsics, contributed by Rahul Joshi
...
llvm-svn: 7373
2003-07-28 21:20:57 +00:00
Misha Brukman
c0ae1cd93e
Add rationale for the MAP_ANONYMOUS vs. MAP_ANON flags.
...
llvm-svn: 7368
2003-07-28 19:26:19 +00:00
Misha Brukman
3bb53319e8
The RTLD_GLOBAL flag allows symbols to be globally accessible, which makes
...
resolution of symbols in the .so possible (currently assists debugging with
bugpoint).
llvm-svn: 7366
2003-07-28 19:19:58 +00:00
Misha Brukman
057f460053
Add ability for external C code to get pointers to functions given their name.
...
This us used by bugpoint -- when code is compiled to a shared object to be
JITted, it must use the JIT's lazy resolution method to find function addresses,
because some functions will not be available at .so load time, as they are in
the bytecode file.
llvm-svn: 7363
2003-07-28 19:09:06 +00:00
Misha Brukman
ee79899ce5
Clean up code dealing with RTLD_SELF differences on Sparc and X86.
...
llvm-svn: 7362
2003-07-28 19:07:30 +00:00
Misha Brukman
d9a9276fe3
Fix reference to architecture.
...
llvm-svn: 7361
2003-07-28 19:06:50 +00:00
Misha Brukman
c69f4a575c
Add in support to load shared objects (-load is provided by Support library).
...
llvm-svn: 7360
2003-07-28 19:06:19 +00:00
Chris Lattner
ae92d0bba6
Specify the value type for the register, not just the size.
...
llvm-svn: 7357
2003-07-28 04:25:36 +00:00
Chris Lattner
845ed843f1
Instead of specifying the SIZE of the register, go so far as to specify
...
what value type it is.
llvm-svn: 7356
2003-07-28 04:24:59 +00:00
Chris Lattner
a2e2f5cc45
Rename function to be more consistent with filename
...
llvm-svn: 7352
2003-07-26 23:49:58 +00:00
Chris Lattner
0c8de4bfca
Making this code const-correct would be a pain, so I'll hack it.
...
llvm-svn: 7350
2003-07-26 23:29:51 +00:00
Chris Lattner
414832fea6
Const correctness fixes
...
llvm-svn: 7349
2003-07-26 23:24:56 +00:00
Chris Lattner
0ed86aca71
Be const correct
...
llvm-svn: 7348
2003-07-26 23:23:41 +00:00
Chris Lattner
1316383267
Hrm, another necesary one :(
...
llvm-svn: 7347
2003-07-26 23:22:19 +00:00
Chris Lattner
e1b4e68396
We don't modify the LLVM rep, remain const correct
...
llvm-svn: 7345
2003-07-26 23:06:00 +00:00
Chris Lattner
ba21b33499
If the pass changes _anything_ it must return true
...
llvm-svn: 7344
2003-07-26 23:05:37 +00:00
Chris Lattner
99dbdf7391
This code doesn't modify the LLVM structure, keep stuff const
...
llvm-svn: 7343
2003-07-26 23:04:00 +00:00
Chris Lattner
824398ec6d
Remove #include
...
llvm-svn: 7342
2003-07-26 23:01:04 +00:00
Chris Lattner
981e585021
Remove extraneous #includes
...
llvm-svn: 7341
2003-07-26 23:00:29 +00:00
Chris Lattner
1cde34a7ff
Fix another minor bug
...
llvm-svn: 7340
2003-07-26 23:00:05 +00:00
Vikram S. Adve
536b19220c
(1) Major fix to the way unused regs. are marked and found for the FP
...
Single and FP double reg types (which share the same reg class).
Now all methods marking/finding unused regs consider the regType
within the reg class, and SparcFloatRegClass specializes this code.
(2) Remove machine-specific regalloc. methods that are no longer needed.
In particular, arguments and return value from a call do not need
machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
overloading when an include file is omitted.
llvm-svn: 7334
2003-07-25 21:12:15 +00:00
Vikram S. Adve
9b17ad16c4
1. Fix a case that was marking the invalid reg. num. (-1) as used,
...
causing a nasty array bound error later.
2. Fix silly typo causing logical shift of unsigned long to use
SRL instead of SRLX.
llvm-svn: 7330
2003-07-25 21:08:58 +00:00
Vikram S. Adve
45766ab682
(1) Change the way unused regs. are marked and found to consider regType
...
info (since multiple reg types may share the same reg class).
(2) Remove machine-specific regalloc. methods that are no longer needed.
In particular, arguments and return value from a call do not need
machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
overloading when an include file is omitted.
llvm-svn: 7329
2003-07-25 21:06:09 +00:00
Vikram S. Adve
abcd8d75ff
Remove unused field. Change the way unused regs. are marked and
...
found to consider regType info (since multiple reg types may share
the same reg class, e.g., single and double on Sparc).
llvm-svn: 7327
2003-07-25 21:00:13 +00:00
Chris Lattner
d504c33746
Dont' try to parse the colon
...
llvm-svn: 7323
2003-07-25 20:49:29 +00:00
Chris Lattner
39e89fe443
Add a more general check-flags which can be used to ensure arbitrary flags are set
...
llvm-svn: 7322
2003-07-25 20:45:40 +00:00
Brian Gaeke
b0078fabea
Include llvm/Support/Mangler.h first. Don't include <iostream>, <set>,
...
<string>, or llvm/Value.h. Move up the inclusion of llvm/Support/Mangler.h.
llvm-svn: 7321
2003-07-25 20:21:20 +00:00
Brian Gaeke
3d35fad525
Don't include llvm/SlotCalculator.h, or <set>.
...
Move up the inclusion of llvm/Support/Mangler.h.
llvm-svn: 7320
2003-07-25 20:21:06 +00:00
Brian Gaeke
356f3289fe
Cleanups:
...
Mangler.cpp: Constify parameter to makeNameProper, and use const_iterator.
Make Count an unsigned int, and use utostr().
Don't name parameters things that start with underscore.
Mangler.h: All of the above, and also: Add Emacs mode-line. Include <set>.
llvm-svn: 7301
2003-07-24 21:37:57 +00:00
Brian Gaeke
d4dff190a4
Factor out name-mangling from X86/Printer, which is derived from CWriter,
...
into this new support class.
llvm-svn: 7300
2003-07-24 20:20:58 +00:00
Brian Gaeke
46f8b71376
Use unified CWriter-X86/Printer name mangler. Do not bother using
...
SlotCalculator in CWriter. (Unfortunately, all this means a lot of
X86/Printer's methods have to be de-constified again. Oh well.)
llvm-svn: 7299
2003-07-24 20:20:44 +00:00
Chris Lattner
ab780dfab5
Instcombine: (A >> c1) << c2 for signed integers
...
llvm-svn: 7295
2003-07-24 18:38:56 +00:00
Chris Lattner
3204d4ed4e
Reorganization of code, no functional changes.
...
Now it shoudl be a bit more efficient
llvm-svn: 7292
2003-07-24 17:52:58 +00:00
Brian Gaeke
0054c3b5b3
It doesn't appear that we need to #include these.
...
llvm-svn: 7291
2003-07-24 17:48:53 +00:00
Chris Lattner
dfae8be3c9
Allow folding several instructions into casts, which can simplify a lot
...
of codes. For example,
short kernel (short t1) {
t1 >>= 8; t1 <<= 8;
return t1;
}
became:
short %kernel(short %t1.1) {
%tmp.3 = shr short %t1.1, ubyte 8 ; <short> [#uses=1]
%tmp.5 = cast short %tmp.3 to int ; <int> [#uses=1]
%tmp.7 = shl int %tmp.5, ubyte 8 ; <int> [#uses=1]
%tmp.8 = cast int %tmp.7 to short ; <short> [#uses=1]
ret short %tmp.8
}
before, now it becomes:
short %kernel(short %t1.1) {
%tmp.3 = shr short %t1.1, ubyte 8 ; <short> [#uses=1]
%tmp.8 = shl short %tmp.3, ubyte 8 ; <short> [#uses=1]
ret short %tmp.8
}
which will become:
short %kernel(short %t1.1) {
%tmp.3 = and short %t1.1, 0xFF00
ret short %tmp.3
}
This implements cast-set.ll:test4 and test5
llvm-svn: 7290
2003-07-24 17:35:25 +00:00
Chris Lattner
727c03a665
Minor cleanups
...
llvm-svn: 7289
2003-07-24 17:31:56 +00:00
Brian Gaeke
391f69b0ff
Constify most methods. We could have constified doInitialization and
...
doFinalization too except that would have made them shadow, not override,
the parent class :-P.
Allow *any* constant cast expression between pointers and longs,
or vice-versa, or any widening (not just same-size) conversion that
isLosslesslyConvertibleTo approves. This fixes oopack.
llvm-svn: 7288
2003-07-24 17:30:45 +00:00
Chris Lattner
e9340228c9
Fix bug: FunctionResolve/2003-07-23-CPR-Reference.ll
...
This fixes a long time annoyance which caused prototypes for bzero, bcopy,
bcmp, fputs, and fputs_unlocked to never get deleted. Grr.
llvm-svn: 7285
2003-07-23 22:03:18 +00:00
Chris Lattner
bfb1d03159
Add comments
...
llvm-svn: 7283
2003-07-23 21:41:57 +00:00
Chris Lattner
9763859e8d
Remove explicit check for: not (not X) = X, it is already handled because xor is commutative
...
- InstCombine: (X & C1) ^ C2 --> (X & C1) | C2 iff (C1&C2) == 0
- InstCombine: (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2
llvm-svn: 7282
2003-07-23 21:37:07 +00:00
Chris Lattner
bbc2bc1790
Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBE
...
llvm-svn: 7276
2003-07-23 20:45:31 +00:00
Brian Gaeke
a92dce471b
Printer.cpp: Ditch addRequired/getAnalysis, because they leave
...
Printer::doFinalization() out in the cold. Now we pass in a TargetMachine
to Printer's constructor and get the TargetData from the TargetMachine.
Don't pass TargetMachine or MRegisterInfo objects around in the Printer.
Constify TargetData references.
X86.h: Update comment and prototype of createX86CodePrinterPass().
X86TargetMachine.cpp: Update callers of createX86CodePrinterPass().
llvm-svn: 7275
2003-07-23 20:25:08 +00:00
Chris Lattner
4b4dacd838
Make Module::getNamedFunction prefer non-external functions if there is more than
...
one function of the same name
llvm-svn: 7274
2003-07-23 20:21:30 +00:00
Chris Lattner
1442020798
Fix space
...
llvm-svn: 7273
2003-07-23 20:21:06 +00:00
Chris Lattner
33217db4d9
InstCombine: (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0
...
llvm-svn: 7272
2003-07-23 19:36:21 +00:00
Chris Lattner
16464b36ff
- InstCombine: (X | C1) & C2 --> X & C2 iff C1 & C1 == 0
...
- InstCombine: (X | C) & C --> C
- InstCombine: (X | C1) & C2 --> (X | (C1&C2)) & C2
llvm-svn: 7269
2003-07-23 19:25:52 +00:00
Brian Gaeke
c3998cb090
Add, rewrite, and/or reformat many comments.
...
Stop passing ostreams around: we already have one perfectly good ostream
and we can all share it.
Stop stashing a pointer to TargetData in the Pass object, because that will
lead to a crash if there are no functions in the module (ouch!) Instead,
use addRequired() and getAnalysis(), like we always should have done.
Move the check for ConstantExpr up before the check for isPrimitiveType,
because we need to be able to catch e.g. ubyte (cast bool false to ubyte),
whose type is primitive but which is nevertheless a ConstantExpr, by calling
our specialized handler instead of the AsmWriter. This would result in
assembler errors when we would try to output something like ".byte (cast
bool false to ubyte)".
GC some unused variable declarations.
llvm-svn: 7265
2003-07-23 18:37:06 +00:00
Chris Lattner
8f0d15601a
IC: (X & C1) | C2 --> (X | C2) & (C1|C2)
...
IC: (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2)
We are now guaranteed that all 'or's will be inside of 'and's, and all 'and's
will be inside of 'xor's, if the second operands are constants.
llvm-svn: 7264
2003-07-23 18:29:44 +00:00
Chris Lattner
49b47ae565
IC: (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)
...
Minor code cleanup
llvm-svn: 7262
2003-07-23 17:57:01 +00:00
Chris Lattner
cfbce7c880
InstCombine: (X ^ 4) == 8 --> X == 12
...
llvm-svn: 7260
2003-07-23 17:26:36 +00:00
Chris Lattner
d492a0b7b4
IC: (X & 5) == 13 --> false
...
IC: (X | 8) == 4 --> false
llvm-svn: 7257
2003-07-23 17:02:11 +00:00
Chris Lattner
625eef3e41
Remove redundant const qualifier
...
llvm-svn: 7254
2003-07-23 15:30:32 +00:00
Chris Lattner
f26a8ee580
Remove redundant const qualifiers from cast<> expressions
...
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
6077c3195f
Simplify code by using ConstantInt::getRawValue instead of checking to see
...
whether the constant is signed or unsigned, then casting
llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Chris Lattner
79f22fe02f
Remove unnecessary casts
...
llvm-svn: 7250
2003-07-23 15:17:51 +00:00
Chris Lattner
3bc9b251b9
Fit code into 80 columns
...
llvm-svn: 7249
2003-07-23 15:17:01 +00:00
Chris Lattner
23801c571e
Eliminate old-style cast
...
llvm-svn: 7248
2003-07-23 15:16:40 +00:00
Chris Lattner
b976da9ecf
Random cleanups
...
llvm-svn: 7247
2003-07-23 14:59:40 +00:00
Chris Lattner
0470412961
Remove using decl
...
llvm-svn: 7246
2003-07-23 14:55:59 +00:00
Chris Lattner
c5372125b9
Remove explicit const qualifiers
...
llvm-svn: 7245
2003-07-23 14:54:33 +00:00
Chris Lattner
d78ebd0c6b
Fix bug: TailDup/2003-07-22-InfiniteLoop.ll
...
llvm-svn: 7243
2003-07-23 03:32:41 +00:00
Chris Lattner
bdb0ce0605
- InstCombine (cast (xor A, B) to bool) ==> (setne A, B)
...
- InstCombine (cast (and X, (1 << size(X)-1)) to bool) ==> x < 0
llvm-svn: 7241
2003-07-22 21:46:59 +00:00
Vikram S. Adve
eb04c29378
Fix comment.
...
llvm-svn: 7227
2003-07-22 12:08:58 +00:00
Chris Lattner
c783297812
Simplify code a bit
...
llvm-svn: 7217
2003-07-21 19:56:49 +00:00
John Criswell
d6dcbc6ce8
Added code that checks to see if a global variable is external before replacing
...
a load of the global variable with the variable's constant value.
llvm-svn: 7216
2003-07-21 19:42:57 +00:00