Chris Lattner
464e2ea567
Two changes:
...
* In promote32, if we can just promote a constant value, do so instead of
promoting a constant dynamically.
* In visitReturn inst, actually USE the promote32 argument that takes a
Value*
The end result of this is that we now generate this:
test:
mov %EAX, 0
ret
instead of...
test:
mov %AX, 0
movzx %EAX, %AX
ret
for:
ushort %test() {
ret ushort 0
}
llvm-svn: 12679
2004-04-06 01:21:00 +00:00
Chris Lattner
bf791614ed
Merge the code generator miscompilation code into the optimizer miscompilation
...
code. This "instantly" gives us loop-extractor power to assist with the
debugment of our nasty codegen issues. :)
llvm-svn: 12678
2004-04-05 22:58:16 +00:00
Chris Lattner
95053a9f28
Make a method public
...
llvm-svn: 12677
2004-04-05 22:01:48 +00:00
Chris Lattner
9af52d12d9
Minor cleanups, remove some old debug code
...
llvm-svn: 12676
2004-04-05 21:37:55 +00:00
Chris Lattner
0434ba3ed0
Refactor and genericize code
...
llvm-svn: 12675
2004-04-05 21:37:38 +00:00
Chris Lattner
b0d1e9d02e
lli no longer takes the -quiet option!
...
llvm-svn: 12674
2004-04-05 20:28:41 +00:00
Chris Lattner
c97b7b2285
Do not mangle intrinsics in any way!
...
llvm-svn: 12673
2004-04-05 20:17:53 +00:00
Chris Lattner
0f1df36bdd
Make full use of the Mangler interface to simplify code
...
llvm-svn: 12671
2004-04-05 19:31:02 +00:00
Chris Lattner
d4f78f270b
Sparc don't got not "sqrtl", bum bum bum
...
llvm-svn: 12670
2004-04-05 19:05:15 +00:00
Misha Brukman
5ebc25c818
Kill warnings during an optimized compile where assert() disappears.
...
llvm-svn: 12669
2004-04-05 19:00:46 +00:00
Chris Lattner
29153fc2e5
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
...
llvm-svn: 12668
2004-04-05 18:46:55 +00:00
Chris Lattner
6f4fea937b
New testcase for PR312
...
llvm-svn: 12667
2004-04-05 18:46:33 +00:00
Chris Lattner
4d1fcf1dcd
Fix a bug in yesterdays checkins which broke siod. siod is a great testcase! :)
...
llvm-svn: 12659
2004-04-05 16:02:41 +00:00
Chris Lattner
8953b90aaa
Fix InstCombine/2004-04-04-InstCombineReplaceAllUsesWith.ll
...
llvm-svn: 12658
2004-04-05 02:10:19 +00:00
Chris Lattner
e79fd5c766
New testcase that crashes the instcombine pass. Dominance properties have
...
no meaning if the code is not reachable.
llvm-svn: 12657
2004-04-05 02:01:32 +00:00
Chris Lattner
677202b49e
PR82 is finally fixed!
...
llvm-svn: 12656
2004-04-05 01:43:08 +00:00
Chris Lattner
6087034f3a
Minor change
...
llvm-svn: 12655
2004-04-05 01:31:50 +00:00
Chris Lattner
33fd702590
Update getelementptr instruction description
...
llvm-svn: 12654
2004-04-05 01:30:49 +00:00
Chris Lattner
69193f93b6
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
llvm-svn: 12653
2004-04-05 01:30:19 +00:00
Chris Lattner
fd9fbe187d
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
Auto-upgrade .ll files that use ubytes to index into structures to use uint's.
llvm-svn: 12652
2004-04-05 01:30:04 +00:00
Chris Lattner
15701e84d1
Implement support for a new LLVM 1.3 bytecode format, which uses uint's
...
to index into structure types and allows arbitrary 32- and 64-bit integer
types to index into sequential types.
llvm-svn: 12651
2004-04-05 01:27:26 +00:00
Chris Lattner
60cf133a8e
Be more restrictive with the index types we allow for sequential types
...
llvm-svn: 12650
2004-04-05 01:25:21 +00:00
Chris Lattner
e916f16dbb
PR305 is now fixed
...
llvm-svn: 12649
2004-04-05 00:40:55 +00:00
Chris Lattner
dd28474610
Add ConstantExpr::get(Sign|Zero)Extend methods
...
llvm-svn: 12648
2004-04-04 23:20:30 +00:00
Chris Lattner
dfcf8e34cf
In the perhaps not-to-distant future, we might support gep instructions that
...
have non-long indices for sequential types. In order to avoid trying to figure
out how the v9 backend works, we'll just hack it in the preselection pass.
llvm-svn: 12647
2004-04-04 20:44:05 +00:00
Chris Lattner
ca76d11a81
Adjust to new interface
...
llvm-svn: 12646
2004-04-04 19:47:06 +00:00
Chris Lattner
5453b2f376
Support iteration over constant instructions
...
llvm-svn: 12645
2004-04-04 19:46:54 +00:00
Chris Lattner
092d260fc1
Adjust to new gep_type_iterator prototypes.
...
llvm-svn: 12644
2004-04-04 17:30:06 +00:00
Chris Lattner
bc8ba73cf1
Remove a bunch of cruft that was used to be backwards compatible with the last
...
prerelease format for LLVM bytecode files. Now we only are compatible with
LLVM 1.0+.
llvm-svn: 12643
2004-04-03 23:43:42 +00:00
Chris Lattner
476f71e30b
Allow for use of arbitrary iterator types...
...
llvm-svn: 12642
2004-04-03 23:29:11 +00:00
Chris Lattner
8ed3c8aa13
Implement test/Regression/Transforms/GCSE/undefined_load.ll
...
llvm-svn: 12641
2004-04-03 00:45:16 +00:00
Chris Lattner
db033fa425
New testcase
...
llvm-svn: 12640
2004-04-03 00:44:56 +00:00
Chris Lattner
0defaa1cbc
Add a break in the default case
...
llvm-svn: 12639
2004-04-03 00:43:03 +00:00
Brian Gaeke
5ade501501
Add autoconf support for isStandardOutAConsole ().
...
llvm-svn: 12638
2004-04-02 21:26:04 +00:00
Brian Gaeke
0d372ee696
Regenerated using autoheader-2.57.
...
llvm-svn: 12637
2004-04-02 21:26:03 +00:00
Brian Gaeke
8bdbb3d7eb
Regenerated using autoconf-2.57.
...
llvm-svn: 12636
2004-04-02 21:26:02 +00:00
Brian Gaeke
c6dba95bbc
check for isatty function
...
llvm-svn: 12635
2004-04-02 21:06:44 +00:00
Chris Lattner
9dcd639e5c
Remove obsolete analyses
...
llvm-svn: 12634
2004-04-02 20:56:33 +00:00
Chris Lattner
6748cca268
Remove obsolete files
...
llvm-svn: 12633
2004-04-02 20:56:24 +00:00
Brian Gaeke
d0bdad38f3
Add support for many of the MRegisterInfo callbacks.
...
Eliminating call-frame pseudo instrs and frame indices are still stubs.
Flesh out the emitPrologue method based on better ABI knowledge.
llvm-svn: 12632
2004-04-02 20:53:37 +00:00
Brian Gaeke
d4869e4107
Add load, store, and NOP instructions.
...
Fix up comments.
llvm-svn: 12631
2004-04-02 20:53:37 +00:00
Brian Gaeke
b65254a34d
Add support for printing pc-relative displacements of functions (as used in
...
the CALL instruction).
llvm-svn: 12630
2004-04-02 20:53:35 +00:00
Brian Gaeke
2fd46b6e43
Add support for call instructions (0-ary only for now).
...
llvm-svn: 12629
2004-04-02 20:53:33 +00:00
Chris Lattner
6f29c89597
cleanup some long-dead code
...
llvm-svn: 12628
2004-04-02 20:46:26 +00:00
Chris Lattner
d4f122044a
Ignore configure produced files
...
llvm-svn: 12627
2004-04-02 20:34:30 +00:00
Chris Lattner
64cdd1ef55
Tweak libraries for scev changes
...
llvm-svn: 12625
2004-04-02 20:32:46 +00:00
Chris Lattner
d8d803adb9
new testcase
...
llvm-svn: 12624
2004-04-02 20:27:47 +00:00
Chris Lattner
0916921332
Comment out debugging printouts
...
llvm-svn: 12623
2004-04-02 20:26:46 +00:00
Chris Lattner
76378746c5
New testcases for the indvars pass
...
llvm-svn: 12622
2004-04-02 20:26:04 +00:00
Chris Lattner
2c416ae11f
Tweak testcase to work with new indvars pass
...
llvm-svn: 12621
2004-04-02 20:25:26 +00:00
Chris Lattner
e61b67d7d5
Rewrite the indvars pass to use the ScalarEvolution analysis.
...
This also implements some new features for the indvars pass, including
linear function test replacement, exit value substitution, and it works with
a much more general class of induction variables and loops.
llvm-svn: 12620
2004-04-02 20:24:31 +00:00
Chris Lattner
d934c70cf8
Add a new analysis
...
llvm-svn: 12619
2004-04-02 20:23:17 +00:00
Chris Lattner
eed034bcd3
Fix the obvious bug in my previous checkin
...
llvm-svn: 12618
2004-04-02 18:15:10 +00:00
Chris Lattner
9f0db32625
Implement Transforms/SimplifyCFG/return-merge.ll
...
This actually causes us to turn code like:
return C ? A : B;
into a select instruction.
llvm-svn: 12617
2004-04-02 18:13:43 +00:00
Chris Lattner
99c9b9c02f
New testcase
...
llvm-svn: 12616
2004-04-02 18:12:49 +00:00
Alkis Evlogimenos
d64e904e27
Clean up code a bit.
...
llvm-svn: 12615
2004-04-02 18:11:32 +00:00
Brian Gaeke
2845936a34
Only strip symbols if emitting bytecode to the assembly file.
...
Move lowerselect pass to come after preselection. Move machine
code construction and stack slots pass to come right before instruction
selection. This is to help fix perlbmk.
Update comments.
Make the sequence of passes in addPassesToJITCompile look more like
the sequence of passes in addPassesToEmitAssembly, including support
for -print-machineinstrs.
llvm-svn: 12614
2004-04-02 17:52:40 +00:00
Brian Gaeke
cc24411c0a
Add support for constant select expressions. Clarify the assertion failure msg.
...
llvm-svn: 12613
2004-04-02 17:52:29 +00:00
Chris Lattner
3838243d04
Minor speedup
...
llvm-svn: 12612
2004-04-02 16:28:32 +00:00
Alkis Evlogimenos
fe66caa9a0
Fix type in comments
...
llvm-svn: 12611
2004-04-02 16:02:50 +00:00
Alkis Evlogimenos
5fc4772d5e
Fix type in instruction builder instantiation
...
llvm-svn: 12610
2004-04-02 15:51:03 +00:00
Chris Lattner
a45a216ff6
Make the verifier API more complete and useful.
...
Patch contributed by Reid Spencer
llvm-svn: 12609
2004-04-02 15:45:08 +00:00
Chris Lattner
b753dd1cb4
Make the verifier API more complete and useful
...
llvm-svn: 12608
2004-04-02 15:44:33 +00:00
Alkis Evlogimenos
d186ed02e4
Add more ADC and SBB variants
...
llvm-svn: 12607
2004-04-02 07:11:10 +00:00
Chris Lattner
bcf2623cab
minor formatting change
...
llvm-svn: 12606
2004-04-02 06:32:45 +00:00
Chris Lattner
a413b08580
Fix two pretty serious bugs:
...
1. Each time the loop extractor extracted a loop, we would leak a module.
2. When we extracted a loop, we didn't add the new function to the list of
miscompiled functions. Thus if the bug was in a loop nest and we
extracted it, we could actually *LOSE THE BUG*, which is very bad.
With these patches, bugpoint has successfully found a bug for me in a function
with several nested loops, and cut it down to just one of them. :) :)
llvm-svn: 12605
2004-04-02 06:32:17 +00:00
Chris Lattner
af67dac7f4
Fix a fairly nasty bug that prevented bugpoint from working quite right when
...
hacking on programs with two functions that have the same name.
llvm-svn: 12604
2004-04-02 06:30:33 +00:00
Chris Lattner
73c141ac71
If the program returns a non-zero exit value, don't leave files laying
...
around
llvm-svn: 12603
2004-04-02 05:33:06 +00:00
Chris Lattner
46e18c7f87
Fix wonky header
...
Address PR305: LLVM tools will happily spew bytecode onto your terminal
llvm-svn: 12602
2004-04-02 05:06:57 +00:00
Chris Lattner
3af1fffd3c
Add new function
...
llvm-svn: 12601
2004-04-02 05:04:12 +00:00
Chris Lattner
454e18317d
Add new function, autoconf support required tho
...
llvm-svn: 12600
2004-04-02 05:04:03 +00:00
Chris Lattner
fd8f46b1cd
Bug fixed
...
llvm-svn: 12598
2004-04-01 20:31:29 +00:00
Chris Lattner
c24019c825
Fix PR310 and TailDup/2004-04-01-DemoteRegToStack.llx
...
llvm-svn: 12597
2004-04-01 20:28:45 +00:00
Chris Lattner
914a7d0d90
New testcase for PR310
...
llvm-svn: 12596
2004-04-01 20:28:35 +00:00
Chris Lattner
59fdf74968
Remove some assertions that are now bogus with the last patch I put in
...
llvm-svn: 12595
2004-04-01 19:21:46 +00:00
Chris Lattner
ff03fe3b13
Bug fixed
...
llvm-svn: 12593
2004-04-01 19:09:49 +00:00
Chris Lattner
146d0df5e4
Fix PR306: Loop simplify incorrectly updates dominator information
...
Testcase: LoopSimplify/2004-04-01-IncorrectDomUpdate.ll
llvm-svn: 12592
2004-04-01 19:06:07 +00:00
Chris Lattner
f475a12626
New testcase for PR306
...
llvm-svn: 12591
2004-04-01 19:05:54 +00:00
Misha Brukman
b78259a57d
Fix grammar.
...
llvm-svn: 12590
2004-04-01 17:15:42 +00:00
Chris Lattner
b28dd11e33
Add support for select constant expressions to the CBE, fixing SIOD
...
llvm-svn: 12589
2004-04-01 05:28:26 +00:00
Chris Lattner
bc7e35b3b1
Simplify code by using the more powerful BuildMI forms.
...
Implement a small optimization. In test/Regression/CodeGen/X86/select.ll,
we now generate this for foldSel3:
foldSel3:
mov %AL, BYTE PTR [%ESP + 4]
fld DWORD PTR [%ESP + 8]
fld DWORD PTR [%ESP + 12]
mov %EAX, DWORD PTR [%ESP + 16]
mov %ECX, DWORD PTR [%ESP + 20]
cmp %EAX, %ECX
fxch %ST(1)
fcmovae %ST(0), %ST(1)
*** fstp %ST(1)
ret
Instead of:
foldSel3:
mov %AL, BYTE PTR [%ESP + 4]
fld DWORD PTR [%ESP + 8]
fld DWORD PTR [%ESP + 12]
mov %EAX, DWORD PTR [%ESP + 16]
mov %ECX, DWORD PTR [%ESP + 20]
cmp %EAX, %ECX
fxch %ST(1)
fcmovae %ST(0), %ST(1)
*** fxch %ST(1)
*** fstp %ST(0)
ret
In practice, this only effects code size: performance should be basically
unaffected.
llvm-svn: 12588
2004-04-01 04:06:09 +00:00
Chris Lattner
3c8561442c
Wrap at 80 cols
...
llvm-svn: 12587
2004-04-01 04:03:27 +00:00
Chris Lattner
fb893edbe3
Allow converting a builder to an iterator
...
llvm-svn: 12586
2004-04-01 04:03:10 +00:00
Chris Lattner
cfbc023153
Tests for fp cmov's that I forgot to check in earlier
...
llvm-svn: 12585
2004-04-01 03:47:56 +00:00
Chris Lattner
1a7e43c5cf
Clear out all of the changes. Reset version numbers to 1.3
...
add note about select
llvm-svn: 12584
2004-04-01 00:41:31 +00:00
Brian Gaeke
8f177d9171
Add clear() forwarding method.
...
llvm-svn: 12580
2004-03-31 22:43:12 +00:00
Chris Lattner
d55509c281
Generate slightly smaller code, "test R, R" instead of "cmp R, 0"
...
llvm-svn: 12579
2004-03-31 22:22:36 +00:00
Chris Lattner
a4b15f04c6
The X86 backend no longer needs the select lowering pass.
...
llvm-svn: 12578
2004-03-31 22:03:46 +00:00
Chris Lattner
37a7f09d80
Codegen FP select instructions into X86 conditional moves. Annoyingly enough
...
the X86 does not support a full set of fp cmove instructions, so we can't always
fold the condition into the select. :( Yuck.
llvm-svn: 12577
2004-03-31 22:03:35 +00:00
Chris Lattner
c07c95816a
Add support for floating point conditional move instructions
...
llvm-svn: 12576
2004-03-31 22:02:36 +00:00
Chris Lattner
cbb4ed9ef2
Add support for FP cmoves
...
llvm-svn: 12575
2004-03-31 22:02:21 +00:00
Chris Lattner
9fe1646804
Add FP conditional move instructions, which annoyingly have special properties
...
that require the asmwriter to be extended (printing implicit uses before the
explicit operands)
llvm-svn: 12574
2004-03-31 22:02:13 +00:00
Chris Lattner
61fab1409d
Add warning
...
llvm-svn: 12573
2004-03-31 22:00:30 +00:00
Chris Lattner
afbafb55ea
MBB::remove should not modify the iterator passed in
...
llvm-svn: 12572
2004-03-31 21:59:59 +00:00
Chris Lattner
acccf32aa3
MachineBasicBlock::remove should not modify the iterator passed in
...
llvm-svn: 12571
2004-03-31 21:59:29 +00:00
Chris Lattner
7c92c296ba
Improve description, add warning
...
llvm-svn: 12570
2004-03-31 21:59:07 +00:00
Chris Lattner
49ed8ad580
MachineBasicBlock::remove should not change the iterator passed into it
...
llvm-svn: 12569
2004-03-31 21:58:50 +00:00
Brian Gaeke
623710bf2f
Factor out getStaticStackSize from InsertPrologCode(), so that I can more
...
easily steal it for a separate use in the reoptimizer.
llvm-svn: 12568
2004-03-31 20:58:37 +00:00
Brian Gaeke
77e78a4531
Use the true, decoded name of the archive member in getObjectType.
...
In ReadArchiveBuffer, make sure that MemberName is set in the case where
getObjectType would want to return SVR4LongFilename.
llvm-svn: 12567
2004-03-31 19:51:00 +00:00
Chris Lattner
c0ba90e35c
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
...
llvm-svn: 12566
2004-03-31 03:49:47 +00:00
Chris Lattner
709f03e2dd
Fix linking of constant expr casts due to type resolution changes. With
...
this and the other patches 253.perlbmk links again.
llvm-svn: 12565
2004-03-31 02:58:28 +00:00
Chris Lattner
467cb2bc5d
Add support for constant expr casts
...
llvm-svn: 12564
2004-03-31 02:56:11 +00:00
Chris Lattner
974efc72be
Add support for reading constantexpr select instructions
...
llvm-svn: 12563
2004-03-31 02:53:59 +00:00
Chris Lattner
b7897ce431
Fix a latent bug in select constantexpr handling that was broke 253.perlbmk
...
llvm-svn: 12562
2004-03-30 22:51:03 +00:00
Alkis Evlogimenos
a333b1382f
Correctly update LiveVariables when an instruction changes
...
llvm-svn: 12561
2004-03-30 22:44:39 +00:00
Chris Lattner
32817f5985
Fold comparisons into select instructions, making much better code and
...
using our broad selection of movcc instructions. :)
llvm-svn: 12560
2004-03-30 22:39:09 +00:00
Chris Lattner
2dfdad631f
Test folding comparisons into select instructions
...
llvm-svn: 12559
2004-03-30 22:37:04 +00:00
Chris Lattner
f78f843adf
New testcase. This now codegens to:
...
max:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, DWORD PTR [%ESP + 8]
cmp %EAX, %ECX
cmovle %EAX, %ECX
ret
Someone should really implement passing arguments through registers for
known-internal functions. :)
llvm-svn: 12558
2004-03-30 22:36:52 +00:00
Chris Lattner
358c97e7ae
Implement spill code folding for all of the conditional move instructions
...
llvm-svn: 12554
2004-03-30 21:29:47 +00:00
Chris Lattner
53b58cb854
Add direct support for integer select instructions, though we still don't support
...
folding compares into the select yet.
llvm-svn: 12553
2004-03-30 21:22:00 +00:00
Chris Lattner
b5d47a9420
New testcase for select instructions
...
llvm-svn: 12552
2004-03-30 21:21:14 +00:00
Chris Lattner
deab5e212d
Fix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llx
...
llvm-svn: 12551
2004-03-30 20:58:25 +00:00
Chris Lattner
090516fe93
New testcase that crashes the assembler
...
llvm-svn: 12550
2004-03-30 20:58:00 +00:00
Chris Lattner
1563983d81
Fix some serious bugs in the cmov descriptions, which didn't cause a problem because
...
we never generated them
Make indentation a bit more consistent
llvm-svn: 12549
2004-03-30 20:18:02 +00:00
Brian Gaeke
ef327be6ed
Start cleaning up this pass so that I can debug it.
...
llvm-svn: 12548
2004-03-30 19:53:46 +00:00
Chris Lattner
f17d2d33fb
Oops, actually USE the previously computed value
...
llvm-svn: 12547
2004-03-30 19:45:39 +00:00
Chris Lattner
fdf3202d69
Test general value/value selection which we can do now that we use the
...
select instruction
llvm-svn: 12546
2004-03-30 19:45:11 +00:00
Chris Lattner
81bdcb90ce
Now that all the code generators support the select instruction, and the instcombine
...
pass can eliminate many nasty cases of them, start generating them in the optimizers
llvm-svn: 12545
2004-03-30 19:44:05 +00:00
Chris Lattner
533bc49775
Implement select.ll:test[3-6]
...
llvm-svn: 12544
2004-03-30 19:37:13 +00:00
Chris Lattner
b785d280ec
Add some testcases for select simplification
...
llvm-svn: 12543
2004-03-30 19:36:54 +00:00
Chris Lattner
0048e574fb
Fix a fairly major performance problem. If a PHI node had a constant as
...
an incoming value from a block, the selector would evaluate the constant
at the TOP of the block instead of at the end of the block. This made the
live range for the constant span the entire block, increasing register
pressure needlessly.
llvm-svn: 12542
2004-03-30 19:10:12 +00:00
Chris Lattner
1a0e9ac2f5
Add the select lowering pass to get initial support for select instructions
...
llvm-svn: 12541
2004-03-30 18:41:59 +00:00
Chris Lattner
059f390257
Add a simple select instruction lowering pass
...
llvm-svn: 12540
2004-03-30 18:41:10 +00:00
Chris Lattner
55481f78d3
Add some new methods
...
llvm-svn: 12539
2004-03-30 00:20:08 +00:00
Brian Gaeke
fd02378d3e
Don't warn about a null live range if the Value is a ConstantIntegral.
...
Otherwise, if you're in debugging mode, you get warnings for (apparently)
every immediate constant in the function during reg. allocation.
llvm-svn: 12538
2004-03-29 21:58:41 +00:00
Brian Gaeke
2fe0ac9ade
Change how the beginnings and ends of MachineFunctions are printed. Get
...
rid of the funny cast.
llvm-svn: 12537
2004-03-29 21:58:31 +00:00
Chris Lattner
5152b9ed34
Adjust to new itf
...
llvm-svn: 12534
2004-03-29 20:42:49 +00:00
Chris Lattner
8582975b62
Relax the interface a bit
...
llvm-svn: 12533
2004-03-29 20:42:38 +00:00
John Criswell
fa2f3686a3
Merged in RELEASE_12.
...
llvm-svn: 12532
2004-03-29 20:23:11 +00:00
John Criswell
d2ff5cf7e8
Merged in RELEASE_12.
...
This fixes the zlib linking problems.
llvm-svn: 12531
2004-03-29 20:22:30 +00:00
Chris Lattner
3cdc27c868
Handle -0.0 correctly
...
llvm-svn: 12530
2004-03-29 19:51:24 +00:00
Chris Lattner
87d6b404b5
Add a faq entry
...
llvm-svn: 12529
2004-03-29 19:14:35 +00:00
Chris Lattner
817175f883
Add a bunch of methods that should have been added a long time ago.
...
llvm-svn: 12526
2004-03-29 02:37:53 +00:00
Chris Lattner
5f126b74d3
Add another check
...
llvm-svn: 12525
2004-03-29 00:29:36 +00:00
Chris Lattner
587a9f1416
Fix an assertion
...
Contributed by Reid Spencer
llvm-svn: 12524
2004-03-29 00:17:20 +00:00
Chris Lattner
dd7ce6c31a
Make error message a bit nicer.
...
Contributed by Reid Spencer
llvm-svn: 12523
2004-03-29 00:16:01 +00:00
Chris Lattner
04d6d9d606
Add two methods which have been needed for a long time: Type::get(Un)signedVersion
...
llvm-svn: 12522
2004-03-26 21:43:22 +00:00
Chris Lattner
3aa7b9d08c
Make sure to get the headers from zlib correctly
...
llvm-svn: 12521
2004-03-26 17:04:53 +00:00
Chris Lattner
56b5051428
X % -1 == X % 1 == 0
...
llvm-svn: 12520
2004-03-26 16:11:24 +00:00
Chris Lattner
57c67b06e9
Two changes:
...
#1 is to unconditionally strip constantpointerrefs out of
instruction operands where they are absolutely pointless and inhibit
optimization. GRRR!
#2 is to implement InstCombine/getelementptr_const.ll
llvm-svn: 12519
2004-03-25 22:59:29 +00:00
Chris Lattner
3932cab427
New testcase
...
llvm-svn: 12518
2004-03-25 22:59:06 +00:00
Chris Lattner
82d34eb470
Minor efficiency improvement, finegrainify namespacification
...
llvm-svn: 12517
2004-03-25 22:56:03 +00:00
Chris Lattner
998c0674be
Add note about setting up linux systems to directly execute LLVM bytecode files
...
Fixes PR303
llvm-svn: 12516
2004-03-25 20:38:40 +00:00
Chris Lattner
3922d607a5
Hrm, we were leaking ~1M of garbage that valgrind never told us about because
...
it was "reachable". Cute.
llvm-svn: 12515
2004-03-19 23:34:33 +00:00
Chris Lattner
9e0b81c3e0
Add a dose of reality into the release notes
...
llvm-svn: 12510
2004-03-19 19:22:28 +00:00
Chris Lattner
abb77c9959
Teach the optimizer to delete zero sized alloca's (but not mallocs!)
...
llvm-svn: 12507
2004-03-19 06:08:10 +00:00
Chris Lattner
597f1da506
New testcase, the optimizer can delete zero sized allocas
...
llvm-svn: 12506
2004-03-19 06:07:43 +00:00
Chris Lattner
91f297d4fe
Perhaps the last bugfix before the release? HOPEFULLY! :)
...
llvm-svn: 12505
2004-03-19 04:26:04 +00:00
Chris Lattner
ba6641d598
Fix PR299: [Sparc] Code generator asserts on alloc of zero size type
...
llvm-svn: 12504
2004-03-19 04:21:43 +00:00
Chris Lattner
6ca9b89abb
Malloc doesn't kill a load. This patch need not go into 1.2 though.
...
llvm-svn: 12500
2004-03-18 17:01:26 +00:00
Chris Lattner
0b41ebe65c
Fix a minor wording bug in the manual
...
llvm-svn: 12496
2004-03-18 14:58:55 +00:00
Chris Lattner
211ae0bf05
This is the last remaining bug that I know of in the loop extractor. The loop
...
extractor has extracted hundreds of loops from the SPEC benchmarks without crashing
and without misoptimizing the programs.
This testcase could be reduced substantially more by hand, but I don't have time
to work on it right now.
llvm-svn: 12495
2004-03-18 06:41:59 +00:00
Chris Lattner
dc47e27188
Fix a really nasty bug that was breaking ijpeg in LLC mode. We were incorrectly
...
folding load instructions into other instructions across free instruction
boundaries. Perhaps this will also fix the other strange failures?
llvm-svn: 12494
2004-03-18 06:29:54 +00:00
Chris Lattner
232155dc1b
Fix bug: CodeExtractor/2004-03-17-MissedLiveIns.ll
...
With this fix we now successfully extract all 149 loops from 256.bzip2 without
crashing or miscompiling the program!
llvm-svn: 12493
2004-03-18 05:56:32 +00:00
Chris Lattner
2bcfcc90c8
New testcase, reduced from 256.bzip2
...
llvm-svn: 12492
2004-03-18 05:55:29 +00:00
Chris Lattner
e83693560a
Add statistics to the loop extractor. The loop extractor has successfully
...
extracted all 63 loops for Olden/bh without crashing and without
miscompiling the program!!!
llvm-svn: 12491
2004-03-18 05:46:10 +00:00
Chris Lattner
5bce0c807d
Fix problem with PHI nodes having multiple predecessors from different
...
exit nodes
llvm-svn: 12490
2004-03-18 05:43:18 +00:00
Chris Lattner
acd75986ee
Fix CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll
...
llvm-svn: 12489
2004-03-18 05:38:31 +00:00
Chris Lattner
4c7fcbf77b
New testcase
...
llvm-svn: 12488
2004-03-18 05:33:39 +00:00
Chris Lattner
320d59f4cd
Seriously simplify and correct the PHI node handling code.
...
llvm-svn: 12487
2004-03-18 05:28:49 +00:00
Chris Lattner
d8017a340d
Fix CodeExtractor/2004-03-17-OutputMismatch.ll
...
llvm-svn: 12486
2004-03-18 04:12:05 +00:00
Chris Lattner
b7b099d569
New testcase that crashes the code extractor
...
llvm-svn: 12485
2004-03-18 04:10:02 +00:00
Chris Lattner
37de257ef0
Fix several bugs in the extractor:
...
1. Names were not put on the new arguments created (ok, this just helps sanity :)
2. Fix outgoing pointer values
3. Do not insert stores for values that had not been computed
4. Fix some wierd problems with the outset calculation
This fixes CodeExtractor/2004-03-14-DominanceProblem.ll, making the extractor
work on at least one simple case!
llvm-svn: 12484
2004-03-18 03:49:40 +00:00
Chris Lattner
e9235d2dde
The code extractor needs dominator info. Provide it
...
llvm-svn: 12483
2004-03-18 03:48:06 +00:00
Chris Lattner
835a759686
The code extractor needs dominator information, so we provide it.
...
llvm-svn: 12482
2004-03-18 03:47:46 +00:00
Chris Lattner
cee3404d0a
Prune #includes, moving the module interface to the front. Note that this
...
exposed the fact that the header was not self-contained. There is a reason
we do things :)
llvm-svn: 12481
2004-03-18 03:15:29 +00:00
Chris Lattner
5b460d2ad7
Make this header file self-contained
...
llvm-svn: 12480
2004-03-18 03:14:56 +00:00
Chris Lattner
3022b1bc2c
Fix a HORRIBLY NASTY bug that caused siod to stop working last night.
...
llvm-svn: 12479
2004-03-17 23:22:04 +00:00
Chris Lattner
baf3f62819
Fix a tag-o
...
llvm-svn: 12477
2004-03-17 21:33:32 +00:00
Chris Lattner
8e8716518e
Rewrite the second on AnalysisUsage usage. This documents the new
...
addRequiredTransitive member that Misha added, and explains the whole
concept a lot better. Also, the document used incorrect "subsubsection"
tags instead of "doc_subsubsection" which this fixes.
llvm-svn: 12474
2004-03-17 21:09:55 +00:00
Chris Lattner
b38cc9c026
When loop extraction succeeds, make sure to map the function pointers over
...
to avoid dangling references.
llvm-svn: 12470
2004-03-17 17:42:09 +00:00
Chris Lattner
7e51a502bc
Fix an inverted condition that causes us to think that loop extraction
...
accomplished something when it really did not. This does not fix the bigger problem tho.
llvm-svn: 12469
2004-03-17 17:37:18 +00:00
Chris Lattner
425726d9c2
Fix an iterator invalidation problem in a "buggy" pass
...
llvm-svn: 12468
2004-03-17 17:29:08 +00:00
Chris Lattner
2820235689
update release notes for 1.2
...
llvm-svn: 12467
2004-03-17 03:54:41 +00:00
John Criswell
d064f2124e
Modify test to use the %t substition (temporary name). This is available
...
in the QMTest Testrunner tests.
Please note that putting output files in the Output directory no longer
works, as QMTest does not build Output directories anymore (nor does the
test run in a separate subdirectory, anyway).
llvm-svn: 12466
2004-03-17 02:31:29 +00:00
Chris Lattner
a078f47b39
Fix compilation of mesa, which I broke earlier today
...
llvm-svn: 12465
2004-03-17 02:02:47 +00:00
Chris Lattner
684fa5ac64
Be more accurate
...
llvm-svn: 12464
2004-03-17 01:59:27 +00:00
Chris Lattner
10a8d735c8
cleanup comment
...
llvm-svn: 12463
2004-03-17 01:29:36 +00:00
Alkis Evlogimenos
02a5354d9b
Make the set of fixed (preallocated) intervals be a fixed superset of
...
unhandled + handled. So unhandled is now including all fixed intervals
and fixed intervals never changes when processing a function.
llvm-svn: 12462
2004-03-17 00:48:59 +00:00
Chris Lattner
a3783a577e
Fix bug in previous checkin
...
llvm-svn: 12458
2004-03-16 23:36:49 +00:00
Chris Lattner
95057f6ad1
Okay, so there is no reasonable way for tail duplication to update SSA form,
...
as it is making effectively arbitrary modifications to the CFG and we don't
have a domset/domfrontier implementations that can handle the dynamic updates.
Instead of having a bunch of code that doesn't actually work in practice,
just demote any potentially tricky values to the stack (causing the problem
to go away entirely). Later invocations of mem2reg will rebuild SSA for us.
This fixes all of the major performance regressions with tail duplication
from LLVM 1.1. For example, this loop:
---
int popcount(int x) {
int result = 0;
while (x != 0) {
result = result + (x & 0x1);
x = x >> 1;
}
return result;
}
---
Used to be compiled into:
int %popcount(int %X) {
entry:
br label %loopentry
loopentry: ; preds = %entry, %no_exit
%x.0 = phi int [ %X, %entry ], [ %tmp.9, %no_exit ] ; <int> [#uses=3]
%result.1.0 = phi int [ 0, %entry ], [ %tmp.6, %no_exit ] ; <int> [#uses=2]
%tmp.1 = seteq int %x.0, 0 ; <bool> [#uses=1]
br bool %tmp.1, label %loopexit, label %no_exit
no_exit: ; preds = %loopentry
%tmp.4 = and int %x.0, 1 ; <int> [#uses=1]
%tmp.6 = add int %tmp.4, %result.1.0 ; <int> [#uses=1]
%tmp.9 = shr int %x.0, ubyte 1 ; <int> [#uses=1]
br label %loopentry
loopexit: ; preds = %loopentry
ret int %result.1.0
}
And is now compiled into:
int %popcount(int %X) {
entry:
br label %no_exit
no_exit: ; preds = %entry, %no_exit
%x.0.0 = phi int [ %X, %entry ], [ %tmp.9, %no_exit ] ; <int> [#uses=2]
%result.1.0.0 = phi int [ 0, %entry ], [ %tmp.6, %no_exit ] ; <int> [#uses=1]
%tmp.4 = and int %x.0.0, 1 ; <int> [#uses=1]
%tmp.6 = add int %tmp.4, %result.1.0.0 ; <int> [#uses=2]
%tmp.9 = shr int %x.0.0, ubyte 1 ; <int> [#uses=2]
%tmp.1 = seteq int %tmp.9, 0 ; <bool> [#uses=1]
br bool %tmp.1, label %loopexit, label %no_exit
loopexit: ; preds = %no_exit
ret int %tmp.6
}
llvm-svn: 12457
2004-03-16 23:29:09 +00:00
Chris Lattner
bb1a2cc7ab
This code was both incredibly complex and incredibly broken. Fix it.
...
llvm-svn: 12456
2004-03-16 23:23:11 +00:00
Chris Lattner
0e64dda7ca
Another simple testcase
...
llvm-svn: 12455
2004-03-16 23:07:52 +00:00
Brian Gaeke
d962dd5528
The .type directive on Solaris uses the # character instead of @.
...
llvm-svn: 12454
2004-03-16 22:52:04 +00:00
Brian Gaeke
3fb0e203cd
Fix bug in zero-extending of shorts.
...
llvm-svn: 12453
2004-03-16 22:45:42 +00:00
Brian Gaeke
ae22ce5370
Add UMULrr and SMULrr instructions.
...
llvm-svn: 12452
2004-03-16 22:37:13 +00:00
Brian Gaeke
ae0ca8baa6
Use ! for comment char; it works in both Solaris as and GAS.
...
llvm-svn: 12451
2004-03-16 22:37:12 +00:00
Brian Gaeke
67fcefbfef
Make getClass more robust by adding cLong.
...
Add handling for Mul instruction.
llvm-svn: 12450
2004-03-16 22:37:11 +00:00
Chris Lattner
64f2517c07
Bug fixed
...
llvm-svn: 12449
2004-03-16 21:55:23 +00:00
Chris Lattner
bd10066d97
New testcase for PR297
...
llvm-svn: 12448
2004-03-16 21:52:24 +00:00
Brian Gaeke
33e83b64b4
Add a better head-of-file comment.
...
llvm-svn: 12447
2004-03-16 21:47:20 +00:00
Chris Lattner
1ab58dd802
Bug not fixed after all
...
llvm-svn: 12446
2004-03-16 21:39:04 +00:00
Chris Lattner
618c3990c7
Fix test
...
llvm-svn: 12445
2004-03-16 21:10:15 +00:00
Chris Lattner
a0fb904d18
Fix testcase
...
llvm-svn: 12444
2004-03-16 20:04:55 +00:00
Chris Lattner
fa48edfb7d
Punt if we see gigantic PHI nodes. This improves a huge interpreter loop
...
testcase from 32.5s in -raise to take .3s
llvm-svn: 12443
2004-03-16 19:52:53 +00:00
Chris Lattner
7a7b114871
Do not try to optimize PHI nodes with incredibly high degree. This reduces SCCP
...
time from 615s to 1.49s on a large testcase that has a gigantic switch statement
that all of the blocks in the function go to (an intepreter).
llvm-svn: 12442
2004-03-16 19:49:59 +00:00
Chris Lattner
a64923ad26
Do not copy gigantic switch instructions
...
llvm-svn: 12441
2004-03-16 19:45:22 +00:00
Chris Lattner
0ea6017b87
Fix bug in bug name. It must be the painkillers that I haven't been taking
...
llvm-svn: 12440
2004-03-16 09:01:10 +00:00
Chris Lattner
d3dc850c6c
Implement a new feature in the CFE, moving a GCC extension from the unsupported
...
to the supported list
llvm-svn: 12439
2004-03-16 08:54:07 +00:00
Chris Lattner
91d855f150
New testcase
...
llvm-svn: 12437
2004-03-16 08:49:48 +00:00