Duncan Sands
b753d27377
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
b2e1ddbd0b
Turn on LegalizeTypes by default.
...
llvm-svn: 53671
2008-07-16 11:36:51 +00:00
Matthijs Kooijman
96d9bcbdf6
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
Evan Cheng
7218339189
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
face16f9d8
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
cabfd3f78c
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
8cf62e122f
TargetAsmInfo::SectionForGlobal showed up in a profile. Simplify it a little.
...
llvm-svn: 53639
2008-07-15 18:37:51 +00:00
Dan Gohman
c4400b8618
SelectionDAG::AssignNodeIds is unused.
...
llvm-svn: 53636
2008-07-15 18:29:32 +00:00
Dan Gohman
c9b72806d7
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
e12f7904ff
Revert this, as it seems to still be broken.
...
llvm-svn: 53627
2008-07-15 17:59:02 +00:00
Owen Anderson
73bdb28e89
Enable local PRE by default.
...
llvm-svn: 53616
2008-07-15 16:28:23 +00:00
Owen Anderson
f1b3898e7f
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
Duncan Sands
7ca2df2319
LegalizeTypes support for fabs on ppc long double.
...
llvm-svn: 53613
2008-07-15 15:02:44 +00:00
Matthijs Kooijman
f9532fe71b
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
18c6979fed
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
f940585c1c
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
50a2233b45
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
4b75601340
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
Duncan Sands
58eb5e35da
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
710be60c23
LegalizeTypes support for promotion of SIGN_EXTEND_INREG.
...
llvm-svn: 53603
2008-07-15 10:14:24 +00:00
Duncan Sands
d2097e5b92
Reorder the integer promotion methods alphabetically.
...
No change in functionality.
llvm-svn: 53602
2008-07-15 10:12:34 +00:00
Matthijs Kooijman
86a46174fe
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
caa3ed0c99
Split DAE::MarkLive into MarkLive and PropagateLiveness.
...
llvm-svn: 53600
2008-07-15 09:00:17 +00:00
Matthijs Kooijman
31b7208f7d
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
937016427b
Simplify debug code by using RetOrArg::getDescription().
...
llvm-svn: 53598
2008-07-15 08:53:36 +00:00
Matthijs Kooijman
c9c8644910
Fix indentation (intentionally left out of the previous commit).
...
llvm-svn: 53592
2008-07-15 08:47:32 +00:00
Matthijs Kooijman
52acc10fdc
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
834c054b1d
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
0d582485f9
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
ac8e34e574
Fix up comments.
...
llvm-svn: 53586
2008-07-15 03:40:27 +00:00
Bruno Cardoso Lopes
0c154df07f
Fixed call stack alignment. Improved AsmPrinter alignment issues.
...
llvm-svn: 53585
2008-07-15 02:03:36 +00:00
Dan Gohman
e76fd33ee5
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
8280b2e66e
Fix uninitialized use of the Changed variable.
...
llvm-svn: 53564
2008-07-14 17:55:01 +00:00
Dan Gohman
7b61b66334
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
bf764c6a4c
Fix edito in the PseudoSourceValue name list.
...
llvm-svn: 53562
2008-07-14 17:45:47 +00:00
Duncan Sands
ef690bbffe
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
bb3251e1f4
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
8a9725bffe
Reapply r53540, now with the matching header!
...
llvm-svn: 53557
2008-07-14 17:32:59 +00:00
Duncan Sands
134155a263
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
5a4bab9849
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
fd63c72205
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
a9d2c2042e
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
f5a55301e0
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
63940a7330
Revert r53540 - it does not compile.
...
llvm-svn: 53549
2008-07-14 07:59:28 +00:00
Chris Lattner
ef7178406b
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
0b95d5f57d
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
d31cacb5d6
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
c68c953e71
wrap long lines, remove some code from a non-assert build.
...
llvm-svn: 53545
2008-07-14 05:52:33 +00:00
Chris Lattner
b786d147c9
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
accde0a86b
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
6841e1dc33
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
f8e9922213
simplify some code, shuffle and insertelt always return a vector.
...
llvm-svn: 53538
2008-07-14 00:32:20 +00:00
Chris Lattner
15ae951af5
Add a note.
...
llvm-svn: 53535
2008-07-14 00:19:59 +00:00
Chris Lattner
14faada3a3
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
3444f4d4c4
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
7cb257551f
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
a4a80e0092
improve comments.
...
llvm-svn: 53531
2008-07-13 21:55:46 +00:00
Chris Lattner
824fbca1ee
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
67bf4acd15
Final bit of simplification for FoldBranchToCommonDest.
...
llvm-svn: 53528
2008-07-13 21:20:19 +00:00
Chris Lattner
3346d311c7
simplify logic a bit
...
llvm-svn: 53527
2008-07-13 21:15:11 +00:00
Chris Lattner
2ac1854097
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
Nick Lewycky
df9e9f0b0e
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
3fb5816774
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
c69b53dff9
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
7457283357
Typos.
...
llvm-svn: 53504
2008-07-12 02:22:07 +00:00
Evan Cheng
05e5317cab
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
ebf7ff4531
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
bf47a27643
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
fee8b04935
Fix spelling of "hierarchy" in comments.
...
llvm-svn: 53489
2008-07-11 22:51:32 +00:00
Dan Gohman
4c18394001
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
Dan Gohman
b21183f645
Fix an obsolete top-level comment.
...
llvm-svn: 53481
2008-07-11 22:39:58 +00:00
Dan Gohman
3b91ef27b5
Factor out debugging code into the common base class.
...
llvm-svn: 53480
2008-07-11 22:36:22 +00:00
Dan Gohman
6ee2195ab1
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
d1342570f2
Use find instead of lower_bound.
...
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Chris Lattner
4f20448c91
add support for returning i128, PR2532.
...
llvm-svn: 53472
2008-07-11 20:53:00 +00:00
Dan Gohman
d7a32ecde2
Trim unnecessary #includes.
...
llvm-svn: 53471
2008-07-11 20:38:31 +00:00
Owen Anderson
cc861329ee
Don't call lookupNumber more than we have to.
...
llvm-svn: 53470
2008-07-11 20:05:13 +00:00
Duncan Sands
eb04d356e3
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
1e3fe05638
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
58130a26f4
Add two missing SINT_TO_FP libcalls.
...
llvm-svn: 53460
2008-07-11 16:57:02 +00:00
Duncan Sands
52f1dbf139
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
669d4d6909
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
cafc3d583d
Document 'mask' in this calculation.
...
llvm-svn: 53454
2008-07-11 08:16:26 +00:00
Duncan Sands
94f659d6cb
Align comments, colons and cases. Remove trailing
...
whitespace.
llvm-svn: 53453
2008-07-11 07:37:30 +00:00
Nick Lewycky
12c88a28f5
Remove misleading constant from comment.
...
llvm-svn: 53452
2008-07-11 07:36:19 +00:00
Nick Lewycky
8cd0f2058e
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
9f17caa9a9
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
07bfade2d4
a missed optimization that Eli spotted
...
llvm-svn: 53449
2008-07-11 06:40:29 +00:00
Chris Lattner
34b0895d4d
another bug in the same line.
...
llvm-svn: 53448
2008-07-11 06:38:16 +00:00
Chris Lattner
3cdb6789b9
fix a bug spotted by Eli's eagle eyes
...
llvm-svn: 53447
2008-07-11 06:36:01 +00:00
Chris Lattner
3d40848bfd
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
d1198896ae
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
16b8ae98c1
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
f3f6b6d7af
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
20b1bde882
regenerate
...
llvm-svn: 53440
2008-07-11 00:30:39 +00:00
Chris Lattner
9dff6fbe58
Implement PR2538
...
llvm-svn: 53438
2008-07-11 00:30:06 +00:00
Chris Lattner
78d60a220b
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
5e784a8ebd
make legalize types be a command line option: -enable-legalize-types.
...
llvm-svn: 53434
2008-07-10 23:37:50 +00:00
Dan Gohman
1f42b96c7e
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
d7023b66ea
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
b5d45a49ea
Remove extraneous vertical whitespace before Eric gets the wrong idea ;-)
...
llvm-svn: 53411
2008-07-10 16:49:53 +00:00
Chris Lattner
5f3c587276
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
a6c09579f0
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
90a916539d
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
91912e046a
Fix a FIXME: use an apint in CTTZ legalization.
...
llvm-svn: 53406
2008-07-10 15:30:54 +00:00
Duncan Sands
f2734eabf2
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
16f5ab06b0
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
a219bb03e1
Make the LegalizeType method naming scheme more regular.
...
llvm-svn: 53403
2008-07-10 15:25:04 +00:00
Duncan Sands
8afe39dc56
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
Matthijs Kooijman
ca5124a630
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
3ec3113431
- 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
26ccb8e9a8
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
65e43ae1e8
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
189609bb36
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
bb9849b7b6
Fix the build by adding a #include.
...
llvm-svn: 53388
2008-07-10 01:44:27 +00:00
Chris Lattner
6d7c5fa8dc
The source and dest of an alias are *not* required to have the same type,
...
though that would be nice and make sense :). Patch by Nathan Keynes!
llvm-svn: 53387
2008-07-10 01:09:33 +00:00
Evan Cheng
02a618dc56
Fix for PR2472. Use movss to set lower 32-bits of a zero XMM vector.
...
llvm-svn: 53386
2008-07-10 01:08:23 +00:00
Chris Lattner
5e57a12a80
open plugins with RTLD_GLOBAL, pointed out by Bram Adams.
...
llvm-svn: 53385
2008-07-10 00:52:20 +00:00
Chris Lattner
7797bfa0fd
SImplify ConstantVector::get a bit and make it turn a vector
...
of all undefs into a single undef value.
llvm-svn: 53384
2008-07-10 00:44:03 +00:00
Chris Lattner
563d2c9fac
Fix a case where vector comparison constant folding would cause an
...
infinite recursion. part of PR2529
llvm-svn: 53383
2008-07-10 00:29:28 +00:00
Chris Lattner
6c12d086d9
add a helper method for code that wants to handle vector
...
constants by element without caring how they are formed.
llvm-svn: 53381
2008-07-10 00:28:11 +00:00
Chris Lattner
4fbada0bef
elementwise comparison of vector constants was completely wrong. Fix
...
it for PR2529
llvm-svn: 53380
2008-07-10 00:08:17 +00:00
Evan Cheng
80f6966c7f
- Replace use of std::map<std::string, ..> with StringMap. Replace use of std::map with DenseMap, std::set with SmallPtrSet. This results in minor speed up.
...
- Some code clean up.
llvm-svn: 53379
2008-07-10 00:04:23 +00:00
Owen Anderson
35080ed650
Revert r53367, which was breaking things.
...
llvm-svn: 53378
2008-07-09 23:09:10 +00:00
Dan Gohman
e10fc737ca
Simplify hasNUsesOfValue and hasAnyUsesOfValue even more. This
...
makes their special-case checks of use_size() less beneficial,
so remove them. This eliminates all but one use of use_size(),
which is in AssignTopologicalOrder, which uses it only once for
each node, and so can reasonably afford to recompute it, as
this allows the UsesSize field of SDNode to be removed
altogether.
llvm-svn: 53377
2008-07-09 23:03:14 +00:00
Dan Gohman
6ba50d7fc1
hasAnyUseOfValue can check SDUse nodes of its users directly instead
...
of examining every operand of every user.
llvm-svn: 53374
2008-07-09 22:39:01 +00:00
Dan Gohman
679872b05f
Move MemoryVT out of LSBaseNode into MemSDNode, allowing the
...
getMemOperand function to be moved into the base class as well
and made non-virtual.
llvm-svn: 53372
2008-07-09 22:08:04 +00:00
Anton Korobeynikov
9eae9520a9
Remove a FIXME: we really need to use const_data section on darwin for
...
constant pool, if relocation model is not static. This directly maps to
the way how GCC works.
llvm-svn: 53370
2008-07-09 21:54:26 +00:00
Evan Cheng
082f7f802e
Avoid creating expensive comment string if it's not going to be printed.
...
llvm-svn: 53369
2008-07-09 21:53:02 +00:00
Anton Korobeynikov
a5955dc461
Add FIXME for future checking.
...
llvm-svn: 53368
2008-07-09 21:38:28 +00:00
Owen Anderson
8174cf28a3
Loosen our check here. Local regalloc only cares that the reg is used and def'd by the same instruction, but about the details of
...
the relationship.
llvm-svn: 53367
2008-07-09 21:34:36 +00:00
Dale Johannesen
be88d5cd94
Remove extra call to DW.SetModuleInfo on Linux.
...
llvm-svn: 53365
2008-07-09 21:33:15 +00:00
Dale Johannesen
02e8b93701
Emit debug info for data-only files on Cell SPU.
...
I cannot test this target, let me know if it breaks!
llvm-svn: 53363
2008-07-09 21:25:06 +00:00
Dale Johannesen
f48f4811a3
Emit debug into for data-only files for Linux PPC.
...
I cannot test this target, let me know if it breaks!
llvm-svn: 53362
2008-07-09 21:24:07 +00:00
Dan Gohman
f6e651fcf2
Move the IsVolatile and SVOffset fields into the MemSDNode base
...
class, and store IsVolatile and Alignment in a more compact form.
This makes AtomicSDNode slightly larger, but it shrinks LoadSDNode
and StoreSDNode, which are much more common and are the largest of
the SDNode subclasses. Also, this lets the isVolatile() and
getAlignment() accessors be non-virtual.
llvm-svn: 53361
2008-07-09 21:23:02 +00:00
Dale Johannesen
11d39779a1
Emit debug info for data-only files. ARM version.
...
llvm-svn: 53360
2008-07-09 21:20:54 +00:00
Owen Anderson
50a64de51e
Don't use an expensive check for two-address-ness when we have the information sitting around to determine it much more quickly,
...
This speeds up the local register allocator from 0.37s to 0.31s on instcombine.
llvm-svn: 53359
2008-07-09 21:15:10 +00:00
Dale Johannesen
36a38a5ba1
Emit debug info for data-only files. This version
...
is X86 ATT only.
llvm-svn: 53355
2008-07-09 20:55:35 +00:00
Anton Korobeynikov
61f4175d64
Add missed section
...
llvm-svn: 53354
2008-07-09 20:47:55 +00:00
Dale Johannesen
51c3445491
Emit debug info for data-only files. This version
...
applies to ppc Darwin only.
llvm-svn: 53353
2008-07-09 20:43:39 +00:00
Owen Anderson
58912683fd
Factor local liveness computation out into its own function.
...
llvm-svn: 53352
2008-07-09 20:14:53 +00:00
Dan Gohman
0975e33ffc
Reuse the MO variable instead of recomputing it in RegAllocLocal.
...
Keep RegAllocSimple in sync.
llvm-svn: 53351
2008-07-09 20:12:26 +00:00
Anton Korobeynikov
57e9182691
Distinguish .const and .const_data on Darwin, when needed. This is somehow crazy :)
...
llvm-svn: 53350
2008-07-09 20:01:42 +00:00
Dan Gohman
c27e4e9651
Give RegAllocSimple a TargetInstrInfo member to keep it consistent
...
with RegAllocLocal.
llvm-svn: 53347
2008-07-09 19:56:01 +00:00
Dan Gohman
ad2c9877ce
RegAllocLocal has a TargetInstrInfo data member. Use it instead
...
of having local variables duplicate it.
llvm-svn: 53346
2008-07-09 19:55:19 +00:00
Dan Gohman
4d221ae533
Use find with std::map, when that's what's needed, instead of lower_bound
...
with extra checks.
llvm-svn: 53344
2008-07-09 19:51:00 +00:00
Anton Korobeynikov
67931c35bd
Weak stuff always goes to coalesced sections on Darwin
...
llvm-svn: 53340
2008-07-09 19:06:02 +00:00
Dan Gohman
8a421248b9
Remove #include <iostream>.
...
llvm-svn: 53333
2008-07-09 18:08:48 +00:00
Anton Korobeynikov
2b2543166d
Add FIXME needed to be resolved later
...
llvm-svn: 53324
2008-07-09 13:30:02 +00:00
Anton Korobeynikov
93fef00b0f
Use only 'subset' of flags
...
llvm-svn: 53323
2008-07-09 13:29:44 +00:00
Anton Korobeynikov
32e4256260
Typo
...
llvm-svn: 53322
2008-07-09 13:29:27 +00:00
Anton Korobeynikov
d31e7ad0cf
Revert accidentially added stuff
...
llvm-svn: 53321
2008-07-09 13:29:08 +00:00
Anton Korobeynikov
03614f247c
First sketch of special section objects
...
llvm-svn: 53320
2008-07-09 13:28:49 +00:00
Anton Korobeynikov
395dac000b
Honour text sections
...
llvm-svn: 53319
2008-07-09 13:28:19 +00:00
Anton Korobeynikov
5ad0c235f1
Use isWeakForLinker() hook
...
llvm-svn: 53318
2008-07-09 13:27:59 +00:00
Anton Korobeynikov
f16db15839
Switch to new section name handling facility
...
llvm-svn: 53316
2008-07-09 13:27:16 +00:00
Anton Korobeynikov
1f697cd97b
Another bunch of hacks for named sections support
...
llvm-svn: 53315
2008-07-09 13:26:52 +00:00
Anton Korobeynikov
d0f5cb4490
Typo
...
llvm-svn: 53314
2008-07-09 13:26:24 +00:00
Anton Korobeynikov
93fe3c3fad
Drop mergeable flag, if size is no suitable
...
llvm-svn: 53313
2008-07-09 13:26:05 +00:00
Anton Korobeynikov
df663a8ddf
Fix several bugs in named sections handling
...
llvm-svn: 53312
2008-07-09 13:25:46 +00:00
Anton Korobeynikov
933bf0ecc4
Add hacky way to distinguish named and named sections. This will be generalized in the future.
...
llvm-svn: 53311
2008-07-09 13:25:26 +00:00
Anton Korobeynikov
f08fab0af5
Use 'gnu.linkonce', where needed
...
llvm-svn: 53310
2008-07-09 13:24:55 +00:00
Anton Korobeynikov
3bde8f2e24
Fix thinko
...
llvm-svn: 53309
2008-07-09 13:24:38 +00:00
Anton Korobeynikov
d30979695f
Drop dead member reference
...
llvm-svn: 53308
2008-07-09 13:24:18 +00:00
Anton Korobeynikov
9f05fccb88
Add funny darwin section selection logic
...
llvm-svn: 53307
2008-07-09 13:23:57 +00:00
Anton Korobeynikov
751cfda7dd
Handle ELF mergeable sections
...
llvm-svn: 53306
2008-07-09 13:23:37 +00:00
Anton Korobeynikov
dd347538c8
Provide section selection for X86 ELF targets
...
llvm-svn: 53305
2008-07-09 13:23:08 +00:00
Anton Korobeynikov
f42d75201a
Provide general hook for section name calculation
...
llvm-svn: 53304
2008-07-09 13:22:46 +00:00
Anton Korobeynikov
c421fcddb4
Print entity size for mergeable sections
...
llvm-svn: 53303
2008-07-09 13:22:17 +00:00
Anton Korobeynikov
849c8617be
Split PrintSectionFlags
...
llvm-svn: 53302
2008-07-09 13:21:49 +00:00
Anton Korobeynikov
7f21791b33
Split UniqueSectionForGlobal()
...
llvm-svn: 53301
2008-07-09 13:21:29 +00:00
Anton Korobeynikov
61aca29278
Split PreferredEHDataFormat hook
...
llvm-svn: 53300
2008-07-09 13:21:08 +00:00
Anton Korobeynikov
32d3d15c2e
Split X86TargetAsmInfo into 4 subtarget-specific classes
...
llvm-svn: 53299
2008-07-09 13:20:48 +00:00
Anton Korobeynikov
80f2417e3b
Whitespace cleanup
...
llvm-svn: 53298
2008-07-09 13:20:27 +00:00
Anton Korobeynikov
059999d321
Move flag decoding stuff into special hook
...
llvm-svn: 53297
2008-07-09 13:20:07 +00:00
Anton Korobeynikov
ca271dd426
Properly handle linkonce stuff
...
llvm-svn: 53296
2008-07-09 13:19:38 +00:00
Anton Korobeynikov
782a69505d
Provide skeletone code for calculation of section, where global should be emitted into
...
llvm-svn: 53295
2008-07-09 13:19:08 +00:00
Anton Korobeynikov
2b2f0a4b8f
Use 'llvm-linkonce' consistently
...
llvm-svn: 53294
2008-07-09 13:18:38 +00:00
Anton Korobeynikov
5bc572ad96
Add default section name resolution routine
...
llvm-svn: 53292
2008-07-09 13:18:02 +00:00
Anton Korobeynikov
552675bb0f
Constify
...
llvm-svn: 53291
2008-07-09 13:17:36 +00:00
Anton Korobeynikov
651865851c
Add code for default section falgs computation
...
llvm-svn: 53290
2008-07-09 13:16:59 +00:00
Duncan Sands
e66e7b80f0
Remove some unneeded includes.
...
llvm-svn: 53289
2008-07-09 12:08:25 +00:00
Duncan Sands
828e080f3b
Redo LegalizeTypes soft float support for
...
SINT_TO_FP and UINT_TO_FP. This now produces
the same code as LegalizeDAG (the previous
code was based on a mistaken idea of what
LegalizeDAG did in this case).
llvm-svn: 53288
2008-07-09 12:07:22 +00:00
Duncan Sands
bc816b10f7
Forgot to update the chain result when softening
...
loads.
llvm-svn: 53287
2008-07-09 11:15:31 +00:00
Duncan Sands
cb4999041b
LegalizeTypes soft float support for FP_TO_SINT and
...
FP_TO_UINT.
llvm-svn: 53286
2008-07-09 11:13:46 +00:00
Duncan Sands
c8d39ae369
LegalizeTypes support for powi soft float.
...
llvm-svn: 53285
2008-07-09 11:11:47 +00:00
Duncan Sands
d5c6d06980
Make the role of MVT::i32 clearer here, and add a
...
note since it is not clear whether it is correct.
llvm-svn: 53284
2008-07-09 08:07:41 +00:00
Nick Lewycky
a7d102aca3
Simplify, suggested by Chris Lattner.
...
llvm-svn: 53283
2008-07-09 07:35:26 +00:00
Nick Lewycky
6341c5a7ec
Fold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.
...
llvm-svn: 53282
2008-07-09 07:29:11 +00:00
Evan Cheng
098905497f
Missed alignment argument on stores lowered from memcpy.
...
llvm-svn: 53281
2008-07-09 06:38:06 +00:00
Evan Cheng
f51c436a1b
Back out 53254. It broke ppc debug info codegen.
...
llvm-svn: 53280
2008-07-09 06:36:53 +00:00
Bill Wendling
3119083ee6
Make the DICountVisitor not a visitor. This keeps us from calling virtual
...
functions and junk.
llvm-svn: 53279
2008-07-09 06:02:33 +00:00
Bill Wendling
ba6c8e3a76
Silence warning by initializing variable.
...
llvm-svn: 53278
2008-07-09 05:55:53 +00:00
Bruno Cardoso Lopes
5ed6e9e045
Fixed features usage.
...
llvm-svn: 53277
2008-07-09 05:32:22 +00:00
Nick Lewycky
38fa84fa12
Fold ((1 << a) & 1) to (a == 0).
...
llvm-svn: 53276
2008-07-09 05:20:13 +00:00
Chris Lattner
b650adae49
Add a little wrapper header that is put around bc files when emitting
...
bc files for modules with a target triple that indicates they are for
darwin. The reader unconditionally handles this, and the writer could
turn this on for more targets if we care.
This change has two benefits for darwin:
1) it allows us to encode the cpu type of the file in an easy to read
place that doesn't require decoding the bc file.
2) it works around a bug (IMO) in darwin's AR where it is incapable of
handling files that are not a multiple of 8 bytes long. BC files
are only guaranteed to be multiples of 4 bytes long.
llvm-svn: 53275
2008-07-09 05:14:23 +00:00
Chris Lattner
6bc83fb5de
random bugfix sitting in my tree.
...
llvm-svn: 53274
2008-07-09 05:12:07 +00:00
Bruno Cardoso Lopes
2bad4772e7
Fixe typos and 80 column size problems
...
llvm-svn: 53272
2008-07-09 04:45:36 +00:00
Nick Lewycky
2a6469c9a5
Reduce x - y to -y when we know the 'x' part will get masked off anyways.
...
llvm-svn: 53271
2008-07-09 04:32:37 +00:00
Bruno Cardoso Lopes
aef7ff4c46
MipsTargetLowering cleanup
...
llvm-svn: 53270
2008-07-09 04:15:08 +00:00
Nick Lewycky
86adf455bd
Remove getValueRange from SCEV. It wasn't doing anything there anyways, and a
...
more complete version is now available from the LoopVR pass.
llvm-svn: 53269
2008-07-09 03:21:51 +00:00
Dan Gohman
f152c7c967
Consistently put quotes around pass names in debugging output.
...
llvm-svn: 53268
2008-07-09 00:50:40 +00:00
Devang Patel
2b56d5281d
If loop induction variable's start value is less then its exit value then do not split the loop.
...
llvm-svn: 53265
2008-07-09 00:12:01 +00:00
Dan Gohman
2e23cd5a18
const-ify SelectionDAG::getNodeValueTypes.
...
llvm-svn: 53264
2008-07-09 00:00:42 +00:00
Dan Gohman
9f1547684c
It's no longer necessary to test if a MachineBasicBlock's
...
parent is non-null. It now always is.
llvm-svn: 53263
2008-07-08 23:59:09 +00:00
Dan Gohman
286e8f7295
Verify that MachineMemOperand alignment is a non-zero power of 2.
...
llvm-svn: 53262
2008-07-08 23:47:04 +00:00
Dan Gohman
5b24b3baef
Factor out the code for computing an alignment value, and make it
...
available to getAtomic in addition to just getLoad and getStore,
to prevent MachineMemOperands with 0 alignment.
llvm-svn: 53261
2008-07-08 23:46:32 +00:00
Owen Anderson
d90ae5127e
Fix the build. Apparently MachineInstr& is no longer implicitly convertable to MachineBasicBlock::iterator.
...
llvm-svn: 53260
2008-07-08 23:36:37 +00:00
Owen Anderson
caf8cb40e8
Make the local register allocator compute (purely local) liveness information for itself
...
rather than depending on LiveVariables. This decreases compile time from:
0.5909s (LV + Regalloc) to 0.421s (just regalloc).
llvm-svn: 53256
2008-07-08 22:24:50 +00:00
Dale Johannesen
d609d7166c
Make debug info come out in data-only files.
...
This is a question of the debugging setup code not
being called at the right time, and it's called from
target-dependent code for some reason. I have only
attempted to fix Darwin, but I'm pretty sure it's
broken elsewhere; I'll leave that to people who can
test it.
llvm-svn: 53254
2008-07-08 21:56:22 +00:00
Dale Johannesen
31b41acdd4
Remove some dead code.
...
llvm-svn: 53253
2008-07-08 21:53:43 +00:00
Evan Cheng
a5621a1c54
Do not CSE DEBUG_LOC, DBG_LABEL, DBG_STOPPOINT, DECLARE, and EH_LABEL SDNode's. This improves compile time slightly at -O0 -g.
...
llvm-svn: 53246
2008-07-08 20:06:39 +00:00
Duncan Sands
9255845ac7
Remove custom expansion from LegalizeTypes when doing
...
soft float: experiments show that targets aren't
expecting this for results or for operands. Add
support select/select_cc result soft float and
correct operand soft float for these.
llvm-svn: 53245
2008-07-08 20:03:24 +00:00
Duncan Sands
a41982af51
Add missing select_cc libcall line, somehow omitted
...
in LegalizeTypes.
llvm-svn: 53244
2008-07-08 20:00:05 +00:00
Chris Lattner
6163b7a5ad
improve comment
...
llvm-svn: 53243
2008-07-08 18:47:38 +00:00
Chris Lattner
c5d6ef88ff
Add a new hidden option to the interpreter to cause it to print
...
out every volatile load and store. This is useful for tracking
down insane volatile memory bugs.
llvm-svn: 53241
2008-07-08 17:25:49 +00:00
Chris Lattner
c144216d78
Fix PR2496, a really nasty bug which involved sinking volatile loads
...
into phis. This is actually the same bug as PR2262 /
2008-04-29-VolatileLoadDontMerge.ll, but I missed checking the first
predecessor for multiple successors. Testcase here:
InstCombine/2008-07-08-VolatileLoadMerge.ll
llvm-svn: 53240
2008-07-08 17:18:32 +00:00
Evan Cheng
6af015292e
Unbreak C++ tests on x86 Darwin.
...
llvm-svn: 53237
2008-07-08 16:40:43 +00:00
Duncan Sands
f9f4389fb7
LegalizeTypes support for FP_ROUND and FP_EXTEND
...
soft float.
llvm-svn: 53231
2008-07-08 10:50:55 +00:00
Duncan Sands
65028bf60d
Add some helpers for manipulating function
...
parameter attributes.
llvm-svn: 53228
2008-07-08 09:41:30 +00:00
Duncan Sands
f21350341b
Pacify gcc-4.3.
...
llvm-svn: 53227
2008-07-08 09:33:14 +00:00
Duncan Sands
b854603cb5
Add some convenience methods for manipulating
...
call attributes.
llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Chris Lattner
d4bcc9011b
Fix three bugs:
...
1) evaluate [v]fcmp true/false with undefs to true or false instead
of undef.
2) fix vector comparisons with undef to return a vector result instead
of i1
3) fix vector comparisons with evaluatable results to return vector
true/false instead of i1 true/false (PR2529)
llvm-svn: 53220
2008-07-08 05:46:34 +00:00
Nick Lewycky
9cecc07bec
Expand SCEVUDiv of power of 2 to a lshr instruction.
...
llvm-svn: 53217
2008-07-08 05:05:37 +00:00
Evan Cheng
5be1103646
Avoid unnecessary string construction during asm printing.
...
llvm-svn: 53215
2008-07-08 00:55:58 +00:00
Dan Gohman
cd25487258
Pool-allocation for MachineInstrs, MachineBasicBlocks, and
...
MachineMemOperands. The pools are owned by MachineFunctions.
This drastically reduces the number of calls to malloc/free made
during the "Emit" phase of scheduling, as well as later phases
in CodeGen. Combined with other changes, this speeds up the
"instruction selection" phase of CodeGen by 10% in some cases.
llvm-svn: 53212
2008-07-07 23:14:23 +00:00
Dan Gohman
93e0208361
Pool-allocation for SDNodes. The pool is allocated once for each function,
...
and reused across SelectionDAGs.
This drastically reduces the number of calls to malloc/free made during
instruction selection, and improves memory locality.
llvm-svn: 53211
2008-07-07 23:02:41 +00:00
Dan Gohman
60e964b34c
Add some basic Pool-allocation infrastructure. This adds a Recycler class,
...
for handling bookkeeping for deleted objects, as well as the alist class
template, for keeping lists of objects allocated from Recyclers, and some
related utilities.
llvm-svn: 53210
2008-07-07 22:58:06 +00:00
Evan Cheng
ba25ca4b1b
Clean up PPC register specification.
...
llvm-svn: 53209
2008-07-07 22:22:07 +00:00
Evan Cheng
688a8070f4
ATT asm printer just print register AsmName's instead of calling tolower on each charater of Name. This speeds it up by 10%.
...
llvm-svn: 53208
2008-07-07 22:21:06 +00:00
Evan Cheng
c8c4503279
TargetRegisterDesc::Name field is the same as the abstract register name. There is no need for targets to specify register names in addition to their AsmName's.
...
llvm-svn: 53207
2008-07-07 22:19:41 +00:00
Bill Wendling
b30a16ca2c
Use the canonical way to get an empty structure.
...
llvm-svn: 53206
2008-07-07 21:41:57 +00:00
Bill Wendling
d7da49634d
Use StringMap for greater justice!
...
llvm-svn: 53202
2008-07-07 20:59:31 +00:00
Dan Gohman
d787dcfa3d
Fix SDNode::MorphNodeTo (a function used by by SelectNodeTo) to
...
properly track dead nodes that are on the original SDNode's operand
list but not the new one, and have no other uses.
llvm-svn: 53201
2008-07-07 20:57:48 +00:00
Dan Gohman
255eb1d296
Move MachineMemOperand's constructor out of line, to avoid a
...
#include dependency on Support/MathExtras.h in the header file.
llvm-svn: 53200
2008-07-07 20:32:02 +00:00
Dan Gohman
c81274ae95
Simplify this use of BuildMI. This is also in preparation for
...
pool-allocating MachineInstrs.
llvm-svn: 53198
2008-07-07 20:09:12 +00:00
Dan Gohman
ed34aec9a8
Use of operator* is redundant and confusing here.
...
llvm-svn: 53197
2008-07-07 20:08:05 +00:00
Dan Gohman
7fb6670108
Minor const-correctness fixes.
...
llvm-svn: 53196
2008-07-07 20:06:06 +00:00
Dan Gohman
713d153ea3
Assert that all MachineInstrs update PhysRegUseDefLists in
...
their cleanup code.
llvm-svn: 53194
2008-07-07 19:55:35 +00:00
Evan Cheng
cf3a4ad46d
Fix two serious LSR bugs.
...
1. LSR runOnLoop is always returning false regardless if any transformation is made.
2. AddUsersIfInteresting can create new instructions that are added to DeadInsts. But there is a later early exit which prevents them from being freed.
llvm-svn: 53193
2008-07-07 19:51:32 +00:00
Bruno Cardoso Lopes
b0c10c758e
fixed 32-bit fp_to_sint pattern
...
llvm-svn: 53192
2008-07-07 19:11:24 +00:00
Dan Gohman
d263602463
Remove most of the uses of SDOperandPtr, usually replacing it with a
...
simple const SDOperand*, which is what's usually needed.
For AddNodeIDOperands, which is small, just duplicate the function to
accept an SDUse*.
For SelectionDAG::getNode - Add an overload that accepts SDUse* that
copies the operands into a temporary SDOperand array, but also has
special-case checks for 0 through 3 operands to avoid the copy in
the common cases.
llvm-svn: 53183
2008-07-07 18:26:29 +00:00
Dan Gohman
955fdc7a4c
Add explicit keywords.
...
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Dan Gohman
6c9a53ffac
Use empty() instead of size().
...
llvm-svn: 53178
2008-07-07 17:52:43 +00:00
Dan Gohman
c97817aac3
Make DenseMap's insert return a pair, to more closely resemble std::map.
...
llvm-svn: 53177
2008-07-07 17:46:23 +00:00
Evan Cheng
38ce408540
LegalizeSetCCOperands should legalize the result of ExpandLibCall. Patch by Richard Osborne.
...
llvm-svn: 53169
2008-07-07 07:18:09 +00:00
Nick Lewycky
5b1024c386
Handle 'lshr' instruction with SCEVUDiv object.
...
Comment the xor %x, -1 case.
llvm-svn: 53167
2008-07-07 06:15:49 +00:00
Bill Wendling
d6bd5ea0b7
Prevent option name conflict.
...
llvm-svn: 53166
2008-07-07 05:42:27 +00:00
Duncan Sands
0caf597378
LegalizeTypes soft-float support for stores of a
...
float value.
llvm-svn: 53165
2008-07-07 00:08:12 +00:00
Anton Korobeynikov
47e1a76977
Add convenient helper for checking whether global is weak in linker sense
...
having weak or linkonce or common or extweak LLVM linkage.
llvm-svn: 53158
2008-07-05 23:48:30 +00:00