oota-llvm.git
16 years agoHandle assembler identifiers specially in CBE. This fixes PR2418.
Anton Korobeynikov [Fri, 6 Jun 2008 16:08:26 +0000 (16:08 +0000)]
Handle assembler identifiers specially in CBE. This fixes PR2418.

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

16 years agoTighten up the abstraction slightly.
Duncan Sands [Fri, 6 Jun 2008 12:49:32 +0000 (12:49 +0000)]
Tighten up the abstraction slightly.

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

16 years agoWrap MVT::ValueType in a struct to get type safety
Duncan Sands [Fri, 6 Jun 2008 12:08:01 +0000 (12:08 +0000)]
Wrap MVT::ValueType in a struct to get type safety
and better control the abstraction.  Rename the type
to MVT.  To update out-of-tree patches, the main
thing to do is to rename MVT::ValueType to MVT, and
rewrite expressions like MVT::getSizeInBits(VT) in
the form VT.getSizeInBits().  Use VT.getSimpleVT()
to extract a MVT::SimpleValueType for use in switch
statements (you will get an assert failure if VT is
an extended value type - these shouldn't exist after
type legalization).
This results in a small speedup of codegen and no
new testsuite failures (x86-64 linux).

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

16 years agoAs Chris suggested, handle the situation if ShAmt larger than BitWidth,
Zhou Sheng [Fri, 6 Jun 2008 08:32:05 +0000 (08:32 +0000)]
As Chris suggested, handle the situation if ShAmt larger than BitWidth,
otherwise, opt might crash.

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

16 years agoRefine stack slot interval weight computation.
Evan Cheng [Fri, 6 Jun 2008 07:54:39 +0000 (07:54 +0000)]
Refine stack slot interval weight computation.

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

16 years agoTurn stdout into binary mode during bitcode emission.
Anton Korobeynikov [Fri, 6 Jun 2008 07:24:01 +0000 (07:24 +0000)]
Turn stdout into binary mode during bitcode emission.
This is necessary on windows targets, since stdout is in text mode there.
Patch by Julien Lerouge!

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

16 years agoProvide hooks for libgcc symbols' address resolution inside lli on mingw32.
Anton Korobeynikov [Fri, 6 Jun 2008 07:20:07 +0000 (07:20 +0000)]
Provide hooks for libgcc symbols' address resolution inside lli on mingw32.
Patch by Julien Lerouge!

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

16 years agoAdded custom isel for MUL, SDIVREM, UDIVREM, SMUL_LOHI and UMUL_LOHI nodes
Bruno Cardoso Lopes [Fri, 6 Jun 2008 06:37:31 +0000 (06:37 +0000)]
Added custom isel for MUL, SDIVREM, UDIVREM, SMUL_LOHI and UMUL_LOHI nodes
MUL is not anymore directly matched because its a pseudoinstruction.
LogicI class fixed to zero-extend immediates.

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

16 years agoAdded custom SELECT_CC lowering
Bruno Cardoso Lopes [Fri, 6 Jun 2008 00:58:26 +0000 (00:58 +0000)]
Added custom SELECT_CC lowering
Added special isel for ADDE,SUBE and new patterns to match SUBC,ADDC

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

16 years agoRevert 52002.
Dan Gohman [Thu, 5 Jun 2008 23:57:06 +0000 (23:57 +0000)]
Revert 52002.

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

16 years agoExpose a public interface to this pass.
Chris Lattner [Thu, 5 Jun 2008 23:45:18 +0000 (23:45 +0000)]
Expose a public interface to this pass.

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

16 years agoLet libcall semantics decide whether it knows about functions
Chris Lattner [Thu, 5 Jun 2008 23:38:34 +0000 (23:38 +0000)]
Let libcall semantics decide whether it knows about functions
with definitions or not.

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

16 years agoWarn of potential violations of strict aliasing rules.
Evan Cheng [Thu, 5 Jun 2008 23:00:08 +0000 (23:00 +0000)]
Warn of potential violations of strict aliasing rules.

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

