oota-llvm.git
16 years agofix a bug spotted by Eli's eagle eyes
Chris Lattner [Fri, 11 Jul 2008 06:36:01 +0000 (06:36 +0000)]
fix a bug spotted by Eli's eagle eyes

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

16 years agosimplify and merge a bunch of code. Instead of comparing against
Chris Lattner [Fri, 11 Jul 2008 05:40:05 +0000 (05:40 +0000)]
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.

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

16 years agofold away (x <= cst) earlier, allowing us to not have to
Chris Lattner [Fri, 11 Jul 2008 05:08:55 +0000 (05:08 +0000)]
fold away (x <= cst) earlier, allowing us to not have to
handle them in some code.

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

16 years agoFix folding of icmp's of i1 where the comparison is signed. The code
Chris Lattner [Fri, 11 Jul 2008 04:20:58 +0000 (04:20 +0000)]
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.

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

16 years agoFix a bogus optimization: folding (slt (zext i1 A to i32), 1) -> (slt i1 A, true)
Chris Lattner [Fri, 11 Jul 2008 04:09:09 +0000 (04:09 +0000)]
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)

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

16 years agomake this condition more precise.
Chris Lattner [Fri, 11 Jul 2008 03:54:57 +0000 (03:54 +0000)]
make this condition more precise.

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

16 years agoregenerate
Chris Lattner [Fri, 11 Jul 2008 00:30:39 +0000 (00:30 +0000)]
regenerate

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

16 years agoImplement PR2538
Chris Lattner [Fri, 11 Jul 2008 00:30:06 +0000 (00:30 +0000)]
Implement PR2538

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

16 years agoFix a bug in the soft-float handling of FCOPYSIGN that Duncan noticed
Chris Lattner [Thu, 10 Jul 2008 23:46:13 +0000 (23:46 +0000)]
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.

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

16 years agomake legalize types be a command line option: -enable-legalize-types.
Chris Lattner [Thu, 10 Jul 2008 23:37:50 +0000 (23:37 +0000)]
make legalize types be a command line option: -enable-legalize-types.

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

16 years agoMake typedef public to make MSVC++ happy.
Ted Kremenek [Thu, 10 Jul 2008 23:24:20 +0000 (23:24 +0000)]
Make typedef public to make MSVC++ happy.

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

16 years agoMake some typedefs public to make MSVC++ happy.
Ted Kremenek [Thu, 10 Jul 2008 23:09:45 +0000 (23:09 +0000)]
Make some typedefs public to make MSVC++ happy.

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

16 years agoMake typedefs in ilist public (Visual C++ errors out when they are private).
Ted Kremenek [Thu, 10 Jul 2008 22:58:10 +0000 (22:58 +0000)]
Make typedefs in ilist public (Visual C++ errors out when they are private).

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

16 years agoPull r53428 from Gaz into mainline:
Bill Wendling [Thu, 10 Jul 2008 22:57:49 +0000 (22:57 +0000)]
Pull r53428 from Gaz into mainline:

Remove warnings about unused/shadowed variables.

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

16 years agoAdded ImmutableMap constructor that accepts a const TreeTy*.
Ted Kremenek [Thu, 10 Jul 2008 22:57:10 +0000 (22:57 +0000)]
Added ImmutableMap constructor that accepts a const TreeTy*.

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

16 years agoPut CPPBackend tests into their own directory and run them only if they're
Bill Wendling [Thu, 10 Jul 2008 22:35:32 +0000 (22:35 +0000)]
Put CPPBackend tests into their own directory and run them only if they're
supported.

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

16 years agoTidy up #includes.
Dan Gohman [Thu, 10 Jul 2008 22:26:19 +0000 (22:26 +0000)]
Tidy up #includes.

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

16 years agoAdd a SubclassData field to SDNode, similar to what's done
Dan Gohman [Thu, 10 Jul 2008 21:44:59 +0000 (21:44 +0000)]
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.

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

16 years agoFix a copy+pasto in an assertion string.
Dan Gohman [Thu, 10 Jul 2008 19:58:23 +0000 (19:58 +0000)]
Fix a copy+pasto in an assertion string.

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

16 years agoStack objects have nonnegative indices, not just positive indices.
Dan Gohman [Thu, 10 Jul 2008 19:57:25 +0000 (19:57 +0000)]
Stack objects have nonnegative indices, not just positive indices.

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

16 years agoEscape the graph name. This unbreaks -view-cfg.
Dan Gohman [Thu, 10 Jul 2008 19:55:54 +0000 (19:55 +0000)]
Escape the graph name. This unbreaks -view-cfg.

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

