oota-llvm.git
16 years agoThe source and dest of an alias are *not* required to have the same type,
Chris Lattner [Thu, 10 Jul 2008 01:09:33 +0000 (01:09 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53387 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix for PR2472. Use movss to set lower 32-bits of a zero XMM vector.
Evan Cheng [Thu, 10 Jul 2008 01:08:23 +0000 (01:08 +0000)]
Fix for PR2472. Use movss to set lower 32-bits of a zero XMM vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53386 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoopen plugins with RTLD_GLOBAL, pointed out by Bram Adams.
Chris Lattner [Thu, 10 Jul 2008 00:52:20 +0000 (00:52 +0000)]
open plugins with RTLD_GLOBAL, pointed out by Bram Adams.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53385 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSImplify ConstantVector::get a bit and make it turn a vector
Chris Lattner [Thu, 10 Jul 2008 00:44:03 +0000 (00:44 +0000)]
SImplify ConstantVector::get a bit and make it turn a vector
of all undefs into a single undef value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53384 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a case where vector comparison constant folding would cause an
Chris Lattner [Thu, 10 Jul 2008 00:29:28 +0000 (00:29 +0000)]
Fix a case where vector comparison constant folding would cause an
infinite recursion.  part of PR2529

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53383 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a helper method for code that wants to handle vector
Chris Lattner [Thu, 10 Jul 2008 00:28:34 +0000 (00:28 +0000)]
add a helper method for code that wants to handle vector
constants by element without caring how they are formed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53382 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd a helper method for code that wants to handle vector
Chris Lattner [Thu, 10 Jul 2008 00:28:11 +0000 (00:28 +0000)]
add a helper method for code that wants to handle vector
constants by element without caring how they are formed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53381 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoelementwise comparison of vector constants was completely wrong. Fix
Chris Lattner [Thu, 10 Jul 2008 00:08:17 +0000 (00:08 +0000)]
elementwise comparison of vector constants was completely wrong.  Fix
it for PR2529

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53380 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago- Replace use of std::map<std::string, ..> with StringMap. Replace use of std::map...
Evan Cheng [Thu, 10 Jul 2008 00:04:23 +0000 (00:04 +0000)]
- 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53379 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert r53367, which was breaking things.
Owen Anderson [Wed, 9 Jul 2008 23:09:10 +0000 (23:09 +0000)]
Revert r53367, which was breaking things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53378 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify hasNUsesOfValue and hasAnyUsesOfValue even more. This
Dan Gohman [Wed, 9 Jul 2008 23:03:14 +0000 (23:03 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53377 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agohasAnyUseOfValue can check SDUse nodes of its users directly instead
Dan Gohman [Wed, 9 Jul 2008 22:39:01 +0000 (22:39 +0000)]
hasAnyUseOfValue can check SDUse nodes of its users directly instead
of examining every operand of every user.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53374 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove MemoryVT out of LSBaseNode into MemSDNode, allowing the
Dan Gohman [Wed, 9 Jul 2008 22:08:04 +0000 (22:08 +0000)]
Move MemoryVT out of LSBaseNode into MemSDNode, allowing the
getMemOperand function to be moved into the base class as well
and made non-virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53372 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove a FIXME: we really need to use const_data section on darwin for
Anton Korobeynikov [Wed, 9 Jul 2008 21:54:26 +0000 (21:54 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53370 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAvoid creating expensive comment string if it's not going to be printed.
Evan Cheng [Wed, 9 Jul 2008 21:53:02 +0000 (21:53 +0000)]
Avoid creating expensive comment string if it's not going to be printed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53369 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd FIXME for future checking.
Anton Korobeynikov [Wed, 9 Jul 2008 21:38:28 +0000 (21:38 +0000)]
Add FIXME for future checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53368 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLoosen our check here. Local regalloc only cares that the reg is used and def'd...
Owen Anderson [Wed, 9 Jul 2008 21:34:36 +0000 (21:34 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53367 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove extra call to DW.SetModuleInfo on Linux.
Dale Johannesen [Wed, 9 Jul 2008 21:33:15 +0000 (21:33 +0000)]
Remove extra call to DW.SetModuleInfo on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53365 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEmit debug info for data-only files on Cell SPU.
Dale Johannesen [Wed, 9 Jul 2008 21:25:06 +0000 (21:25 +0000)]
Emit debug info for data-only files on Cell SPU.
I cannot test this target, let me know if it breaks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53363 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEmit debug into for data-only files for Linux PPC.
Dale Johannesen [Wed, 9 Jul 2008 21:24:07 +0000 (21:24 +0000)]
Emit debug into for data-only files for Linux PPC.
I cannot test this target, let me know if it breaks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53362 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove the IsVolatile and SVOffset fields into the MemSDNode base
Dan Gohman [Wed, 9 Jul 2008 21:23:02 +0000 (21:23 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53361 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEmit debug info for data-only files. ARM version.
Dale Johannesen [Wed, 9 Jul 2008 21:20:54 +0000 (21:20 +0000)]
Emit debug info for data-only files.  ARM version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53360 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't use an expensive check for two-address-ness when we have the information sittin...
Owen Anderson [Wed, 9 Jul 2008 21:15:10 +0000 (21:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53359 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEmit debug info for data-only files. This version
Dale Johannesen [Wed, 9 Jul 2008 20:55:35 +0000 (20:55 +0000)]
Emit debug info for data-only files.  This version
is X86 ATT only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53355 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd missed section
Anton Korobeynikov [Wed, 9 Jul 2008 20:47:55 +0000 (20:47 +0000)]
Add missed section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53354 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEmit debug info for data-only files. This version
Dale Johannesen [Wed, 9 Jul 2008 20:43:39 +0000 (20:43 +0000)]
Emit debug info for data-only files.  This version
applies to ppc Darwin only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53353 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFactor local liveness computation out into its own function.
Owen Anderson [Wed, 9 Jul 2008 20:14:53 +0000 (20:14 +0000)]
Factor local liveness computation out into its own function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53352 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReuse the MO variable instead of recomputing it in RegAllocLocal.
Dan Gohman [Wed, 9 Jul 2008 20:12:26 +0000 (20:12 +0000)]
Reuse the MO variable instead of recomputing it in RegAllocLocal.
Keep RegAllocSimple in sync.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53351 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDistinguish .const and .const_data on Darwin, when needed. This is somehow crazy :)
Anton Korobeynikov [Wed, 9 Jul 2008 20:01:42 +0000 (20:01 +0000)]
Distinguish .const and .const_data on Darwin, when needed. This is somehow crazy :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53350 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGive RegAllocSimple a TargetInstrInfo member to keep it consistent
Dan Gohman [Wed, 9 Jul 2008 19:56:01 +0000 (19:56 +0000)]
Give RegAllocSimple a TargetInstrInfo member to keep it consistent
with RegAllocLocal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53347 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRegAllocLocal has a TargetInstrInfo data member. Use it instead
Dan Gohman [Wed, 9 Jul 2008 19:55:19 +0000 (19:55 +0000)]
RegAllocLocal has a TargetInstrInfo data member. Use it instead
of having local variables duplicate it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53346 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse find with std::map, when that's what's needed, instead of lower_bound
Dan Gohman [Wed, 9 Jul 2008 19:51:00 +0000 (19:51 +0000)]
Use find with std::map, when that's what's needed, instead of lower_bound
with extra checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53344 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWeak stuff always goes to coalesced sections on Darwin
Anton Korobeynikov [Wed, 9 Jul 2008 19:06:02 +0000 (19:06 +0000)]
Weak stuff always goes to coalesced sections on Darwin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53340 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove #include <iostream>.
Dan Gohman [Wed, 9 Jul 2008 18:08:48 +0000 (18:08 +0000)]
Remove #include <iostream>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53333 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTestcase for PR2024
Anton Korobeynikov [Wed, 9 Jul 2008 14:09:41 +0000 (14:09 +0000)]
Testcase for PR2024

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53327 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSilence a warning
Anton Korobeynikov [Wed, 9 Jul 2008 13:56:43 +0000 (13:56 +0000)]
Silence a warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53326 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDrop enum and use constants for SectionFlags
Anton Korobeynikov [Wed, 9 Jul 2008 13:41:07 +0000 (13:41 +0000)]
Drop enum and use constants for SectionFlags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53325 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd FIXME needed to be resolved later
Anton Korobeynikov [Wed, 9 Jul 2008 13:30:02 +0000 (13:30 +0000)]
Add FIXME needed to be resolved later

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53324 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse only 'subset' of flags
Anton Korobeynikov [Wed, 9 Jul 2008 13:29:44 +0000 (13:29 +0000)]
Use only 'subset' of flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53323 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTypo
Anton Korobeynikov [Wed, 9 Jul 2008 13:29:27 +0000 (13:29 +0000)]
Typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53322 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert accidentially added stuff
Anton Korobeynikov [Wed, 9 Jul 2008 13:29:08 +0000 (13:29 +0000)]
Revert accidentially added stuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53321 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFirst sketch of special section objects
Anton Korobeynikov [Wed, 9 Jul 2008 13:28:49 +0000 (13:28 +0000)]
First sketch of special section objects

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53320 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHonour text sections
Anton Korobeynikov [Wed, 9 Jul 2008 13:28:19 +0000 (13:28 +0000)]
Honour text sections

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53319 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse isWeakForLinker() hook
Anton Korobeynikov [Wed, 9 Jul 2008 13:27:59 +0000 (13:27 +0000)]
Use isWeakForLinker() hook

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53318 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUnbreak
Anton Korobeynikov [Wed, 9 Jul 2008 13:27:37 +0000 (13:27 +0000)]
Unbreak

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53317 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSwitch to new section name handling facility
Anton Korobeynikov [Wed, 9 Jul 2008 13:27:16 +0000 (13:27 +0000)]
Switch to new section name handling facility

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53316 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAnother bunch of hacks for named sections support
Anton Korobeynikov [Wed, 9 Jul 2008 13:26:52 +0000 (13:26 +0000)]
Another bunch of hacks for named sections support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53315 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTypo
Anton Korobeynikov [Wed, 9 Jul 2008 13:26:24 +0000 (13:26 +0000)]
Typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53314 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDrop mergeable flag, if size is no suitable
Anton Korobeynikov [Wed, 9 Jul 2008 13:26:05 +0000 (13:26 +0000)]
Drop mergeable flag, if size is no suitable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53313 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix several bugs in named sections handling
Anton Korobeynikov [Wed, 9 Jul 2008 13:25:46 +0000 (13:25 +0000)]
Fix several bugs in named sections handling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53312 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd hacky way to distinguish named and named sections. This will be generalized in...
Anton Korobeynikov [Wed, 9 Jul 2008 13:25:26 +0000 (13:25 +0000)]
Add hacky way to distinguish named and named sections. This will be generalized in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53311 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse 'gnu.linkonce', where needed
Anton Korobeynikov [Wed, 9 Jul 2008 13:24:55 +0000 (13:24 +0000)]
Use 'gnu.linkonce', where needed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53310 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix thinko
Anton Korobeynikov [Wed, 9 Jul 2008 13:24:38 +0000 (13:24 +0000)]
Fix thinko

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53309 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDrop dead member reference
Anton Korobeynikov [Wed, 9 Jul 2008 13:24:18 +0000 (13:24 +0000)]
Drop dead member reference

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53308 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd funny darwin section selection logic
Anton Korobeynikov [Wed, 9 Jul 2008 13:23:57 +0000 (13:23 +0000)]
Add funny darwin section selection logic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53307 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle ELF mergeable sections
Anton Korobeynikov [Wed, 9 Jul 2008 13:23:37 +0000 (13:23 +0000)]
Handle ELF mergeable sections

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53306 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProvide section selection for X86 ELF targets
Anton Korobeynikov [Wed, 9 Jul 2008 13:23:08 +0000 (13:23 +0000)]
Provide section selection for X86 ELF targets

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53305 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProvide general hook for section name calculation
Anton Korobeynikov [Wed, 9 Jul 2008 13:22:46 +0000 (13:22 +0000)]
Provide general hook for section name calculation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53304 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPrint entity size for mergeable sections
Anton Korobeynikov [Wed, 9 Jul 2008 13:22:17 +0000 (13:22 +0000)]
Print entity size for mergeable sections

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53303 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSplit PrintSectionFlags
Anton Korobeynikov [Wed, 9 Jul 2008 13:21:49 +0000 (13:21 +0000)]
Split PrintSectionFlags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53302 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSplit UniqueSectionForGlobal()
Anton Korobeynikov [Wed, 9 Jul 2008 13:21:29 +0000 (13:21 +0000)]
Split UniqueSectionForGlobal()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53301 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSplit PreferredEHDataFormat hook
Anton Korobeynikov [Wed, 9 Jul 2008 13:21:08 +0000 (13:21 +0000)]
Split PreferredEHDataFormat hook

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53300 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSplit X86TargetAsmInfo into 4 subtarget-specific classes
Anton Korobeynikov [Wed, 9 Jul 2008 13:20:48 +0000 (13:20 +0000)]
Split X86TargetAsmInfo into 4 subtarget-specific classes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53299 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhitespace cleanup
Anton Korobeynikov [Wed, 9 Jul 2008 13:20:27 +0000 (13:20 +0000)]
Whitespace cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53298 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove flag decoding stuff into special hook
Anton Korobeynikov [Wed, 9 Jul 2008 13:20:07 +0000 (13:20 +0000)]
Move flag decoding stuff into special hook

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53297 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProperly handle linkonce stuff
Anton Korobeynikov [Wed, 9 Jul 2008 13:19:38 +0000 (13:19 +0000)]
Properly handle linkonce stuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53296 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProvide skeletone code for calculation of section, where global should be emitted...
Anton Korobeynikov [Wed, 9 Jul 2008 13:19:08 +0000 (13:19 +0000)]
Provide skeletone code for calculation of section, where global should be emitted into

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53295 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse 'llvm-linkonce' consistently
Anton Korobeynikov [Wed, 9 Jul 2008 13:18:38 +0000 (13:18 +0000)]
Use 'llvm-linkonce' consistently

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53294 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake hooks virtual
Anton Korobeynikov [Wed, 9 Jul 2008 13:18:21 +0000 (13:18 +0000)]
Make hooks virtual

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53293 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd default section name resolution routine
Anton Korobeynikov [Wed, 9 Jul 2008 13:18:02 +0000 (13:18 +0000)]
Add default section name resolution routine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53292 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoConstify
Anton Korobeynikov [Wed, 9 Jul 2008 13:17:36 +0000 (13:17 +0000)]
Constify

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53291 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd code for default section falgs computation
Anton Korobeynikov [Wed, 9 Jul 2008 13:16:59 +0000 (13:16 +0000)]
Add code for default section falgs computation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53290 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove some unneeded includes.
Duncan Sands [Wed, 9 Jul 2008 12:08:25 +0000 (12:08 +0000)]
Remove some unneeded includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53289 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRedo LegalizeTypes soft float support for
Duncan Sands [Wed, 9 Jul 2008 12:07:22 +0000 (12:07 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53288 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoForgot to update the chain result when softening
Duncan Sands [Wed, 9 Jul 2008 11:15:31 +0000 (11:15 +0000)]
Forgot to update the chain result when softening
loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53287 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLegalizeTypes soft float support for FP_TO_SINT and
Duncan Sands [Wed, 9 Jul 2008 11:13:46 +0000 (11:13 +0000)]
LegalizeTypes soft float support for FP_TO_SINT and
FP_TO_UINT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53286 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLegalizeTypes support for powi soft float.
Duncan Sands [Wed, 9 Jul 2008 11:11:47 +0000 (11:11 +0000)]
LegalizeTypes support for powi soft float.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53285 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake the role of MVT::i32 clearer here, and add a
Duncan Sands [Wed, 9 Jul 2008 08:07:41 +0000 (08:07 +0000)]
Make the role of MVT::i32 clearer here, and add a
note since it is not clear whether it is correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53284 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify, suggested by Chris Lattner.
Nick Lewycky [Wed, 9 Jul 2008 07:35:26 +0000 (07:35 +0000)]
Simplify, suggested by Chris Lattner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53283 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.
Nick Lewycky [Wed, 9 Jul 2008 07:29:11 +0000 (07:29 +0000)]
Fold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53282 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMissed alignment argument on stores lowered from memcpy.
Evan Cheng [Wed, 9 Jul 2008 06:38:06 +0000 (06:38 +0000)]
Missed alignment argument on stores lowered from memcpy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53281 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBack out 53254. It broke ppc debug info codegen.
Evan Cheng [Wed, 9 Jul 2008 06:36:53 +0000 (06:36 +0000)]
Back out 53254. It broke ppc debug info codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53280 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake the DICountVisitor not a visitor. This keeps us from calling virtual
Bill Wendling [Wed, 9 Jul 2008 06:02:33 +0000 (06:02 +0000)]
Make the DICountVisitor not a visitor. This keeps us from calling virtual
functions and junk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53279 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSilence warning by initializing variable.
Bill Wendling [Wed, 9 Jul 2008 05:55:53 +0000 (05:55 +0000)]
Silence warning by initializing variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53278 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed features usage.
Bruno Cardoso Lopes [Wed, 9 Jul 2008 05:32:22 +0000 (05:32 +0000)]
Fixed features usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53277 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFold ((1 << a) & 1) to (a == 0).
Nick Lewycky [Wed, 9 Jul 2008 05:20:13 +0000 (05:20 +0000)]
Fold ((1 << a) & 1) to (a == 0).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53276 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a little wrapper header that is put around bc files when emitting
Chris Lattner [Wed, 9 Jul 2008 05:14:23 +0000 (05:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53275 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorandom bugfix sitting in my tree.
Chris Lattner [Wed, 9 Jul 2008 05:12:07 +0000 (05:12 +0000)]
random bugfix sitting in my tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53274 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a broken test. Neither load is eliminable without changing the CFG.
Chris Lattner [Wed, 9 Jul 2008 05:01:02 +0000 (05:01 +0000)]
Fix a broken test.  Neither load is eliminable without changing the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53273 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixe typos and 80 column size problems
Bruno Cardoso Lopes [Wed, 9 Jul 2008 04:45:36 +0000 (04:45 +0000)]
Fixe typos and 80 column size problems

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53272 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReduce x - y to -y when we know the 'x' part will get masked off anyways.
Nick Lewycky [Wed, 9 Jul 2008 04:32:37 +0000 (04:32 +0000)]
Reduce x - y to -y when we know the 'x' part will get masked off anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53271 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMipsTargetLowering cleanup
Bruno Cardoso Lopes [Wed, 9 Jul 2008 04:15:08 +0000 (04:15 +0000)]
MipsTargetLowering cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53270 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove getValueRange from SCEV. It wasn't doing anything there anyways, and a
Nick Lewycky [Wed, 9 Jul 2008 03:21:51 +0000 (03:21 +0000)]
Remove getValueRange from SCEV. It wasn't doing anything there anyways, and a
more complete version is now available from the LoopVR pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53269 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoConsistently put quotes around pass names in debugging output.
Dan Gohman [Wed, 9 Jul 2008 00:50:40 +0000 (00:50 +0000)]
Consistently put quotes around pass names in debugging output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53268 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIf loop induction variable's start value is less then its exit value then do not...
Devang Patel [Wed, 9 Jul 2008 00:12:01 +0000 (00:12 +0000)]
If loop induction variable's start value is less then its exit value then do not split the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53265 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoconst-ify SelectionDAG::getNodeValueTypes.
Dan Gohman [Wed, 9 Jul 2008 00:00:42 +0000 (00:00 +0000)]
const-ify SelectionDAG::getNodeValueTypes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53264 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIt's no longer necessary to test if a MachineBasicBlock's
Dan Gohman [Tue, 8 Jul 2008 23:59:09 +0000 (23:59 +0000)]
It's no longer necessary to test if a MachineBasicBlock's
parent is non-null. It now always is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53263 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoVerify that MachineMemOperand alignment is a non-zero power of 2.
Dan Gohman [Tue, 8 Jul 2008 23:47:04 +0000 (23:47 +0000)]
Verify that MachineMemOperand alignment is a non-zero power of 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53262 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFactor out the code for computing an alignment value, and make it
Dan Gohman [Tue, 8 Jul 2008 23:46:32 +0000 (23:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53261 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the build. Apparently MachineInstr& is no longer implicitly convertable to Machi...
Owen Anderson [Tue, 8 Jul 2008 23:36:37 +0000 (23:36 +0000)]
Fix the build.  Apparently MachineInstr& is no longer implicitly convertable to MachineBasicBlock::iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53260 91177308-0d34-0410-b5e6-96231b3b80d8