16 years agoDon't break strict aliasing.
Evan Cheng [Thu, 5 Jun 2008 22:59:21 +0000 (22:59 +0000)]
Don't break strict aliasing.

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

16 years agoDescribe loop index split.
Devang Patel [Thu, 5 Jun 2008 21:44:00 +0000 (21:44 +0000)]
Describe loop index split.

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

16 years agoWording fixes. Thanks Bill!
Dan Gohman [Thu, 5 Jun 2008 18:45:33 +0000 (18:45 +0000)]
Wording fixes. Thanks Bill!

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

16 years agoRemove debugging code.
Owen Anderson [Thu, 5 Jun 2008 18:43:34 +0000 (18:43 +0000)]
Remove debugging code.

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

16 years agofix typos, tweak stuff, make it to validate
Gabor Greif [Thu, 5 Jun 2008 18:39:01 +0000 (18:39 +0000)]
fix typos, tweak stuff, make it to validate

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

16 years agoUse the newly created helper on LiveIntervals.
Owen Anderson [Thu, 5 Jun 2008 17:22:53 +0000 (17:22 +0000)]
Use the newly created helper on LiveIntervals.

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

16 years agoAdd a helper for constructing new live ranges that ended from an instruction to the...
Owen Anderson [Thu, 5 Jun 2008 17:15:43 +0000 (17:15 +0000)]
Add a helper for constructing new live ranges that ended from an instruction to the end of its MBB.

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

16 years agoMove i128 on x86-64 from the codegen section to the x86-specific section.
Dan Gohman [Thu, 5 Jun 2008 16:15:39 +0000 (16:15 +0000)]
Move i128 on x86-64 from the codegen section to the x86-specific section.

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

16 years agoAdd a note about improved alignment detection.
Dan Gohman [Thu, 5 Jun 2008 15:49:29 +0000 (15:49 +0000)]
Add a note about improved alignment detection.

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

16 years agoAdd a note mentioning --view-sunit-dags improvements.
Dan Gohman [Thu, 5 Jun 2008 15:46:36 +0000 (15:46 +0000)]
Add a note mentioning --view-sunit-dags improvements.

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

16 years agoExpand the bullet item about i128 support and APInt usage in codegen.
Dan Gohman [Thu, 5 Jun 2008 15:43:11 +0000 (15:43 +0000)]
Expand the bullet item about i128 support and APInt usage in codegen.

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

16 years agoAdd a test case for opt -instcombine bug fix in revision 52003.
Zhou Sheng [Thu, 5 Jun 2008 14:25:11 +0000 (14:25 +0000)]
Add a test case for opt -instcombine bug fix in revision 52003.

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

16 years agoIf BitWidth equals to ShtAmt, the RHSKnownZero[BitWidth-ShiftAmt-1] will
Zhou Sheng [Thu, 5 Jun 2008 14:23:44 +0000 (14:23 +0000)]
If BitWidth equals to ShtAmt, the RHSKnownZero[BitWidth-ShiftAmt-1] will
crash the opt. Just fix this.

Test case in llvm/test/Transforms/InstCombine/2008-06-05-ashr-crash.ll

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

16 years agoChange the Verifier to support returning first class aggregrates.
Matthijs Kooijman [Thu, 5 Jun 2008 14:00:36 +0000 (14:00 +0000)]
Change the Verifier to support returning first class aggregrates.

Add a testcase for functions returning first class aggregrates.

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

16 years agoAdd a test case for APInt bug fix in r51999.
Zhou Sheng [Thu, 5 Jun 2008 13:42:21 +0000 (13:42 +0000)]
Add a test case for APInt bug fix in r51999.

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

16 years agoAs comments said, for negative value, the arithmetic
Zhou Sheng [Thu, 5 Jun 2008 13:27:38 +0000 (13:27 +0000)]
As comments said, for negative value, the arithmetic
over-shift-right should return -1. So here it should be signed-extended,
when bitwidth larger than 64.

