oota-llvm.git
16 years agoRestructure ARM code emitter to use instruction formats instead of addressing modes...
Evan Cheng [Wed, 5 Nov 2008 18:35:52 +0000 (18:35 +0000)]
Restructure ARM code emitter to use instruction formats instead of addressing modes to determine how to encode instructions.

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

16 years agoUse an assert to check that SelectCode isn't called on
Dan Gohman [Wed, 5 Nov 2008 18:30:52 +0000 (18:30 +0000)]
Use an assert to check that SelectCode isn't called on
nodes that are already selected.

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

16 years agoThe HadDelete field is no longer used.
Dan Gohman [Wed, 5 Nov 2008 17:35:14 +0000 (17:35 +0000)]
The HadDelete field is no longer used.

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

16 years agoReintroduce a comment that was removed with the AddToISelQueue
Dan Gohman [Wed, 5 Nov 2008 17:16:24 +0000 (17:16 +0000)]
Reintroduce a comment that was removed with the AddToISelQueue
changes.

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

16 years agoUpdate some comments to reflect the new code.
Dan Gohman [Wed, 5 Nov 2008 17:13:57 +0000 (17:13 +0000)]
Update some comments to reflect the new code.

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

16 years agoTest commit, add Makefile for XCore target, more to follow.
Richard Osborne [Wed, 5 Nov 2008 09:53:58 +0000 (09:53 +0000)]
Test commit, add Makefile for XCore target, more to follow.

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

16 years agoFix thinko in ppcf128 expansion of truncating store.
Duncan Sands [Wed, 5 Nov 2008 07:17:27 +0000 (07:17 +0000)]
Fix thinko in ppcf128 expansion of truncating store.

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

16 years agoAdd more vector move low and zero-extend patterns.
Evan Cheng [Wed, 5 Nov 2008 06:04:51 +0000 (06:04 +0000)]
Add more vector move low and zero-extend patterns.

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

16 years agoType of shuffle mask has changed.
Evan Cheng [Wed, 5 Nov 2008 06:04:18 +0000 (06:04 +0000)]
Type of shuffle mask has changed.

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

16 years agoIndentation.
Evan Cheng [Wed, 5 Nov 2008 06:03:38 +0000 (06:03 +0000)]
Indentation.

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

16 years agoEliminate the ISel priority queue, which used the topological order for a
Dan Gohman [Wed, 5 Nov 2008 04:14:16 +0000 (04:14 +0000)]
Eliminate the ISel priority queue, which used the topological order for a
priority function. Instead, just iterate over the AllNodes list, which is
already in topological order. This eliminates a fair amount of bookkeeping,
and speeds up the isel phase by about 15% on many testcases.

The impact on most targets is that AddToISelQueue calls can be simply removed.

In the x86 target, there are two additional notable changes.

The rule-bending AND+SHIFT optimization in MatchAddress that creates new
pre-isel nodes during isel is now a little more verbose, but more robust.
Instead of either creating an invalid DAG or creating an invalid topological
sort, as it has historically done, it can now just insert the new nodes into
the node list at a position where they will be consistent with the topological
ordering.

Also, the address-matching code has logic that checked to see if a node was
"already selected". However, when a node is selected, it has all its uses
taken away via ReplaceAllUsesWith or equivalent, so it won't recieve any
further visits from MatchAddress. This code is now removed.

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

16 years agoUse getTargetConstant instead of getConstant for nodes that should not be visited
Dan Gohman [Wed, 5 Nov 2008 02:06:09 +0000 (02:06 +0000)]
Use getTargetConstant instead of getConstant for nodes that should not be visited
by isel and potentially forced into registers.

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

16 years agoRename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS X
Evan Cheng [Wed, 5 Nov 2008 01:50:32 +0000 (01:50 +0000)]
Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS X
indirect gv reference. Please don't call it lazy.

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

16 years agoNew test case.
Devang Patel [Wed, 5 Nov 2008 01:40:30 +0000 (01:40 +0000)]
New test case.

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

16 years agoDo now allow InlineAlways pass to remove dead functions.
Devang Patel [Wed, 5 Nov 2008 01:39:16 +0000 (01:39 +0000)]
Do now allow InlineAlways pass to remove dead functions.

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

16 years agoSilence unused variable warnings.
Devang Patel [Wed, 5 Nov 2008 01:37:40 +0000 (01:37 +0000)]
Silence unused variable warnings.

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

