Chris Lattner
9fed5b6122
Add support for output memory constraints.
...
llvm-svn: 26410
2006-02-27 23:45:39 +00:00
Jim Laskey
6d5c2a0156
Qualify dwarf namespace inside llvm namespace.
...
llvm-svn: 26409
2006-02-27 22:37:23 +00:00
Nate Begeman
f918ed2e33
readme updates
...
llvm-svn: 26405
2006-02-27 22:08:36 +00:00
Jim Laskey
bc7a3832e8
Partial enabling of functions.
...
llvm-svn: 26404
2006-02-27 20:37:42 +00:00
Chris Lattner
ec185f7843
Don't print constant initializers, they may span lines now.
...
llvm-svn: 26403
2006-02-27 20:09:23 +00:00
Jim Laskey
72b66d6d8a
Supporting multiple compile units.
...
llvm-svn: 26402
2006-02-27 17:27:12 +00:00
Jim Laskey
22e47b9f4e
Re-orging file.
...
llvm-svn: 26401
2006-02-27 12:43:29 +00:00
Jim Laskey
6be3d8e0df
Pretty print large struct constants.
...
llvm-svn: 26400
2006-02-27 10:33:53 +00:00
Jim Laskey
8f2c1021b4
Removed dependency on how operands are printed (want multi-line.)
...
llvm-svn: 26399
2006-02-27 10:29:04 +00:00
Chris Lattner
d87ea46887
Use -emit-llvm -S to get .ll file output from llvm-gcc
...
llvm-svn: 26397
2006-02-27 05:39:00 +00:00
Chris Lattner
c7bfed0f7b
Merge two almost-identical pieces of code.
...
Make this code more powerful by using ComputeMaskedBits instead of looking
for an AND operand. This lets us fold this:
int %test23(int %a) {
%tmp.1 = and int %a, 1
%tmp.2 = seteq int %tmp.1, 0
%tmp.3 = cast bool %tmp.2 to int ;; xor tmp1, 1
ret int %tmp.3
}
into: xor (and a, 1), 1
llvm-svn: 26396
2006-02-27 02:38:23 +00:00
Chris Lattner
a8bd74d5d0
new testcases
...
llvm-svn: 26395
2006-02-27 02:36:19 +00:00
Chris Lattner
f5c8a0b83f
Fold (A^B) == A -> B == 0
...
and (A-B) == A -> B == 0
llvm-svn: 26394
2006-02-27 01:44:11 +00:00
Chris Lattner
7422e470f3
New testcases
...
llvm-svn: 26393
2006-02-27 01:43:02 +00:00
Chris Lattner
ab8164042a
Implement bit propagation through sub nodes, this (re)implements
...
PowerPC/div-2.ll
llvm-svn: 26392
2006-02-27 01:00:42 +00:00
Chris Lattner
3af2da1f3d
Reenable this
...
llvm-svn: 26391
2006-02-27 01:00:12 +00:00
Chris Lattner
47ee42829d
remove some completed notes
...
llvm-svn: 26390
2006-02-27 00:39:31 +00:00
Chris Lattner
a60751dd43
Check RHS simplification before LHS simplification to avoid infinitely looping
...
on PowerPC/small-arguments.ll
llvm-svn: 26389
2006-02-27 00:36:27 +00:00
Chris Lattner
27220f8958
Just like we use the RHS of an AND to simplify the LHS, use the LHS to
...
simplify the RHS. This allows for the elimination of many thousands of
ands from multisource, and compiles CodeGen/PowerPC/and-elim.ll:test2
into this:
_test2:
srwi r2, r3, 1
xori r3, r2, 40961
blr
instead of this:
_test2:
rlwinm r2, r3, 31, 17, 31
xori r2, r2, 40961
rlwinm r3, r2, 0, 16, 31
blr
llvm-svn: 26388
2006-02-27 00:22:28 +00:00
Chris Lattner
255ab33177
new testcase
...
llvm-svn: 26387
2006-02-27 00:20:23 +00:00
Chris Lattner
118ddba929
Add a bunch of missed cases. Perhaps the most significant of which is that
...
assertzext produces zero bits.
llvm-svn: 26386
2006-02-26 23:36:02 +00:00
Chris Lattner
f78df7c14d
Fold (X|C1)^C2 -> X^(C1|C2) when possible. This implements
...
InstCombine/or.ll:test23.
llvm-svn: 26385
2006-02-26 19:57:54 +00:00
Chris Lattner
69c68c3c3e
new testcase
...
llvm-svn: 26384
2006-02-26 19:55:30 +00:00
Jim Laskey
702c1d11b5
Reverting. Didn't realize some developers were embedding constants in their
...
target assembler code gen.
llvm-svn: 26383
2006-02-26 10:16:05 +00:00
Evan Cheng
877ab55e06
ConstantPoolIndex is now the displacement portion of the address (rather
...
than base).
llvm-svn: 26382
2006-02-26 09:12:34 +00:00
Evan Cheng
9f9662b86e
Print ConstantPoolSDNode offset field.
...
llvm-svn: 26381
2006-02-26 08:36:57 +00:00
Evan Cheng
75b8783aaf
Fixed ConstantPoolIndex operand asm print bug. This fixed 2005-07-17-INT-To-FP
...
and 2005-05-12-Int64ToFP.
llvm-svn: 26380
2006-02-26 08:28:12 +00:00
Jim Laskey
3bb7874dd3
Format large struct constants for readability.
...
llvm-svn: 26379
2006-02-25 12:27:03 +00:00
Evan Cheng
74de65aacd
New test case: use lea for imul by some constants.
...
llvm-svn: 26378
2006-02-25 10:16:10 +00:00
Evan Cheng
5c1e1ca29f
lea.ll is XFAIL until we implement convertToThreeAddress.
...
llvm-svn: 26377
2006-02-25 10:15:22 +00:00
Evan Cheng
77d86ff8fc
* Cleaned up addressing mode matching code.
...
* Cleaned up and tweaked LEA cost analysis code. Removed some hacks.
* Handle ADD $X, c to MOV32ri $X+c. These patterns cannot be autogen'd and
they need to be matched before LEA.
llvm-svn: 26376
2006-02-25 10:09:08 +00:00
Evan Cheng
1c557bfeb5
Updates.
...
llvm-svn: 26375
2006-02-25 10:04:07 +00:00
Evan Cheng
1fac3b3360
* Allow mul, shl nodes to be codegen'd as LEA (if appropriate).
...
* Add patterns to handle GlobalAddress, ConstantPool, etc.
MOV32ri to materialize these nodes in registers.
ADD32ri to handle %reg + GA, etc.
MOV32mi to handle store GA, etc. to memory.
llvm-svn: 26374
2006-02-25 10:02:21 +00:00
Evan Cheng
e4a8b74e4f
ConstantPoolIndex is now the displacement field of addressing mode.
...
llvm-svn: 26373
2006-02-25 09:56:50 +00:00
Evan Cheng
994700101e
Added a common about the need for X86ISD::Wrapper.
...
llvm-svn: 26372
2006-02-25 09:55:19 +00:00
Evan Cheng
ed169db8a5
Added an offset field to ConstantPoolSDNode.
...
llvm-svn: 26371
2006-02-25 09:54:52 +00:00
Chris Lattner
b8d9667087
this fails, mark it as such
...
llvm-svn: 26370
2006-02-25 08:18:43 +00:00
Chris Lattner
7d01f95a57
Fix a bug that Evan exposed with some changes he's making, and that was
...
exposed with a fastcc problem (breaking pcompress2 on x86 with -enable-x86-fastcc).
When reloading a reused reg, make sure to invalidate the reloaded reg, and
check to see if there are any other pending uses of the same register.
llvm-svn: 26369
2006-02-25 02:17:31 +00:00
Chris Lattner
28a0b8bec7
Remove debugging printout :)
...
Add a minor compile time win, no codegen change.
llvm-svn: 26368
2006-02-25 02:03:40 +00:00
Chris Lattner
525522e429
Refactor some code from being inline to being out in a new class with methods.
...
This gets rid of two gotos, which is always nice, and also adds some comments.
No functionality change, this is just a refactor.
llvm-svn: 26367
2006-02-25 01:51:33 +00:00
Evan Cheng
42d5ac557c
Fix an obvious bug exposed when we are doing
...
ADD X, 4
==>
MOV32ri $X+4, ...
llvm-svn: 26366
2006-02-25 01:37:02 +00:00
Chris Lattner
7674d90fa1
Add memory printing support for PPC. Input memory operands now work with
...
inline asms! :)
llvm-svn: 26365
2006-02-24 20:27:40 +00:00
Chris Lattner
1d08c6534c
Use the PrintAsmMemoryOperand to print addressing modes.
...
llvm-svn: 26364
2006-02-24 20:21:58 +00:00
Chris Lattner
d0dadd73a4
Add a PrintAsmMemoryOperand method for printing addresses
...
llvm-svn: 26363
2006-02-24 20:21:12 +00:00
Chris Lattner
5af3fdec12
Pass all the flags to the asm printer, not just the # operands.
...
llvm-svn: 26362
2006-02-24 19:50:58 +00:00
Chris Lattner
2f8a794b13
rename NumOps -> NumVals to avoid shadowing a NumOps var in an outer scope.
...
Add support for addressing modes.
llvm-svn: 26361
2006-02-24 19:18:20 +00:00
Chris Lattner
86c51000db
Refactor operand adding out to a new AddOperand method
...
llvm-svn: 26358
2006-02-24 18:54:03 +00:00
Chris Lattner
bbc861543f
add a method
...
llvm-svn: 26357
2006-02-24 18:53:51 +00:00
Chris Lattner
b580d26e7d
Fix a problem that Nate noticed that boils down to an over conservative check
...
in the code that does "select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y)))".
We now compile this loop:
LBB1_1: ; no_exit
add r6, r2, r3
subf r3, r2, r3
cmpwi cr0, r2, 0
addi r7, r5, 4
lwz r2, 0(r5)
addi r4, r4, 1
blt cr0, LBB1_4 ; no_exit
LBB1_3: ; no_exit
mr r3, r6
LBB1_4: ; no_exit
cmpwi cr0, r4, 16
mr r5, r7
bne cr0, LBB1_1 ; no_exit
into this instead:
LBB1_1: ; no_exit
srawi r6, r2, 31
add r2, r2, r6
xor r6, r2, r6
addi r7, r5, 4
lwz r2, 0(r5)
addi r4, r4, 1
add r3, r3, r6
cmpwi cr0, r4, 16
mr r5, r7
bne cr0, LBB1_1 ; no_exit
llvm-svn: 26356
2006-02-24 18:05:58 +00:00
Jim Laskey
723d3e0746
Add pointer and reference types. Added short-term code to ignore NULL types
...
(to allow llvm-gcc4 to build.)
llvm-svn: 26355
2006-02-24 16:46:40 +00:00
Jeff Cohen
83c22e0d75
Get VC++ building again.
...
llvm-svn: 26351
2006-02-24 02:52:40 +00:00
Chris Lattner
dcf785bf46
Implement (most of) selection of inline asm memory operands.
...
llvm-svn: 26350
2006-02-24 02:13:54 +00:00
Chris Lattner
dc445eadc0
Select inline asm memory operands.
...
llvm-svn: 26349
2006-02-24 02:13:31 +00:00
Chris Lattner
a1ec1ddd59
Implement selection of inline asm memory operands
...
llvm-svn: 26348
2006-02-24 02:13:12 +00:00
Chris Lattner
ca3341cac6
Add some hooks for selecting memory addresses.
...
llvm-svn: 26347
2006-02-24 02:12:52 +00:00
Chris Lattner
7ef7a64ebb
Lower C_Memory operands.
...
llvm-svn: 26346
2006-02-24 01:11:24 +00:00
Chris Lattner
2a9e1e3e74
Recognize memory operand codes
...
llvm-svn: 26345
2006-02-24 01:10:46 +00:00
Chris Lattner
db3689ed09
Add C_Memory operand type
...
llvm-svn: 26344
2006-02-24 01:10:14 +00:00
Chris Lattner
de5a9f4517
Parse the %*# constraint modifiers
...
llvm-svn: 26341
2006-02-23 23:36:53 +00:00
Chris Lattner
f75c0e50fe
add a new flag
...
llvm-svn: 26340
2006-02-23 23:36:23 +00:00
Jim Laskey
e5386d4d98
Added basic support for typedefs.
...
llvm-svn: 26339
2006-02-23 22:37:30 +00:00
Evan Cheng
0ed48fe601
PPC JIT relocation model should be DynamicNoPIC.
...
llvm-svn: 26338
2006-02-23 22:18:07 +00:00
Evan Cheng
e0ed6ec13f
- Clean up the lowering and selection code of ConstantPool, GlobalAddress,
...
and ExternalSymbol.
- Use C++ code (rather than tblgen'd selection code) to match the above
mentioned leaf nodes. Do not mutate and nodes and do not record the
selection in CodeGenMap. These nodes should be safe to duplicate. This is
a performance win.
llvm-svn: 26335
2006-02-23 20:41:18 +00:00
Chris Lattner
e7c0ffb3a0
Fix an endianness problem on big-endian targets with expanded operands
...
to inline asms. Mark some methods const.
llvm-svn: 26334
2006-02-23 20:06:57 +00:00
Chris Lattner
1bad2546d0
Implement the PPC inline asm "L" modifier. This allows us to compile:
...
long long test(long long X) {
__asm__("foo %0 %L0 %1 %L1" : "=r"(X): "r"(X));
return X;
}
to:
foo r2 r3 r2 r3
llvm-svn: 26333
2006-02-23 19:31:10 +00:00
Chris Lattner
571d9647c6
Record all of the expanded registers in the DAG and machine instr, fixing
...
several bugs in inline asm expanded operands.
llvm-svn: 26332
2006-02-23 19:21:04 +00:00
Jim Laskey
69b9e26186
DwarfWriter reading basic type information from llvm-gcc4 code.
...
llvm-svn: 26331
2006-02-23 16:58:18 +00:00
Chris Lattner
47b8bb0ca0
Match the case of other mailing lists in the list
...
llvm-svn: 26330
2006-02-23 16:18:29 +00:00
Chris Lattner
411f0df031
document the llvm-testresults list
...
llvm-svn: 26329
2006-02-23 16:14:22 +00:00
Chris Lattner
2988921dc4
Code cleanups, no functionality change
...
llvm-svn: 26328
2006-02-23 06:44:17 +00:00
Chris Lattner
16f08f53b1
"." isn't enough to get a private label on linux, use ".L".
...
llvm-svn: 26327
2006-02-23 05:25:02 +00:00
Chris Lattner
2bacf981bf
add a small and simple case.
...
llvm-svn: 26326
2006-02-23 05:17:43 +00:00
Evan Cheng
f4448cee66
A couple of new entries.
...
llvm-svn: 26325
2006-02-23 02:50:21 +00:00
Evan Cheng
1f342c2884
PIC related bug fixes.
...
1. Various asm printer bug.
2. Lowering bug. Now TargetGlobalAddress is wrapped in X86ISD::TGAWrapper.
llvm-svn: 26324
2006-02-23 02:43:52 +00:00
Evan Cheng
7eabbfd618
X86 codegen tweak to use lea in another case:
...
Suppose base == %eax and it has multiple uses, then instead of
movl %eax, %ecx
addl $8, %ecx
use
leal 8(%eax), %ecx.
llvm-svn: 26323
2006-02-23 00:13:58 +00:00
Evan Cheng
94d5466fa1
Add a test case for 'lea'.
...
llvm-svn: 26322
2006-02-23 00:12:12 +00:00
Evan Cheng
7714a59d91
Missing .globl for weak / link-once .text symbols.
...
llvm-svn: 26321
2006-02-22 23:59:57 +00:00
Chris Lattner
e5521db5bc
Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which
...
caused SPASS to fail building last night.
We can't trivially unswitch a loop if the exit block has phi nodes in it,
because we don't know which predecessor to use.
llvm-svn: 26320
2006-02-22 23:55:00 +00:00
Chris Lattner
a61d2e8878
new testcase distilled from SPASS
...
llvm-svn: 26319
2006-02-22 23:54:15 +00:00
Chris Lattner
b1124f3c76
This fixes a couple of problems with expansion
...
llvm-svn: 26318
2006-02-22 23:09:03 +00:00
Chris Lattner
2e124af406
Don't return registers from register classes that aren't legal.
...
llvm-svn: 26317
2006-02-22 23:00:51 +00:00
Chris Lattner
6f87d18be9
Change a whole bunch of code to be built around RegsForValue instead of
...
a single register number. This fully implements promotion for inline asms,
expand is close but not quite right yet.
llvm-svn: 26316
2006-02-22 22:37:12 +00:00
Evan Cheng
73136dfecc
- Added option -relocation-model to set relocation model. Valid values include static, pic,
...
dynamic-no-pic, and default.
PPC and x86 default is dynamic-no-pic for Darwin, pic for others.
- Removed options -enable-pic and -ppc-static.
llvm-svn: 26315
2006-02-22 20:19:42 +00:00
Jim Laskey
2fa33a989d
Coordinate activities with llvm-gcc4 and dwarf.
...
llvm-svn: 26314
2006-02-22 19:02:11 +00:00
Chris Lattner
50e2638ee7
Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean.
...
Patch by Martin Partel!
llvm-svn: 26313
2006-02-22 16:23:43 +00:00
Chris Lattner
8bd3e91fa2
Turn on loop unswitching tonight
...
llvm-svn: 26312
2006-02-22 07:33:49 +00:00
Chris Lattner
8a5a324dac
Add some comments, simplify some code, and fix a bug that caused rewriting
...
to rewrite with the wrong value.
llvm-svn: 26311
2006-02-22 06:37:14 +00:00
Evan Cheng
9e252e3bcf
Added MMX, SSE1, and SSE2 vector instructions and some simple patterns.
...
Fixed some existing bugs (wrong predicates, prefixes) at the same time.
llvm-svn: 26310
2006-02-22 02:26:30 +00:00
Chris Lattner
02f92a88b6
reorder some libraries
...
llvm-svn: 26309
2006-02-22 00:59:06 +00:00
Chris Lattner
7ad77dfc2a
split register class handling from explicit physreg handling.
...
llvm-svn: 26308
2006-02-22 00:56:39 +00:00
Chris Lattner
cd78df1e85
expose the set of values types holdable in a regclass to clients
...
llvm-svn: 26307
2006-02-21 23:51:58 +00:00
Chris Lattner
5c79f98f15
Adjust to changes in getRegForInlineAsmConstraint prototype
...
llvm-svn: 26306
2006-02-21 23:12:12 +00:00
Chris Lattner
7bb4696dc3
Updates to match change of getRegForInlineAsmConstraint prototype
...
llvm-svn: 26305
2006-02-21 23:11:00 +00:00
Chris Lattner
ebb7489537
Pass in a value type to getRegForInlineAsmConstraint, allowing targets to
...
select different sets of registers depending on the type requested.
llvm-svn: 26304
2006-02-21 23:10:29 +00:00
Evan Cheng
d58478161f
One more round of reorg so sabre doesn't freak out. :-)
...
llvm-svn: 26303
2006-02-21 20:00:20 +00:00
Evan Cheng
6fc1162855
A big more cleaning up.
...
llvm-svn: 26302
2006-02-21 19:30:30 +00:00
Evan Cheng
8711b6bff3
Moving things to their proper places.
...
llvm-svn: 26301
2006-02-21 19:26:52 +00:00
Evan Cheng
6e595b9fd8
Split instruction info into multiple files, one for each of x87, MMX, and SSE.
...
llvm-svn: 26300
2006-02-21 19:13:53 +00:00
Chris Lattner
0a08f44704
missed optzn
...
llvm-svn: 26299
2006-02-21 18:29:44 +00:00
Chris Lattner
747cf60696
The HasNoV9 hack isn't needed here, now that tblgen knows that CustomDAGSchedInserter
...
instructions are expensive.
llvm-svn: 26298
2006-02-21 18:04:32 +00:00
Evan Cheng
d57203c0a1
Added separate alias instructions for SSE logical ops that operate on non-packed types.
...
llvm-svn: 26297
2006-02-21 02:24:38 +00:00
Evan Cheng
afffe63fc1
Added MMX and XMM packed integer move instructions, movd and movq.
...
llvm-svn: 26296
2006-02-21 01:39:57 +00:00
Evan Cheng
fa57a0add9
Added SSE2 128-bit integer packed types: V16I8, V8I16, V4I32, and V2I64.
...
Added generic vector types: VR64 and VR128.
llvm-svn: 26295
2006-02-21 01:38:21 +00:00
Evan Cheng
43070b7541
Added x86 integer vector types: 64-bit packed byte integer (v16i8), 64-bit
...
packed word integer (v8i16), and 64-bit packed doubleword integer (v2i32).
llvm-svn: 26294
2006-02-20 22:34:53 +00:00
Evan Cheng
4547400ae2
Some updates
...
llvm-svn: 26292
2006-02-20 19:58:27 +00:00
Chris Lattner
301f45cf6f
Fix a problem Nate and Duraid reported where simplifying nodes can cause
...
them to get ressurected, in which case, deleting the undead nodes is
unfriendly.
llvm-svn: 26291
2006-02-20 06:51:04 +00:00
Chris Lattner
486d1bc5ed
Fix a problem on itanium with memset. The value to set has been promoted to
...
i64 before this code, so zero_ext doesn't work.
llvm-svn: 26290
2006-02-20 06:38:35 +00:00
Chris Lattner
c2e3a7a4ce
improved support for branch folding, still not enabled.
...
llvm-svn: 26289
2006-02-18 07:57:38 +00:00
Evan Cheng
d13778eb30
If SSE3 is available, promote FP_TO_UINT i32 to FP_TO_SINT i64 to take
...
advantage of fisttpll.
llvm-svn: 26288
2006-02-18 07:26:17 +00:00
Jeff Cohen
0add83e969
Fix bugs identified by VC++.
...
llvm-svn: 26287
2006-02-18 03:20:33 +00:00
Nate Begeman
983ca89714
Add a fold for add that exchanges it with a constant shift if possible, so
...
that the shift may be more easily folded into other operations.
llvm-svn: 26286
2006-02-18 02:43:25 +00:00
Chris Lattner
19fa8ac938
Implement deletion of dead blocks, currently disabled.
...
llvm-svn: 26285
2006-02-18 02:42:34 +00:00
Nate Begeman
abac61603f
Add checks to make sure we don't create bogus extend nodes, and fix a bug
...
where we were doing exactly that which was causing failures on x86 and
alpha.
llvm-svn: 26284
2006-02-18 02:40:58 +00:00
Evan Cheng
70af620709
Added fisttp for fp to int conversion.
...
llvm-svn: 26283
2006-02-18 02:36:28 +00:00
Evan Cheng
33f4156663
Bump up pattern cost if the resulting instruction is marked
...
usesCustomDAGSchedInserter.
llvm-svn: 26282
2006-02-18 02:33:09 +00:00
Evan Cheng
06c2e6d1b3
Disable PIC for JIT.
...
llvm-svn: 26281
2006-02-18 01:49:25 +00:00
Chris Lattner
cb853de534
a previous patch completely disabled trivial unswitching, this fixees it.
...
Thanks to nate for pointing this out :)
llvm-svn: 26280
2006-02-18 01:32:04 +00:00
Chris Lattner
29f771ba21
initial trivial support for folding branches that have now-constant destinations.
...
llvm-svn: 26279
2006-02-18 01:27:45 +00:00
Evan Cheng
5caed8a231
Jit does not support PIC yet.
...
llvm-svn: 26278
2006-02-18 00:57:10 +00:00
Chris Lattner
8e44ff50b0
When unswitching a loop, make sure to update loop info with exit blocks in
...
the right loop.
llvm-svn: 26277
2006-02-18 00:55:32 +00:00
Chris Lattner
d95665188b
Fix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll
...
llvm-svn: 26275
2006-02-18 00:33:17 +00:00
Chris Lattner
88b8e3bb71
new testcase that crashes simplifycfg
...
llvm-svn: 26274
2006-02-18 00:32:44 +00:00
Evan Cheng
5588de9415
x86 / Darwin PIC support.
...
llvm-svn: 26273
2006-02-18 00:15:05 +00:00
Evan Cheng
5f99760ae7
Moved PICEnabled to include/llvm/Target/TargetOptions.h
...
llvm-svn: 26272
2006-02-18 00:08:58 +00:00
Evan Cheng
94a8bd4290
Move PICEnabled declaration here.
...
llvm-svn: 26271
2006-02-18 00:06:03 +00:00
Chris Lattner
375e1a71cc
Fix a tricky issue in the SimplifyDemandedBits code where CombineTo wasn't
...
exactly the API we wanted to call into. This fixes the crash on crafty last
night.
llvm-svn: 26269
2006-02-17 21:58:01 +00:00
Chris Lattner
4a717bbbfb
add a new method
...
llvm-svn: 26268
2006-02-17 21:57:00 +00:00
Nate Begeman
8d0e47a017
A few final (for now) tests
...
llvm-svn: 26267
2006-02-17 21:38:45 +00:00
Nate Begeman
6aee554aa1
Yet another test
...
llvm-svn: 26266
2006-02-17 21:32:46 +00:00
Nate Begeman
5e176da364
New tests!
...
llvm-svn: 26265
2006-02-17 21:22:08 +00:00
Robert Bocchino
820bc75b8b
Added documentation for vset and vselect.
...
llvm-svn: 26264
2006-02-17 21:18:08 +00:00
Nate Begeman
fb5dbadf15
Clean up DemandedBitsAreZero interface
...
Make more use of the new mask helpers in valuetypes.h
Combine (sra (srl x, c1), c1) -> sext_inreg if legal
llvm-svn: 26263
2006-02-17 19:54:08 +00:00
Nate Begeman
1d7d611ba4
Fix a nit sabre noticed
...
llvm-svn: 26262
2006-02-17 18:06:19 +00:00
Nate Begeman
57b3567552
Don't expand sdiv by power of two before legalize, since it will likely
...
generate illegal nodes.
llvm-svn: 26261
2006-02-17 07:26:20 +00:00
Chris Lattner
07a2677e43
unbreak the build
...
llvm-svn: 26260
2006-02-17 07:09:27 +00:00
Evan Cheng
593bea73ba
Unbreak x86 be
...
llvm-svn: 26259
2006-02-17 07:01:52 +00:00
Chris Lattner
baddba41c7
Fix loops where the header has an exit, fixing a loop-unswitch crash on crafty
...
llvm-svn: 26258
2006-02-17 06:39:56 +00:00
Nate Begeman
42c9e4df6f
Fix a comment sabre noticed :)
...
llvm-svn: 26257
2006-02-17 06:24:31 +00:00
Nate Begeman
669ad7ea19
A couple new regression tests to make sure we always pattern match the new
...
opcodes on ppc.
llvm-svn: 26256
2006-02-17 06:16:56 +00:00
Nate Begeman
5965bd19f8
kill ADD_PARTS & SUB_PARTS and replace them with fancy new ADDC, ADDE, SUBC
...
and SUBE nodes that actually expose what's going on and allow for
significant simplifications in the targets.
llvm-svn: 26255
2006-02-17 05:43:56 +00:00
Chris Lattner
9ec392b2aa
Fix another miscompilation exposed by lencode, where we lowered i64->f32
...
conversions to __floatdidf instead of __floatdisf on targets that support
f32 but not i64 (e.g. sparc).
llvm-svn: 26254
2006-02-17 04:32:33 +00:00
Chris Lattner
67c21b6c46
add note about div by power of 2
...
llvm-svn: 26253
2006-02-17 04:20:13 +00:00
Jeff Cohen
0d62ebd13f
Fix bug noticed by VC++.
...
llvm-svn: 26252
2006-02-17 02:12:18 +00:00
Jeff Cohen
ac8b761b62
Inform Visual Studio of deleted file.
...
llvm-svn: 26251
2006-02-17 02:11:34 +00:00
Nate Begeman
3920ce4d8d
Whoops, didn't mean to check this in yet.
...
llvm-svn: 26250
2006-02-17 00:56:19 +00:00
Nate Begeman
4a0dc0c8f6
Add a missing and useful pat frag
...
llvm-svn: 26249
2006-02-17 00:51:06 +00:00
Chris Lattner
6fd136239b
start of some new simplification code, not thoroughly tested, use at your own
...
risk :)
llvm-svn: 26248
2006-02-17 00:31:07 +00:00
Evan Cheng
b590d3a72b
Remind ourselves to revisit the "pxor vs. xorps/xorpd to clear XMM registers"
...
issue. Need to do more experiments.
llvm-svn: 26247
2006-02-17 00:04:28 +00:00
Nate Begeman
7e5496d5fe
Kill the x86 pattern isel. boom.
...
llvm-svn: 26246
2006-02-17 00:03:04 +00:00
Evan Cheng
db1dbbe8d6
Remove the entry about using movapd for SSE reg-reg moves.
...
llvm-svn: 26245
2006-02-17 00:00:58 +00:00
Evan Cheng
eb7b3380fd
pxor (for FLD0SS) encoding was missing the OpSize prefix.
...
llvm-svn: 26244
2006-02-16 23:59:30 +00:00
Chris Lattner
936cc9fe53
Remove the skeleton target, it doesn't produce useful code and there are
...
other small targets that do that can be learned from. They also have
the added advantage of being tested :)
llvm-svn: 26243
2006-02-16 23:14:50 +00:00
Evan Cheng
c3dcf5a4d7
Dumb bug. Code sees a memcpy from X+c so it increments src offset. But it
...
turns out not to point to a constant string but it forgot change the offset
back.
llvm-svn: 26242
2006-02-16 23:11:42 +00:00
Evan Cheng
24c461b51e
1. Use pxor instead of xoraps / xorapd to clear FR32 / FR64 registers. This
...
proves to be worth 20% on Ptrdist/ks. Might be related to dependency
breaking support.
2. Added FsMOVAPSrr and FsMOVAPDrr as aliases to MOVAPSrr and MOVAPDrr. These
are used for FR32 / FR64 reg-to-reg copies.
3. Tell reg-allocator to generate MOVSSrm / MOVSDrm and MOVSSmr / MOVSDmr to
spill / restore FsMOVAPSrr and FsMOVAPDrr.
llvm-svn: 26241
2006-02-16 22:45:17 +00:00
Evan Cheng
3f99628939
Use movaps / movapd to spill / restore V4F4 / V2F8 registers.
...
llvm-svn: 26240
2006-02-16 21:20:26 +00:00
Chris Lattner
3d22a090cf
remove skeleton target
...
llvm-svn: 26239
2006-02-16 21:12:54 +00:00
Nate Begeman
8a77efe4f7
Rework the SelectionDAG-based implementations of SimplifyDemandedBits
...
and ComputeMaskedBits to match the new improved versions in instcombine.
Tested against all of multisource/benchmarks on ppc.
llvm-svn: 26238
2006-02-16 21:11:51 +00:00
Chris Lattner
4382d8e8d9
don't build the skeleton target
...
llvm-svn: 26237
2006-02-16 21:11:49 +00:00
Chris Lattner
e5002f3e09
remove support for the skeleton target
...
llvm-svn: 26236
2006-02-16 21:10:57 +00:00
Chris Lattner
fa335f6083
Change SplitBlock to increment a BasicBlock::iterator, not an Instruction*. Apparently they do different things :)
...
This fixes a testcase that nate reduced from spass.
Also included are a couple minor code changes that don't affect the generated
code at all.
llvm-svn: 26235
2006-02-16 19:36:22 +00:00
Evan Cheng
01afec2adb
MOVAPSrr and MOVAPDrr instruction format should be MRMSrcReg.
...
llvm-svn: 26234
2006-02-16 19:34:41 +00:00
Duraid Madina
36a2ee299e
distinguish between objects and register names, now we can have stuff
...
with names like "f84", "in6" etc etc.
this should fix one or two tests
llvm-svn: 26232
2006-02-16 13:12:57 +00:00
Evan Cheng
42c01c8d39
If the false case is the current basic block, then this is a self loop.
...
We do not want to emit "Loop: ... brcond Out; br Loop", as it adds an extra
instruction in the loop. Instead, invert the condition and emit
"Loop: ... br!cond Loop; br Out.
Generalize the fix by moving it from PPCDAGToDAGISel to SelectionDAGLowering.
llvm-svn: 26231
2006-02-16 08:27:56 +00:00
Chris Lattner
471627c49d
Lowering of sdiv X, pow2 was broken, this fixes it. This patch is written
...
by Nate, I'm just committing it for him.
llvm-svn: 26230
2006-02-16 08:02:36 +00:00
Chris Lattner
1e6128254c
Fix a minor makefile bug with lex/yacc handling that nate noticed. We don't
...
want to copy the files when the .cpp file changes, we want to copy them
to the .cvs versions when the .l/.y file change (like the comments even say).
This avoids having bogus changes show up in diffs.
llvm-svn: 26229
2006-02-16 05:10:48 +00:00
Jeff Cohen
55f63f1b53
Fix VC++ warning.
...
llvm-svn: 26228
2006-02-16 04:07:37 +00:00
Jeff Cohen
6388d5b2f7
Visual Studio enters the future of bisoning.
...
llvm-svn: 26227
2006-02-16 04:07:03 +00:00
Evan Cheng
ae82498e81
Use movaps / movapd (instead of movss / movsd) to do FR32 / FR64 reg to reg
...
transfer.
According to the Intel P4 Optimization Manual:
Moves that write a portion of a register can introduce unwanted
dependences. The movsd reg, reg instruction writes only the bottom
64 bits of a register, not to all 128 bits. This introduces a dependence on
the preceding instruction that produces the upper 64 bits (even if those
bits are not longer wanted). The dependence inhibits register renaming,
and thereby reduces parallelism.
Not to mention movaps is shorter than movss.
llvm-svn: 26226
2006-02-16 01:50:02 +00:00
Chris Lattner
ff42e81028
fix a bug where we unswitched the wrong way
...
llvm-svn: 26225
2006-02-16 01:24:41 +00:00
Evan Cheng
03c1e6f48e
A bit more memset / memcpy optimization.
...
Turns them into calls to memset / memcpy if 1) buffer(s) are not DWORD aligned,
2) size is not known to be greater or equal to some minimum value (currently 128).
llvm-svn: 26224
2006-02-16 00:21:07 +00:00
Chris Lattner
fdff0bb43e
Implement trivial unswitching for switch stmts. This allows us to trivial
...
unswitch this loop on 2 before sweating to unswitch on 1/3.
void test4(int N, int i, int C, int*P, int*Q) {
int j;
for (j = 0; j < N; ++j) {
switch (C) { // general unswitching.
default: P[i+j] = 0; break;
case 1: Q[i+j] = 0; break;
case 3: P[i+j] = Q[i+j]; break;
case 2: break; // TRIVIAL UNSWITCH on C==2
}
}
}
llvm-svn: 26223
2006-02-15 22:52:05 +00:00
Evan Cheng
76a7775ce1
Remove an entry.
...
llvm-svn: 26222
2006-02-15 22:14:34 +00:00
Evan Cheng
93e4865d4b
Remove an unused function parameter.
...
llvm-svn: 26221
2006-02-15 22:12:35 +00:00
Chris Lattner
e5cb76d744
make "trivial" unswitching significantly more general. It can now handle
...
this for example:
for (j = 0; j < N; ++j) { // trivial unswitch
if (C)
P[i+j] = 0;
}
turning it into the obvious code without bothering to duplicate an empty loop.
llvm-svn: 26220
2006-02-15 22:03:36 +00:00
Evan Cheng
6781b6e62e
Turn a memcpy from string constant into a series of stores of constant values.
...
llvm-svn: 26219
2006-02-15 21:59:04 +00:00
Andrew Lenharth
47da60130a
fix a bunch of alpha regressions. see bug 709
...
llvm-svn: 26218
2006-02-15 21:13:37 +00:00
Chris Lattner
6afb5587da
new test
...
llvm-svn: 26217
2006-02-15 19:52:06 +00:00
Jim Laskey
2eea436192
Should not combine ISD::LOCATIONs until we have scheme to remove from
...
MachineDebugInfo tables.
llvm-svn: 26216
2006-02-15 19:34:44 +00:00
Chris Lattner
65152d80ec
Checking the wrong value. This caused us to emit silly code like
...
Y = seteq bool X, true
instead of just using X :)
llvm-svn: 26215
2006-02-15 19:05:52 +00:00
Jim Laskey
1fcabe2016
Code sufficiently protected against this test.
...
llvm-svn: 26213
2006-02-15 17:20:59 +00:00
Duraid Madina
8604de8bec
reverting previous change, will add support for other compilers later
...
llvm-svn: 26211
2006-02-15 07:57:42 +00:00
Chris Lattner
a7c9234fde
Convert over to the new way of handling lex/bison checked into cvs
...
llvm-svn: 26209
2006-02-15 07:26:07 +00:00
Chris Lattner
3e15eac81b
Check the new form for bison output into CVS
...
llvm-svn: 26208
2006-02-15 07:24:01 +00:00
Chris Lattner
b0240b2f4a
bugfixes
...
llvm-svn: 26207
2006-02-15 07:23:05 +00:00
Chris Lattner
f20e61f003
Convert this over to work with the new makefiles
...
llvm-svn: 26206
2006-02-15 07:22:58 +00:00
Chris Lattner
c38a9755f1
Convert the bison-output-checked-into-cvs makefile handling stuff to work
...
like the flex stuff, which actually works when people do cvs updates and
get conflicts in the updated checked in file.
llvm-svn: 26205
2006-02-15 07:16:57 +00:00
Chris Lattner
6db414e8de
Sparc actually *DOES* have a directive for emitting zeros. In fact, it requires
...
it, because this:
.bss
X:
.byte 0
results in the assembler warning: "initialization in bss segment". Annoying.
llvm-svn: 26204
2006-02-15 07:07:14 +00:00
Chris Lattner
7edc87279c
random lexer change to test the makefile updating stuff
...
llvm-svn: 26203
2006-02-15 07:02:59 +00:00
Chris Lattner
a9d0b5800a
Fix SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c on Sparc.
...
The ABI specifies that there is a register save area at the bottom of the
stack, which means the actual used pointer needs to be an offset from
the subtracted value.
llvm-svn: 26202
2006-02-15 06:41:34 +00:00
Duraid Madina
cbbc184a2e
HP aCC (and a bunch of other compilers, no doubt) don't share
...
GCC's syntax for auto-dependency generation stuff. This should
be changed to be disabling dependency stuff unless GCC/ICC is
found.
llvm-svn: 26201
2006-02-15 03:23:26 +00:00
Duraid Madina
1f898afd3d
oops, I meant this
...
llvm-svn: 26200
2006-02-15 03:20:16 +00:00
Duraid Madina
aa9cca395d
zap
...
llvm-svn: 26199
2006-02-15 03:16:52 +00:00
Duraid Madina
09518d0c73
previously, configure would die if GCC or ICC was not found. Now it'll
...
go through, but we do want to know if we're using GCC/ICC since they
share certain funky command line options (for dependency generation
stuff)
llvm-svn: 26198
2006-02-15 03:15:55 +00:00
Evan Cheng
7a6c21ac26
Remove an entry.
...
llvm-svn: 26197
2006-02-15 01:56:48 +00:00
Evan Cheng
2d23c9f1ab
Use .zerofill on x86/darwin.
...
llvm-svn: 26196
2006-02-15 01:56:23 +00:00
Evan Cheng
e2038bdeee
Lower memcpy with small constant size operand into a series of load / store
...
ops.
llvm-svn: 26195
2006-02-15 01:54:51 +00:00
Chris Lattner
01db04efb0
more refactoring, no functionality change.
...
llvm-svn: 26194
2006-02-15 01:44:42 +00:00
Evan Cheng
aacc4c3b4c
cvtsd2ss / cvtss2sd encoding bug.
...
llvm-svn: 26193
2006-02-15 00:31:03 +00:00
Evan Cheng
665c26ab40
movaps, movapd encoding bug.
...
llvm-svn: 26192
2006-02-15 00:11:37 +00:00
Chris Lattner
b0cbe7106e
pull some code out into a function
...
llvm-svn: 26191
2006-02-15 00:07:43 +00:00
Chris Lattner
684f911241
new testcase that broke unswitch due to loopsimplify not doing the right thing.
...
llvm-svn: 26190
2006-02-14 23:07:29 +00:00
Chris Lattner
9c5693fb2a
Canonicalize inner loops before outer loops. Inner loop canonicalization
...
can provide work for the outer loop to canonicalize.
This fixes a case that breaks unswitching.
llvm-svn: 26189
2006-02-14 23:06:02 +00:00
Evan Cheng
0451499b3c
Doh again!
...
llvm-svn: 26188
2006-02-14 23:05:54 +00:00
Chris Lattner
cffbbee8d1
When splitting exit edges to canonicalize loops, make sure to put the new
...
block in the appropriate loop nest.
Third time is the charm, right?
llvm-svn: 26187
2006-02-14 22:34:08 +00:00
Chris Lattner
e3c793a71a
new note
...
llvm-svn: 26186
2006-02-14 22:19:54 +00:00
Chris Lattner
b134520b86
If we have zero initialized data with external linkage, use .zerofill to
...
emit it (instead of .space), saving a bit of space in the .o file.
For example:
int foo[100];
int bar[100] = {};
when compiled with C++ or -fno-common results in shrinkage from 1160 to 360
bytes of space. The X86 backend can also do this on darwin.
llvm-svn: 26185
2006-02-14 22:18:23 +00:00
Jim Laskey
ebb50a61d2
Using wrong DW_FORM.
...
llvm-svn: 26184
2006-02-14 22:01:57 +00:00
Evan Cheng
f84774ed46
Don't special case XS, XD prefixes.
...
llvm-svn: 26183
2006-02-14 21:52:51 +00:00
Evan Cheng
fb7b5ef74b
Bug fix: XS, XD prefixes were being emitted twice.
...
XMM registers were not being handled.
llvm-svn: 26182
2006-02-14 21:45:24 +00:00
Chris Lattner
84fb09eba4
Make sure that weak functions are aligned properly
...
llvm-svn: 26181
2006-02-14 20:42:33 +00:00
Evan Cheng
43b72f4421
Duh
...
llvm-svn: 26180
2006-02-14 20:37:37 +00:00
Evan Cheng
ad8c20cd2b
Remove -disable-x86-sse
...
llvm-svn: 26179
2006-02-14 20:30:14 +00:00
Chris Lattner
94f936d8ef
add an assert
...
llvm-svn: 26178
2006-02-14 20:14:17 +00:00
Evan Cheng
db2a7a736a
Keep to < 80 cols
...
llvm-svn: 26177
2006-02-14 20:12:38 +00:00
Evan Cheng
038521ef76
Missed a break so memcpy cases fell through to memset. Doh.
...
llvm-svn: 26176
2006-02-14 19:45:56 +00:00
Evan Cheng
d502610604
Fixed a build breakage.
...
llvm-svn: 26175
2006-02-14 09:11:59 +00:00
Evan Cheng
4b40a42653
Rename maxStoresPerMemSet to maxStoresPerMemset, etc.
...
llvm-svn: 26174
2006-02-14 08:38:30 +00:00
Evan Cheng
f976d79f78
Add a entry.
...
llvm-svn: 26173
2006-02-14 08:25:32 +00:00
Evan Cheng
6a37456d73
Set maxStoresPerMemSet to 16. Ditto for maxStoresPerMemCpy and
...
maxStoresPerMemMove. Although the last one is not used.
llvm-svn: 26172
2006-02-14 08:25:08 +00:00
Evan Cheng
81fcea8aa2
Expand memset dst, c, size to a series of stores if size falls below the
...
target specific theshold, e.g. 16 for x86.
llvm-svn: 26171
2006-02-14 08:22:34 +00:00
Evan Cheng
40b6eb9973
Enable SSE (for the right subtargets)
...
llvm-svn: 26169
2006-02-14 08:07:58 +00:00
Jeff Cohen
5cc208f9a9
Match changes to unix build system.
...
llvm-svn: 26167
2006-02-14 06:12:08 +00:00
Chris Lattner
1784a9d267
now that libcalls don't suck, we can remove this hack
...
llvm-svn: 26164
2006-02-14 05:39:35 +00:00
Chris Lattner
e01ff337ee
Adjust to new style "generated files in CVS" mechanism for lex output
...
llvm-svn: 26163
2006-02-14 05:16:35 +00:00
Chris Lattner
0242688ad8
adjust to new style of handling lexer changes
...
llvm-svn: 26162
2006-02-14 05:14:46 +00:00
Chris Lattner
ecd162d5cd
Adjust to new form of handling lexer dependencies, this way shouldn't have
...
the problems the old way did.
llvm-svn: 26161
2006-02-14 05:13:13 +00:00
Chris Lattner
8104b4c352
Implement an alternative way of handling generated lex files in CVS. This
...
should solve the "updating cvs when .l files change give me conflict markers
that break my build" issue.
llvm-svn: 26160
2006-02-14 05:12:00 +00:00
Chris Lattner
b8e7aa0c9b
Wrap a couple more long lines
...
llvm-svn: 26159
2006-02-14 04:27:15 +00:00
Chris Lattner
e2dcbe03a1
wrap long lines
...
llvm-svn: 26158
2006-02-14 04:25:54 +00:00
Chris Lattner
0b8ec1a132
Use statistics to keep track of what flavors of loops we are unswitching
...
llvm-svn: 26157
2006-02-14 01:01:41 +00:00
Chris Lattner
8e2ee7358f
Fix a latent bug in the call sequence handling stuff. Some targets (e.g. x86)
...
create these nodes with flag results. Remember that we legalized them.
llvm-svn: 26156
2006-02-14 00:55:02 +00:00
Chris Lattner
8b10ab3002
Implement Instcombine/and.ll:test34
...
llvm-svn: 26155
2006-02-13 23:07:23 +00:00
Chris Lattner
8081f40b50
new testcase
...
llvm-svn: 26154
2006-02-13 23:07:02 +00:00
Chris Lattner
4108d260e8
Fix typo that caused build failures for things trying to use m_Or.
...
llvm-svn: 26153
2006-02-13 23:06:39 +00:00
Chris Lattner
7d8522884b
If any of the sign extended bits are demanded, the input sign bit is demanded
...
for a sign extension.
This fixes InstCombine/2006-02-13-DemandedMiscompile.ll and Ptrdist/bc.
llvm-svn: 26152
2006-02-13 22:41:07 +00:00
Chris Lattner
5898effde0
testcase reduced from Ptrdist/bc that is miscompiled by recent instcombine changes.
...
llvm-svn: 26151
2006-02-13 22:31:50 +00:00
Chris Lattner
d2d174dd0e
Another hack due to allowing multiple symbols with the same name.
...
llvm-svn: 26150
2006-02-13 22:22:42 +00:00
Chris Lattner
eea0f0198e
Another work around for the 'symbols with different types can have the same
...
name' issue.
llvm-svn: 26149
2006-02-13 21:43:26 +00:00
Andrew Lenharth
a438ef0ee7
improved zap discovery
...
llvm-svn: 26148
2006-02-13 18:52:29 +00:00
Andrew Lenharth
a3bc7b8a85
test for improved zap discovery
...
llvm-svn: 26147
2006-02-13 18:52:01 +00:00
Jim Laskey
29483560d0
Sync up the tag numbers with gcc4.
...
llvm-svn: 26146
2006-02-13 16:56:43 +00:00
Jim Laskey
390c63e9d9
Rename to better reflect usage (current and planned.)
...
llvm-svn: 26145
2006-02-13 12:50:39 +00:00
Chris Lattner
462505fc5f
Completely rewrite libcall insertion by the legalizer, providing the
...
following handy-dandy properties:
1. it is always correct now
2. it is much faster than before
3. it is easier to understand
This implementation builds off of the recent simplifications of the
legalizer that made it single-pass instead of iterative.
This fixes JM/lencod, JM/ldecod, and
CodeGen/Generic/2006-02-12-InsertLibcall.ll (at least on PPC).
llvm-svn: 26144
2006-02-13 09:18:02 +00:00
Chris Lattner
62c3484e43
Switch targets over to using SelectionDAG::getCALLSEQ_START to create
...
CALLSEQ_START nodes.
llvm-svn: 26143
2006-02-13 09:00:43 +00:00
Chris Lattner
3a0ad47b39
Switch to using getCALLSEQ_START instead of using our own creation calls
...
llvm-svn: 26142
2006-02-13 08:55:29 +00:00
Chris Lattner
5a30d8367a
Add a method
...
llvm-svn: 26141
2006-02-13 08:54:46 +00:00
Chris Lattner
d062f09026
this passes now, due to Nate's recent efforts
...
llvm-svn: 26140
2006-02-13 07:26:36 +00:00
Chris Lattner
4c388281c1
Reduce this testcase a bit more, with the help of llvm-extract and some hand tweaks
...
llvm-svn: 26139
2006-02-13 07:02:50 +00:00
Chris Lattner
68e7475777
Be careful not to request or look at bits shifted in from outside the size
...
of the input. This fixes the mediabench/gsm/toast failure last night.
llvm-svn: 26138
2006-02-13 06:09:08 +00:00
Evan Cheng
0684e9ae6d
Added a test case for a libcall insertion bug.
...
llvm-svn: 26137
2006-02-12 10:24:00 +00:00
Nate Begeman
bc3ec1d37b
Add missing patterns for andi. and andis., fixing test/Regression/CodeGen/
...
PowerPC/and-imm.ll
llvm-svn: 26136
2006-02-12 09:09:52 +00:00
Chris Lattner
f5b4ef7f58
remove some more dead special case code
...
llvm-svn: 26135
2006-02-12 08:07:37 +00:00
Chris Lattner
5b2edb1fca
Eliminate special case hacks that are superceded by general purpose hacks
...
llvm-svn: 26134
2006-02-12 08:02:11 +00:00
Chris Lattner
e6ebe1af61
tweaks
...
llvm-svn: 26133
2006-02-12 08:01:35 +00:00
Chris Lattner
ee0f280743
Three changes:
...
1. Teach GetConstantInType to handle boolean constants.
2. Teach instcombine to fold (compare X, CST) when X has known 0/1 bits.
Testcase here: set.ll:test22
3. Improve the "(X >> c1) & C2 == 0" folding code to allow a noop cast
between the shift and and. More aggressive bitfolding for other reasons
was turning signed shr's into unsigned shr's, leaving the noop cast in
the way.
llvm-svn: 26131
2006-02-12 02:07:56 +00:00
Chris Lattner
2234a136b3
new testcase
...
llvm-svn: 26130
2006-02-12 02:06:31 +00:00
Chris Lattner
5e488c9cc2
move a failing testcase from bit-tracking.ll to narrow.ll, and move the
...
xfail marker with it
llvm-svn: 26129
2006-02-12 02:02:43 +00:00
Chris Lattner
02f53ad3a2
Revert my last patch. It too breaks stuff
...
llvm-svn: 26128
2006-02-12 01:59:10 +00:00
Chris Lattner
8e99b0baca
Make these tests fail if opt crashes.
...
llvm-svn: 26127
2006-02-12 01:32:58 +00:00
Chris Lattner
35248e06bc
Fix for my previously reverted patch
...
llvm-svn: 26126
2006-02-11 21:24:54 +00:00
Chris Lattner
f3ed03481a
Update comments to be actually accurate
...
llvm-svn: 26124
2006-02-11 09:37:07 +00:00
Chris Lattner
00601c0c7e
This is implemented by the simplify-libcalls pass, not instcombine
...
llvm-svn: 26123
2006-02-11 09:33:28 +00:00
Chris Lattner
0157e7f55b
Port the recent innovations in ComputeMaskedBits to SimplifyDemandedBits.
...
This allows us to simplify on conditions where bits are not known, but they
are not demanded either! This also fixes a couple of bugs in
ComputeMaskedBits that were exposed during this work.
In the future, swaths of instcombine should be removed, as this code
subsumes a bunch of ad-hockery.
llvm-svn: 26122
2006-02-11 09:31:47 +00:00
Chris Lattner
b24ce3a2a8
revert my previous change, it exposed other problems.
...
llvm-svn: 26121
2006-02-11 08:47:47 +00:00
Duraid Madina
4698e4f5fe
fix storing booleans (grawp missed this one)
...
llvm-svn: 26120
2006-02-11 07:33:17 +00:00
Duraid Madina
0010a92375
now short immediates will get matched (previously constants were all
...
triggering movl 64bit imm fat instructions)
llvm-svn: 26119
2006-02-11 07:32:15 +00:00
Chris Lattner
05bf90dddf
Make this check stricter. Disallow loop exit blocks from being shared by
...
loops and their subloops.
llvm-svn: 26118
2006-02-11 02:13:17 +00:00
Evan Cheng
a86ba85dc5
Prevent certain nodes that have already been selected from being folded into
...
X86 addressing mode. Currently we do not allow any node whose target node
produces a chain as well as any node that is at the root of the addressing
mode expression tree.
llvm-svn: 26117
2006-02-11 02:05:36 +00:00
Chris Lattner
a6ae101afa
remove dead expr
...
llvm-svn: 26116
2006-02-11 01:43:37 +00:00
Jim Laskey
5995d0160c
Reorg for integration with gcc4. Old style debug info will not be passed though
...
to SelIDAG.
llvm-svn: 26115
2006-02-11 01:01:30 +00:00
Chris Lattner
fbadd7e1ee
implement unswitching of loops with switch stmts and selects in them
...
llvm-svn: 26114
2006-02-11 00:43:37 +00:00
Chris Lattner
f1b151684d
Update PHI nodes in successors of exit blocks.
...
llvm-svn: 26113
2006-02-10 23:26:14 +00:00
Chris Lattner
fe4151efe7
Reform the unswitching code in terms of edge splitting, not block splitting.
...
llvm-svn: 26112
2006-02-10 23:16:39 +00:00
Evan Cheng
2b6f78b664
Nicer code. :-)
...
llvm-svn: 26111
2006-02-10 22:46:26 +00:00
Evan Cheng
d49cc3634e
Added X86 isel debugging stuff.
...
llvm-svn: 26110
2006-02-10 22:24:32 +00:00
Chris Lattner
975486db5e
Remove a level of indirection.
...
llvm-svn: 26109
2006-02-10 21:32:11 +00:00
Chris Lattner
ec6b40a093
Fix a case where UnswitchTrivialCondition broke critical edges with
...
phi's in the successors
llvm-svn: 26108
2006-02-10 19:08:15 +00:00
Chris Lattner
fcb8a3aa76
Use the auto-generated call matcher. Remove a broken impl of the frameaddr/returnaddr
...
intrinsics.
Autogen frameindex matcher
llvm-svn: 26107
2006-02-10 07:35:42 +00:00
Chris Lattner
0c4dea4cb2
Update to new-style flags usage, simplifying the .td file
...
llvm-svn: 26106
2006-02-10 06:58:25 +00:00
Evan Cheng
907be3e24c
Remove a completed entry; add a new entry about fisttp op
...
llvm-svn: 26105
2006-02-10 05:48:15 +00:00
Chris Lattner
6e263155a6
add some notes, move some code around. Implement unswitching of loops
...
with branches on partially invariant computations.
llvm-svn: 26104
2006-02-10 02:30:37 +00:00
Chris Lattner
4935417a84
Move code around to be more logical, no functionality change.
...
llvm-svn: 26103
2006-02-10 02:01:22 +00:00
Chris Lattner
3fc3148b85
When unswitching a trivial loop, do admit we are doing it! :)
...
llvm-svn: 26102
2006-02-10 01:36:35 +00:00
Chris Lattner
ed7a67b0de
Implement unconditional unswitching of 'trivial' loops, those loops that contain
...
branches in their entry block that control whether or not the loop is a noop or not.
llvm-svn: 26101
2006-02-10 01:24:09 +00:00
Chris Lattner
4f0e66df6a
Simplify control flow a bit, note that unswitch preserves canonical loop form
...
llvm-svn: 26098
2006-02-09 22:15:42 +00:00
Evan Cheng
101e4b916a
Match tblgen change.
...
llvm-svn: 26096
2006-02-09 22:12:53 +00:00
Evan Cheng
5940bc210e
Call InsertISelMapEntry rather than map insertion operator to prevent overly
...
aggrssive inlining. This reduces Select_store frame size from 24k to 10k.
llvm-svn: 26095
2006-02-09 22:12:27 +00:00
Evan Cheng
a1ef3ec5b5
Added SelectionDAG::InsertISelMapEntry(). This is used to workaround the gcc
...
problem where it inline the map insertion call too aggressively. Before this
change it was producing a frame size of 24k for Select_store(), now it's down
to 10k (by calling this method rather than calling the map insertion operator).
llvm-svn: 26094
2006-02-09 22:11:03 +00:00
Chris Lattner
8976219850
Make the threshold a parameter
...
llvm-svn: 26093
2006-02-09 20:15:48 +00:00
Chris Lattner
4c0bd5bcdf
Done
...
llvm-svn: 26091
2006-02-09 20:00:19 +00:00
Chris Lattner
5259aa1c86
Enable LSR by default for SPARC: it is a clear win.
...
llvm-svn: 26090
2006-02-09 19:59:55 +00:00
Chris Lattner
2826e0511b
Simplify the loop-unswitch pass, by not even trying to unswitch loops with
...
uses of loop values outside the loop. We need loop-closed SSA form to do
this right, or to use SSA rewriting if we really care.
llvm-svn: 26089
2006-02-09 19:14:52 +00:00
Chris Lattner
24cd2fa269
Fix 80-column violations
...
llvm-svn: 26088
2006-02-09 07:41:14 +00:00
Chris Lattner
4534dd59a3
Enhance MVIZ in three ways:
...
1. Teach it new tricks: in particular how to propagate through signed shr and sexts.
2. Teach it to return a bitset of known-1 and known-0 bits, instead of just zero.
3. Teach instcombine (AND X, C) to fold when we know all C bits of X.
This implements Regression/Transforms/InstCombine/bittest.ll, and allows
future things to be simplified.
llvm-svn: 26087
2006-02-09 07:38:58 +00:00
Chris Lattner
11f380962b
new testcase
...
llvm-svn: 26086
2006-02-09 07:38:30 +00:00
Evan Cheng
d1b82d8db0
Match getTargetNode() changes (now return SDNode* instead of SDOperand).
...
llvm-svn: 26085
2006-02-09 07:17:49 +00:00
Evan Cheng
9ce762d51f
Match getTargetNode() changes (now returns SDNode* instead of SDOperand).
...
llvm-svn: 26084
2006-02-09 07:16:09 +00:00
Evan Cheng
d3f1db93c1
More changes to reduce frame size.
...
Move all getTargetNode() out of SelectionDAG.h into SelectionDAG.cpp. This
prevents them from being inlined.
Change getTargetNode() so they return SDNode * instead of SDOperand to prevent
copying. It should also help compilation speed.
llvm-svn: 26083
2006-02-09 07:15:23 +00:00
Chris Lattner
e19b89f59c
this apparently passes on linux
...
llvm-svn: 26082
2006-02-09 07:12:13 +00:00
Chris Lattner
c75d5b093d
add an option to turn on LSR.
...
llvm-svn: 26080
2006-02-09 05:06:36 +00:00
Chris Lattner
729ffe95c4
simplify this code now that each constant pool entry is not separately allocated
...
llvm-svn: 26079
2006-02-09 04:49:59 +00:00
Chris Lattner
f6190821da
Adjust to MachineConstantPool interface change: instead of keeping a
...
value/alignment pair for each constant, keep a value/offset pair.
llvm-svn: 26078
2006-02-09 04:46:04 +00:00
Chris Lattner
8bb44151e1
instead of keeping track of Constant/alignment pairs, actually compute the
...
offset of each entry from the start of the constant pool.
llvm-svn: 26077
2006-02-09 04:44:32 +00:00
Chris Lattner
ba97264e72
rename fields of constant pool entries
...
llvm-svn: 26076
2006-02-09 04:22:52 +00:00
Chris Lattner
1cd22199dd
Use a MachineConstantPoolEntry struct instead of a pair to hold
...
constant pool entries.
llvm-svn: 26075
2006-02-09 04:21:49 +00:00
Chris Lattner
47f7319f00
Simplify code, alignment must be specified now.
...
llvm-svn: 26074
2006-02-09 02:26:04 +00:00
Chris Lattner
0ece4214ad
Assert invariants
...
llvm-svn: 26073
2006-02-09 02:25:42 +00:00
Chris Lattner
c360656c1d
Require an alignment.
...
llvm-svn: 26072
2006-02-09 02:24:25 +00:00
Chris Lattner
4576bb74d5
Make MachineConstantPool entries alignments explicit
...
llvm-svn: 26071
2006-02-09 02:23:13 +00:00
Chris Lattner
832d78d981
Always pass in an alignment.
...
llvm-svn: 26070
2006-02-09 02:19:16 +00:00
Chris Lattner
d94a3d2c8a
provide an explicit alignment for cp entries
...
llvm-svn: 26069
2006-02-09 02:15:30 +00:00
Chris Lattner
ea25aba382
Add a comment: value is log2
...
llvm-svn: 26068
2006-02-09 02:10:15 +00:00
Evan Cheng
6dc90ca172
Change Select() from
...
SDOperand Select(SDOperand N);
to
void Select(SDOperand &Result, SDOperand N);
llvm-svn: 26067
2006-02-09 00:37:58 +00:00
Chris Lattner
2e07d6370a
Darwin doesn't support #APP/#NO_APP
...
llvm-svn: 26066
2006-02-08 23:42:22 +00:00
Chris Lattner
ed87dcd45f
Add support for assembler directives that wrap inline asm
...
llvm-svn: 26065
2006-02-08 23:41:56 +00:00
Chris Lattner
26e385a623
Rename BSel -> PPCBSel for the benefit of doxygen users.
...
Move the methods out of line.
Remove unused Debug.h stuff.
Teach getNumBytesForInstruction to know the size of an inline asm.
llvm-svn: 26064
2006-02-08 19:33:26 +00:00
Jim Laskey
15f9188d73
Disable this test for the time being as debug is brought up to speed.
...
llvm-svn: 26063
2006-02-08 18:17:06 +00:00
Chris Lattner
b4fc050f0f
add a simple optimization
...
llvm-svn: 26062
2006-02-08 17:47:22 +00:00
Chris Lattner
6f5a00fd68
Mention that delta can be used to reduce some Front-end problems.
...
Patch by Marco Matthies, thanks!
llvm-svn: 26061
2006-02-08 17:01:37 +00:00
Chris Lattner
4999a5c0c7
Add SRoA to the lexicon. Patch by Marco Matthies!
...
llvm-svn: 26060
2006-02-08 16:59:49 +00:00
Evan Cheng
df5ef770b6
Added options -cflag, -cxxflags, and -ldflags to override the default C
...
compilation, C++ compilation, and linker options.
e.g. This is the options I use for testing on my x86 iMac:
nice ./NightlyTest.pl -release -cflags "-Os -DNDEBUG -fomit-frame-pointer" -cxxflags "-Os -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer"
llvm-svn: 26057
2006-02-08 09:08:06 +00:00
Chris Lattner
ab2dc4d70d
Simplify some code, reducing calls to MaskedValueIsZero. Implement a minor
...
optimization where we reduce the number of bits in AND masks when possible.
llvm-svn: 26056
2006-02-08 07:34:50 +00:00
Evan Cheng
0ba2808775
Remove -pedantic. It no longer works.
...
llvm-svn: 26055
2006-02-08 07:28:22 +00:00
Chris Lattner
b7e074ab9b
more email -> README moving
...
llvm-svn: 26054
2006-02-08 07:12:07 +00:00
Chris Lattner
f7b962d7d7
Emit the 'mr' pseudoop for easier reading.
...
llvm-svn: 26053
2006-02-08 06:56:40 +00:00
Chris Lattner
45bb34b715
Add some random notes, not high-prio
...
llvm-svn: 26052
2006-02-08 06:52:06 +00:00
Chris Lattner
b97142eec0
Move emails from nate into public places
...
llvm-svn: 26051
2006-02-08 06:43:51 +00:00
Chris Lattner
5997cf9381
Use EraseInstFromFunction in a few cases to put the uses of the removed
...
instruction onto the worklist (in case they are now dead).
Add a really trivial local DSE implementation to help out bitfield code.
We now fold this:
struct S {
unsigned char a : 1, b : 1, c : 1, d : 2, e : 3;
S();
};
S::S() : a(0), b(0), c(1), d(0), e(6) {}
to this:
void %_ZN1SC1Ev(%struct.S* %this) {
entry:
%tmp.1 = getelementptr %struct.S* %this, int 0, uint 0
store ubyte 38, ubyte* %tmp.1
ret void
}
much earlier (in gccas instead of only in gccld after DSE runs).
llvm-svn: 26050
2006-02-08 03:25:32 +00:00
Chris Lattner
06a0ed1ee0
Implement some more interesting select sccp cases. This implements:
...
test/Regression/Transforms/SCCP/select.ll
llvm-svn: 26049
2006-02-08 02:38:11 +00:00
Chris Lattner
d82b2036e9
new testcase for more interesting select sccp cases
...
llvm-svn: 26048
2006-02-08 02:37:40 +00:00
Chris Lattner
a10e23c19f
Compile this:
...
xori r6, r2, 1
rlwinm r6, r6, 0, 31, 31
cmpwi cr0, r6, 0
bne cr0, LBB1_3 ; endif
to this:
rlwinm r6, r2, 0, 31, 31
cmpwi cr0, r6, 0
beq cr0, LBB1_3 ; endif
llvm-svn: 26047
2006-02-08 02:13:15 +00:00
Chris Lattner
49c0457529
Add some happy helper methods.
...
llvm-svn: 26046
2006-02-08 02:05:45 +00:00
Chris Lattner
ddba3289b5
Fix a problem in my patch yesterday, causing a miscompilation of 176.gcc
...
llvm-svn: 26045
2006-02-08 01:20:23 +00:00
Evan Cheng
adeb8fb5a2
Fixed a local common symbol bug.
...
llvm-svn: 26044
2006-02-07 23:32:58 +00:00
Evan Cheng
ec212fb66d
For ELF, .comm takes alignment value as the optional 3rd argument. It must be
...
specified in bytes.
llvm-svn: 26043
2006-02-07 21:54:08 +00:00
Chris Lattner
203b2f1288
Implement getConstraintType for PPC.
...
llvm-svn: 26042
2006-02-07 20:16:30 +00:00
Chris Lattner
56a2621ef5
getConstraintType should be virtual.
...
llvm-svn: 26041
2006-02-07 20:13:44 +00:00
Chris Lattner
44314827d6
Fix Transforms/InstCombine/2006-02-07-SextZextCrash.ll
...
llvm-svn: 26040
2006-02-07 19:07:40 +00:00
Chris Lattner
ee278d9417
new testcase that caused instcombine to crash on 176.gcc last night.
...
llvm-svn: 26039
2006-02-07 19:07:25 +00:00
Evan Cheng
5a76680de1
Darwin ABI issues: weak, linkonce, etc. dynamic-no-pic support is complete.
...
Also fixed a function stub bug. Added weak and linkonce support for
x86 Linux.
llvm-svn: 26038
2006-02-07 08:38:37 +00:00
Evan Cheng
227e469c25
Remind myself to add PIC and static asm printer support.
...
llvm-svn: 26037
2006-02-07 08:35:44 +00:00
Chris Lattner
92a6865321
Generalize MaskedValueIsZero into a ComputeMaskedNonZeroBits function, which
...
is just as efficient as MVIZ and is also more general.
Fix a few minor bugs introduced in recent patches
llvm-svn: 26036
2006-02-07 08:05:22 +00:00
Chris Lattner
c3ebf40031
Make MaskedValueIsZero take a uint64_t instead of a ConstantIntegral as a
...
mask. This allows the code to be simpler and more efficient.
Also, generalize some of the cases in MVIZ a bit, making it slightly more aggressive.
llvm-svn: 26035
2006-02-07 07:27:52 +00:00
Chris Lattner
77defbae0a
Use Type::getIntegralTypeMask() to simplify some code
...
llvm-svn: 26034
2006-02-07 07:00:41 +00:00
Chris Lattner
2590e511d8
Implement the beginnings of a facility for simplifying expressions based on
...
'demanded bits', inspired by Nate's work in the dag combiner. This isn't
complete, but needs to unrelated instcombiner changes to continue.
llvm-svn: 26033
2006-02-07 06:56:34 +00:00
Chris Lattner
f1197c9f21
add a new Type::getIntegralTypeMask() method, which is useful for clients that
...
want to do bitwise inspection of integer types.
llvm-svn: 26032
2006-02-07 06:17:10 +00:00
Jeff Cohen
2439669c6f
The interpreter assumes that the caller of runFunction() must be lli, and
...
therefore the function being called must be a main() returning an int. The
consequences when these assumptions are false are not good, so don't assume
them.
llvm-svn: 26031
2006-02-07 05:29:44 +00:00
Jeff Cohen
69e849014c
Teach the interpreter to handle global variables that are added to a module after
...
interpretation has begun. The JIT already handles this situation correctly, and
the interpreter can already handle new functions being added.
llvm-svn: 26030
2006-02-07 05:11:57 +00:00
Jeff Cohen
c89a2a1a83
Fix some truncation warnings.
...
llvm-svn: 26029
2006-02-07 03:34:35 +00:00
Chris Lattner
49b3414322
fix an error compiling with -pedantic
...
llvm-svn: 26028
2006-02-07 01:12:49 +00:00