test case: llvm/test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll

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

16 years agoEscape "$#".
Nick Lewycky [Thu, 5 Jun 2008 12:54:44 +0000 (12:54 +0000)]
Escape "$#".

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

16 years agoLearn ScalarReplAggregrates how stores and loads of first class aggregrates
Matthijs Kooijman [Thu, 5 Jun 2008 12:51:53 +0000 (12:51 +0000)]
Learn ScalarReplAggregrates how stores and loads of first class aggregrates
work and how to replace them into individual values. Also, when trying to
replace an aggregrate that is used by load or store with a single (large)
integer, don't crash (but don't replace the aggregrate either).

Also adds a testcase for both structs and arrays.

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

16 years agoMove this to the proper section.
Gordon Henriksen [Thu, 5 Jun 2008 12:51:50 +0000 (12:51 +0000)]
Move this to the proper section.

I misread Optimizer Improvements as Other Improvements for some reason.

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

16 years agoAdding release notes for bindings improvements.
Gordon Henriksen [Thu, 5 Jun 2008 12:48:32 +0000 (12:48 +0000)]
Adding release notes for bindings improvements.

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

16 years agoLet StructRetPromotion check if all if its users are really calls or invokesn,
Matthijs Kooijman [Thu, 5 Jun 2008 08:57:20 +0000 (08:57 +0000)]
Let StructRetPromotion check if all if its users are really calls or invokesn,
not other instructions. This fixes a crash with the added testcase.

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

16 years agoLet StructRetPromotion check if it's users are really calling it and not
Matthijs Kooijman [Thu, 5 Jun 2008 08:48:32 +0000 (08:48 +0000)]
Let StructRetPromotion check if it's users are really calling it and not
passing its pointer. Fixes test with added testcase.

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

16 years agoUse use_iterator::getOperandNo instead of CallSite::hasArgument to check if a
Matthijs Kooijman [Thu, 5 Jun 2008 08:34:25 +0000 (08:34 +0000)]
Use use_iterator::getOperandNo instead of CallSite::hasArgument to check if a
function is passed as an argument instead of called. Also do this check a bit
earlier.

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

16 years ago * Make CallSite::hasArgument const and let it take a const parameter.
Matthijs Kooijman [Thu, 5 Jun 2008 08:04:58 +0000 (08:04 +0000)]
 * Make CallSite::hasArgument const and let it take a const parameter.

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

16 years agomore updates and random notes, including changes up through Week-of-Mon-20080324.
Chris Lattner [Thu, 5 Jun 2008 08:02:49 +0000 (08:02 +0000)]
more updates and random notes, including changes up through Week-of-Mon-20080324.

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

16 years agoUpdate comments and documentation to reflect that GCSE and ValueNumbering are
Matthijs Kooijman [Thu, 5 Jun 2008 07:55:49 +0000 (07:55 +0000)]
Update comments and documentation to reflect that GCSE and ValueNumbering are
deprecated by the GVN and GVNPRE passes.

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

16 years agoCast because I think I know what I'm doing. There are warnings about converting
Bill Wendling [Thu, 5 Jun 2008 07:35:27 +0000 (07:35 +0000)]
Cast because I think I know what I'm doing. There are warnings about converting
from 64-bit to 32-bit.

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

16 years agoFix 80 column violations.
Matthijs Kooijman [Thu, 5 Jun 2008 07:26:15 +0000 (07:26 +0000)]
Fix 80 column violations.

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

16 years agoRemove unused parameter. Some clients might use -Werror when compiling and
Bill Wendling [Thu, 5 Jun 2008 07:24:08 +0000 (07:24 +0000)]
Remove unused parameter. Some clients might use -Werror when compiling and
cause drama.

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

16 years agoadd llvmc2 notes, stack realignment.
Chris Lattner [Thu, 5 Jun 2008 06:57:39 +0000 (06:57 +0000)]
add llvmc2 notes, stack realignment.

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