16 years agoCheck Attribute::NoInline.
Devang Patel [Wed, 5 Nov 2008 01:37:05 +0000 (01:37 +0000)]
Check Attribute::NoInline.

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

16 years agoRemove dead variable.
Bill Wendling [Wed, 5 Nov 2008 00:56:35 +0000 (00:56 +0000)]
Remove dead variable.

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

16 years agoSimplify the allocated size calculation.
Bill Wendling [Wed, 5 Nov 2008 00:54:27 +0000 (00:54 +0000)]
Simplify the allocated size calculation.

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

16 years agoFix comment
Bill Wendling [Wed, 5 Nov 2008 00:46:15 +0000 (00:46 +0000)]
Fix comment

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

16 years agoUse the new predicate to control when we do prealloc splitting. Fix a small bug.
Owen Anderson [Wed, 5 Nov 2008 00:32:13 +0000 (00:32 +0000)]
Use the new predicate to control when we do prealloc splitting.  Fix a small bug.

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

16 years agoDebugging output tweak.
Evan Cheng [Wed, 5 Nov 2008 00:22:28 +0000 (00:22 +0000)]
Debugging output tweak.

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

16 years agoCMake: updated list of source files.
Oscar Fuentes [Wed, 5 Nov 2008 00:11:22 +0000 (00:11 +0000)]
CMake: updated list of source files.

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

16 years agoSome code simplification. It now doesn't generate a prologue if the epilogue
Bill Wendling [Wed, 5 Nov 2008 00:00:21 +0000 (00:00 +0000)]
Some code simplification. It now doesn't generate a prologue if the epilogue
isn't going to be generated.

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

16 years agoAdd a new pass to simplify specific half_powr function calls. This is
Dan Gohman [Tue, 4 Nov 2008 23:41:45 +0000 (23:41 +0000)]
Add a new pass to simplify specific half_powr function calls. This is
a specialized pass that it not likely to be generally useful.

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

16 years agoOn darwin, 32-bit x86 target is i386-apple-darwin...
Devang Patel [Tue, 4 Nov 2008 23:13:50 +0000 (23:13 +0000)]
On darwin, 32-bit x86 target is i386-apple-darwin...

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

16 years agofix memory leak in pass manager when adding an analysis pass that already existed...
Nuno Lopes [Tue, 4 Nov 2008 23:03:58 +0000 (23:03 +0000)]
fix memory leak in pass manager when adding an analysis pass that already existed. as pass manager takes ownership of the added passes, it has to delete the pass if it isnt added to the pass list
tweak the opt tool so that it doesnt access a Pass after the ownership was taken by the pass manager

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

16 years agoFix tests not to emit IR output
Anton Korobeynikov [Tue, 4 Nov 2008 23:02:39 +0000 (23:02 +0000)]
Fix tests not to emit IR output

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

16 years agoSmall simplification of the stack guard type.
Bill Wendling [Tue, 4 Nov 2008 22:54:43 +0000 (22:54 +0000)]
Small simplification of the stack guard type.

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

16 years ago- Add a "getOrInsertGlobal" method to the Module class. This acts similarly to
Bill Wendling [Tue, 4 Nov 2008 22:51:24 +0000 (22:51 +0000)]
- Add a "getOrInsertGlobal" method to the Module class. This acts similarly to
  "getOrInsertFunction" in that it either adds a new declaration of the global
  and returns it, or returns the current one -- optionally casting it to the
  correct type.
- Use the new getOrInsertGlobal in the stack protector code.
- Use "splitBasicBlock" in the stack protector code.

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

16 years agoFirst pass at checking for the creation of a new join point when doing pre-alloc...
Owen Anderson [Tue, 4 Nov 2008 22:22:41 +0000 (22:22 +0000)]
First pass at checking for the creation of a new join point when doing pre-alloc splitting.  This is not turned on yet.

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

16 years agoActually ARM / Mac OS X does have UINTTOFP_I64_F{64|32} libcalls.
Evan Cheng [Tue, 4 Nov 2008 22:19:55 +0000 (22:19 +0000)]
Actually ARM / Mac OS X does have UINTTOFP_I64_F{64|32} libcalls.

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

16 years agoUpdate in response to feedback from Chris:
Bill Wendling [Tue, 4 Nov 2008 21:53:09 +0000 (21:53 +0000)]
Update in response to feedback from Chris:

