Roman Levenstein
7e71b4baaf
Some improvements related to the computation of isReachable.
...
This fixes Bugzilla #1835 (http://llvm.org/bugs/show_bug.cgi?id=1835 ).
This patched is reviewed by Tanya and Dan. Dan tested and approved it.
The reason for the bad performance of the old algorithm is that it is very naive and scans every
time all nodes of the DAG in the worst case.
This patch introduces a new algorithm based on the paper "Online algorithms
for maintaining the topological order of a directed acyclic graph" by
David J.Pearce and Paul H.J.Kelly. This is the MNR algorithm. It has a
linear time worst-case and performs much better in most situations.
The paper can be found here:
http://fano.ics.uci.edu/cites/Document/Online-algorithms-for-maintaining-the-topological-order-of-a-directed-acyclic-graph.html
The main idea of the new algorithm is to compute the topological ordering of the SNodes in the
DAG and to maintain it even after DAG modifications. The topological ordering allows for very fast
node reachability checks.
Tests on very big input files with tens of thousands of instructions in a BB indicate huge
speed-ups (up to 10x compilation time improvement) compared to the old version.
llvm-svn: 48817
2008-03-26 09:18:09 +00:00
Evan Cheng
292063603e
Fix some SSE4.1 instruction encoding bugs.
...
llvm-svn: 48815
2008-03-26 08:11:49 +00:00
Owen Anderson
5d2d1776e0
Dead PHI instructions need to be handled specially.
...
llvm-svn: 48811
2008-03-26 03:03:23 +00:00
Erick Tryzelaar
05acd73a73
Test commit (removed trailing whitespace)
...
llvm-svn: 48809
2008-03-26 00:38:56 +00:00
Dale Johannesen
ad6c23d5e9
Use ## for comment delimiter on darwin x86-32, so
...
llvm's output .s files will go through gcc -std=c99
without triggering preprocesser errors. Approach
suggested by Daveed Vandevoorde.
llvm-svn: 48808
2008-03-25 23:29:30 +00:00
Evan Cheng
ddc58ff92a
Smaller function alignment when optimizing for size.
...
llvm-svn: 48805
2008-03-25 22:29:46 +00:00
Evan Cheng
88c44ef91f
Rename option -optimizefor-size to -optimize-size.
...
llvm-svn: 48804
2008-03-25 22:28:39 +00:00
Owen Anderson
9f129318dc
Remove some debugging code.
...
llvm-svn: 48803
2008-03-25 22:26:43 +00:00
Owen Anderson
1d46d45e35
StrongPHIElimination doesn't support swapping live intervals like the coalescer does.
...
llvm-svn: 48802
2008-03-25 22:25:27 +00:00
Dan Gohman
c60c67fc37
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Dan Gohman
bdc24adaaf
A quick nm audit turned up several fixed tables and objects that were
...
marked read-write. Use const so that they can be allocated in a
read-only segment.
llvm-svn: 48800
2008-03-25 21:45:14 +00:00
Dan Gohman
a7ba51f6ec
Avoid outputing spaces at the ends of lines.
...
llvm-svn: 48797
2008-03-25 21:38:12 +00:00
Devang Patel
72cfe84f05
Do not align loops if optimizing for size.
...
llvm-svn: 48794
2008-03-25 21:03:02 +00:00
Devang Patel
246a52740b
Add optimize-for-size knob.
...
llvm-svn: 48793
2008-03-25 21:02:35 +00:00
Evan Cheng
df1690dc7c
Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
...
llvm-svn: 48792
2008-03-25 20:08:07 +00:00
Evan Cheng
2b72c05992
Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
...
llvm-svn: 48791
2008-03-25 20:07:13 +00:00
Anton Korobeynikov
4c1559f54e
Fix the Cygwin/Mingw-On-Cygwin build. Patch by Alain Frisch!
...
llvm-svn: 48786
2008-03-25 18:53:36 +00:00
Bill Wendling
e9e706a249
De-constify the input to the "operator >>" method as it is modified.
...
Patch by dekruijf@cs.wisc.edu !
llvm-svn: 48782
2008-03-25 18:16:52 +00:00
Dan Gohman
fd227e9c3a
Fix typos.
...
llvm-svn: 48779
2008-03-25 17:10:29 +00:00
Dan Gohman
883cbfd0ba
Add CMP32mr and friends to the load-unfolding table. Among
...
other things, this allows the scheduler to unfold a load operand
in the 2008-01-08-SchedulerCrash.ll testcase, so it now successfully
clones the comparison to avoid a pushf+popf.
llvm-svn: 48777
2008-03-25 16:53:19 +00:00
Gordon Henriksen
40f061cb66
Tests for the instruction iterator bindings.
...
llvm-svn: 48775
2008-03-25 16:35:08 +00:00
Gordon Henriksen
9859ab7283
Extend the builder interface to use the new instruction positioning code.
...
This adds support for instruction iterators, as well as rewriting the
builder code to use these new functions. This lets us eliminate the C
bindings for moving around the builder.
Patch by Erick Tryzelaar!
llvm-svn: 48774
2008-03-25 16:26:51 +00:00
Bill Wendling
0ee1bd9588
Fix PR2062: Don't build Intrinsics.gen in the source directory. Do it in the
...
object directory.
llvm-svn: 48766
2008-03-25 09:12:48 +00:00
Tanya Lattner
ca8eb5d0f5
Disable building llvm-upgrade.
...
llvm-svn: 48764
2008-03-25 05:05:58 +00:00
Sam Bishop
1c077ae1b7
Make a note of the fact that EmitOwnedPtr() has nothing to do with the
...
OwningPtr<> class.
llvm-svn: 48763
2008-03-25 04:41:18 +00:00
Tanya Lattner
8bf97c2324
Byebye llvm-upgrade!
...
llvm-svn: 48762
2008-03-25 04:26:08 +00:00
Evan Cheng
7d564c3b4a
lastRegisterUse() should ignore identity copies. Those will be erased.
...
llvm-svn: 48759
2008-03-25 02:02:19 +00:00
Devang Patel
0d48c94e7d
check struct layout
...
llvm-svn: 48758
2008-03-25 00:47:49 +00:00
Evan Cheng
fe7610f37f
Remove an unneeded test.
...
llvm-svn: 48755
2008-03-24 23:55:16 +00:00
Evan Cheng
50b536eef9
Add \t after .set. Fix by Jay Freeman.
...
llvm-svn: 48753
2008-03-24 23:36:49 +00:00
Evan Cheng
69a3f9c417
If the coalescer commuted a def MI to allow coalescing, it can changed a previously coalesced copy into an non-identity copy.
...
llvm-svn: 48752
2008-03-24 23:31:21 +00:00
Evan Cheng
6e225173c5
Add an assertion to catch register of illegal class.
...
llvm-svn: 48751
2008-03-24 23:28:21 +00:00
Bill Wendling
6306183df3
Use the bit size of the operand instead of the hard-coded 32 to generate the
...
mask.
llvm-svn: 48750
2008-03-24 23:16:37 +00:00
Andrew Lenharth
5e0067d982
With debug info, there are nameless constant global values. do not crash when we hit one
...
llvm-svn: 48749
2008-03-24 22:16:14 +00:00
Steve Naroff
48b1a18de4
Add file to project.
...
llvm-svn: 48747
2008-03-24 22:01:58 +00:00
Evan Cheng
615488ab45
- SSE4.1 extractfps extracts a f32 into a gr32 register. Very useful! Not. Fix the instruction specification and teaches lowering code to use it only when the only use is a store instruction.
...
llvm-svn: 48746
2008-03-24 21:52:23 +00:00
Owen Anderson
ce2682184f
Oops. I wanted the compile flags for C++, not the C preprocessor flags.
...
llvm-svn: 48744
2008-03-24 21:38:01 +00:00
Owen Anderson
c905fe9407
Revert r48676. I had plans for using it, but now it's just dead code.
...
llvm-svn: 48743
2008-03-24 21:29:58 +00:00
Devang Patel
9c1f8b1d55
void type is also a valid function return type.
...
llvm-svn: 48740
2008-03-24 20:52:42 +00:00
Owen Anderson
e2707768a4
Remove #include<iostream>, which I was using for debugging.
...
llvm-svn: 48739
2008-03-24 20:36:47 +00:00
Devang Patel
a38f58aa5c
Add incoming value from header only if phi node has any use inside the loop.
...
llvm-svn: 48738
2008-03-24 20:16:14 +00:00
Tanya Lattner
a863ccadeb
Added Passes.html to the documentation list.
...
llvm-svn: 48736
2008-03-24 18:29:32 +00:00
Devang Patel
8dec6c27b8
Fix typo. Clarify underlying message.
...
llvm-svn: 48734
2008-03-24 18:10:52 +00:00
Devang Patel
c50977b025
Fix test name.
...
llvm-svn: 48733
2008-03-24 18:08:07 +00:00
Chris Lattner
c2c0c8303c
apparently tclsh doesn't lex like bash. Weird.
...
llvm-svn: 48732
2008-03-24 17:41:57 +00:00
Chris Lattner
9ca6bb4f16
pass the option so this test tests the right thing.
...
llvm-svn: 48731
2008-03-24 17:36:38 +00:00
Devang Patel
c8794e71e3
Add new test.
...
llvm-svn: 48730
2008-03-24 17:16:39 +00:00
Dan Gohman
9654eca3ab
Remove an unnecessary #include.
...
llvm-svn: 48729
2008-03-24 16:58:44 +00:00
Devang Patel
ea249e3aef
Remove incorrect comment.
...
llvm-svn: 48728
2008-03-24 16:58:20 +00:00
Dan Gohman
aa583d75b1
Shrink the size of AllocationInst by using its SubclassData
...
field to store the alignment value instead of haing a
separate field.
llvm-svn: 48727
2008-03-24 16:55:58 +00:00
Dan Gohman
d8ea040c31
APIntify SelectionDAG's EXTRACT_ELEMENT code.
...
llvm-svn: 48726
2008-03-24 16:38:05 +00:00
Evan Cheng
3471ae8c5d
Increasing the inline limit from (overly conservative) 200 to 300. Given each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it).
...
Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining.
llvm-svn: 48725
2008-03-24 06:37:48 +00:00
Bill Wendling
1f5c2e7fc6
Small format/grammar changes.
...
llvm-svn: 48723
2008-03-24 05:58:47 +00:00
Bill Wendling
f52a379cb3
Grammar Nazi strikes! :-)
...
llvm-svn: 48722
2008-03-24 05:55:54 +00:00
Devang Patel
e3dfc1cbf1
Update Function type documentation to clarify how multiple return values are supported.
...
llvm-svn: 48721
2008-03-24 05:35:41 +00:00
Evan Cheng
21a8e3d260
Temporarily disabling memset forming optimization. Add an option.
...
llvm-svn: 48720
2008-03-24 05:28:38 +00:00
Owen Anderson
200e57840e
Be sure to remove intervals after we've joined them. Also, remove some duplicated code.
...
With this pass, StrongPHIElim can compile very simple testcases correctly. There's still a ways
to go before it's ready for prime time, though.
llvm-svn: 48719
2008-03-24 04:11:27 +00:00
Evan Cheng
c3cf9f872a
Transform (zext (or (icmp), (icmp))) to (or (zext (cimp), (zext icmp))) if at least one of the (zext icmp) can be transformed to eliminate an icmp.
...
llvm-svn: 48715
2008-03-24 00:21:34 +00:00
Evan Cheng
58db865d6e
Remove duplicated entries.
...
llvm-svn: 48714
2008-03-23 22:56:07 +00:00
Gordon Henriksen
76537e4251
Another typo.
...
llvm-svn: 48713
2008-03-23 22:52:51 +00:00
Gordon Henriksen
21c6a018b1
Fix a typo.
...
llvm-svn: 48712
2008-03-23 22:37:22 +00:00
Gordon Henriksen
07a45f4edb
Objective Caml bindings for basic block, function, global, and arg iterators.
...
llvm-svn: 48711
2008-03-23 22:21:29 +00:00
Anton Korobeynikov
1fdd5e9133
Minor typo fixes. Also add another FIXME.
...
llvm-svn: 48710
2008-03-23 20:32:06 +00:00
Gordon Henriksen
cc0f58a763
Update project to reflect deleted files.
...
llvm-svn: 48709
2008-03-23 16:49:47 +00:00
Anton Korobeynikov
d38b3fb127
Preserve calling convention during function cloning
...
llvm-svn: 48708
2008-03-23 16:03:00 +00:00
Anton Korobeynikov
17fb491469
Add license header
...
llvm-svn: 48707
2008-03-23 14:53:18 +00:00
Anton Korobeynikov
9f0e820fa3
Add Win64 compilation callback. This allows easy examples to be JITed on Win64!
...
llvm-svn: 48706
2008-03-23 14:44:32 +00:00
Anton Korobeynikov
058014972a
Use C-style comments :)
...
llvm-svn: 48705
2008-03-23 13:44:17 +00:00
Anton Korobeynikov
a347663762
Provide a JIT selector on win64
...
llvm-svn: 48704
2008-03-23 13:43:47 +00:00
Anton Korobeynikov
7574ead985
Hack out the PIC mode on Win64 targets. This needs to be investigated later.
...
llvm-svn: 48703
2008-03-23 13:41:18 +00:00
Anton Korobeynikov
4733e72a25
Code cleanup. Provide generic way of selecting JIT pointer bitwidth regardless
...
of compiler used.
llvm-svn: 48702
2008-03-23 13:40:45 +00:00
Anton Korobeynikov
bd47269f13
Remove old-standing obsolete code.
...
llvm-svn: 48701
2008-03-23 12:32:54 +00:00
Anton Korobeynikov
479c8382f3
Add Mikhail to credits file
...
llvm-svn: 48700
2008-03-23 08:58:32 +00:00
Anton Korobeynikov
70548d835e
Add first proof-of-concept universal compiler driver framework based
...
on ideas mentioned in PR686.
Written by Mikhail Glushenkov and contributed by Codedgers, Inc.
Old llvmc will be removed soon after new one will have all its properties.
llvm-svn: 48699
2008-03-23 08:57:20 +00:00
Bill Wendling
7e2a6c4112
New testcase.
...
llvm-svn: 48697
2008-03-22 22:27:01 +00:00
Bill Wendling
da2586f69a
Don't strip things when we're doing a debug build.
...
llvm-svn: 48696
2008-03-22 21:57:15 +00:00
Anton Korobeynikov
cec773d8e7
Honour built-in defines on win64 targets for automatically subtarget recognize.
...
Force stack alignment to 16 bytes on win targets.
llvm-svn: 48695
2008-03-22 21:18:22 +00:00
Anton Korobeynikov
07a789d2b5
Recognize "windows" in target triple, not only "win32"
...
llvm-svn: 48694
2008-03-22 21:12:53 +00:00
Owen Anderson
e3605ac108
Use normal naming convention for test.
...
llvm-svn: 48693
2008-03-22 21:08:33 +00:00
Anton Korobeynikov
b86e0936f1
Add information about callee-saved registers on Win64
...
llvm-svn: 48692
2008-03-22 21:04:01 +00:00
Anton Korobeynikov
7f125b2ba5
Add convenient helper for win64 check. Simplify things slightly.
...
llvm-svn: 48691
2008-03-22 20:57:27 +00:00
Anton Korobeynikov
7b4f4e1a86
Initial support for Win64 calling conventions. Still in early state.
...
llvm-svn: 48690
2008-03-22 20:37:30 +00:00
Anton Korobeynikov
7ebdd255b5
Register EH frames emitted in JIT when using gcc unwinding runtime
...
llvm-svn: 48688
2008-03-22 08:53:09 +00:00
Anton Korobeynikov
dd8c695746
Fix merge error
...
llvm-svn: 48687
2008-03-22 08:50:08 +00:00
Anton Korobeynikov
3f7fab913d
Add testcase for prev. commit. Minor fixes
...
llvm-svn: 48686
2008-03-22 08:37:05 +00:00
Anton Korobeynikov
25b2e8203a
Aliasing chains cleanups: update langref, add check into verifier
...
llvm-svn: 48685
2008-03-22 08:36:14 +00:00
Anton Korobeynikov
72d5d42dbc
Support chained aliases for LLVM IR printing. This fixes PR2145
...
llvm-svn: 48684
2008-03-22 08:17:17 +00:00
Anton Korobeynikov
2fa75184f3
Another comments fixing
...
llvm-svn: 48683
2008-03-22 07:53:40 +00:00
Anton Korobeynikov
2fb3897f1b
Slightly increase default set size. It's cheap and won't hurt.
...
llvm-svn: 48682
2008-03-22 07:48:40 +00:00
Anton Korobeynikov
a56dcc977e
Typo fixes
...
llvm-svn: 48681
2008-03-22 07:48:08 +00:00
Chris Lattner
53ccb62712
implement an initial hack at a straight-line store -> memset optimization.
...
This fires dozens of times across spec and multisource, but I don't know
if it actually speeds stuff up. Hopefully the testers will show something
nice :)
llvm-svn: 48680
2008-03-22 05:37:16 +00:00
Chris Lattner
168be766a8
implement the logic for memset insertion and store deletion.
...
llvm-svn: 48679
2008-03-22 04:13:49 +00:00
Owen Anderson
5b993fd70d
Add a comment, and fix a bug where AllocateRW recurred to AllocateRWX instead of itself.
...
llvm-svn: 48677
2008-03-22 02:59:54 +00:00
Owen Anderson
c1e4e3e9a1
Add an AllocateRW to match AllocateRWX.
...
llvm-svn: 48676
2008-03-22 02:33:53 +00:00
Evan Cheng
31604a62f6
Teach DAG combiner to commute commutable binary nodes in order to achieve sdisel CSE.
...
llvm-svn: 48673
2008-03-22 01:55:50 +00:00
Chris Lattner
f5d41c67af
This is a partially implemented and currently disabled start of a store
...
merging optimization. Nothing to see here, hopefully more later :)
llvm-svn: 48670
2008-03-22 00:31:52 +00:00
Dan Gohman
9988569af8
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Dan Gohman
026eed69e7
Avoid calling array_endof in a static initializer, as it incurs
...
dynamic initialization.
llvm-svn: 48666
2008-03-21 23:44:21 +00:00
Dan Gohman
5a6ac79738
Specialize FORCE_DEFINING_FILE_TO_BE_LINKED using a GCC trick
...
to avoid using constructor calls for static objects. This reduces
the number of objects requiring static constructors in a typical
LLVM build by around 20%.
llvm-svn: 48665
2008-03-21 23:38:23 +00:00
Dan Gohman
30e44a4b40
Fix -view-sunit-dags to support cross-rc-copy nodes.
...
llvm-svn: 48664
2008-03-21 22:51:06 +00:00
Gabor Greif
a6c5b38c4a
a happier version of happiness
...
llvm-svn: 48663
2008-03-21 22:17:07 +00:00
Chris Lattner
804209d17c
the size of a smallvector shouldn't be part of the interface to these methods.
...
llvm-svn: 48662
2008-03-21 22:01:16 +00:00
Chris Lattner
beb216da0a
make gvn marginally faster by reallocating the lastSeenLoad map for
...
each basic block.
llvm-svn: 48660
2008-03-21 21:33:23 +00:00
Chris Lattner
2876a645c3
Minor cleanups and shrinkification.
...
llvm-svn: 48658
2008-03-21 21:14:38 +00:00
Dan Gohman
a25dde6fee
Handle getresult instructions in different basic blocks
...
from their aggregate operands by moving the getresult
instructions.
llvm-svn: 48657
2008-03-21 21:01:32 +00:00
Chris Lattner
c55b444a8f
Restore this assert now that the livevar bug is fixed.
...
This verifies kill info for "ret" fp operands is right.
llvm-svn: 48656
2008-03-21 20:41:27 +00:00
Duncan Sands
e37b9c0d34
Testcase for PR2160.
...
llvm-svn: 48655
2008-03-21 20:22:11 +00:00
Evan Cheng
8c19af1b7e
A couple of kill marker maintainence bug.
...
llvm-svn: 48653
2008-03-21 19:09:30 +00:00
Chris Lattner
fb7c88de77
clean up and fix the call section.
...
llvm-svn: 48651
2008-03-21 17:24:17 +00:00
Chris Lattner
141b613b32
cleanups for the getresult section.
...
llvm-svn: 48650
2008-03-21 17:20:51 +00:00
Andrew Lenharth
74d154ce57
FunctionExtractorPass has been superceded by GVExtractorPass
...
llvm-svn: 48648
2008-03-21 16:46:53 +00:00
Duncan Sands
dec270a6db
Make it possible to get an empty struct using
...
the new StructType::get method. The second NULL
is to pacify the gcc warning mechanism. This
patch compiles but is otherwise untested.
llvm-svn: 48645
2008-03-21 15:53:17 +00:00
Duncan Sands
d97eea372a
Introduce a new node for holding call argument
...
flags. This is needed by the new legalize types
infrastructure which wants to expand the 64 bit
constants previously used to hold the flags on
32 bit machines. There are two functional changes:
(1) in LowerArguments, if a parameter has the zext
attribute set then that is marked in the flags;
before it was being ignored; (2) PPC had some bogus
code for handling two word arguments when using the
ELF 32 ABI, which was hard to convert because of
the bogusness. As suggested by the original author
(Nicolas Geoffray), I've disabled it for the moment.
Tested with "make check" and the Ada ACATS testsuite.
llvm-svn: 48640
2008-03-21 09:14:45 +00:00
Duncan Sands
c9e09a0588
Fix the build for gcc-4.2.
...
llvm-svn: 48639
2008-03-21 08:32:17 +00:00
Chris Lattner
68b11e14bc
remove Evan's "ugly hack" that sorta attempted to get
...
x86-64 return conventions correct, but was never enabled.
We can now do the "right thing" with multiple return values.
llvm-svn: 48635
2008-03-21 06:50:21 +00:00
Chris Lattner
5abbe6cef5
Add support for calls that return two FP values in
...
ST(0)/ST(1).
llvm-svn: 48634
2008-03-21 06:38:26 +00:00
Chris Lattner
7e59a30e9f
disable a bogus assertion.
...
llvm-svn: 48633
2008-03-21 06:01:05 +00:00
Chris Lattner
b6f04a3e0a
Enable support for returning two long-double values in ST(0)/ST(1).
...
This allows us to compile fp-stack-2results.ll into:
_test:
fldz
fld1
ret
which returns 1 in ST(0) and 0 in ST(1). This is needed for x86-64
_Complex long double.
llvm-svn: 48632
2008-03-21 05:57:20 +00:00
Chris Lattner
c44160ce6e
Teach masked value is zero about add and sub, and use MVIZ to
...
simplify things like (X & 4) >> 1 == 2 --> (X & 4) == 4.
since it is obvious that the shift doesn't remove any bits.
llvm-svn: 48631
2008-03-21 05:19:58 +00:00
Evan Cheng
92b4488202
Undo 48570. Correctly match mmx shift instructions with an immediate operand.
...
llvm-svn: 48627
2008-03-21 00:40:09 +00:00
Devang Patel
4d638f1a42
These passes preserve CFG.
...
This patch fixes Benchmarks/Trimaran/enc-pc1/enc-pc1 failure reported by Grawp-PIC i386 nightly tester
llvm-svn: 48623
2008-03-20 23:27:18 +00:00
Devang Patel
5ca2ea6479
Incorporate feedback.
...
- Fix loop nest.
- Use RetVals.size()
- Check for null return value.
llvm-svn: 48605
2008-03-20 18:30:32 +00:00
Gordon Henriksen
b81777a354
C and Objective Caml bindings for mem2reg and reg2mem.
...
Patch by Erick Tryzelaar.
llvm-svn: 48602
2008-03-20 17:16:03 +00:00
Andrew Lenharth
1a3ebe36f7
enable -analyze for andersens
...
llvm-svn: 48601
2008-03-20 15:36:44 +00:00
Zhou Sheng
a30cdb9417
Take the old function's name.
...
llvm-svn: 48588
2008-03-20 08:05:05 +00:00
Nick Lewycky
183e524b2d
ubyte and sbyte? what are those?
...
llvm-svn: 48585
2008-03-20 06:19:51 +00:00
Chris Lattner
fd5fe2a83d
add a note.
...
llvm-svn: 48583
2008-03-20 04:46:13 +00:00
Christopher Lamb
3e9f49716e
Check even more carefully before applying this DAGCombine transform.
...
llvm-svn: 48580
2008-03-20 04:31:39 +00:00
Devang Patel
80e43fa744
Restore isCFGOnly property of various analysis passes.
...
llvm-svn: 48579
2008-03-20 02:25:21 +00:00
Evan Cheng
7a3e750fd2
Fix this xform: (sra (shl X, m), result_size) -> (sign_extend (trunc (shl X, result_size - n - m)))
...
llvm-svn: 48578
2008-03-20 02:18:41 +00:00
Chris Lattner
a7cca362af
detabify llvm, patch by Mike Stump!
...
llvm-svn: 48577
2008-03-20 01:22:40 +00:00
Devang Patel
cbbf291f34
Keep track of analysis information inherited from Module pass manager.
...
llvm-svn: 48576
2008-03-20 01:09:53 +00:00
Scott Michel
bbaf3edace
Add more patterns to match in the integer comparison test harnesses.
...
Fix bugs encountered, mostly due to range matching for immediates;
the CellSPU's 10-bit immediates are sign extended, covering a
larger range of unsigned values.
llvm-svn: 48575
2008-03-20 00:51:36 +00:00
Evan Cheng
5daf090a1a
80 col violation.
...
llvm-svn: 48573
2008-03-20 00:20:23 +00:00
Evan Cheng
bbba76fc99
Add intrinsics to match mmx shift builtin's with immediate operand.
...
llvm-svn: 48569
2008-03-19 23:38:52 +00:00
Devang Patel
b727960f78
Add comment.
...
llvm-svn: 48567
2008-03-19 23:05:52 +00:00
Andrew Lenharth
0d537491e7
style and spelling
...
llvm-svn: 48562
2008-03-19 22:32:43 +00:00
Devang Patel
fbf53a4d1d
#if 1 .. #endif markers do not add any value.
...
llvm-svn: 48560
2008-03-19 22:24:25 +00:00
Evan Cheng
a90fdc4340
Remove dead options.
...
llvm-svn: 48556
2008-03-19 22:02:26 +00:00
Devang Patel
718da668ab
PassInfo keep tracks whether a pass is an analysis pass or not.
...
llvm-svn: 48554
2008-03-19 21:56:59 +00:00
Dan Gohman
b9056838d2
Add support for multiple return values for the PPC target by
...
converting call result lowering to use the CallingConvLowering
infastructure.
llvm-svn: 48552
2008-03-19 21:39:28 +00:00
Andrew Lenharth
4d93dc17b2
llvm-ld deserves disable-verify too. opt shouldn't have all the fun options.
...
llvm-svn: 48550
2008-03-19 20:49:51 +00:00
Arnold Schwaighofer
7da2bceb3b
Don't loose incoming argument registers. Fix documentation style.
...
llvm-svn: 48545
2008-03-19 16:39:45 +00:00
Duncan Sands
9a4a089f07
Fix comment.
...
llvm-svn: 48543
2008-03-19 10:59:59 +00:00
Christopher Lamb
8fe9109469
Fix X86's isTruncateFree to not claim that truncate to i1 is free. This fixes Bill's testcase that failed for r48491.
...
llvm-svn: 48542
2008-03-19 08:30:06 +00:00
Tanya Lattner
ab7872c06c
Upgrade tests.
...
llvm-svn: 48538
2008-03-19 07:28:33 +00:00
Tanya Lattner
f9d25185d5
Upgrade tests.
...
llvm-svn: 48536
2008-03-19 05:39:35 +00:00
Chris Lattner
f5ec84c4f3
add some convenience methods for creating GEP instructions and
...
struct types. Patch by David Chisnall, with some tweaks.
llvm-svn: 48531
2008-03-19 05:06:05 +00:00
Tanya Lattner
0ea4c8d706
Upgrade tests to not use llvm-upgrade.
...
llvm-svn: 48530
2008-03-19 04:36:04 +00:00
Tanya Lattner
1d526b90aa
Upgrade tests to not use llvm-upgrade.
...
llvm-svn: 48529
2008-03-19 04:14:49 +00:00
Gordon Henriksen
054817ce06
C bindings for Module-, Function-, and BasicBlock::iterator.
...
llvm-svn: 48528
2008-03-19 03:47:18 +00:00
Tanya Lattner
f73582b17c
Remove llvm-upgrade and update tests.
...
llvm-svn: 48527
2008-03-19 03:47:13 +00:00
Evan Cheng
56e9e57d28
Fixed a coalescer bug caused by a typo.
...
llvm-svn: 48526
2008-03-19 02:26:36 +00:00
Gordon Henriksen
265f780c22
C and Objective Caml bindings for the various getParent methods of the IR.
...
Based on Erick Tryzelaar's patch.
llvm-svn: 48523
2008-03-19 01:11:35 +00:00
Evan Cheng
44c0b4f754
Fix live variables issues:
...
1. If part of a register is re-defined, an implicit kill and an implicit def are added to denote read / mod / write. However, this should only be necessary if the register is actually read later. This is a performance issue.
2. If a sub-register is being defined, and it doesn't have a previous use, do not add a implicit kill to the last use of a super-register:
= EAX, AX<imp-use,kill>
...
AX =
In this case, EAX is live but AX is killed, this is wrong and will cause the coalescer to do bad things.
llvm-svn: 48521
2008-03-19 00:52:20 +00:00
Devang Patel
af75ab8130
Do not use virtual function to identify an analysis pass.
...
llvm-svn: 48520
2008-03-19 00:48:41 +00:00
Bill Wendling
2f6ab65d77
On Darwin, GCC issues a ".globl" for something that has a "visibility protected"
...
attribute instead of ".protected".
llvm-svn: 48516
2008-03-18 23:38:12 +00:00
Evan Cheng
484064370a
Fix a x86-64 isel lowering bug that's been around forever. A x86-64 varargs function implicitly reads X86::AL, don't clobber it!
...
llvm-svn: 48515
2008-03-18 23:36:35 +00:00
Scott Michel
4799ea70ea
Note that gcc 4.0.1 will trip internal LLVM asserts (e.g., pred_iterator) if compiling
...
for Release with optimization levels greater than -O0.
llvm-svn: 48513
2008-03-18 23:13:26 +00:00
Bill Wendling
43784cc27d
It might be nice to have this run as x86 on non-x86 platforms...
...
llvm-svn: 48511
2008-03-18 22:38:22 +00:00
Bill Wendling
efb4d9ef80
Temporarily revert r48491. It's breaking test/CodeGen/X86/xorl.ll.
...
llvm-svn: 48510
2008-03-18 22:29:51 +00:00
Daniel Berlin
5fef9aea12
Fix PR 2160 by making sure arguments to external functions get marked as pointing to anything
...
llvm-svn: 48509
2008-03-18 22:22:53 +00:00
Tanya Lattner
a043a9b0f0
Do not pass -g flag when compiling tests, so remove the C.Flags. This only happens if you have a debug build of llvm.
...
llvm-svn: 48498
2008-03-18 19:59:04 +00:00
Dale Johannesen
12c76db312
Make conversions of i8/i16 to ppcf128 work.
...
llvm-svn: 48493
2008-03-18 17:28:38 +00:00
Scott Michel
08ef1b2bdb
Dial down gcc's warnings: don't use 0UL when 0U suffices (and when the
...
variables and methods themselves only use unsigned.)
llvm-svn: 48492
2008-03-18 16:55:06 +00:00
Christopher Lamb
3e408d4d82
Target independent DAG transform to use truncate for field extraction + sign extend on targets where this is profitable. Passes nightly on x86-64.
...
llvm-svn: 48491
2008-03-18 16:46:39 +00:00
Evan Cheng
d096ec0a86
Rewrite code that propagate isDead information after a dead copy is coalesced. This remove some ugly spaghetti code and fixed a number of subtle bugs.
...
llvm-svn: 48490
2008-03-18 08:26:47 +00:00
Tanya Lattner
4e59897d3d
Upgrade tests to not use llvm-upgrade.
...
llvm-svn: 48484
2008-03-18 04:14:37 +00:00
Tanya Lattner
baa370b37a
Upgrade tests to not use llvm-upgrade.
...
llvm-svn: 48483
2008-03-18 03:45:45 +00:00
Dale Johannesen
69683fa5ee
Get rid of compilation warnings. Per Devang.
...
llvm-svn: 48478
2008-03-18 01:52:17 +00:00
Devang Patel
864970e9b6
Identify Analysis pass.
...
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
llvm-svn: 48476
2008-03-18 00:39:19 +00:00
Devang Patel
924ca7f01d
Update heuritics that estimates cost of call instructions.
...
llvm-svn: 48474
2008-03-17 23:41:20 +00:00
Dale Johannesen
cf87e71053
Make Complex long long/double/long double work
...
in ppc64 mode.
llvm-svn: 48459
2008-03-17 17:11:08 +00:00
Duncan Sands
c572c1e487
Clarify the unwind attribute. Add assumption
...
about sret made by the optimizers.
llvm-svn: 48452
2008-03-17 12:17:41 +00:00
Bill Wendling
0d3970c839
Fix for "make install" of ocaml docs. Patch by Erick Tryzelaar!
...
llvm-svn: 48451
2008-03-17 07:49:23 +00:00
Nate Begeman
fbbe80b597
Add support for escaping {} in asm strings, based on patch from Nick Burns.
...
llvm-svn: 48450
2008-03-17 07:26:14 +00:00
Chris Lattner
7d4152bda6
Check in some #ifdef'd out code switching call argument
...
lowering over to SparcCallingConv.td. We can't make the switch
yet because we can't say to pass f64 registers in 2 x i32 registers
with the td file yet.
llvm-svn: 48449
2008-03-17 06:58:37 +00:00
Chris Lattner
52f16deb65
minor cleanups
...
llvm-svn: 48448
2008-03-17 06:57:02 +00:00
Evan Cheng
24bc123e80
Unbreak JIT. Ignore TargetInstrInfo::IMPLICIT_DEF.
...
llvm-svn: 48447
2008-03-17 06:56:52 +00:00
Owen Anderson
488e645938
A first attempt at updating live intervals, with code lifted from
...
the coalescer. This doesn't really work, but gets us farther than
before.
llvm-svn: 48446
2008-03-17 06:08:26 +00:00
Chris Lattner
4eabbb8f11
remove dead code
...
llvm-svn: 48445
2008-03-17 06:04:10 +00:00
Chris Lattner
db26db2158
Switch sparc from using LowerCallTo to using LowerOperation(CALL) like
...
other targets. Use autogenerated calling conv to lower result of
calls.
llvm-svn: 48444
2008-03-17 06:01:07 +00:00
Chris Lattner
49b269d780
Start moving sparc to use SparcCallingConv.td, switching over
...
return lowering first. This fixes a bug where the top and bottom
of i64 values were returned in the wrong registers before.
llvm-svn: 48443
2008-03-17 05:41:48 +00:00
Chris Lattner
0a1762e374
split sparc lowering out into SparcISelLowering.{cpp|h} to follow
...
best practices.
llvm-svn: 48442
2008-03-17 03:21:36 +00:00
Chris Lattner
5c5597a572
refactor the LowerOperation code out to individual functions for
...
each lowering, which is 'best practice'.
llvm-svn: 48441
2008-03-17 02:52:07 +00:00
Dale Johannesen
92dcf1e0c2
Next round of PPC32 ABI changes. Allow for gcc
...
behavior where a callee thinks a param will be
present in memory, even though the ABI doc says
it doesn't have to be. Handle complex long long
and complex double (4 and 8 return regs).
llvm-svn: 48439
2008-03-17 02:13:43 +00:00
Chris Lattner
af8d3c6699
various rotate fun.
...
llvm-svn: 48438
2008-03-17 01:47:51 +00:00
Chris Lattner
3b79fdcae5
ensure we continue matching x86-64 rotates.
...
llvm-svn: 48437
2008-03-17 01:35:03 +00:00
Nate Begeman
39afeaf834
__builtin_ia32_movntdqa reads memory
...
llvm-svn: 48431
2008-03-16 21:15:47 +00:00
Nate Begeman
9030ecec88
Add a couple missing SSE4 instructions
...
llvm-svn: 48430
2008-03-16 21:14:46 +00:00
Gordon Henriksen
ab4b7d36cd
C and Objective Caml bindings for the TargetData class.
...
llvm-svn: 48422
2008-03-16 20:08:03 +00:00
Bill Wendling
9a11a0174f
Add assert for non-hexadecimal radixes.
...
llvm-svn: 48421
2008-03-16 20:05:52 +00:00
Gordon Henriksen
d0cc8dbd4d
Housekeeping.
...
llvm-svn: 48420
2008-03-16 16:33:35 +00:00
Gordon Henriksen
82a0e74f43
C and Objective Caml bindings for several scalar transforms.
...
Patch originally by Erick Tryzelaar, but has been modified somewhat.
llvm-svn: 48419
2008-03-16 16:32:40 +00:00
Gordon Henriksen
9657149875
Remove unnecessary includes.
...
llvm-svn: 48418
2008-03-16 15:55:43 +00:00
Nick Lewycky
ec6f1669d3
All of these tests had out of date syntax and were never even running through
...
llvm-upgrade because nobody noticed them failing.
Update to use new syntax and actually check for the right failure by looking at
the error message.
llvm-svn: 48417
2008-03-16 07:55:46 +00:00
Nick Lewycky
942035d8b3
Functions are allowed to return structures. (Note that this test never failed.)
...
llvm-svn: 48416
2008-03-16 07:49:49 +00:00
Nick Lewycky
227c7a290b
Regressions/ is long gone.
...
llvm-svn: 48415
2008-03-16 07:31:23 +00:00
Nick Lewycky
084ab471fe
Commit works on regular functions too. Fix the syntax to allow @foo.
...
llvm-svn: 48414
2008-03-16 07:18:12 +00:00
Gordon Henriksen
878114bf16
C and Objective Caml bindings for PassManagers.
...
llvm-svn: 48413
2008-03-16 04:20:44 +00:00