16 years agovarious status updates.
Chris Lattner [Thu, 5 Jun 2008 06:35:40 +0000 (06:35 +0000)]
various status updates.

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

16 years agoStart adding 2.3 content.
Chris Lattner [Thu, 5 Jun 2008 06:25:56 +0000 (06:25 +0000)]
Start adding 2.3 content.

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

16 years agoFix a memcpy lowering bug. Even though the memcpy alignment is smaller than the desir...
Evan Cheng [Wed, 4 Jun 2008 23:37:54 +0000 (23:37 +0000)]
Fix a memcpy lowering bug. Even though the memcpy alignment is smaller than the desired alignment, the frame destination alignment may still be larger than the desired alignment. Don't change its alignment to something smaller.

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

16 years agoRemove unneeded #include.
Owen Anderson [Wed, 4 Jun 2008 18:28:10 +0000 (18:28 +0000)]
Remove unneeded #include.

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

16 years agoFix inst_iterator example.
Chris Lattner [Wed, 4 Jun 2008 18:20:42 +0000 (18:20 +0000)]
Fix inst_iterator example.

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

16 years agoOops. Should not be enabled by default.
Evan Cheng [Wed, 4 Jun 2008 18:09:20 +0000 (18:09 +0000)]
Oops. Should not be enabled by default.

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

16 years agoRewrite a bunch of the CBE's inline asm code, giving it the
Chris Lattner [Wed, 4 Jun 2008 18:03:28 +0000 (18:03 +0000)]
Rewrite a bunch of the CBE's inline asm code, giving it the
ability to handle indirect input operands.  This fixes PR2407.

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

16 years agoCorrectly construct live intervals for the copies we inserted into the predecessors...
Owen Anderson [Wed, 4 Jun 2008 17:55:58 +0000 (17:55 +0000)]
Correctly construct live intervals for the copies we inserted into the predecessors of a block containing a PHI.

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

16 years agoRevert this.
Evan Cheng [Wed, 4 Jun 2008 17:21:44 +0000 (17:21 +0000)]
Revert this.

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

16 years agoReplace two manual loops with calls to CallSite::hasArguments (no functional changes).
Matthijs Kooijman [Wed, 4 Jun 2008 16:57:50 +0000 (16:57 +0000)]
Replace two manual loops with calls to CallSite::hasArguments (no functional changes).

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

16 years agoAdd CallSite::hasArgument to allow for seeing if a call passes a certain value as...
Matthijs Kooijman [Wed, 4 Jun 2008 16:31:12 +0000 (16:31 +0000)]
Add CallSite::hasArgument to allow for seeing if a call passes a certain value as an argument quickly.

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

16 years agoAdd a Name parameter to two of the init methods of GetElementPointer to make the...
Matthijs Kooijman [Wed, 4 Jun 2008 16:14:12 +0000 (16:14 +0000)]
Add a Name parameter to two of the init methods of GetElementPointer to make the name setting more consistent.

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

16 years agoFix example to be valid LLVM assembly.
Matthijs Kooijman [Wed, 4 Jun 2008 15:46:35 +0000 (15:46 +0000)]
Fix example to be valid LLVM assembly.

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

16 years agoImplement the two constructors in InsertValueInst and ExtractValueInst.
Matthijs Kooijman [Wed, 4 Jun 2008 14:40:55 +0000 (14:40 +0000)]
Implement the two constructors in InsertValueInst and ExtractValueInst.

Add a Name argment to two init methods in these classes as well to make things
a bit more consistent.

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

16 years agoAdd a stack slot coloring pass. Not yet enabled.
Evan Cheng [Wed, 4 Jun 2008 09:18:41 +0000 (09:18 +0000)]
Add a stack slot coloring pass. Not yet enabled.

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

16 years agoLowerSubregs should not clobber any analysis.
Evan Cheng [Wed, 4 Jun 2008 09:17:16 +0000 (09:17 +0000)]
LowerSubregs should not clobber any analysis.

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