- Use enums instead of magic numbers.

- Rework algorithm to use the bytes size from the target to determine when to
  emit stack protectors.

- Get rid of "propolice" in any comments.

- Renamed an option to its expanded form.

- Other miscellanenous changes.

More changes will come after this.

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

16 years agofix two validation errors
Gabor Greif [Tue, 4 Nov 2008 21:50:59 +0000 (21:50 +0000)]
fix two validation errors

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

16 years agofix typos, harmonize formatting
Gabor Greif [Tue, 4 Nov 2008 21:48:10 +0000 (21:48 +0000)]
fix typos, harmonize formatting

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

16 years agoRevert 58687. This breaks mingw.
Tanya Lattner [Tue, 4 Nov 2008 21:06:11 +0000 (21:06 +0000)]
Revert 58687. This breaks mingw.

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

16 years agoAllow SROA of vectors. Removing this caused a
Dale Johannesen [Tue, 4 Nov 2008 20:54:03 +0000 (20:54 +0000)]
Allow SROA of vectors.  Removing this caused a
huge performance regression in something we care
about.  This may not be final fix.

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

16 years ago80 columns
Dale Johannesen [Tue, 4 Nov 2008 20:52:49 +0000 (20:52 +0000)]
80 columns

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

16 years agoCustom lower bit_convert i64 -> f64 into FMDRR. This is now happening with legalizetypes.
Evan Cheng [Tue, 4 Nov 2008 19:57:48 +0000 (19:57 +0000)]
Custom lower bit_convert i64 -> f64 into FMDRR. This is now happening with legalizetypes.

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

16 years agoAdd note about cmake. Patch by Oscar Fuentes.
Tanya Lattner [Tue, 4 Nov 2008 18:40:27 +0000 (18:40 +0000)]
Add note about cmake. Patch by Oscar Fuentes.

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

16 years agoGive tablegen's Type a destructor, to suppress spurious
Dan Gohman [Tue, 4 Nov 2008 18:09:07 +0000 (18:09 +0000)]
Give tablegen's Type a destructor, to suppress spurious
"Type has virtual functions but non-virtual destructor"
warnings.

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

16 years agoFix typo. Patch by nlewycky.
Duncan Sands [Tue, 4 Nov 2008 18:05:30 +0000 (18:05 +0000)]
Fix typo.  Patch by nlewycky.

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

16 years agoDebug output tweak.
Evan Cheng [Tue, 4 Nov 2008 17:58:53 +0000 (17:58 +0000)]
Debug output tweak.

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

16 years agoLDM_RET restores pc, do not set 's' bit which would restore CPSR from SPSR.
Evan Cheng [Tue, 4 Nov 2008 17:57:07 +0000 (17:57 +0000)]
LDM_RET restores pc, do not set 's' bit which would restore CPSR from SPSR.

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

16 years agoFix PR3011: LegalizeTypes support for scalarizing
Duncan Sands [Tue, 4 Nov 2008 17:31:08 +0000 (17:31 +0000)]
Fix PR3011: LegalizeTypes support for scalarizing
SELECT_CC.

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

16 years agoDuncan pointed out that the Extended case in getTypeForMVT could
Dan Gohman [Tue, 4 Nov 2008 16:19:44 +0000 (16:19 +0000)]
Duncan pointed out that the Extended case in getTypeForMVT could
be considerably simplified.

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

16 years agoAdd a return statement to suppress warnings in NDEBUG builds.
Dan Gohman [Tue, 4 Nov 2008 16:08:57 +0000 (16:08 +0000)]
Add a return statement to suppress warnings in NDEBUG builds.

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

16 years agoAdd some asserts to verify MVT invariant assumptions.
Dan Gohman [Tue, 4 Nov 2008 16:03:56 +0000 (16:03 +0000)]
Add some asserts to verify MVT invariant assumptions.

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

16 years agoregenerate
Nuno Lopes [Tue, 4 Nov 2008 14:43:20 +0000 (14:43 +0000)]
regenerate

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

16 years agofix leakage of APFloats in getExistingVal()
Nuno Lopes [Tue, 4 Nov 2008 14:42:19 +0000 (14:42 +0000)]
fix leakage of APFloats in getExistingVal()

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

16 years agoregenerate
Nuno Lopes [Tue, 4 Nov 2008 14:28:33 +0000 (14:28 +0000)]
regenerate

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

