Bill Wendling
cb13d70595
Fix grammar.
...
llvm-svn: 53898
2008-07-22 01:10:25 +00:00
Bill Wendling
9fe8b29012
Another buildbot test commit.
...
llvm-svn: 53896
2008-07-22 00:53:37 +00:00
Dan Gohman
7fea169c86
Correct the name of MachineMemOperand's include guard.
...
llvm-svn: 53895
2008-07-22 00:52:54 +00:00
Dan Gohman
e343021fbd
Fix a typo in a comment.
...
llvm-svn: 53894
2008-07-22 00:52:04 +00:00
Dan Gohman
cf971f0513
Fix multiple-return-value-to-first-class-aggregates autoupgrade to
...
correctly handle the case where multiple-return-value constructs
were used to return one or zero values.
llvm-svn: 53890
2008-07-22 00:36:48 +00:00
Bill Wendling
d07cee2e5c
Trivial check-in to test buildbot. No functionality change.
...
llvm-svn: 53889
2008-07-22 00:28:47 +00:00
Dan Gohman
d5d24f63fd
InsertValue and ExtractValue constant expressions are always
...
folded. Remove code that handled the case where they aren't
folded, and remove bitcode reader/writer support for them.
llvm-svn: 53887
2008-07-21 23:30:30 +00:00
Devang Patel
f81bd70177
Provide llvm bitcode file to native object file interface.
...
llvm-svn: 53886
2008-07-21 23:04:39 +00:00
Dan Gohman
ebeccb44cf
Fix grammaros in comments.
...
llvm-svn: 53884
2008-07-21 22:38:59 +00:00
Dan Gohman
60bae3faaf
Add the PR number to the test.
...
llvm-svn: 53880
2008-07-21 21:50:25 +00:00
Dan Gohman
7ad3cd8c9d
Fix a bug in LSR's dead-PHI cleanup. If a PHI has a def-use chain that
...
leads into a cycle involving a different PHI, LSR got stuck running
around that cycle looking for the original PHI. To avoid this, keep
track of visited PHIs and stop searching if we see one more than once.
This fixes PR2570.
llvm-svn: 53879
2008-07-21 21:45:02 +00:00
Dan Gohman
f1dc362547
Enhance the GraphWriter support for edge destinations, and teach the
...
SelectionDAG graph writer to make use of them. Now, nodes with multiple
values are displayed as such, with incoming edges pointing to the
specific value they use.
llvm-svn: 53875
2008-07-21 21:06:55 +00:00
Dan Gohman
a6191cde79
After early-lowering the FORMAL_ARGUMENTS node, delete it.
...
llvm-svn: 53874
2008-07-21 21:04:07 +00:00
Evan Cheng
fa374ca223
Eliminate a compilation warning.
...
llvm-svn: 53873
2008-07-21 20:02:45 +00:00
Dan Gohman
581cc87f57
Add titles to the various SelectionDAG viewGraph calls
...
that include useful information like the name of the
block being viewed and the current phase of compilation.
llvm-svn: 53872
2008-07-21 20:00:07 +00:00
Dan Gohman
6dc08ebeb0
Make the GraphWriter be more consistent about the string
...
used for the graph "title" and the graph "label", as there
are differences in interpretation of these strings
between viewers.
llvm-svn: 53871
2008-07-21 19:57:57 +00:00
Dan Gohman
8c08a692ee
Fix uses of underscore-capital names.
...
llvm-svn: 53870
2008-07-21 19:48:15 +00:00
Bruno Cardoso Lopes
e5d1fcfe4e
Added initial support for small sections on Mips.
...
Added gp_rel relocations to support addressing small section contents.
Added command line to specify small section threshold in bytes.
llvm-svn: 53869
2008-07-21 18:52:34 +00:00
Dan Gohman
3e9ad4d8e6
Now that the MachineInstr leaks are fixed, enable leak checking
...
in the MachineInstr clone code.
llvm-svn: 53868
2008-07-21 18:47:29 +00:00
Bill Wendling
c90c560c43
Temporary hack to build with GCC 4.0 instead of 4.2.
...
llvm-svn: 53860
2008-07-21 18:33:09 +00:00
Anton Korobeynikov
e61ad2b229
Use better variable names
...
llvm-svn: 53859
2008-07-21 18:29:23 +00:00
Anton Korobeynikov
b35f9b2819
Don't use larger alignment.
...
llvm-svn: 53857
2008-07-21 18:25:17 +00:00
Duncan Sands
b0e3938651
Add VerifyNode, a place to put sanity checks on
...
generic SDNode's (nodes with their own constructors
should do sanity checking in the constructor). Add
sanity checks for BUILD_VECTOR and fix all the places
that were producing bogus BUILD_VECTORs, as found by
"make check". My favorite is the BUILD_VECTOR with
only two operands that was being used to build a
vector with four elements!
llvm-svn: 53850
2008-07-21 10:20:31 +00:00
Evan Cheng
e001643358
Use movaps instead of movups to spill 16-byte vector values when default alignment is >= 16. This fixes some massive performance regressions.
...
llvm-svn: 53844
2008-07-21 06:34:17 +00:00
Nick Lewycky
56e328bb81
Revert r53812 -- premature. LegalizeTypes isn't actually on yet!
...
llvm-svn: 53816
2008-07-21 04:03:00 +00:00
Nick Lewycky
419a174ccf
Switch on the use of arbitrary precision integers in scalar evolution. This will
...
bail after 256-bits to avoid producing code that the backends can't handle.
Previously, we capped it at 64-bits, preferring to miscompile in those cases.
This change also reverts much of r52248 because the invariants the code was
expecting are now being met.
llvm-svn: 53812
2008-07-21 02:51:31 +00:00
Wojciech Matyjewicz
1185ad1abc
This header isn't necessary now.
...
llvm-svn: 53811
2008-07-20 17:35:32 +00:00
Wojciech Matyjewicz
f0d21cdd19
Fix PR2088. Use modulo linear equation solver to compute loop iteration
...
count.
llvm-svn: 53810
2008-07-20 15:55:14 +00:00
Cedric Venet
9acb15565f
Updated VC++ projects
...
llvm-svn: 53809
2008-07-20 12:04:49 +00:00
Bill Wendling
75840e6435
Fix for first part of PR2562. Generate the "pinsrw" instruction for inserts
...
into v4i16 vectors.
llvm-svn: 53807
2008-07-20 02:32:23 +00:00
Bill Wendling
1071bfb17d
Pull r53795 from Gaz into mainline:
...
If .loc and .file aren't used, always emit the "debug_line" section. This
requires at least one entry in the line matrix. So if there's nothing to emit
into the matrix, emit an end of matrix value anyway.
llvm-svn: 53803
2008-07-20 00:11:19 +00:00
Anton Korobeynikov
bc780e3441
Unbreak build: 'DarwinTargetAsmInfo' was already taken as PPC TAI flavour.
...
llvm-svn: 53801
2008-07-19 21:44:57 +00:00
Duncan Sands
2a28791789
Make sure custom lowering for LegalizeTypes
...
returns a node with the right number of
return values. This fixes codegen of
Generic/cast-fp.ll, Generic/fp_to_int.ll
and PowerPC/multiple-return-values.ll
when using -march=ppc32 -mattr=+64bit.
llvm-svn: 53794
2008-07-19 16:26:02 +00:00
Nick Lewycky
82510bf0e3
XFAIL this test.
...
llvm-svn: 53793
2008-07-19 15:52:06 +00:00
Wojciech Matyjewicz
a78669c2cf
While testing particular algorithms to compute loop iteration count the brute
...
force evaluation (ComputeIterationCountExhaustively) should be turned off.
It doesn't apply to trip-count2.ll because this file tests the brute force
evaluation.
The test for PR2364 (2008-05-25-NegativeStepToZero.ll) currently fails
showing that the patch for this bug doesn't work. I'll fix it in a few hours
with a patch for PR2088.
llvm-svn: 53792
2008-07-19 13:26:15 +00:00
Anton Korobeynikov
b26de0765e
Use chars, where possible
...
llvm-svn: 53791
2008-07-19 13:16:32 +00:00
Anton Korobeynikov
bb24791a57
Switch MIPS to new ELFTargetAsmInfo. Add few FIXMEs.
...
llvm-svn: 53790
2008-07-19 13:16:11 +00:00
Anton Korobeynikov
aaee859a18
Fix a FIXME :)
...
llvm-svn: 53789
2008-07-19 13:15:46 +00:00
Anton Korobeynikov
4e05489745
Use generic ELFTargetAsmInfo and DarwinTargetAsmInfo for X86 code
...
llvm-svn: 53788
2008-07-19 13:15:21 +00:00
Anton Korobeynikov
c187438dcd
Add TargetAsmInfo stuff for all darwin-based targets
...
llvm-svn: 53787
2008-07-19 13:14:46 +00:00
Anton Korobeynikov
1d03fcc7c9
Add TargetAsmInfo for all ELF-based targets
...
llvm-svn: 53786
2008-07-19 13:14:11 +00:00
Anton Korobeynikov
74d3fa165c
Testcase for PR2549
...
llvm-svn: 53785
2008-07-19 06:31:12 +00:00
Anton Korobeynikov
b7a49925a1
Use aligned stack spills, where possible. This fixes PR2549.
...
llvm-svn: 53784
2008-07-19 06:30:51 +00:00
Anton Korobeynikov
fa8511bf08
Remove bogus assertion. This unbreaks mingw, where ConstantSDNode
...
has alignment 8 and LoadSDNode (used as LargestT template) - 4.
llvm-svn: 53782
2008-07-19 05:52:44 +00:00
Nick Kledzik
44831bcb8c
tentative definitions are default visibility
...
llvm-svn: 53780
2008-07-19 00:58:07 +00:00
Evan Cheng
a7a20c4946
Fix a memory leak in LiveIntervalAnalysis.
...
llvm-svn: 53779
2008-07-19 00:37:25 +00:00
Devang Patel
bf3a52a62c
typo.
...
llvm-svn: 53778
2008-07-18 23:47:27 +00:00
Devang Patel
4e38849dec
If all linker input files are native object files then lto-bugpoint is not useful.
...
llvm-svn: 53777
2008-07-18 23:46:41 +00:00
Devang Patel
f45f608e7d
Start writing lto-bugpoint tool.
...
llvm-svn: 53774
2008-07-18 22:59:45 +00:00
Duncan Sands
6b418e750d
Softfloat support for FDIV. Patch by
...
Richard Pennington.
llvm-svn: 53773
2008-07-18 21:18:48 +00:00
Duncan Sands
694228b47d
Eliminate unused variable.
...
llvm-svn: 53772
2008-07-18 21:07:41 +00:00
Duncan Sands
2c741145a7
Supress a gcc-4.3 warning.
...
llvm-svn: 53771
2008-07-18 21:06:02 +00:00
Duncan Sands
32e387c461
Revert 53729, after waking up in the middle of
...
the night realising that it was wrong :) I
think the reason the same type was being used
for the shufflevec of indices as for the actual
indices is so that if one of them needs splitting
then so does the other. After my patch it might
be that the indices need splitting but not the
rest, yet there is no good way of handling that.
I think the right solution is to not have the
shufflevec be an operand at all: just have it
be the list of numbers it actually is, stored
as extra info in the node.
llvm-svn: 53768
2008-07-18 20:12:05 +00:00
Dan Gohman
44dfd7bf56
In the CBackend, use casts to force integer add, subtract, and
...
multiply to be done as unsigned, so that they have well defined
behavior on overflow. This fixes PR2408.
llvm-svn: 53767
2008-07-18 18:43:12 +00:00
Dan Gohman
597bd1633e
Fix a LocalSpiller leak. This fixes tramp3d-v4.
...
llvm-svn: 53766
2008-07-18 18:28:56 +00:00
Owen Anderson
04a6e0ba8c
Make PRE actually handle critical edges (by splitting them). Confirmed that bootstrap passes with this change.
...
llvm-svn: 53762
2008-07-18 18:03:38 +00:00
Owen Anderson
9858691f25
Reapply r53735. My last patch fixed the failures Dan observed.
...
llvm-svn: 53761
2008-07-18 17:49:43 +00:00
Owen Anderson
1468bec06e
Add some checks that got lost in the shuffle. This fixes 464.h264ref.
...
llvm-svn: 53760
2008-07-18 17:46:41 +00:00
Dan Gohman
29c3adaae0
Revert r53735. It broke SPEC 464.h264ref.
...
llvm-svn: 53757
2008-07-18 16:44:49 +00:00
Chris Lattner
eee1f57cea
verify limits-fndefn.c from the GCC testsuite before the
...
heat death of the universe, fixing an O(N^2) problem in the
size of a basic block.
llvm-svn: 53749
2008-07-18 05:23:39 +00:00
Dan Gohman
0ece943845
Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.
...
Fix a leak that this turned up in LowerSubregs.cpp.
And, comment a leak in LiveIntervalAnalysis.cpp.
llvm-svn: 53746
2008-07-17 23:49:46 +00:00
Dan Gohman
7168de7872
When printing MemOperand nodes, only use print() for
...
PseudoSourceValue values, which never have names. Use getName()
for all other values, because we want to print just a short summary
of the value, not the entire instruction.
llvm-svn: 53738
2008-07-17 21:12:16 +00:00
Owen Anderson
fd7102037d
Use MergeBlockIntoPredecessor to simplify some code.
...
llvm-svn: 53735
2008-07-17 20:00:46 +00:00
Evan Cheng
cefd6e62fa
Subreg live interval valno may not have a corresponding def machineinstr since it's less precise.
...
llvm-svn: 53734
2008-07-17 19:48:53 +00:00
Evan Cheng
c5add64f0a
Add nounwind.
...
llvm-svn: 53733
2008-07-17 19:48:04 +00:00
Daniel Dunbar
e086221da2
test commit access
...
llvm-svn: 53732
2008-07-17 19:46:54 +00:00
Owen Anderson
27405efdc0
Make MergeBlockIntoPredecessor more aggressive when the same successor appears
...
more than once.
llvm-svn: 53731
2008-07-17 19:42:29 +00:00
Owen Anderson
addbe3eed1
Enable PRE. My last batch of changes fixed the miscompile.
...
llvm-svn: 53730
2008-07-17 19:41:00 +00:00
Duncan Sands
656b256a1a
Use a legal type for elements of the vector_shuffle
...
mask. These are just indices into the shuffled vector
so their type is unrelated to the type of the
shuffled elements (which is what was being used before).
This fixes vec_shuffle-11.ll when using LegalizeTypes.
What seems to have happened is that Dan's recent change
r53687, which corrected the result type of the shuffle,
somehow caused LegalizeTypes to notice that the mask
operand was a BUILD_VECTOR with a legal type but elements
of an illegal type (i64). LegalizeTypes legalized this
by introducing a new BUILD_VECTOR of i32 and bitcasting
it to the old type. But the mask operand is not supposed
to be a bitcast but a straight BUILD_VECTOR of constants,
causing a crash.
llvm-svn: 53729
2008-07-17 19:28:41 +00:00
Dan Gohman
1705968102
Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
...
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.
Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.
This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.
These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.
llvm-svn: 53728
2008-07-17 19:10:17 +00:00
Evan Cheng
d8c156e8be
Indentation.
...
llvm-svn: 53727
2008-07-17 18:41:20 +00:00
Duncan Sands
7e5edf1a1f
LegalizeTypes support for what seems to be the
...
only missing ppc long double operations: FNEG
and FP_EXTEND.
llvm-svn: 53723
2008-07-17 17:35:14 +00:00
Nate Begeman
3851e29e20
Remove unnecessary readme entry
...
llvm-svn: 53722
2008-07-17 17:21:14 +00:00
Duncan Sands
d9256a7ceb
Turn LegalizeTypes back off again for the moment:
...
it is breaking Darwin bootstrap due to missing
functionality.
llvm-svn: 53721
2008-07-17 17:06:03 +00:00
Nate Begeman
3a2147aa97
Fix a typo in last commit
...
llvm-svn: 53720
2008-07-17 17:04:58 +00:00
Nate Begeman
55b7becb29
SSE codegen for vsetcc nodes
...
llvm-svn: 53719
2008-07-17 16:51:19 +00:00
Matthijs Kooijman
8b69d77a7a
Make GlobalOpt preserve address spaces when scalar replacing aggregate globals.
...
llvm-svn: 53716
2008-07-17 11:59:53 +00:00
Chris Lattner
c600c53d1f
Fix PR2553
...
llvm-svn: 53715
2008-07-17 06:07:20 +00:00
Mon P Wang
1e2c6bfa41
When lowering certain atomics, we need to copy the memoperand from the old
...
atomic operation to the new one.
llvm-svn: 53714
2008-07-17 04:54:06 +00:00
Duncan Sands
77a3d05f1e
Factorize some code for determining which libcall to use.
...
llvm-svn: 53713
2008-07-17 02:36:29 +00:00
Evan Cheng
97cd0298cc
Inliner tweak. Function calls should cost more than one instruction!
...
llvm-svn: 53712
2008-07-17 01:31:49 +00:00
Owen Anderson
c062381c7b
Factor MergeBlockIntoPredecessor out into BasicBlockUtils.
...
llvm-svn: 53705
2008-07-17 00:01:40 +00:00
Devang Patel
41cfed7e49
Name string length is end position marker - begin position marker.
...
llvm-svn: 53697
2008-07-16 19:49:09 +00:00
Devang Patel
a59fe95be3
Do not forget global definitions from inline asm code block.
...
llvm-svn: 53693
2008-07-16 18:06:52 +00:00
Devang Patel
78e8a09f39
Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
...
llvm-svn: 53692
2008-07-16 17:54:34 +00:00
Owen Anderson
ac31096311
There's no need to iterate block merging and PRE. In fact, iterating the latter
...
could cause problems for memdep when it breaks critical edges.
llvm-svn: 53691
2008-07-16 17:52:31 +00:00
Scott Michel
fe09508210
Somehow, custom lowering of i64 multiplications got dropped along the way.
...
llvm-svn: 53689
2008-07-16 17:17:29 +00:00
Dan Gohman
f169f81036
Fix the result type of X86's truncate to i8.
...
llvm-svn: 53688
2008-07-16 16:20:48 +00:00
Dan Gohman
2714059079
Fix the result type of a VECTOR_SHUFFLE+BIT_CONVERT dagcombine. This
...
was turned up by some new SelectionDAG assertion checks that I'm
working on.
llvm-svn: 53687
2008-07-16 16:13:58 +00:00
Dan Gohman
494fb26521
Fix the name of BreakCriticalMachineEdge.h's include guard
...
llvm-svn: 53686
2008-07-16 16:04:07 +00:00
Dan Gohman
52636b2a81
Correct a top-level comment.
...
llvm-svn: 53685
2008-07-16 16:03:31 +00:00
Duncan Sands
2d28e281e9
Add support for promoting and expanding AssertZext
...
and AssertSext. Needed when passing huge integer
parameters with the zeroext or signext attributes.
llvm-svn: 53684
2008-07-16 16:03:07 +00:00
Dan Gohman
add5195334
Clarify the comments here, to make slightly more clear the
...
difference in purpose of TargetInstrInfo and TargetInstrDesc,
which isn't immediately obvious from the name.
llvm-svn: 53683
2008-07-16 16:02:59 +00:00
Dan Gohman
b010a08d3a
Tidy a doxygen comment.
...
llvm-svn: 53682
2008-07-16 15:59:56 +00:00
Dan Gohman
26ffe2bea6
Fix a comment to say nonnegative instead of positive.
...
llvm-svn: 53681
2008-07-16 15:57:10 +00:00
Dan Gohman
bf98f68265
Add an assert to check for empty flags for MachineMemOperand.
...
llvm-svn: 53680
2008-07-16 15:56:42 +00:00
Duncan Sands
5b2c2975b8
Test passing of integer parameters for integers
...
of all sizes from i1 to i256. The code is not
always that great, for example (x86)
movw %di, %ax
movw %ax, i17_s
where the store could be directly from %di.
llvm-svn: 53677
2008-07-16 13:37:36 +00:00
Duncan Sands
5efef246ed
Test codegen of loads and stores of all integer
...
sizes from i1 to i256. The generated code is
like one huge bug report of things that the DAG
combiner fails to simplify!
llvm-svn: 53676
2008-07-16 13:10:20 +00:00
Matthijs Kooijman
f22f34f0cc
Add a few cases to instcombine's extractvalue testcase.
...
llvm-svn: 53675
2008-07-16 12:57:25 +00:00
Matthijs Kooijman
c9d4e06f3a
Un-XFAIL multdeadretval, since instcombine now properly handles the mess deadargelim leaves behind :-)
...
llvm-svn: 53674
2008-07-16 12:56:52 +00:00
Matthijs Kooijman
c1d7477ed2
Redo InstCombiner::visitExtractValueInst. Instead of using the (complicate)
...
FindInsertedValue, it now performs a number of simple transformations that
should result in the same effect when applied iteratively.
llvm-svn: 53673
2008-07-16 12:55:45 +00:00
Duncan Sands
e766b4230e
Reorder methods alphabetically. No functionality change.
...
While this is not a wonderful organizing principle, it
does make it easy to find routines, and clear where to
insert new ones.
llvm-svn: 53672
2008-07-16 11:41:33 +00:00
Duncan Sands
c359055fa9
Turn on LegalizeTypes by default.
...
llvm-svn: 53671
2008-07-16 11:36:51 +00:00
Matthijs Kooijman
b85cc9db19
Don't use ++idx_begin when I actually mean idx_begin + 1, especially since we
...
also use *idx_begin in the same expression, giving unpredictable results.
This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html
llvm-svn: 53670
2008-07-16 10:47:35 +00:00
Duncan Sands
a0b1ab3c0b
The atomic.cmp.swap promotion logic is wrong: it
...
simply does the atomic.cmp.swap on the larger type,
which means it blows away whatever is sitting in
the bytes just after the memory location, i.e.
causes a buffer overflow. This really requires
target specific code, which is why LegalizeTypes
doesn't try to handle this case generically. The
existing (wrong) code in LegalizeDAG will go away
automatically once the type legalization code is
removed from LegalizeDAG so I'm leaving it there
for the moment. Meanwhile, don't test for this
feature.
llvm-svn: 53669
2008-07-16 08:09:48 +00:00
Evan Cheng
c97094552c
Fix PR2296. Do not transform x86_sse2_storel_dq into a full-width store.
...
llvm-svn: 53666
2008-07-16 07:28:14 +00:00
Evan Cheng
cf06fe476f
x86-64 PIC JIT fixes: do not generate the extra load for external GV's.
...
llvm-svn: 53661
2008-07-16 01:34:02 +00:00
Evan Cheng
68bd1546ab
X86-64 PIC jump table values are different from x86-32 cases, they are dest - table base.
...
llvm-svn: 53660
2008-07-16 01:33:08 +00:00
Dan Gohman
efa4160fcc
TargetAsmInfo::SectionForGlobal showed up in a profile. Simplify it a little.
...
llvm-svn: 53639
2008-07-15 18:37:51 +00:00
Dan Gohman
1e5aa12b7d
SelectionDAG::AssignNodeIds is unused.
...
llvm-svn: 53636
2008-07-15 18:29:32 +00:00
Dan Gohman
1d093846b5
Don't sort SDNodes by their addresses in SelectionDAG::dump. Instead,
...
just use the AllNodes order, which is at least relatively stable
across runs.
llvm-svn: 53632
2008-07-15 18:18:54 +00:00
Owen Anderson
24768e3dc4
Revert this, as it seems to still be broken.
...
llvm-svn: 53627
2008-07-15 17:59:02 +00:00
Owen Anderson
9d1f497a28
Enable local PRE by default.
...
llvm-svn: 53616
2008-07-15 16:28:23 +00:00
Owen Anderson
53d546e40b
Have GVN do a pre-pass over the CFG that folds away unconditional branches where possible. This allows local PRE to be more aggressive.
...
llvm-svn: 53615
2008-07-15 16:28:06 +00:00
Matthijs Kooijman
af3594cca1
XFAIL the multdeadretval test for now, I will be fixing instcombine to make it work again tomorrow.
...
llvm-svn: 53614
2008-07-15 16:05:09 +00:00
Duncan Sands
0f1a1cdcf8
LegalizeTypes support for fabs on ppc long double.
...
llvm-svn: 53613
2008-07-15 15:02:44 +00:00
Matthijs Kooijman
121a206292
Remove a few tests which no longer hold for deadargelim (since it is now
...
allowed to canonicalize return values).
Add a test that checks if return value and function attributes are not removed.
llvm-svn: 53612
2008-07-15 14:57:01 +00:00
Matthijs Kooijman
d881fb0a5b
Add a testcase for the canonicalizations now performed by deadargelim.
...
llvm-svn: 53611
2008-07-15 14:42:58 +00:00
Matthijs Kooijman
c893bf472d
Allow deadargelim to change return types even though now values were dead. This
...
again canonicalizes {i32} into i32 and {} into void.
llvm-svn: 53610
2008-07-15 14:42:31 +00:00
Matthijs Kooijman
5e8c022e21
Revert r53606. It turns out that explicitely tracking the liveness of the
...
return value as a whole in deadargelim is really not needed now that we simply
rebuild the old return value and actually prevents some canonicalization from
taking place.
This revert stops deadargelim from changing {i32} into i32 for now, but I'll
fix that next.
llvm-svn: 53609
2008-07-15 14:39:36 +00:00
Matthijs Kooijman
c1da874478
Make deadargelim a bit less smart, so it doesn't choke on nested structs as
...
return values that are still (partially) live. Instead of updating all uses of
a call instruction after removing some elements, it now just rebuilds the
original struct (With undef gaps where the unused values were) and leaves it to
instcombine to clean this up.
The added testcase still fails currently, but this is due to instcombine which
isn't good enough yet. I will fix that part next.
llvm-svn: 53608
2008-07-15 14:03:10 +00:00
Matthijs Kooijman
04d4c328ac
Don't use isa when we can reuse a previous dyn_cast.
...
llvm-svn: 53607
2008-07-15 13:39:08 +00:00
Matthijs Kooijman
84194b6768
Make DeadArgElim keep liveness of the return value as a whole in addition to
...
only the liveness of partial return values (for functions returning a struct).
This is more explicit to prevent unwanted changes in the return value.
In particular, deadargelim now canonicalizes a function returning {i32} to
returning i32 and {} to void, if the struct returned is not used in its
entirety, but only the single element is used.
llvm-svn: 53606
2008-07-15 13:36:06 +00:00
Matthijs Kooijman
d337446b8e
Fix typo.
...
llvm-svn: 53605
2008-07-15 13:15:10 +00:00
Duncan Sands
6162e0377c
LegalizeTypes support for promotion of bswap.
...
In LegalizeDAG the value is zero-extended to
the new type before byte swapping. It doesn't
matter how the extension is done since the new
bits are shifted off anyway after the swap, so
extend by any old rubbish bits. This results
in the final assembler for the testcase being
one line shorter.
llvm-svn: 53604
2008-07-15 10:18:22 +00:00
Duncan Sands
202225cdf8
LegalizeTypes support for promotion of SIGN_EXTEND_INREG.
...
llvm-svn: 53603
2008-07-15 10:14:24 +00:00
Duncan Sands
b9b5a671d3
Reorder the integer promotion methods alphabetically.
...
No change in functionality.
llvm-svn: 53602
2008-07-15 10:12:34 +00:00
Matthijs Kooijman
79a8eb547c
Let DAE keep a list of live functions, instead of simply marking all arguments
...
and return values live for those functions. This doesn't change anything yet,
but prepares for the coming commits.
llvm-svn: 53601
2008-07-15 09:11:16 +00:00
Matthijs Kooijman
e9af814669
Split DAE::MarkLive into MarkLive and PropagateLiveness.
...
llvm-svn: 53600
2008-07-15 09:00:17 +00:00
Matthijs Kooijman
2ce5709e31
Pass around const RetOrArg references instead of copying values. Also, mark
...
RetOrArg::getDescription() as const.
llvm-svn: 53599
2008-07-15 08:56:49 +00:00
Matthijs Kooijman
f2860b9fb3
Simplify debug code by using RetOrArg::getDescription().
...
llvm-svn: 53598
2008-07-15 08:53:36 +00:00
Matthijs Kooijman
90d08addb0
Fix indentation (intentionally left out of the previous commit).
...
llvm-svn: 53592
2008-07-15 08:47:32 +00:00
Matthijs Kooijman
06642d3812
Move the deadargelim code for intrinsically alive functions into its own
...
method, to slightly simplify control flow.
llvm-svn: 53591
2008-07-15 08:45:12 +00:00
Mon P Wang
97432f4f1b
Fixed potential bug if the source and target of a bit convert have different alignment
...
llvm-svn: 53590
2008-07-15 05:28:34 +00:00
Nick Lewycky
970914c8c8
Correct this inversion!
...
I swear that didn't show up in svn diff...
llvm-svn: 53587
2008-07-15 03:47:44 +00:00
Nick Lewycky
3752e51311
Fix up comments.
...
llvm-svn: 53586
2008-07-15 03:40:27 +00:00
Bruno Cardoso Lopes
7d5d402b16
Fixed call stack alignment. Improved AsmPrinter alignment issues.
...
llvm-svn: 53585
2008-07-15 02:03:36 +00:00
Devang Patel
7688bed4ff
LinkOnce definitions have default scope, like weak definitions. Otherwise, the linker may not be able to match LinkOnce definition from one module with an exteranl reference from other module.
...
llvm-svn: 53580
2008-07-15 00:00:11 +00:00
Evan Cheng
4015ae1d2c
Goodbye tail duplication (for good this time).
...
llvm-svn: 53574
2008-07-14 22:29:15 +00:00
Chris Lattner
1359c1d773
This replaces all $(SolutionDir) macros with $(ProjectDir)..\
...
Patch by Nicolas Capens!
llvm-svn: 53571
2008-07-14 18:46:16 +00:00
Dan Gohman
adec96f438
Reapply 53476 and 53480, with a fix so that it properly updates
...
the BB member to the current basic block after emitting
instructions.
llvm-svn: 53567
2008-07-14 18:19:29 +00:00
Dan Gohman
162668fa78
Fix uninitialized use of the Changed variable.
...
llvm-svn: 53564
2008-07-14 17:55:01 +00:00
Dan Gohman
e7c8387616
Improve debug output for MemOperandSDNode. PseudoSourceValue nodes
...
don't have value names, so use print instead of getName() to get a
useful string.
llvm-svn: 53563
2008-07-14 17:51:24 +00:00
Dan Gohman
793357b115
Fix edito in the PseudoSourceValue name list.
...
llvm-svn: 53562
2008-07-14 17:45:47 +00:00
Dan Gohman
0c292dbb6c
Reformat this message to fit in 80 cols.
...
llvm-svn: 53561
2008-07-14 17:43:27 +00:00
Duncan Sands
673cf1836b
I don't think BUILD_PAIR can have a vector result.
...
Remove support for this.
llvm-svn: 53559
2008-07-14 17:34:19 +00:00
Duncan Sands
0ca9a38f68
Tighten up some checks. Fix FPOWI splitting for
...
non-power-of-two vectors.
llvm-svn: 53558
2008-07-14 17:33:37 +00:00
Chris Lattner
8882b1c41c
Reapply r53540, now with the matching header!
...
llvm-svn: 53557
2008-07-14 17:32:59 +00:00
Duncan Sands
a30cbd9797
An INSERT_VECTOR_ELT can insert a larger value
...
than the vector element type. Don't forget to
handle this when the insertion index is not a
constant.
llvm-svn: 53556
2008-07-14 17:32:02 +00:00
Duncan Sands
693185bcee
According to the docs, it is possible to have an
...
extending load of a vector. Handle this case when
splitting vector loads. I'm not completely sure
what is supposed to happen, but I think it means
hi should be set to undef. LegalizeDAG does not
consider this case.
llvm-svn: 53555
2008-07-14 17:27:46 +00:00
Duncan Sands
b766084cb0
There should be no extending loads or truncating
...
stores of one-element vectors. Also, neaten the
handling of INSERT_VECTOR_ELT when the inserted
type is larger than the vector element type.
llvm-svn: 53554
2008-07-14 17:22:31 +00:00
Duncan Sands
d47d2d6b12
Ignore TargetConstant with an illegal type. These
...
are used for passing huge immediates in inline ASM
from the front-end straight down to the ASM writer.
Of course this is a hack, but it is simple, limited
in scope, works in practice, and is what LegalizeDAG
does.
llvm-svn: 53553
2008-07-14 17:15:45 +00:00
Bruno Cardoso Lopes
80ab8f9649
Added Subtarget support into RegisterInfo
...
Added HasABICall and HasAbsoluteCall (equivalent to gcc -mabicall and
-mno-shared). HasAbsoluteCall is not implemented but HasABICall is the
default for o32 ABI. Now, both should help into a more accurate
relocation types implementation.
Added IsLinux is needed to choose between asm directives.
Instruction name strings cleanup.
AsmPrinter improved.
llvm-svn: 53551
2008-07-14 14:42:54 +00:00
Duncan Sands
68b0383057
Revert r53540 - it does not compile.
...
llvm-svn: 53549
2008-07-14 07:59:28 +00:00
Chris Lattner
0ead7a50b2
Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixes
...
the second half of link-global-to-func.ll and causes some minor changes in
messages.
There are two TODOs here. First, this causes a regression in
2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it). Anton,
I would really appreciate it if you could take a look at this. It should be
a matter of adding proper alias support to GetLinkageResult, and was probably
already a latent bug that would manifest with globals.
The second todo is to reimplement LinkAlias in the same pattern as
function and global linking. This should be pretty straight-forward for
someone who knows aliases, but isn't a requirement for correctness.
llvm-svn: 53548
2008-07-14 07:23:24 +00:00
Chris Lattner
c08e7a00c3
don't do any linkage, not even type resolution, of symbols that have
...
internal linkage.
llvm-svn: 53547
2008-07-14 06:52:19 +00:00
Chris Lattner
34fc5a0eaa
implement linking of globals to functions, in one direction
...
(replacing a function with a global). This is needed when building
llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack
in lib/system/DynamicLibrary.cpp.
Implementation of linking the other way will need to wait for a
cleanup of LinkFunctionProtos.
llvm-svn: 53546
2008-07-14 06:49:45 +00:00
Chris Lattner
177a3008e1
wrap long lines, remove some code from a non-assert build.
...
llvm-svn: 53545
2008-07-14 05:52:33 +00:00
Chris Lattner
eab49263b5
Fix a bunch of bugs handling vector compare constant expressions, fixing
...
PR2317.
llvm-svn: 53544
2008-07-14 05:17:31 +00:00
Chris Lattner
c5098a2877
Document and fix Constant::getVectorElements to return an empty vector
...
when presented with a constant expr.
If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction
returns an undef or constant expr.
llvm-svn: 53541
2008-07-14 05:10:41 +00:00
Chris Lattner
2831ad28be
If a function calls setjmp, never inline it into other functions. This is
...
a hack around the fact that we don't represent the CFG correctly for sj/lj.
It fixes PR2486.
llvm-svn: 53540
2008-07-14 00:46:56 +00:00
Chris Lattner
6f5ea6e49c
simplify some code, shuffle and insertelt always return a vector.
...
llvm-svn: 53538
2008-07-14 00:32:20 +00:00
Chris Lattner
3b81a821b4
whitespace fix.
...
llvm-svn: 53537
2008-07-14 00:28:45 +00:00
Chris Lattner
0c5183d9a5
doxygenate comments and wrap to 80 cols.
...
llvm-svn: 53536
2008-07-14 00:27:31 +00:00
Chris Lattner
8377c02308
Add a note.
...
llvm-svn: 53535
2008-07-14 00:19:59 +00:00
Chris Lattner
16395e51f4
Fix PR2506 by being a bit more careful about reverse fact propagation when
...
disproving a condition. This actually compiles the existing testcase
(udiv_select_to_select_shift) to:
define i64 @test(i64 %X, i1 %Cond) {
entry:
%divisor1.t = lshr i64 %X, 3 ; <i64> [#uses=1]
%quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1]
%sum = add i64 %divisor1.t, %quotient2 ; <i64> [#uses=1]
ret i64 %sum
}
instead of:
define i64 @test(i64 %X, i1 %Cond) {
entry:
%quotient1.v = select i1 %Cond, i64 3, i64 4 ; <i64> [#uses=1]
%quotient1 = lshr i64 %X, %quotient1.v ; <i64> [#uses=1]
%quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1]
%sum = add i64 %quotient1, %quotient2 ; <i64> [#uses=1]
ret i64 %sum
}
llvm-svn: 53534
2008-07-14 00:15:52 +00:00
Chris Lattner
80b03a1b49
Fix mishandling of the infinite loop case when merging two blocks. This
...
fixes PR2540.
llvm-svn: 53533
2008-07-13 22:23:11 +00:00
Chris Lattner
834ab4ec1b
more refactoring. Use early exits instead of really complex logic.
...
No functionality change.
llvm-svn: 53532
2008-07-13 22:04:41 +00:00
Chris Lattner
5eed37224a
improve comments.
...
llvm-svn: 53531
2008-07-13 21:55:46 +00:00
Chris Lattner
9aada1d755
factor another large hunk of code out into its own function.
...
No functionality change.
llvm-svn: 53530
2008-07-13 21:53:26 +00:00
Chris Lattner
8afd2f3016
add a description.
...
llvm-svn: 53529
2008-07-13 21:27:36 +00:00
Chris Lattner
55eaae1e0c
Final bit of simplification for FoldBranchToCommonDest.
...
llvm-svn: 53528
2008-07-13 21:20:19 +00:00
Chris Lattner
1b317ea48a
simplify logic a bit
...
llvm-svn: 53527
2008-07-13 21:15:11 +00:00
Chris Lattner
2e25b8f444
Refactor some code out into its own helper function, getting rid of crazy multiline
...
conditionals and commenting the code better.
No functionality change.
llvm-svn: 53526
2008-07-13 21:12:01 +00:00
Duncan Sands
2e6f7b49bf
Fix comment.
...
llvm-svn: 53525
2008-07-13 20:14:38 +00:00
Chris Lattner
501c3b67fd
Fix PR2231 - opt -internalize -std-compile-opts should run internalize first
...
llvm-svn: 53523
2008-07-13 19:35:21 +00:00
Cedric Venet
bea0963a5c
Remove deleted files from VC++ project.
...
llvm-svn: 53521
2008-07-13 11:12:36 +00:00
Ted Kremenek
0017db2ff5
Inline typedef for alist_iterator::pointer to work with MSVC++.
...
llvm-svn: 53517
2008-07-12 18:28:46 +00:00
Nick Lewycky
b5688ccf57
Stop creating extraneous smax/umax in SCEV. This removes a regression where we
...
started complicating many loops ('for' loops, in fact).
llvm-svn: 53508
2008-07-12 07:41:32 +00:00
Nick Lewycky
e424236c4e
operator[] is not defined for list::iterator. Overload it in ilist::iterator
...
to prevent silly things from happening accidentally. PR2171
llvm-svn: 53507
2008-07-12 07:00:52 +00:00
Nick Lewycky
f76aa23b54
Enhance analysis of srem.
...
Remove dead code analyzing urem. 'urem' of power-of-2 is canonicalized to an
'and' instruction.
llvm-svn: 53506
2008-07-12 05:04:38 +00:00
Evan Cheng
32e376f354
Implement llvm.atomic.cmp.swap.i32 on PPC. Patch by Gary Benson!
...
llvm-svn: 53505
2008-07-12 02:23:19 +00:00
Evan Cheng
2b3c52d5c4
Typos.
...
llvm-svn: 53504
2008-07-12 02:22:07 +00:00
Evan Cheng
e0a352e8e7
Fix PR2536: a nasty spiller bug. If a two-address instruction uses a register but the use portion of its live range is not part of its liveinterval, it must be defined by an implicit_def. In that case, do not spill the use. e.g.
...
8 %reg1024<def> = IMPLICIT_DEF
12 %reg1024<def> = INSERT_SUBREG %reg1024<kill>, %reg1025, 2
The live range [12, 14) are not part of the r1024 live interval since it's defined by an implicit def. It will not conflicts with live interval of r1025. Now suppose both registers are spilled, you can easily see a situation where both registers are reloaded before the INSERT_SUBREG and both target registers that would overlap.
llvm-svn: 53503
2008-07-12 01:56:02 +00:00
Evan Cheng
ef8412c822
Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
...
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Dan Gohman
9a542a4d5f
Add a utility function to MachineInstr for testing whether an instruction
...
has exactly one MachineMemOperand, and change some X86 lowering code to
make use of it.
llvm-svn: 53498
2008-07-12 00:10:52 +00:00
Dan Gohman
0e52a0c89e
Fix spelling of "hierarchy" in comments.
...
llvm-svn: 53489
2008-07-11 22:51:32 +00:00
Dan Gohman
cd9b66e5c1
Fix typos in comments.
...
llvm-svn: 53487
2008-07-11 22:48:20 +00:00
Dan Gohman
02c7c6cb33
Include a frame index in the "fixed stack" pseudo source value
...
instead of using the frame index for the SVOffset, which was
inconsistent.
llvm-svn: 53486
2008-07-11 22:44:52 +00:00
Ted Kremenek
1a74784517
Minor tweaks to the ImmutableList iterator interface.
...
Added partial specialization of DenseMapInfo<T> for ImmutableList.
llvm-svn: 53485
2008-07-11 22:43:07 +00:00
Bill Wendling
5c77307c2b
Porting r53478 into mainline:
...
Update to build_llvm. Don't output a floating point number for the version.
llvm-svn: 53484
2008-07-11 22:42:10 +00:00
Dan Gohman
ed087a62dc
Fix an obsolete top-level comment.
...
llvm-svn: 53481
2008-07-11 22:39:58 +00:00
Dan Gohman
f4cd404e6f
Factor out debugging code into the common base class.
...
llvm-svn: 53480
2008-07-11 22:36:22 +00:00
Dan Gohman
36a69373dc
Add support for putting NamedRegionTimers in TimerGroups, and
...
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.
llvm-svn: 53476
2008-07-11 21:54:34 +00:00
Dan Gohman
3707f1daba
Use find instead of lower_bound.
...
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Chris Lattner
9fc580f2d0
add support for returning i128, PR2532.
...
llvm-svn: 53472
2008-07-11 20:53:00 +00:00
Dan Gohman
0597e5b697
Trim unnecessary #includes.
...
llvm-svn: 53471
2008-07-11 20:38:31 +00:00
Owen Anderson
8e462e9a82
Don't call lookupNumber more than we have to.
...
llvm-svn: 53470
2008-07-11 20:05:13 +00:00
Duncan Sands
121641d601
Remove an apparently useless routine: there should
...
be no need to split the result of a vector RET node,
since they are always already legal.
llvm-svn: 53462
2008-07-11 17:02:09 +00:00
Duncan Sands
3e7d0fa3ca
It is pointless to turn a UINT_TO_FP into an
...
SINT_TO_FP libcall plus additional operations:
it might as well be a direct UINT_TO_FP libcall.
So only turn it into an SINT_TO_FP if the target
has special handling for SINT_TO_FP.
llvm-svn: 53461
2008-07-11 17:00:14 +00:00
Duncan Sands
37b7322b35
Add two missing SINT_TO_FP libcalls.
...
llvm-svn: 53460
2008-07-11 16:57:02 +00:00
Duncan Sands
d9948110a6
Port a shift-by-1 optimization from LegalizeDAG: it
...
was presumably added after the rest of the code was
copied to LegalizeTypes.
llvm-svn: 53459
2008-07-11 16:54:57 +00:00
Duncan Sands
927a3648d5
Add support for 128 bit shifts and 32 bit shifts
...
on 16 bit machines.
llvm-svn: 53458
2008-07-11 16:52:29 +00:00
Nick Lewycky
45e127ab20
Document 'mask' in this calculation.
...
llvm-svn: 53454
2008-07-11 08:16:26 +00:00
Duncan Sands
914ca2d368
Align comments, colons and cases. Remove trailing
...
whitespace.
llvm-svn: 53453
2008-07-11 07:37:30 +00:00
Nick Lewycky
da405e1155
Remove misleading constant from comment.
...
llvm-svn: 53452
2008-07-11 07:36:19 +00:00
Nick Lewycky
f95b64acaa
Add another optimization from PR2330. Also catch some missing cases that are
...
similar.
llvm-svn: 53451
2008-07-11 07:20:53 +00:00
Bill Wendling
5774466a33
The frame address on an x86-64 box needs to be offset by -8, not -4.
...
llvm-svn: 53450
2008-07-11 07:18:52 +00:00
Chris Lattner
3994bed1a9
a missed optimization that Eli spotted
...
llvm-svn: 53449
2008-07-11 06:40:29 +00:00
Chris Lattner
13a6911ea2
another bug in the same line.
...
llvm-svn: 53448
2008-07-11 06:38:16 +00:00
Chris Lattner
de89b507dd
fix a bug spotted by Eli's eagle eyes
...
llvm-svn: 53447
2008-07-11 06:36:01 +00:00
Chris Lattner
bd25b8507c
simplify and merge a bunch of code. Instead of comparing against
...
the min/max values for an integer type, compare against the min/max
values we can prove contain the input. This might be a tighter bound,
so this is general goodness.
llvm-svn: 53446
2008-07-11 05:40:05 +00:00
Chris Lattner
38a50c9528
fold away (x <= cst) earlier, allowing us to not have to
...
handle them in some code.
llvm-svn: 53445
2008-07-11 05:08:55 +00:00
Chris Lattner
6af608b8ce
Fix folding of icmp's of i1 where the comparison is signed. The code
...
was using the algorithm for folding unsigned comparisons which is
completely wrong. This has been broken since the signless types change.
llvm-svn: 53444
2008-07-11 04:20:58 +00:00
Chris Lattner
4fa8bb3430
Fix a bogus optimization: folding (slt (zext i1 A to i32), 1) -> (slt i1 A, true)
...
This cause a regression in InstCombine/JavaCompare, which was doing the right
thing on accident. To handle the missed case, generalize the comparisons based
on masked bits a little bit to handle comparisons against the max value. For
example, we can now xform (slt i32 (and X, 4), 4) -> (setne i32 (and X, 4), 4)
llvm-svn: 53443
2008-07-11 04:09:09 +00:00
Chris Lattner
1be09d9e21
make this condition more precise.
...
llvm-svn: 53442
2008-07-11 03:54:57 +00:00
Chris Lattner
c9046b286b
regenerate
...
llvm-svn: 53440
2008-07-11 00:30:39 +00:00
Chris Lattner
61622615ae
Implement PR2538
...
llvm-svn: 53438
2008-07-11 00:30:06 +00:00
Chris Lattner
87909d0629
Fix a bug in the soft-float handling of FCOPYSIGN that Duncan noticed
...
when working on legalizetypes. Both legalizetypes and legalizeops now
produce hte same code for CodeGen/ARM/fcopysign.ll.
llvm-svn: 53435
2008-07-10 23:46:13 +00:00
Chris Lattner
17b234cf9b
make legalize types be a command line option: -enable-legalize-types.
...
llvm-svn: 53434
2008-07-10 23:37:50 +00:00
Ted Kremenek
e4a6db3349
Make typedef public to make MSVC++ happy.
...
llvm-svn: 53433
2008-07-10 23:24:20 +00:00
Ted Kremenek
72a2d8e6b5
Make some typedefs public to make MSVC++ happy.
...
llvm-svn: 53432
2008-07-10 23:09:45 +00:00
Ted Kremenek
483300f96d
Make typedefs in ilist public (Visual C++ errors out when they are private).
...
llvm-svn: 53431
2008-07-10 22:58:10 +00:00
Bill Wendling
c20893b026
Pull r53428 from Gaz into mainline:
...
Remove warnings about unused/shadowed variables.
llvm-svn: 53430
2008-07-10 22:57:49 +00:00
Ted Kremenek
40a63884fe
Added ImmutableMap constructor that accepts a const TreeTy*.
...
llvm-svn: 53429
2008-07-10 22:57:10 +00:00
Bill Wendling
33d58e7657
Put CPPBackend tests into their own directory and run them only if they're
...
supported.
llvm-svn: 53427
2008-07-10 22:35:32 +00:00
Dan Gohman
38c5ffb753
Tidy up #includes.
...
llvm-svn: 53426
2008-07-10 22:26:19 +00:00
Dan Gohman
f50b0a0cbd
Add a SubclassData field to SDNode, similar to what's done
...
in Value, to make use of some otherwise unused space. Use this
field to shrink LoadSDNode and StoreSDNode by moving the
addressing mode and ext/trunc fields there.
llvm-svn: 53422
2008-07-10 21:44:59 +00:00
Dan Gohman
84b6cc9cbe
Fix a copy+pasto in an assertion string.
...
llvm-svn: 53419
2008-07-10 19:58:23 +00:00
Dan Gohman
40e1c38d2d
Stack objects have nonnegative indices, not just positive indices.
...
llvm-svn: 53418
2008-07-10 19:57:25 +00:00
Dan Gohman
43f97716c7
Escape the graph name. This unbreaks -view-cfg.
...
llvm-svn: 53417
2008-07-10 19:55:54 +00:00
Dan Gohman
49eff5fbc0
Remove this file; the code that it went with is no longer
...
in the repository.
llvm-svn: 53416
2008-07-10 19:55:04 +00:00
Dan Gohman
7ce10037c4
Make stack slot coloring's debug output more consistent with
...
other passes.
llvm-svn: 53415
2008-07-10 19:49:32 +00:00
Evan Cheng
45fdeb6c3f
Change StackSlotForVirtReg (which maps vregs to frame indices) from std::map to IndexedMap.
...
llvm-svn: 53414
2008-07-10 18:23:23 +00:00
Chris Lattner
60de1ae3d9
Remove extraneous vertical whitespace before Eric gets the wrong idea ;-)
...
llvm-svn: 53411
2008-07-10 16:49:53 +00:00
Chris Lattner
5e718e7431
Fix an altivec constant miscompilation that Duncan found through
...
his work on legalizetypes.
llvm-svn: 53410
2008-07-10 16:33:38 +00:00
Duncan Sands
abdcac66dc
Add support for 128 bit multiplicative operations.
...
Lack of these caused a bootstrap failure with Fortran
on x86-64 with LegalizeTypes turned on. While there,
be nice to 16 bit machines and support expansion of
i32 too.
llvm-svn: 53408
2008-07-10 15:35:05 +00:00
Duncan Sands
5e6d1402c2
Add a mysteriously missing libcall, FPTOSINT_F80_I32.
...
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.
llvm-svn: 53407
2008-07-10 15:33:02 +00:00
Duncan Sands
303524be58
Fix a FIXME: use an apint in CTTZ legalization.
...
llvm-svn: 53406
2008-07-10 15:30:54 +00:00
Duncan Sands
e78352a125
Remove PromoteIntRes_FP_ROUND - not sure what it
...
was doing there: FP_ROUND returns a float, not an
integer.
llvm-svn: 53405
2008-07-10 15:29:55 +00:00
Duncan Sands
4ac3984fc5
Make sure the alignment of the temporary created
...
in CreateStackStoreLoad is good enough for both
the source and destination types.
llvm-svn: 53404
2008-07-10 15:26:17 +00:00
Duncan Sands
d4c09df689
Make the LegalizeType method naming scheme more regular.
...
llvm-svn: 53403
2008-07-10 15:25:04 +00:00
Duncan Sands
74f23ff45c
Don't barf when dumping a constant that contains
...
a ginormous value (eg: i128 -1).
llvm-svn: 53402
2008-07-10 11:23:14 +00:00
Duncan Sands
4603a2ae6b
Correct a comment.
...
llvm-svn: 53401
2008-07-10 11:21:59 +00:00
Matthijs Kooijman
e0f3ab82c4
Restructure dead argument elimination, try #3 :-)
...
Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of
dependencies between return values and/or arguments. Also make the handling of
arguments and return values the same.
The pass now looks properly inside returned structs, but only at the first
level (ie, not inside nested structs).
This version fixed a few more bugs and was cleaned up a bit. It now passes all
of LLVM's testing, and should still pass SPEC2006. There is still a minor bug
with regard to returning nested structs. Since there is currently nothing that
emits such IR, I will fix that in a seperate commit (partly because it requires
a non-trivial fix).
llvm-svn: 53400
2008-07-10 10:24:08 +00:00
Evan Cheng
e9ba28dd68
- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
...
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.
llvm-svn: 53394
2008-07-10 07:35:43 +00:00
Nick Lewycky
6193a564ab
Fix overzealous optimization. Thanks to Duncan Sands for pointing out my error!
...
llvm-svn: 53393
2008-07-10 05:51:40 +00:00
Owen Anderson
04a77c2492
Use DenseMap instead of std::map in local register allocation. This improves the time on instcombine from .31s to .22s
...
llvm-svn: 53390
2008-07-10 01:56:35 +00:00
Owen Anderson
20f41dac8d
Fix 403.gcc. Finally got the check for two-address-ness correct.
...
llvm-svn: 53389
2008-07-10 01:53:01 +00:00
Owen Anderson
36b92ca037
Fix the build by adding a #include.
...
llvm-svn: 53388
2008-07-10 01:44:27 +00:00