Chris Lattner
3fb2b87f17
bugfix
...
llvm-svn: 31074
2006-10-20 20:44:34 +00:00
Chris Lattner
6ea0134893
Fix an ugly problem in SCCP. This fixes Benchmarks/Misc-C++/mandel-text.cpp
...
llvm-svn: 31073
2006-10-20 20:19:08 +00:00
Chris Lattner
38ed7d9e49
Fix miscompilation of MallocBench/espresso which code review pointed out
...
but apparently didn't make it into the final patch.
llvm-svn: 31070
2006-10-20 18:20:21 +00:00
Chris Lattner
2f54afc364
Make flag and chain edges visually distinguishable from value edges in DOT
...
output.
llvm-svn: 31067
2006-10-20 18:06:09 +00:00
Chris Lattner
62a0f00312
Implement branch analysis/xform hooks required by the branch folding pass.
...
llvm-svn: 31065
2006-10-20 17:42:20 +00:00
Reid Spencer
d414793dbc
For PR950:
...
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.
llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Devang Patel
b030b91f4a
While creating mask, use 1ULL instead of 1.
...
llvm-svn: 31062
2006-10-20 01:16:56 +00:00
Chris Lattner
d9aa90ded4
Fix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.
...
llvm-svn: 31061
2006-10-20 00:42:07 +00:00
Chris Lattner
5b4ca99562
add a method to determine whether evaluation of a constant can trap.
...
llvm-svn: 31059
2006-10-20 00:27:06 +00:00
Bill Wendling
edce5ede57
Partially in response to PR926: insert the newly created machine basic
...
blocks into the basic block list when lowering the switch inst. into a
binary tree of if-then statements. This allows the "visitSwitchCase" func
to allow for fall-through behavior.
llvm-svn: 31057
2006-10-19 21:46:38 +00:00
Devang Patel
880a9d823f
It is OK to remove extra cast if operation is EQ/NE even though source
...
and destination sign may not match but other conditions are met.
llvm-svn: 31056
2006-10-19 20:59:13 +00:00
Devang Patel
88406a6e1e
Typo Typo.
...
llvm-svn: 31055
2006-10-19 19:21:36 +00:00
Devang Patel
277990c79f
Typo.
...
llvm-svn: 31054
2006-10-19 19:05:38 +00:00
Devang Patel
d9ade71cc7
Fix bug in PR454 resolution. Added new test case.
...
This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin.
llvm-svn: 31053
2006-10-19 18:54:08 +00:00
Rafael Espindola
c08546401b
use Pat to implement extloadi8 and extloadi16
...
llvm-svn: 31052
2006-10-19 17:05:03 +00:00
Rafael Espindola
35e92188e0
implement undef
...
llvm-svn: 31049
2006-10-19 13:45:00 +00:00
Rafael Espindola
f7a41f3ddd
print common symbols
...
llvm-svn: 31048
2006-10-19 13:30:40 +00:00
Rafael Espindola
722266845b
implement extloadi8 and extloadi16
...
llvm-svn: 31047
2006-10-19 12:45:04 +00:00
Rafael Espindola
17544c1c1d
expand SIGN_EXTEND_INREG
...
llvm-svn: 31046
2006-10-19 12:06:50 +00:00
Rafael Espindola
6cc20c7950
expand brind so that we don't have to implement jump tables right now
...
llvm-svn: 31045
2006-10-19 10:56:43 +00:00
Reid Spencer
765ea73e59
Beef up the output from DiffFilesWithTolerance by setting the error code
...
to describe the difference being reported. This assists with understanding
differences an llvm-test and should help with bugpoint too.
llvm-svn: 31044
2006-10-18 20:23:52 +00:00
Jim Laskey
c06a0bc853
Add option for controlling inclusion of global AA.
...
llvm-svn: 31040
2006-10-18 19:08:31 +00:00
Chris Lattner
a86fff7583
fit in 80 cols
...
llvm-svn: 31039
2006-10-18 18:26:48 +00:00
Chris Lattner
fa22dc8afe
add a note
...
llvm-svn: 31038
2006-10-18 17:04:09 +00:00
Rafael Espindola
1220d18e11
add blx
...
llvm-svn: 31037
2006-10-18 16:21:43 +00:00
Rafael Espindola
73e8f41749
add isTerminatortto b and bcond
...
llvm-svn: 31036
2006-10-18 16:20:57 +00:00
Jim Laskey
288c230cbd
Use global info for alias analysis.
...
llvm-svn: 31035
2006-10-18 12:29:57 +00:00
Rafael Espindola
80c7461ada
implement CallingConv::Fast as CallingConv::C
...
llvm-svn: 31034
2006-10-18 12:03:07 +00:00
Anton Korobeynikov
d1436ae792
Fixed mingw\cygwin linkonce linkage once again.
...
Added workaround for linker bug with linkonce sections.
Changed sections prefix to allow linker merge them
(PE loader doesn't like too much long-named sections :) )
All of this unbreaks libstdc++ on mingw32 allowing (small)
programs to be compiled, linked and run.
llvm-svn: 31033
2006-10-18 09:12:29 +00:00
Owen Anderson
de03eb21c2
Add support for the new "target data" information in .ll files. This provides
...
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.
Update the generated files.
llvm-svn: 31031
2006-10-18 02:21:48 +00:00
Owen Anderson
12374f766b
Add support for the new "target data" information in .ll files. This provides
...
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.
llvm-svn: 31030
2006-10-18 02:21:12 +00:00
Chris Lattner
0f686ec438
set the ppc64 stack pointer right, dynamic alloca now works for ppc64
...
llvm-svn: 31028
2006-10-18 01:20:43 +00:00
Chris Lattner
6c403f7102
Expand alloca for ppc64
...
llvm-svn: 31027
2006-10-18 01:18:48 +00:00
Chris Lattner
cd00328fad
Teach the branch folder to update debug info if it removes blocks with line
...
# notes in it.
llvm-svn: 31026
2006-10-17 23:17:27 +00:00
Chris Lattner
22e311fe77
add a method to remove a line # record.
...
llvm-svn: 31025
2006-10-17 23:16:42 +00:00
Chris Lattner
7353b07275
expose DWARF_LABEL opcode# so the branch folder can update debug info properly.
...
llvm-svn: 31024
2006-10-17 22:41:45 +00:00
Chris Lattner
dd39b9d358
Do not leak all of the SourceLineInfo objects. Do not bother mallocing each
...
one separately.
llvm-svn: 31022
2006-10-17 22:06:46 +00:00
Chris Lattner
8708a62f93
Trivial patch to speed up legalizing common i64 constants.
...
llvm-svn: 31020
2006-10-17 21:47:13 +00:00
Chris Lattner
bfbb76e103
Fix CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll
...
llvm-svn: 31019
2006-10-17 21:24:15 +00:00
Evan Cheng
3be6b15cd9
Fix printer for StoreSDNode.
...
llvm-svn: 31017
2006-10-17 21:18:26 +00:00
Evan Cheng
2113bdf34d
Reflect MemOpAddrMode change; added a helper to create pre-indexed load.
...
llvm-svn: 31016
2006-10-17 21:14:32 +00:00
Rafael Espindola
58233f9db2
expand ISD::SDIV, ISD::UDIV, ISD::SREM and ISD::UREM
...
llvm-svn: 31014
2006-10-17 21:05:33 +00:00
Rafael Espindola
4e8824608e
add the FPUnaryOp and DFPUnaryOp classes
...
llvm-svn: 31013
2006-10-17 20:45:22 +00:00
Rafael Espindola
fe0a9a6fe2
add FABSS and FABSD
...
llvm-svn: 31012
2006-10-17 20:33:13 +00:00
Anton Korobeynikov
c86485a397
Adding linkonce linkage codegeneration support for mingw32\cygwin
...
targets.
llvm-svn: 31011
2006-10-17 20:29:49 +00:00
Jim Laskey
7f16ca4872
Make it simplier to dump DAGs while in DAGCombiner. Remove a nasty optimization.
...
llvm-svn: 31009
2006-10-17 19:33:52 +00:00
Rafael Espindola
64f93033bc
remove extra [] in stores
...
llvm-svn: 31008
2006-10-17 18:29:14 +00:00
Chris Lattner
ef7c2e1dc8
Enable deleting branches to successor blocks. With the previous patches,
...
branch folding can now compile stuff like this:
void foo(int W, int X, int Y, int Z) {
if (W & 1) {
for (; X;--X) bar();
} else if (W & 2) {
for (; Y;--Y) bar();
} else if (W & 4) {
for (; Z;--Z) bar();
} else if (W & 8) {
for (; W;--W) bar();
}
if (W) {
bar();
}
}
contrived testcase where loops exits all end up merging together. To have
the loop merges be:
...
cmplw cr0, r30, r27
bne cr0, LBB1_14 ;bb38
LBB1_16: ;cond_next48.loopexit
mr r27, r29
LBB1_20: ;cond_next48
cmplwi cr0, r27, 0
beq cr0, LBB1_22 ;UnifiedReturnBlock
...
instead of:
...
cmplw cr0, r30, r27
bne cr0, LBB1_14 ;bb38
LBB1_16: ;cond_next48.loopexit
mr r27, r29
b LBB1_20 ;cond_next48
LBB1_17: ;cond_next48.loopexit1
b LBB1_20 ;cond_next48
LBB1_18: ;cond_next48.loopexit2
b LBB1_20 ;cond_next48
LBB1_19: ;cond_next48.loopexit3
LBB1_20: ;cond_next48
cmplwi cr0, r27, 0
beq cr0, LBB1_22 ;UnifiedReturnBlock
...
This is CodeGen/PowerPC/branch-opt.ll
llvm-svn: 31006
2006-10-17 18:16:40 +00:00
Chris Lattner
bf15d2f503
add support for inserting an uncond branch
...
llvm-svn: 31003
2006-10-17 18:06:55 +00:00
Rafael Espindola
47970f96ac
initial implementation of addressing mode 5
...
llvm-svn: 31002
2006-10-17 18:04:53 +00:00
Jim Laskey
37679253ae
Clean up interface to getGlobalLinkName.
...
llvm-svn: 31001
2006-10-17 17:17:24 +00:00
Chris Lattner
8464c7e3e1
Reenable this pass, fixing the bugs in it.
...
It now correctly deletes unreachable blocks and blocks that are empty.
llvm-svn: 31000
2006-10-17 17:13:52 +00:00
Evan Cheng
d9bec725a2
Make sure operand does have size and element type operands.
...
llvm-svn: 30999
2006-10-17 17:06:35 +00:00
Rafael Espindola
d5a6eaec14
add the immediate to the Offset in eliminateFrameIndex
...
llvm-svn: 30998
2006-10-17 14:34:02 +00:00
Jim Laskey
620df3ea5f
Basic support for getGlobalLinkName.
...
llvm-svn: 30997
2006-10-17 13:41:07 +00:00
Rafael Espindola
31f59f5b94
add FSTD and FSTS
...
llvm-svn: 30996
2006-10-17 13:36:07 +00:00
Rafael Espindola
01400015fc
add FCPYS and FCPYD
...
llvm-svn: 30995
2006-10-17 13:13:23 +00:00
Jim Laskey
d266d999cb
Use S_debug for dwarf info.
...
llvm-svn: 30994
2006-10-17 11:30:57 +00:00
Evan Cheng
bf3e5a1d7a
Proper fix.
...
llvm-svn: 30993
2006-10-17 00:24:49 +00:00
Evan Cheng
36ab7976a0
One more try.
...
llvm-svn: 30992
2006-10-16 23:44:08 +00:00
Reid Spencer
c6aa794a41
Undo Chris' last patch, it caused a regression.
...
llvm-svn: 30991
2006-10-16 23:08:08 +00:00
Evan Cheng
1cf362ec18
Unbreak x86-64 build.
...
llvm-svn: 30990
2006-10-16 22:53:28 +00:00
Evan Cheng
2d9318cff1
Be careful when looking through a vbit_convert. Optimizing this:
...
(vector_shuffle
(vbitconvert (vbuildvector (copyfromreg v4f32), 1, v4f32), 4, f32),
(undef, undef, undef, undef), (0, 0, 0, 0), 4, f32)
to the
vbitconvert
is a very bad idea.
llvm-svn: 30989
2006-10-16 22:49:37 +00:00
Rafael Espindola
a156538e34
add fdivs e fdivd
...
llvm-svn: 30988
2006-10-16 21:50:04 +00:00
Rafael Espindola
4f61431679
expand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS
...
llvm-svn: 30987
2006-10-16 21:10:32 +00:00
Evan Cheng
04bec886a9
Added a X86CompilationCallback variant which saves XMM argument registers for targets with SSE.
...
llvm-svn: 30986
2006-10-16 21:01:55 +00:00
Evan Cheng
b4d8323e54
Proper fix for rdar://problem/4770604 Thanks to Stuart Hastings!
...
llvm-svn: 30985
2006-10-16 21:00:37 +00:00
Jim Laskey
06f4428abc
Pass AliasAnalysis thru to DAGCombiner.
...
llvm-svn: 30984
2006-10-16 20:52:31 +00:00
Jim Laskey
5fe261bc52
Global name regression.
...
llvm-svn: 30982
2006-10-16 19:38:41 +00:00
Rafael Espindola
25fbeb5ec2
define the DFPBinOp class
...
llvm-svn: 30981
2006-10-16 18:39:22 +00:00
Rafael Espindola
57dc40a3a8
add the FPBinOp class
...
llvm-svn: 30980
2006-10-16 18:32:36 +00:00
Rafael Espindola
8a40de94f2
define the Addr1BinOp class
...
llvm-svn: 30979
2006-10-16 18:18:14 +00:00
Rafael Espindola
6554b1014d
define the IntBinOp class and use it to implement the multiply instructions
...
llvm-svn: 30978
2006-10-16 17:57:20 +00:00
Rafael Espindola
71ae8c3d4a
fix assembly syntax
...
llvm-svn: 30977
2006-10-16 17:38:12 +00:00
Rafael Espindola
d255bfb09b
implement LDRB, LDRSB, LDRH and LDRSH
...
llvm-svn: 30976
2006-10-16 17:17:22 +00:00
Rafael Espindola
93359fa883
implement smull and umull
...
llvm-svn: 30975
2006-10-16 16:33:29 +00:00
Evan Cheng
ca5eaf4020
Avoid getting into an infinite loop when -disable-x86-shuffle-opti is specified.
...
llvm-svn: 30974
2006-10-16 06:36:00 +00:00
Evan Cheng
c73547a71d
SelectScalarSSELoad should call CanBeFoldedBy as well.
...
llvm-svn: 30973
2006-10-16 06:34:55 +00:00
Chris Lattner
9ecd9bcde4
regenerate
...
llvm-svn: 30971
2006-10-15 23:27:25 +00:00
Chris Lattner
2ac6ca0f82
Produce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll
...
llvm-svn: 30970
2006-10-15 23:26:46 +00:00
Chris Lattner
5a4d067b26
label* is not a valid type, add an assertion.
...
llvm-svn: 30968
2006-10-15 23:21:12 +00:00
Chris Lattner
fd983f91e7
fix a buggy check that accidentally disabled this xform
...
llvm-svn: 30967
2006-10-15 22:42:15 +00:00
Anton Korobeynikov
61d88967b9
Align stack size to DWORD boundary
...
llvm-svn: 30964
2006-10-14 20:53:35 +00:00
Rafael Espindola
c426cede28
expand ISD::BRCOND
...
llvm-svn: 30963
2006-10-14 17:59:54 +00:00
Rafael Espindola
38c602f658
fix some fp condition codes
...
use non trapping comparison instructions
llvm-svn: 30962
2006-10-14 13:42:53 +00:00
Jim Laskey
1070dfefba
Tidy up after truncstore changes.
...
llvm-svn: 30961
2006-10-14 12:14:27 +00:00
Evan Cheng
bfd74c6d9c
Debug tweak.
...
llvm-svn: 30959
2006-10-14 08:34:06 +00:00
Evan Cheng
6c8de88f88
Corrected load folding check. We need to start from the root of the sub-dag
...
being matched and ensure there isn't a non-direct path to the load (i.e. a
path that goes out of the sub-dag.)
llvm-svn: 30958
2006-10-14 08:33:25 +00:00
Chris Lattner
08aa96b824
Make sure that the node returned by SimplifySetCC is added to the worklist
...
so that it can be deleted if unused.
llvm-svn: 30955
2006-10-14 03:52:46 +00:00
Chris Lattner
a515f322f3
fold setcc of a setcc.
...
llvm-svn: 30953
2006-10-14 01:02:29 +00:00
Chris Lattner
25ad62d132
When SimplifySetCC was moved to the DAGCombiner, it was never removed from
...
SelectionDAG and it has since bitrotted. Remove the copy from SelectionDAG.
Next, remove the constant folding piece of DAGCombiner::SimplifySetCC into
a new FoldSetCC method which can be used by getNode() and SimplifySetCC.
This fixes obscure bugs.
llvm-svn: 30952
2006-10-14 00:41:01 +00:00
Chris Lattner
c4be6ee8b8
disable this pass for now, it's causing issues
...
llvm-svn: 30951
2006-10-14 00:30:06 +00:00
Chris Lattner
1c35d27fc4
falling off the end of a function is ok with an unreachable instruction.
...
llvm-svn: 30950
2006-10-14 00:21:48 +00:00
Jim Laskey
bf50140aac
Reduce the workload by not adding chain users to work list.
...
llvm-svn: 30948
2006-10-13 23:32:28 +00:00
Chris Lattner
9b1878a28c
Fix a bug where we incorrectly turned '(X & 0) == 0' into '(X & 0) >> -1',
...
which is undefined. "0" isn't a power of 2.
llvm-svn: 30947
2006-10-13 22:46:18 +00:00
Chris Lattner
b90d66b7da
implement branch inspection/modification methods.
...
llvm-svn: 30946
2006-10-13 21:21:17 +00:00
Evan Cheng
fe5bb5dbe6
Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
...
llvm-svn: 30945
2006-10-13 21:14:26 +00:00
Chris Lattner
87d16e0ed9
add the branch folding pass as a late cleanup pass for all targets. For now
...
it just deletes empty MBB's. Soon it will do more :)
llvm-svn: 30941
2006-10-13 20:45:56 +00:00
Chris Lattner
ae19ea4b2a
disable some objectionable code, maybe we can bring this pass to life
...
llvm-svn: 30939
2006-10-13 20:43:10 +00:00
Chris Lattner
bea7a9de50
remove some dead code
...
llvm-svn: 30938
2006-10-13 20:40:42 +00:00