16 years agofix leakage of APSInt in getVal()
Nuno Lopes [Tue, 4 Nov 2008 14:26:58 +0000 (14:26 +0000)]
fix leakage of APSInt in getVal()

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

16 years agofix leakage of IfcvtTokens
Nuno Lopes [Tue, 4 Nov 2008 13:02:59 +0000 (13:02 +0000)]
fix leakage of IfcvtTokens

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

16 years agoFor some targets, it's not possible to place GVs in the same memory buffer as the...
Evan Cheng [Tue, 4 Nov 2008 09:30:48 +0000 (09:30 +0000)]
For some targets, it's not possible to place GVs in the same memory buffer as the MachineCodeEmitter allocated memory. Code and data has different read / write / execution privilege requirements.

This is a short term workaround. The current solution is for the JIT memory manager to manage code and data memory separately.

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

16 years agoDon't "shell out" to resolve paths. Using pure perl makes llvm-config
Nick Lewycky [Tue, 4 Nov 2008 08:05:21 +0000 (08:05 +0000)]
Don't "shell out" to resolve paths. Using pure perl makes llvm-config
friendlier to non-Unixes that happen to have perl. Patch from Sascha Othman!

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

16 years ago80 col violation.
Evan Cheng [Tue, 4 Nov 2008 06:10:31 +0000 (06:10 +0000)]
80 col violation.

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

16 years agoStylistic change.
Evan Cheng [Tue, 4 Nov 2008 06:10:06 +0000 (06:10 +0000)]
Stylistic change.

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

16 years agohasDisassembler should return false if disassembler isn't available.
Evan Cheng [Tue, 4 Nov 2008 06:09:38 +0000 (06:09 +0000)]
hasDisassembler should return false if disassembler isn't available.

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

16 years agoCMakeLists: removed asmprinter component from
Oscar Fuentes [Tue, 4 Nov 2008 03:28:37 +0000 (03:28 +0000)]
CMakeLists: removed asmprinter component from
tools/llc/CMakeLists.txt.

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

16 years agoCMake: Support for building 32 bit mode libs and binaries on
Oscar Fuentes [Tue, 4 Nov 2008 03:27:24 +0000 (03:27 +0000)]
CMake: Support for building 32 bit mode libs and binaries on
Linux/x86-64.

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

16 years agoCMake: Updated list of source files.
Oscar Fuentes [Tue, 4 Nov 2008 03:24:04 +0000 (03:24 +0000)]
CMake: Updated list of source files.

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

16 years agoInitial checkin for stack protectors. Here's what it does:
Bill Wendling [Tue, 4 Nov 2008 02:10:20 +0000 (02:10 +0000)]
Initial checkin for stack protectors. Here's what it does:

* The prologue is modified to read the __stack_chk_guard global and insert it
  onto the stack.

* The epilogue is modified to read the stored guard from the stack and compare
  it to the original __stack_chk_guard value. If they differ, then the
  __stack_chk_fail() function is called.

* The stack protector needs to be first on the stack (after the parameters) to
  catch any stack-smashing activities.

Front-end support will follow after a round of beta testing.

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

16 years agoHandle ARM machine constantpool entries.
Evan Cheng [Tue, 4 Nov 2008 00:50:32 +0000 (00:50 +0000)]
Handle ARM machine constantpool entries.

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

16 years agoThe ANDMask node folds to a constant, and isn't the node that needs to
Dan Gohman [Mon, 3 Nov 2008 23:43:55 +0000 (23:43 +0000)]
The ANDMask node folds to a constant, and isn't the node that needs to
have its node id set. The new and and shift nodes are the nodes that need
the IDs. This fixes PR2982.

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

16 years agoFix unused variable warnings.
Devang Patel [Mon, 3 Nov 2008 23:20:04 +0000 (23:20 +0000)]
Fix unused variable warnings.

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

16 years agoFix unused variable warnings.
Devang Patel [Mon, 3 Nov 2008 23:14:09 +0000 (23:14 +0000)]
Fix unused variable warnings.

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

16 years agoAdd C bindings for extractvalue and insertvalue. Patch by Frits van Bommel!
Dan Gohman [Mon, 3 Nov 2008 22:55:43 +0000 (22:55 +0000)]
Add C bindings for extractvalue and insertvalue. Patch by Frits van Bommel!

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