16 years agoMove #include to right place.
Evan Cheng [Wed, 4 Jun 2008 09:16:33 +0000 (09:16 +0000)]
Move #include to right place.

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

16 years agoRegister if-converter pass for -debug-pass.
Evan Cheng [Wed, 4 Jun 2008 09:15:51 +0000 (09:15 +0000)]
Register if-converter pass for -debug-pass.

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

16 years agoMore pass manager debugging outputs.
Evan Cheng [Wed, 4 Jun 2008 09:13:31 +0000 (09:13 +0000)]
More pass manager debugging outputs.

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

16 years agoChange packed struct layout so that field sizes
Duncan Sands [Wed, 4 Jun 2008 08:21:45 +0000 (08:21 +0000)]
Change packed struct layout so that field sizes
are the same as in unpacked structs, only field
positions differ.  This only matters for structs
containing x86 long double or an apint; it may
cause backwards compatibility problems if someone
has bitcode containing a packed struct with a
field of one of those types.
The issue is that only 10 bytes are needed to
hold an x86 long double: the store size is 10
bytes, but the ABI size is 12 or 16 bytes (linux/
darwin) which comes from rounding the store size
up by the alignment.  Because it seemed silly not
to pack an x86 long double into 10 bytes in a
packed struct, this is what was done.  I now
think this was a mistake.  Reserving the ABI size
for an x86 long double field even in a packed
struct makes things more uniform: the ABI size is
now always used when reserving space for a type.
This means that developers are less likely to
make mistakes.  It also makes life easier for the
CBE which otherwise could not represent all LLVM
packed structs (PR2402).
Front-end people might need to adjust the way
they create LLVM structs - see following change
to llvm-gcc.

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

16 years agoAdd #includes required by GCC 4.3, thanks for Zhongxing Xu
Chris Lattner [Wed, 4 Jun 2008 04:46:14 +0000 (04:46 +0000)]
Add #includes required by GCC 4.3, thanks for Zhongxing Xu
for reporting this.

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

16 years agoSome Mips minor fixes
Bruno Cardoso Lopes [Wed, 4 Jun 2008 01:45:25 +0000 (01:45 +0000)]
Some Mips minor fixes
Added support for mips little endian arch => mipsel

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

16 years agoWe need to subtract one from this index because live ranges are open at the end.
Owen Anderson [Wed, 4 Jun 2008 00:38:56 +0000 (00:38 +0000)]
We need to subtract one from this index because live ranges are open at the end.

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

16 years agoFix spellnig error
Scott Michel [Tue, 3 Jun 2008 19:13:20 +0000 (19:13 +0000)]
Fix spellnig error

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

16 years agoTestcase for LoopIndexSplit and DomFrontier.
Owen Anderson [Tue, 3 Jun 2008 18:32:27 +0000 (18:32 +0000)]
Testcase for LoopIndexSplit and DomFrontier.

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

16 years agoLoopIndexSplit can sometimes result in cases where a block in its own domfrontier.
Owen Anderson [Tue, 3 Jun 2008 18:29:48 +0000 (18:29 +0000)]
LoopIndexSplit can sometimes result in cases where a block in its own domfrontier.
Don't crash when we encounter one of these.

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

16 years agoExpand documentation of StringConstantPrefix.
Dale Johannesen [Tue, 3 Jun 2008 18:15:03 +0000 (18:15 +0000)]
Expand documentation of StringConstantPrefix.

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

16 years agoPrevent a crash in debug dumps.
Dale Johannesen [Tue, 3 Jun 2008 18:14:29 +0000 (18:14 +0000)]
Prevent a crash in debug dumps.

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

16 years agoAdd StringConstantPrefix to control what the
Dale Johannesen [Tue, 3 Jun 2008 18:09:06 +0000 (18:09 +0000)]
Add StringConstantPrefix to control what the
assembler names of string constants look like.

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

