Reid Spencer
b19636e4af
Fix a compilation error (jump to case label).
...
llvm-svn: 36539
2007-04-28 14:13:42 +00:00
Anton Korobeynikov
511d54f61b
Regenerate
...
llvm-svn: 36538
2007-04-28 13:48:45 +00:00
Anton Korobeynikov
b18f8f85e9
Implement review feedback. Aliasees can be either GlobalValue's or
...
bitcasts of them.
llvm-svn: 36537
2007-04-28 13:45:00 +00:00
Chris Lattner
1deacd61f4
memory inputs to an inline asm are required to have an address available.
...
If the operand is not already an indirect operand, spill it to a constant
pool entry or a stack slot.
This fixes PR1356 and CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll
llvm-svn: 36536
2007-04-28 06:42:38 +00:00
Chris Lattner
d102ed0ac6
Fix CodeGen/Generic/2007-04-27-LargeMemObject.ll and
...
CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll
llvm-svn: 36534
2007-04-28 06:08:13 +00:00
Chris Lattner
19651c77b2
add a way to make this less brittle
...
llvm-svn: 36528
2007-04-28 05:38:52 +00:00
Chris Lattner
089e35cc57
fix a bug triggered by 403.gcc
...
llvm-svn: 36527
2007-04-28 05:27:36 +00:00
Chris Lattner
6e880871e9
Fix several latent bugs in EmitGEPOffset that didn't manifest with its
...
previous clients. This fixes MallocBench/gs
llvm-svn: 36525
2007-04-28 04:52:43 +00:00
Chris Lattner
4df3e8093b
Fix this to match change to InlineAsm class.
...
llvm-svn: 36524
2007-04-28 04:05:59 +00:00
Chris Lattner
c753800800
uhn zap cvs
...
llvm-svn: 36523
2007-04-28 03:50:56 +00:00
Chris Lattner
c48e2c3100
represent indirect operands explicitly in inline asm strings.
...
llvm-svn: 36522
2007-04-28 01:02:58 +00:00
Chris Lattner
acbf6a401d
Implement PR1345 and Transforms/InstCombine/bitcast-gep.ll
...
llvm-svn: 36521
2007-04-28 00:57:34 +00:00
Dale Johannesen
7e7280b538
change per review
...
llvm-svn: 36519
2007-04-28 00:36:37 +00:00
Dale Johannesen
29c05756b5
Prevent Thumb code from generating ARM instructions
...
llvm-svn: 36518
2007-04-27 22:17:18 +00:00
Chris Lattner
2705829925
add a GEP helper function
...
llvm-svn: 36515
2007-04-27 20:35:56 +00:00
Lauro Ramos Venancio
99cb63029a
add parenthesis.
...
llvm-svn: 36514
2007-04-27 20:10:08 +00:00
Evan Cheng
559c546453
Doh. ARM::LEApcrel is a single instruction MI.
...
llvm-svn: 36513
2007-04-27 18:27:13 +00:00
Lauro Ramos Venancio
62f65468bc
In Thumb mode, the frame register must be R7.
...
llvm-svn: 36512
2007-04-27 17:58:03 +00:00
Chris Lattner
1db224db92
refactor some code relating to pointer cast xforms, pulling it out of the codepath
...
for unrelated casts.
llvm-svn: 36511
2007-04-27 17:44:50 +00:00
Chris Lattner
1cbe208cda
Fix incorrect legalization of EHSELECTOR. This fixes
...
CodeGen/Generic/2007-04-14-EHSelectorCrash.ll and PR1326
llvm-svn: 36510
2007-04-27 17:12:52 +00:00
Lauro Ramos Venancio
c39c12a3fa
ARM TLS: implement "general dynamic", "initial exec" and "local exec" models.
...
llvm-svn: 36506
2007-04-27 13:54:47 +00:00
Evan Cheng
c9f22fd1a4
Darwin runtime library does not have these.
...
llvm-svn: 36505
2007-04-27 08:15:43 +00:00
Evan Cheng
d9990f061f
Special handling of LEApcrel and tLEApcrel.
...
llvm-svn: 36504
2007-04-27 08:14:15 +00:00
Evan Cheng
e54018687d
Back out previous check-in. Incorrect.
...
llvm-svn: 36503
2007-04-27 07:50:02 +00:00
Evan Cheng
68ec63b3d7
tLEApcrel is a AddrModeTs, i.e. pc relative.
...
llvm-svn: 36502
2007-04-27 07:37:22 +00:00
Evan Cheng
bf535fc8bd
Expand UINT_TO_FP in turns of SINT_TO_FP when UINTTOFP_* libcalls are not available.
...
llvm-svn: 36501
2007-04-27 07:33:31 +00:00
Chris Lattner
784fe9dbbb
improve EH global handling, patch by Duncan Sands.
...
llvm-svn: 36499
2007-04-27 01:20:11 +00:00
Devang Patel
2c1bba0c0c
Move ~Pass() from Pass.h into Pass.cpp
...
llvm-svn: 36498
2007-04-26 21:33:42 +00:00
Chris Lattner
8131ab7c0f
enable Anton's shift/and switch lowering stuff! It now passes ppc bootstrap
...
successfully! woohoo...
llvm-svn: 36496
2007-04-26 21:09:43 +00:00
Dan Gohman
a30eabdd6e
Fix PR1339 and CodeGen/X86/dollar-name.ll
...
llvm-svn: 36495
2007-04-26 21:07:05 +00:00
Bill Wendling
c8264ca457
Have MMX registers clobbered in x86-64 too.
...
llvm-svn: 36494
2007-04-26 21:06:48 +00:00
Anton Korobeynikov
d7ae7f1659
Fixx off-by-one bug, which prevents llvm-gcc bootstrap on ppc32
...
llvm-svn: 36490
2007-04-26 20:44:04 +00:00
Dan Gohman
e131e3ac02
Fix a typo in a comment.
...
llvm-svn: 36485
2007-04-26 19:40:56 +00:00
Evan Cheng
910c80851e
Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion.
...
llvm-svn: 36483
2007-04-26 19:00:32 +00:00
Reid Spencer
1d48207f5b
1. Don't swap byte order in scanf. It isn't necessary and leads to
...
incorrect results (canonicalization was dropped several commits ago).
2. Add support for fscanf.
3. Suppress a warning about cast to pointer from non-pointer-sized integer.
llvm-svn: 36482
2007-04-26 18:19:35 +00:00
Devang Patel
68f72b17f2
Use toplevel function pass manager as OnTheFly manager.
...
llvm-svn: 36481
2007-04-26 17:50:19 +00:00
Zhou Sheng
3178736d50
Using APInt more efficiently.
...
llvm-svn: 36475
2007-04-26 16:42:07 +00:00
Evan Cheng
ed23a1387e
Minor bug.
...
llvm-svn: 36473
2007-04-26 08:24:22 +00:00
Chris Lattner
e6e364c198
start code for writing out instructions. Separate BB#s from normal value
...
#'s.
llvm-svn: 36472
2007-04-26 05:53:54 +00:00
Chris Lattner
720367c5f0
regen
...
llvm-svn: 36470
2007-04-26 05:31:05 +00:00
Chris Lattner
eee35bfc8a
wrap long lines
...
Fix PR1358 and test/Assembler/2007-04-25-AssemblerFoldExternWeak.ll, by
creating forward decl globals with linkage extern_weak to defeat implicit
constant folding.
llvm-svn: 36469
2007-04-26 05:30:35 +00:00
Chris Lattner
7c37b01998
enumerate BB's separately from other function values.
...
llvm-svn: 36467
2007-04-26 04:42:16 +00:00
Chris Lattner
5f640b9cc9
add support for incorporating and purging functions to the value enumerator
...
llvm-svn: 36465
2007-04-26 03:50:57 +00:00
Chris Lattner
a5211c43c2
improve a comment
...
llvm-svn: 36464
2007-04-26 03:32:43 +00:00
Chris Lattner
831d420256
move some code around, fix a bug in the reader reading globalinits (which
...
I just introduced), stub out function reading, purge aggregate values from
the value table before reading functions.
llvm-svn: 36463
2007-04-26 03:27:58 +00:00
Chris Lattner
44c1707207
add bitcode alias support
...
llvm-svn: 36461
2007-04-26 02:46:40 +00:00
Chris Lattner
d2747054b4
print aliases before functions
...
llvm-svn: 36459
2007-04-26 02:24:10 +00:00
Evan Cheng
43a17fe826
Be careful when to add implicit kill / dead operands. Don't add them during / post reg-allocation.
...
llvm-svn: 36458
2007-04-26 01:40:09 +00:00
Evan Cheng
ce6e6db704
Fix for PR1348. If stack inc / dec amount is > 32-bits, issue a series of add / sub instructions.
...
llvm-svn: 36456
2007-04-26 01:09:28 +00:00
Bill Wendling
0be6fc5fd7
Quiet a compiler warning about assignment in an if-then conditional.
...
llvm-svn: 36454
2007-04-25 23:52:02 +00:00
Evan Cheng
0ba174534c
Match MachineFunction::UsedPhysRegs changes.
...
llvm-svn: 36452
2007-04-25 22:13:27 +00:00
Evan Cheng
d21968d11a
Change UsedPhysRegs from array bool to BitVector to save some space. Setting / getting its states now go through MachineFunction.
...
llvm-svn: 36451
2007-04-25 22:10:09 +00:00
Evan Cheng
d4549c5527
Clean up.
...
llvm-svn: 36449
2007-04-25 21:34:08 +00:00
Bill Wendling
157d7ee7e5
Add SSSE3 as a feature of Core2. Add MMX registers to the list of registers
...
clobbered by a call.
llvm-svn: 36448
2007-04-25 21:31:48 +00:00
Evan Cheng
0fbe14ab87
Data structure change to improve compile time (especially in debug mode).
...
llvm-svn: 36447
2007-04-25 19:34:00 +00:00
Evan Cheng
15f269afa3
This was lefted out. Fixed sumarray-dbl.
...
llvm-svn: 36445
2007-04-25 18:33:21 +00:00
Devang Patel
d3ccc073a2
Mem2Reg does not need TargetData.
...
llvm-svn: 36444
2007-04-25 18:32:35 +00:00
Anton Korobeynikov
5e4e8f5e09
Add missed semicolon. Resotre compatibility with older bisons
...
llvm-svn: 36443
2007-04-25 18:07:40 +00:00
Chris Lattner
d20cd6658a
do the multiplication as signed, so that 2*-2 == -4 instead of 4294967292
...
when promoted to 64-bits
llvm-svn: 36442
2007-04-25 17:23:53 +00:00
Devang Patel
073be55d8e
Remove unused function argument.
...
llvm-svn: 36441
2007-04-25 17:15:20 +00:00
Lauro Ramos Venancio
4ae9425bb6
remember to emit weak reference in one more case.
...
llvm-svn: 36438
2007-04-25 14:50:40 +00:00
Anton Korobeynikov
e9fcbefa9a
Regenerate
...
llvm-svn: 36437
2007-04-25 14:29:12 +00:00
Anton Korobeynikov
a97b694c82
Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
...
will follow.
llvm-svn: 36435
2007-04-25 14:27:10 +00:00
Evan Cheng
7818c03c6b
Fix for PR1306.
...
- A register def / use now implicitly affects sub-register liveness but does
not affect liveness information of super-registers.
- Def of a larger register (if followed by a use later) is treated as
read/mod/write of a smaller register.
llvm-svn: 36434
2007-04-25 07:30:23 +00:00
Evan Cheng
11dc5abde1
Clean up.
...
llvm-svn: 36431
2007-04-25 07:18:20 +00:00
Evan Cheng
8cd224e81c
Relex assertions to account for additional implicit def / use operands.
...
llvm-svn: 36430
2007-04-25 07:12:14 +00:00
Chris Lattner
827cb98a0a
If an alloca only has two types of uses: 1) reads 2) a memcpy/memmove that
...
copies from a constant global, then we can change the reads to read from the
global instead of from the alloca. This eliminates the alloca and the memcpy,
and promotes secondary optimizations (because the loads are now loads from
a constant global).
This is important for a common C idiom:
void foo() {
int A[] = {1,2,3,4,5,6,7,8,9...};
... only reads of A ...
}
For some reason, people forget to mark the array static or const.
This triggers on these multisource benchmarks:
JM/ldecode: block_pos, [3 x [4 x [4 x i32]]]
FreeBench/mason: m, [18 x i32], inlined 4 times
MiBench/office-stringsearch: search_strings, [1332 x i8*]
MiBench/office-stringsearch: find_strings, [1333 x i8*]
Prolangs-C++/city: dirs, [9 x i8*], inlined 4 places
and these spec benchmarks:
177.mesa: message, [8 x [32 x i8]]
186.crafty: bias_rl45, [64 x i32]
186.crafty: diag_sq, [64 x i32]
186.crafty: empty, [9 x i8]
186.crafty: xlate, [15 x i8]
186.crafty: status, [13 x i8]
186.crafty: bdinfo, [25 x i8]
445.gobmk: routines, [16 x i8*]
458.sjeng: piece_rep, [14 x i8*]
458.sjeng: t, [13 x i32], inlined 4 places.
464.h264ref: block8x8_idx, [3 x [4 x [4 x i32]]]
464.h264ref: block_pos, [3 x [4 x [4 x i32]]]
464.h264ref: j_off_tab, [12 x i32]
This implements Transforms/ScalarRepl/memcpy-from-global.ll
llvm-svn: 36429
2007-04-25 06:40:51 +00:00
Chris Lattner
bbe9b8a12f
simplify some code
...
llvm-svn: 36427
2007-04-25 05:49:09 +00:00
Chris Lattner
31e5addb67
refactor the SROA code out into its own method, no functionality change.
...
llvm-svn: 36426
2007-04-25 05:02:56 +00:00
Chris Lattner
b975bebec1
support for >4G stack frames
...
llvm-svn: 36425
2007-04-25 04:30:24 +00:00
Chris Lattner
1ef35a2721
support >4G stack frames
...
llvm-svn: 36423
2007-04-25 04:25:10 +00:00
Chris Lattner
9bd98ea4c1
support > 4G stack objects
...
llvm-svn: 36422
2007-04-25 04:20:54 +00:00
Owen Anderson
510fefcd8a
Undo my previous changes. Since my approach to this problem is being revised,
...
this approach is no longer appropriate.
llvm-svn: 36421
2007-04-25 04:18:54 +00:00
Chris Lattner
cb0ed0cfbd
allow support for 64-bit stack objects
...
llvm-svn: 36420
2007-04-25 04:08:28 +00:00
Devang Patel
d3208523b2
Fix
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048376.html
llvm-svn: 36417
2007-04-25 00:37:04 +00:00
Chris Lattner
01a26c74ae
Be more careful about folding op(x, undef) when we have vector operands.
...
This fixes CodeGen/X86/2007-04-24-VectorCrash.ll
llvm-svn: 36413
2007-04-25 00:00:45 +00:00
Chris Lattner
cb35c61a4b
Fix PR1351 and CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
...
llvm-svn: 36410
2007-04-24 22:51:03 +00:00
Bill Wendling
a784d875be
Update.
...
llvm-svn: 36407
2007-04-24 21:20:03 +00:00
Bill Wendling
b3b6c35beb
Add the PADDQ to the list.
...
llvm-svn: 36406
2007-04-24 21:19:14 +00:00
Bill Wendling
5c7f25632e
Add the final MMX instructions. Correct a few wrong patterns.
...
llvm-svn: 36405
2007-04-24 21:18:37 +00:00
Bill Wendling
e2324ca17d
Remove some invalid instructions from this check.
...
llvm-svn: 36404
2007-04-24 21:17:46 +00:00
Bill Wendling
591eab8844
Support for the special case of a vector with the canonical form:
...
vector_shuffle v1, v2, <2, 6, 3, 7>
I.e.
vector_shuffle v, undef, <2, 2, 3, 3>
MMX only has a shuffle for v4i16 vectors. It needs to use the unpackh for
this type of operation.
llvm-svn: 36403
2007-04-24 21:16:55 +00:00
Bill Wendling
47917b697f
Assertion when using a 1-element vector for an add operation. Get the
...
real vector type in this case.
llvm-svn: 36402
2007-04-24 21:13:23 +00:00
Chris Lattner
890683d636
ensure that every error return sets a message (and goes through Error, for
...
easy breakpointing).
Fix bugs reading constantexpr geps. We now can disassemble kc++ global
initializers.
llvm-svn: 36398
2007-04-24 18:15:21 +00:00
Chris Lattner
0ee6a3a561
fix memory leak
...
llvm-svn: 36397
2007-04-24 17:22:05 +00:00
Chris Lattner
c86d3f691b
fix a memory leak
...
llvm-svn: 36396
2007-04-24 17:20:52 +00:00
Chris Lattner
1e16bcf7ff
implement reading and writing of constant exprs.
...
llvm-svn: 36394
2007-04-24 07:07:11 +00:00
Owen Anderson
c24701ed7f
Rollback some changes that adversely affected performance. I'm currently rethinking
...
my approach to this, so hopefully I'll find a way to do this without making this slower.
llvm-svn: 36392
2007-04-24 06:40:39 +00:00
Chris Lattner
1663ccaf13
implement support for reading aggregate constants, including handling forward
...
constant references, etc.
llvm-svn: 36391
2007-04-24 05:48:56 +00:00
Chris Lattner
08feb1e73a
add supprot for FP constants, wide integers, and fix the encoding of MININT
...
llvm-svn: 36390
2007-04-24 04:04:35 +00:00
Chris Lattner
fbc1d33b81
read basic constants: null, undef, integers <= 64bits
...
llvm-svn: 36389
2007-04-24 03:30:34 +00:00
Chris Lattner
1e50c299a8
fix off-by-one computing size for section abbrevs
...
llvm-svn: 36388
2007-04-24 03:29:47 +00:00
Scott Michel
4cfa616cee
Use '-1U' where '-1UL' is obvious overkill, eliminating gcc warnings about
...
tests always being true in the process.
llvm-svn: 36387
2007-04-24 01:24:20 +00:00
Chris Lattner
a272ead35a
move check to the right place :)
...
llvm-svn: 36386
2007-04-24 00:21:45 +00:00
Chris Lattner
47d131bd32
track global inits
...
llvm-svn: 36385
2007-04-24 00:18:21 +00:00
Chris Lattner
52523561d9
Emit module-level constants.
...
llvm-svn: 36384
2007-04-24 00:16:04 +00:00
Dale Johannesen
8653d29b45
modify per review commentary
...
llvm-svn: 36383
2007-04-23 23:33:31 +00:00
Devang Patel
38bc86f057
Fix
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048333.html
llvm-svn: 36380
2007-04-23 22:42:03 +00:00
Chris Lattner
ccaa448dcf
Read global symtab
...
llvm-svn: 36378
2007-04-23 21:26:05 +00:00
Chris Lattner
1e93f5b8f4
fix off-by one
...
llvm-svn: 36377
2007-04-23 21:23:41 +00:00