16 years agoRemove a dead switch statement.
Evan Cheng [Mon, 3 Nov 2008 21:26:52 +0000 (21:26 +0000)]
Remove a dead switch statement.

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

16 years agoMinor code restructuring. No functionality change.
Evan Cheng [Mon, 3 Nov 2008 21:02:39 +0000 (21:02 +0000)]
Minor code restructuring. No functionality change.

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

16 years agoFix some ppcf128 regressions: make ExpandFloatRes_LOAD
Dale Johannesen [Mon, 3 Nov 2008 20:47:45 +0000 (20:47 +0000)]
Fix some ppcf128 regressions:  make ExpandFloatRes_LOAD
work correctly, and bring over a late change to ppcf128
SetCC handling.

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

16 years agoMake VAARG promotion work correctly with large funky
Duncan Sands [Mon, 3 Nov 2008 20:22:12 +0000 (20:22 +0000)]
Make VAARG promotion work correctly with large funky
sized integers like i129, and also reduce the number
of assumptions made about how vaarg is implemented.
This still doesn't work correctly for small integers
like (eg) i1 on x86, since x86 passes each of them
(essentially an i8) in a 4 byte stack slot, so the
pointer needs to be advanced by 4 bytes not by 1 byte
as now.  But this is no longer a LegalizeTypes problem
(it was also wrong in LT before): it is a bug in the
operation expansion in LegalizeDAG: now LegalizeTypes
turns an i1 vaarg into an i8 vaarg which would work
fine if only the i8 vaarg was turned into correct code
later.

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

16 years agoOverload AddInteger on int/long/long long instead of on int/int64_t,
Dan Gohman [Mon, 3 Nov 2008 19:40:18 +0000 (19:40 +0000)]
Overload AddInteger on int/long/long long instead of on int/int64_t,
to avoid overload ambiguities. This fixes build errors introduced
by r58623.

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

16 years agoIgnore conditions that are outside the loop.
Devang Patel [Mon, 3 Nov 2008 19:38:07 +0000 (19:38 +0000)]
Ignore conditions that are outside the loop.

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

16 years agoadd a period at the end of the comment, ignoring the fact that the comment would...
Andrew Lenharth [Mon, 3 Nov 2008 19:29:29 +0000 (19:29 +0000)]
add a period at the end of the comment, ignoring the fact that the comment would be hard pressed to be considered a sentence, but if it makes Bill happy...

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

16 years agoAdd binary encoding support for multiply instructions. Some blanks left to fill in...
Jim Grosbach [Mon, 3 Nov 2008 18:38:31 +0000 (18:38 +0000)]
Add binary encoding support for multiply instructions. Some blanks left to fill in, but the basics are there.

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

16 years agoTurn floating point IVs into integer IVs where possible.
Devang Patel [Mon, 3 Nov 2008 18:32:19 +0000 (18:32 +0000)]
Turn floating point IVs into integer IVs where possible.
This allows SCEV users to effectively calculate trip count.
LSR later on transforms back integer IVs to floating point IVs
later on to avoid int-to-float casts inside the loop.

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

16 years agoRefactor various TargetAsmInfo subclasses' TargetMachine members away
Dan Gohman [Mon, 3 Nov 2008 18:22:42 +0000 (18:22 +0000)]
Refactor various TargetAsmInfo subclasses' TargetMachine members away
adding a TargetMachine member to the base TargetAsmInfo class instead.

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

16 years agoChange how extended types are represented in MVTs. Instead of fiddling
Dan Gohman [Mon, 3 Nov 2008 17:56:27 +0000 (17:56 +0000)]
Change how extended types are represented in MVTs. Instead of fiddling
bits, use a union of a SimpleValueType enum and a regular Type*.

This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.

This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.

This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.

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

16 years agoComment fix.
Daniel Dunbar [Mon, 3 Nov 2008 17:33:36 +0000 (17:33 +0000)]
Comment fix.

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

16 years agoRemove redundant inline keywords from functions defined within
Dan Gohman [Mon, 3 Nov 2008 17:10:24 +0000 (17:10 +0000)]
Remove redundant inline keywords from functions defined within
class definitions.

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

16 years agoEnsure that we are checking only calls to the function we are interested in specializing
Andrew Lenharth [Mon, 3 Nov 2008 16:05:35 +0000 (16:05 +0000)]
Ensure that we are checking only calls to the function we are interested in specializing

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

