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
Chris Lattner
683ed3d94e
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
71b7398463
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
2e24e0ca68
open plugins with RTLD_GLOBAL, pointed out by Bram Adams.
...
llvm-svn: 53385
2008-07-10 00:52:20 +00:00
Chris Lattner
d977c07680
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
67136cff7b
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
97c661df7a
add a helper method for code that wants to handle vector
...
constants by element without caring how they are formed.
llvm-svn: 53382
2008-07-10 00:28:34 +00:00
Chris Lattner
2105d66c05
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
b69689e18b
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
0e6973442d
- 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
be2e9a4447
Revert r53367, which was breaking things.
...
llvm-svn: 53378
2008-07-09 23:09:10 +00:00
Dan Gohman
7d94c49db9
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
7a510c2990
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
db4504fa57
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
6e816424b0
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
1787443028
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
443864544e
Add FIXME for future checking.
...
llvm-svn: 53368
2008-07-09 21:38:28 +00:00
Owen Anderson
d3736ca1e0
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
ca43dce1e8
Remove extra call to DW.SetModuleInfo on Linux.
...
llvm-svn: 53365
2008-07-09 21:33:15 +00:00
Dale Johannesen
f76138c71f
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
dbd04c0783
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
89e71d48b8
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
c4650f4b56
Emit debug info for data-only files. ARM version.
...
llvm-svn: 53360
2008-07-09 21:20:54 +00:00
Owen Anderson
b42ed21894
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
605d38657a
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
bcfb41ca7d
Add missed section
...
llvm-svn: 53354
2008-07-09 20:47:55 +00:00
Dale Johannesen
b9aaddc110
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
a0bc522466
Factor local liveness computation out into its own function.
...
llvm-svn: 53352
2008-07-09 20:14:53 +00:00
Dan Gohman
70aa89d215
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
5c0d2bd46e
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
d0a33a9270
Give RegAllocSimple a TargetInstrInfo member to keep it consistent
...
with RegAllocLocal.
llvm-svn: 53347
2008-07-09 19:56:01 +00:00
Dan Gohman
8ab08642ee
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
8a95073098
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
92e4ac1599
Weak stuff always goes to coalesced sections on Darwin
...
llvm-svn: 53340
2008-07-09 19:06:02 +00:00
Dan Gohman
0acb6be89c
Remove #include <iostream>.
...
llvm-svn: 53333
2008-07-09 18:08:48 +00:00
Anton Korobeynikov
dad7a35acf
Testcase for PR2024
...
llvm-svn: 53327
2008-07-09 14:09:41 +00:00
Anton Korobeynikov
86e706d448
Silence a warning
...
llvm-svn: 53326
2008-07-09 13:56:43 +00:00
Anton Korobeynikov
decb136538
Drop enum and use constants for SectionFlags
...
llvm-svn: 53325
2008-07-09 13:41:07 +00:00
Anton Korobeynikov
ee09e66a01
Add FIXME needed to be resolved later
...
llvm-svn: 53324
2008-07-09 13:30:02 +00:00
Anton Korobeynikov
56827c1b60
Use only 'subset' of flags
...
llvm-svn: 53323
2008-07-09 13:29:44 +00:00
Anton Korobeynikov
d5cf47d853
Typo
...
llvm-svn: 53322
2008-07-09 13:29:27 +00:00
Anton Korobeynikov
d62b4f5b37
Revert accidentially added stuff
...
llvm-svn: 53321
2008-07-09 13:29:08 +00:00
Anton Korobeynikov
daee281590
First sketch of special section objects
...
llvm-svn: 53320
2008-07-09 13:28:49 +00:00
Anton Korobeynikov
03dc8bf4d6
Honour text sections
...
llvm-svn: 53319
2008-07-09 13:28:19 +00:00
Anton Korobeynikov
577c45dd74
Use isWeakForLinker() hook
...
llvm-svn: 53318
2008-07-09 13:27:59 +00:00
Anton Korobeynikov
deaa37362a
Unbreak
...
llvm-svn: 53317
2008-07-09 13:27:37 +00:00
Anton Korobeynikov
fe047d241c
Switch to new section name handling facility
...
llvm-svn: 53316
2008-07-09 13:27:16 +00:00
Anton Korobeynikov
3d3d12f431
Another bunch of hacks for named sections support
...
llvm-svn: 53315
2008-07-09 13:26:52 +00:00
Anton Korobeynikov
4f125b7217
Typo
...
llvm-svn: 53314
2008-07-09 13:26:24 +00:00
Anton Korobeynikov
9da4fd0f2e
Drop mergeable flag, if size is no suitable
...
llvm-svn: 53313
2008-07-09 13:26:05 +00:00
Anton Korobeynikov
13b9a22fb0
Fix several bugs in named sections handling
...
llvm-svn: 53312
2008-07-09 13:25:46 +00:00
Anton Korobeynikov
60919583b3
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
d789b7c196
Use 'gnu.linkonce', where needed
...
llvm-svn: 53310
2008-07-09 13:24:55 +00:00
Anton Korobeynikov
7504c283f2
Fix thinko
...
llvm-svn: 53309
2008-07-09 13:24:38 +00:00
Anton Korobeynikov
e1a65bcda1
Drop dead member reference
...
llvm-svn: 53308
2008-07-09 13:24:18 +00:00
Anton Korobeynikov
1e4dc36be4
Add funny darwin section selection logic
...
llvm-svn: 53307
2008-07-09 13:23:57 +00:00
Anton Korobeynikov
908998f071
Handle ELF mergeable sections
...
llvm-svn: 53306
2008-07-09 13:23:37 +00:00
Anton Korobeynikov
4c37c3ad5b
Provide section selection for X86 ELF targets
...
llvm-svn: 53305
2008-07-09 13:23:08 +00:00
Anton Korobeynikov
9d6939b5fc
Provide general hook for section name calculation
...
llvm-svn: 53304
2008-07-09 13:22:46 +00:00
Anton Korobeynikov
94ff6f02ef
Print entity size for mergeable sections
...
llvm-svn: 53303
2008-07-09 13:22:17 +00:00
Anton Korobeynikov
4e4f3168dd
Split PrintSectionFlags
...
llvm-svn: 53302
2008-07-09 13:21:49 +00:00
Anton Korobeynikov
cf638bfaac
Split UniqueSectionForGlobal()
...
llvm-svn: 53301
2008-07-09 13:21:29 +00:00
Anton Korobeynikov
d947aa838c
Split PreferredEHDataFormat hook
...
llvm-svn: 53300
2008-07-09 13:21:08 +00:00
Anton Korobeynikov
9a6ed374f8
Split X86TargetAsmInfo into 4 subtarget-specific classes
...
llvm-svn: 53299
2008-07-09 13:20:48 +00:00
Anton Korobeynikov
84fd5698f3
Whitespace cleanup
...
llvm-svn: 53298
2008-07-09 13:20:27 +00:00
Anton Korobeynikov
2633a040a3
Move flag decoding stuff into special hook
...
llvm-svn: 53297
2008-07-09 13:20:07 +00:00
Anton Korobeynikov
ab778022d5
Properly handle linkonce stuff
...
llvm-svn: 53296
2008-07-09 13:19:38 +00:00
Anton Korobeynikov
7680198798
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
3ee57868a5
Use 'llvm-linkonce' consistently
...
llvm-svn: 53294
2008-07-09 13:18:38 +00:00
Anton Korobeynikov
0bf332476a
Make hooks virtual
...
llvm-svn: 53293
2008-07-09 13:18:21 +00:00
Anton Korobeynikov
21539c6d1e
Add default section name resolution routine
...
llvm-svn: 53292
2008-07-09 13:18:02 +00:00
Anton Korobeynikov
aab504fb19
Constify
...
llvm-svn: 53291
2008-07-09 13:17:36 +00:00
Anton Korobeynikov
9e4ab5023a
Add code for default section falgs computation
...
llvm-svn: 53290
2008-07-09 13:16:59 +00:00
Duncan Sands
37ab611e8e
Remove some unneeded includes.
...
llvm-svn: 53289
2008-07-09 12:08:25 +00:00
Duncan Sands
5e266c914a
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
b9e63db718
Forgot to update the chain result when softening
...
loads.
llvm-svn: 53287
2008-07-09 11:15:31 +00:00
Duncan Sands
ed811f0ec1
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
8090f8576f
LegalizeTypes support for powi soft float.
...
llvm-svn: 53285
2008-07-09 11:11:47 +00:00
Duncan Sands
c52d3bf646
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
bb89c2a3f6
Simplify, suggested by Chris Lattner.
...
llvm-svn: 53283
2008-07-09 07:35:26 +00:00
Nick Lewycky
f9c27c343a
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
7898e98026
Missed alignment argument on stores lowered from memcpy.
...
llvm-svn: 53281
2008-07-09 06:38:06 +00:00
Evan Cheng
49c8e68e4c
Back out 53254. It broke ppc debug info codegen.
...
llvm-svn: 53280
2008-07-09 06:36:53 +00:00
Bill Wendling
88d2506ae2
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
a2279686cf
Silence warning by initializing variable.
...
llvm-svn: 53278
2008-07-09 05:55:53 +00:00
Bruno Cardoso Lopes
bcc2139ba6
Fixed features usage.
...
llvm-svn: 53277
2008-07-09 05:32:22 +00:00
Nick Lewycky
364661c43e
Fold ((1 << a) & 1) to (a == 0).
...
llvm-svn: 53276
2008-07-09 05:20:13 +00:00
Chris Lattner
a660f4bb07
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
304deea9e6
random bugfix sitting in my tree.
...
llvm-svn: 53274
2008-07-09 05:12:07 +00:00
Chris Lattner
7212e2014c
Fix a broken test. Neither load is eliminable without changing the CFG.
...
llvm-svn: 53273
2008-07-09 05:01:02 +00:00
Bruno Cardoso Lopes
7ceec57703
Fixe typos and 80 column size problems
...
llvm-svn: 53272
2008-07-09 04:45:36 +00:00
Nick Lewycky
0d3645e673
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
a6ce3cee2f
MipsTargetLowering cleanup
...
llvm-svn: 53270
2008-07-09 04:15:08 +00:00
Nick Lewycky
b36bd47419
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
1526985bac
Consistently put quotes around pass names in debugging output.
...
llvm-svn: 53268
2008-07-09 00:50:40 +00:00
Devang Patel
51cbf928ab
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
919936815e
const-ify SelectionDAG::getNodeValueTypes.
...
llvm-svn: 53264
2008-07-09 00:00:42 +00:00
Dan Gohman
f188fa4499
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
8293650d90
Verify that MachineMemOperand alignment is a non-zero power of 2.
...
llvm-svn: 53262
2008-07-08 23:47:04 +00:00
Dan Gohman
e8d8d2ea42
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
27b8a21dfd
Fix the build. Apparently MachineInstr& is no longer implicitly convertable to MachineBasicBlock::iterator.
...
llvm-svn: 53260
2008-07-08 23:36:37 +00:00
Dan Gohman
cb2ec30ef6
The graph name really does matter for configurations that use gv.
...
llvm-svn: 53259
2008-07-08 23:33:46 +00:00
Owen Anderson
45d4475fe5
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
07f5db0318
Testcase for debug info from data-only files.
...
This one is x86-32-Darwin specific.
llvm-svn: 53255
2008-07-08 21:57:56 +00:00
Dale Johannesen
b9097a71d4
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
45a4ec1a27
Remove some dead code.
...
llvm-svn: 53253
2008-07-08 21:53:43 +00:00
Nick Kledzik
c232347cb8
fix dangling pointer and argv off by one errors. Add support for --disable-inlining
...
llvm-svn: 53249
2008-07-08 21:14:10 +00:00
Evan Cheng
34ef1db87c
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
0797e5bf05
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
360d689db3
Add missing select_cc libcall line, somehow omitted
...
in LegalizeTypes.
llvm-svn: 53244
2008-07-08 20:00:05 +00:00
Chris Lattner
350e41760a
improve comment
...
llvm-svn: 53243
2008-07-08 18:47:38 +00:00
Chris Lattner
4f1a9ffc09
'Optimize' test
...
llvm-svn: 53242
2008-07-08 18:33:33 +00:00
Chris Lattner
2528d63ba7
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
501d78fdc0
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
Chris Lattner
855d2c38ec
new testcase for PR2496
...
llvm-svn: 53239
2008-07-08 17:18:05 +00:00
Evan Cheng
0a1e672dff
Unbreak C++ tests on x86 Darwin.
...
llvm-svn: 53237
2008-07-08 16:40:43 +00:00
Owen Anderson
c76bacbffb
Global variables beginning with \01 have special meaning on Darwin, so we need to remove
...
the name prefix when we change them from internal to external. This allows bugpointing
of codegen miscompilations to work more reliably on Darwin.
llvm-svn: 53236
2008-07-08 16:38:42 +00:00
Duncan Sands
12525efdfc
LegalizeTypes support for FP_ROUND and FP_EXTEND
...
soft float.
llvm-svn: 53231
2008-07-08 10:50:55 +00:00
Duncan Sands
acf0189b4b
Testcase for PR2520.
...
llvm-svn: 53230
2008-07-08 10:11:36 +00:00
Duncan Sands
66336db096
Add some helpers for manipulating function
...
parameter attributes.
llvm-svn: 53228
2008-07-08 09:41:30 +00:00
Duncan Sands
441080f7f2
Pacify gcc-4.3.
...
llvm-svn: 53227
2008-07-08 09:33:14 +00:00
Duncan Sands
825bde45cc
Note that 'nest' only applies to pointers.
...
llvm-svn: 53226
2008-07-08 09:27:25 +00:00
Matthijs Kooijman
328494c428
Add CallSite::getArgumentNo() to be able to translate an operand number into a
...
argument number.
llvm-svn: 53225
2008-07-08 08:51:47 +00:00
Matthijs Kooijman
ea017c77ff
Add CallSite::getArgumentOffset() to hide the differences in operands betwen
...
Call and Invoke in a single method instead of having it hardcoded in multiple
places.
llvm-svn: 53224
2008-07-08 08:50:32 +00:00
Duncan Sands
78c8872d87
Add some convenience methods for manipulating
...
call attributes.
llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Chris Lattner
d137a08b0d
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
Chris Lattner
fc12d2e5f3
clarify :)
...
llvm-svn: 53218
2008-07-08 05:12:37 +00:00
Nick Lewycky
3c947045ef
Expand SCEVUDiv of power of 2 to a lshr instruction.
...
llvm-svn: 53217
2008-07-08 05:05:37 +00:00
Evan Cheng
534952224c
Avoid unnecessary string construction during asm printing.
...
llvm-svn: 53215
2008-07-08 00:55:58 +00:00
Nick Kledzik
7c6f23fb9d
add _lto_codegen_debug_options so that linker can use it
...
llvm-svn: 53213
2008-07-07 23:24:06 +00:00
Dan Gohman
3b46030375
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
7f8b6d5f80
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
e5932e5a3d
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
0189604b0a
Clean up PPC register specification.
...
llvm-svn: 53209
2008-07-07 22:22:07 +00:00
Evan Cheng
90a92af176
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
4a898c0b11
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
b46e5165bf
Use the canonical way to get an empty structure.
...
llvm-svn: 53206
2008-07-07 21:41:57 +00:00
Dan Gohman
d6ec05077f
Refactor the tablegen DAGISelEmitter code for outputing calls to
...
getTargetNode and SelectNodeTo to reduce duplication, and to
make some of the getTargetNode code available to SelectNodeTo.
Use SelectNodeTo instead of getTargetNode in several new
interesting cases, as it mutates nodes in place instead of
creating new ones.
This triggers some scheduling behavior differences due to nodes
being presented to the scheduler in a different order. Some of the
arbitrary scheduling decisions it makes are now arbitrarily made
differently. This is visible in CodeGen/PowerPC/LargeAbsoluteAddr.ll,
where a trivial scheduling difference led to a trivial register
allocation difference.
llvm-svn: 53203
2008-07-07 21:00:17 +00:00
Bill Wendling
1214860a78
Use StringMap for greater justice!
...
llvm-svn: 53202
2008-07-07 20:59:31 +00:00
Dan Gohman
9169763955
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
aedb4a61b8
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
230263c63e
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
14464bc61c
Use of operator* is redundant and confusing here.
...
llvm-svn: 53197
2008-07-07 20:08:05 +00:00
Dan Gohman
c7fc432b19
Minor const-correctness fixes.
...
llvm-svn: 53196
2008-07-07 20:06:06 +00:00
Dan Gohman
75f9b72bfc
Shrink MachineMemOperand by storing the alignment in log form
...
and rearranging the fields.
llvm-svn: 53195
2008-07-07 20:05:04 +00:00