16 years agoRemove this file; the code that it went with is no longer
Dan Gohman [Thu, 10 Jul 2008 19:55:04 +0000 (19:55 +0000)]
Remove this file; the code that it went with is no longer
in the repository.

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

16 years agoMake stack slot coloring's debug output more consistent with
Dan Gohman [Thu, 10 Jul 2008 19:49:32 +0000 (19:49 +0000)]
Make stack slot coloring's debug output more consistent with
other passes.

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

16 years agoChange StackSlotForVirtReg (which maps vregs to frame indices) from std::map to Index...
Evan Cheng [Thu, 10 Jul 2008 18:23:23 +0000 (18:23 +0000)]
Change StackSlotForVirtReg (which maps vregs to frame indices) from std::map to IndexedMap.

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

16 years agoRemove extraneous vertical whitespace before Eric gets the wrong idea ;-)
Chris Lattner [Thu, 10 Jul 2008 16:49:53 +0000 (16:49 +0000)]
Remove extraneous vertical whitespace before Eric gets the wrong idea ;-)

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

16 years agoFix an altivec constant miscompilation that Duncan found through
Chris Lattner [Thu, 10 Jul 2008 16:33:38 +0000 (16:33 +0000)]
Fix an altivec constant miscompilation that Duncan found through
his work on legalizetypes.

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

16 years agoAdd support for 128 bit multiplicative operations.
Duncan Sands [Thu, 10 Jul 2008 15:35:05 +0000 (15:35 +0000)]
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.

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

16 years agoAdd a mysteriously missing libcall, FPTOSINT_F80_I32.
Duncan Sands [Thu, 10 Jul 2008 15:33:02 +0000 (15:33 +0000)]
Add a mysteriously missing libcall, FPTOSINT_F80_I32.
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.

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

16 years agoFix a FIXME: use an apint in CTTZ legalization.
Duncan Sands [Thu, 10 Jul 2008 15:30:54 +0000 (15:30 +0000)]
Fix a FIXME: use an apint in CTTZ legalization.

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

16 years agoRemove PromoteIntRes_FP_ROUND - not sure what it
Duncan Sands [Thu, 10 Jul 2008 15:29:55 +0000 (15:29 +0000)]
Remove PromoteIntRes_FP_ROUND - not sure what it
was doing there: FP_ROUND returns a float, not an
integer.

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

16 years agoMake sure the alignment of the temporary created
Duncan Sands [Thu, 10 Jul 2008 15:26:17 +0000 (15:26 +0000)]
Make sure the alignment of the temporary created
in CreateStackStoreLoad is good enough for both
the source and destination types.

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

16 years agoMake the LegalizeType method naming scheme more regular.
Duncan Sands [Thu, 10 Jul 2008 15:25:04 +0000 (15:25 +0000)]
Make the LegalizeType method naming scheme more regular.

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

16 years agoDon't barf when dumping a constant that contains
Duncan Sands [Thu, 10 Jul 2008 11:23:14 +0000 (11:23 +0000)]
Don't barf when dumping a constant that contains
a ginormous value (eg: i128 -1).

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

16 years agoCorrect a comment.
Duncan Sands [Thu, 10 Jul 2008 11:21:59 +0000 (11:21 +0000)]
Correct a comment.

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

16 years agoRestructure dead argument elimination, try #3 :-)
Matthijs Kooijman [Thu, 10 Jul 2008 10:24:08 +0000 (10:24 +0000)]
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).

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

16 years ago- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operan...
Evan Cheng [Thu, 10 Jul 2008 07:35:43 +0000 (07:35 +0000)]
- 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.

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

16 years agoFix overzealous optimization. Thanks to Duncan Sands for pointing out my error!
Nick Lewycky [Thu, 10 Jul 2008 05:51:40 +0000 (05:51 +0000)]
Fix overzealous optimization. Thanks to Duncan Sands for pointing out my error!

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

16 years agoUse DenseMap instead of std::map in local register allocation. This improves the...
Owen Anderson [Thu, 10 Jul 2008 01:56:35 +0000 (01:56 +0000)]
Use DenseMap instead of std::map in local register allocation.  This improves the time on instcombine from .31s to .22s

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

16 years agoFix 403.gcc. Finally got the check for two-address-ness correct.
Owen Anderson [Thu, 10 Jul 2008 01:53:01 +0000 (01:53 +0000)]
Fix 403.gcc.  Finally got the check for two-address-ness correct.

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

16 years agoFix the build by adding a #include.
Owen Anderson [Thu, 10 Jul 2008 01:44:27 +0000 (01:44 +0000)]
Fix the build by adding a #include.

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

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