16 years agoTestcase for recent llvm-gcc fix
Anton Korobeynikov [Mon, 3 Nov 2008 14:43:31 +0000 (14:43 +0000)]
Testcase for recent llvm-gcc fix

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

16 years agoMake VAARG work with x86 long double (which is
Duncan Sands [Mon, 3 Nov 2008 11:51:11 +0000 (11:51 +0000)]
Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).

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

16 years agoMake MachineFrameInfo::print not crash when no TargetFrameInfo is available.
Matthijs Kooijman [Mon, 3 Nov 2008 11:16:43 +0000 (11:16 +0000)]
Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.

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

16 years agoSilence a compiler warning.
Evan Cheng [Mon, 3 Nov 2008 07:14:02 +0000 (07:14 +0000)]
Silence a compiler warning.

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

16 years agoTypo
Nick Lewycky [Mon, 3 Nov 2008 03:50:40 +0000 (03:50 +0000)]
Typo

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

16 years agoReplace explicit loop with utility function.
Nick Lewycky [Mon, 3 Nov 2008 03:49:14 +0000 (03:49 +0000)]
Replace explicit loop with utility function.

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

16 years agoDon't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
Nick Lewycky [Mon, 3 Nov 2008 02:43:49 +0000 (02:43 +0000)]
Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
We're still waiting on code that actually analyzes them properly.

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

16 years agoRevert my last patch until I consult with Evan about it.
Owen Anderson [Mon, 3 Nov 2008 02:33:28 +0000 (02:33 +0000)]
Revert my last patch until I consult with Evan about it.

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

16 years agoChanges from Duncan's review:
Nick Lewycky [Sun, 2 Nov 2008 16:46:26 +0000 (16:46 +0000)]
Changes from Duncan's review:
 * merge two weak functions by making them both alias a third non-weak fn
 * don't reimplement CallSite::hasArgument
 * whitelist the safe linkage types

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

16 years agoTestcase for PR2691
Anton Korobeynikov [Sun, 2 Nov 2008 16:46:17 +0000 (16:46 +0000)]
Testcase for PR2691

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

16 years agoSilence a warning
Anton Korobeynikov [Sun, 2 Nov 2008 11:47:11 +0000 (11:47 +0000)]
Silence a warning

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

16 years agoGet this building on 64 bit machines (error:
Duncan Sands [Sun, 2 Nov 2008 09:00:33 +0000 (09:00 +0000)]
Get this building on 64 bit machines (error:
cast from ‘const llvm::PointerType*’ to ‘unsigned int’
loses precision).

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

16 years agoDon't do pre-splitting if doing so would create a value join that did not
Owen Anderson [Sun, 2 Nov 2008 08:08:18 +0000 (08:08 +0000)]
Don't do pre-splitting if doing so would create a value join that did not
exist before.  Updating the live intervals in that care is tricky in the general
case.

Evan, if you see a tighter guard condition for this, let me know.

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

16 years agoCMake: added a source file.
Oscar Fuentes [Sun, 2 Nov 2008 06:01:39 +0000 (06:01 +0000)]
CMake: added a source file.

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

16 years agoWhoops! Remove test Output/ directory.
Nick Lewycky [Sun, 2 Nov 2008 05:53:37 +0000 (05:53 +0000)]
Whoops! Remove test Output/ directory.

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

16 years agoAdd a new MergeFunctions pass. It finds identical functions and merges them.
Nick Lewycky [Sun, 2 Nov 2008 05:52:50 +0000 (05:52 +0000)]
Add a new MergeFunctions pass. It finds identical functions and merges them.

This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.

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

16 years agoFix demanded bits analysis with srem by negative number. Based on a patch
Nick Lewycky [Sun, 2 Nov 2008 02:41:50 +0000 (02:41 +0000)]
Fix demanded bits analysis with srem by negative number. Based on a patch
by Richard Osborne.

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

16 years agoFix this recently moved code to use the correct type. CI is now a
Dan Gohman [Sun, 2 Nov 2008 00:17:33 +0000 (00:17 +0000)]
Fix this recently moved code to use the correct type. CI is now a
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.

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

16 years agoAdded interface to allow clients to create a MemIntrinsicNode for
Mon P Wang [Sat, 1 Nov 2008 20:24:53 +0000 (20:24 +0000)]
Added interface to allow clients to create a MemIntrinsicNode for
target intrinsics that touches memory

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