16 years agoFind a better place to output hex constants corresponding to integers.
Scott Michel [Tue, 3 Jun 2008 15:39:51 +0000 (15:39 +0000)]
Find a better place to output hex constants corresponding to integers.

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

16 years agoFixed bug in bad behavior in calculateFrameObjectOffsets,
Bruno Cardoso Lopes [Tue, 3 Jun 2008 08:46:59 +0000 (08:46 +0000)]
Fixed bug in bad behavior in calculateFrameObjectOffsets,
the solution commited is different from the previous patch to
avoid int and unsigned comparison

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

16 years agoDo not run loop-aligner at -fast (e.g. -O0).
Evan Cheng [Tue, 3 Jun 2008 06:56:08 +0000 (06:56 +0000)]
Do not run loop-aligner at -fast (e.g. -O0).

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

16 years agoRevert this patch
Scott Michel [Tue, 3 Jun 2008 06:18:19 +0000 (06:18 +0000)]
Revert this patch

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

16 years agonounwindify.
Dan Gohman [Tue, 3 Jun 2008 01:21:11 +0000 (01:21 +0000)]
nounwindify.

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

16 years ago"Unable to schedule <A> required by <B>" is more helpful then
Devang Patel [Tue, 3 Jun 2008 01:20:02 +0000 (01:20 +0000)]
"Unable to schedule <A> required by <B>" is more helpful then
"Unable to handle Pass that requires lower level Analysis pass"

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

16 years agoAdd debugging aid.
Devang Patel [Tue, 3 Jun 2008 01:02:16 +0000 (01:02 +0000)]
Add debugging aid.

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

16 years agoFix whitespace in whitespace-significant pseudocode in a comment.
Dan Gohman [Tue, 3 Jun 2008 00:57:21 +0000 (00:57 +0000)]
Fix whitespace in whitespace-significant pseudocode in a comment.

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

16 years agoConstant folding for insertvalue and extractvalue.
Dan Gohman [Tue, 3 Jun 2008 00:15:20 +0000 (00:15 +0000)]
Constant folding for insertvalue and extractvalue.

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

16 years agoUpdate dom tree. Fix PR 2372.
Devang Patel [Mon, 2 Jun 2008 22:52:56 +0000 (22:52 +0000)]
Update dom tree. Fix PR 2372.

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

16 years agoFold adds and subtracts of zero immediately, instead of waiting
Dan Gohman [Mon, 2 Jun 2008 22:27:05 +0000 (22:27 +0000)]
Fold adds and subtracts of zero immediately, instead of waiting
for dagcombine to do this.

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

16 years agoMinor cosmetic patch so that the hex equivalent of a decimal
Scott Michel [Mon, 2 Jun 2008 22:19:12 +0000 (22:19 +0000)]
Minor cosmetic patch so that the hex equivalent of a decimal
constant shows up in the assembly language output. Helps with
debugging without a HP calculator having to be handy.

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

16 years agoAdd necessary 64-bit support so that gcc frontend compiles (mostly). Current
Scott Michel [Mon, 2 Jun 2008 22:18:03 +0000 (22:18 +0000)]
Add necessary 64-bit support so that gcc frontend compiles (mostly). Current
issue is operand promotion for setcc/select... but looks like the fundamental
stuff is implemented for CellSPU.

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

16 years agoImplement CBE support for first-class structs and array values,
Dan Gohman [Mon, 2 Jun 2008 21:30:49 +0000 (21:30 +0000)]
Implement CBE support for first-class structs and array values,
and insertvalue and extractvalue instructions.

First-class array values are not trivial because C doesn't
support them. The approach I took here is to wrap all arrays
in structs. Feedback is welcome.

The 2007-01-15-NamedArrayType.ll test needed to be modified
because it has a "not grep" for a string that now exists,
because array types now have associated struct types, and
those struct types have names.

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

16 years agoUpdate the polygen grammer for the new insertvalue and extractvalue syntax.
Dan Gohman [Mon, 2 Jun 2008 19:47:09 +0000 (19:47 +0000)]
Update the polygen grammer for the new insertvalue and extractvalue syntax.

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

16 years agoRemove unneeded code I added.
Chris Lattner [Mon, 2 Jun 2008 18:39:07 +0000 (18:39 +0000)]
Remove unneeded code I added.

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

16 years agoFix the position of MemOperands in nodes that use variadic_ops
Dan Gohman [Mon, 2 Jun 2008 17:40:38 +0000 (17:40 +0000)]
Fix the position of MemOperands in nodes that use variadic_ops
in DAGISelEmitter output. This bug was recently uncovered by the
addition of patterns for CALL32m and CALL64m, which are nodes
that now have both MemOperands and variadic_ops.

This bug was especially visible with PIC in various configurations,
because the new patterns are matching the indirect call code used
in many PIC configurations.

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

16 years agoCorrectly handle removed instructions at the beginning of MBBs when renumbering.
Owen Anderson [Mon, 2 Jun 2008 17:36:36 +0000 (17:36 +0000)]
Correctly handle removed instructions at the beginning of MBBs when renumbering.

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

16 years agoFixes PR2395. Looking for a constant in a GEP tail (when the first GEP
Wojciech Matyjewicz [Mon, 2 Jun 2008 17:26:12 +0000 (17:26 +0000)]
Fixes PR2395. Looking for a constant in a GEP tail (when the first GEP
is longer than the second one) should stop after finding one. Added break
instruction guarantees it. It also changes difference between offsets to
absolute value of this difference in the condition.

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

16 years agoupdate vc configure project for renaming of
Steve Naroff [Mon, 2 Jun 2008 16:37:36 +0000 (16:37 +0000)]
update vc configure project for renaming of
hash_map/hash_set/iterator to have a .h suffix.

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

16 years agoDon't use the GOT for symbols that are not externally visible.
Rafael Espindola [Mon, 2 Jun 2008 07:52:43 +0000 (07:52 +0000)]
Don't use the GOT for symbols that are not externally visible.

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

16 years agomove CannotBeNegativeZero to ValueTracking. Simplify some signbit comparisons.
Chris Lattner [Mon, 2 Jun 2008 01:29:46 +0000 (01:29 +0000)]
move CannotBeNegativeZero to ValueTracking.  Simplify some signbit comparisons.

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

16 years agomove ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits
Chris Lattner [Mon, 2 Jun 2008 01:18:21 +0000 (01:18 +0000)]
move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits
out of instcombine into a new file in libanalysis.  This also teaches
ComputeNumSignBits about the number of sign bits in a constantint.

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

16 years agoFix two issues that Eli Friedman pointed out, where would misoptimized code like:
Owen Anderson [Sun, 1 Jun 2008 22:26:26 +0000 (22:26 +0000)]
Fix two issues that Eli Friedman pointed out, where would misoptimized code like:

char a[200];
init(a, a+200);

OR

int a[200];
char* b = (char*)a;
char* c = (char*)a;
foo(b, c);

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

16 years agoTest for PR2401
Owen Anderson [Sun, 1 Jun 2008 21:55:55 +0000 (21:55 +0000)]
Test for PR2401

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

16 years agoDon't remove the memcpy when call slot substitution fails.
Owen Anderson [Sun, 1 Jun 2008 21:52:16 +0000 (21:52 +0000)]
Don't remove the memcpy when call slot substitution fails.

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

16 years agoRemember to update the reverse non-local cache when cleaning up dirty entries. This...
Owen Anderson [Sun, 1 Jun 2008 21:03:52 +0000 (21:03 +0000)]
Remember to update the reverse non-local cache when cleaning up dirty entries.  This fixes PR2397.

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

16 years agoMake ping more aggressive in finding nonlocal caching errors.
Owen Anderson [Sun, 1 Jun 2008 20:51:41 +0000 (20:51 +0000)]
Make ping more aggressive in finding nonlocal caching errors.

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