oota-llvm.git
16 years agoFix PR2835. Do not change the width of a volatile load.
Evan Cheng [Mon, 29 Sep 2008 17:26:18 +0000 (17:26 +0000)]
Fix PR2835. Do not change the width of a volatile load.

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

16 years agoSpeed up these passes when the callgraph has
Duncan Sands [Mon, 29 Sep 2008 14:59:04 +0000 (14:59 +0000)]
Speed up these passes when the callgraph has
huge simply connected components.  Suggested
by Chris.

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

16 years agoremove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)
Nuno Lopes [Mon, 29 Sep 2008 14:40:32 +0000 (14:40 +0000)]
remove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)

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

16 years agoTweak some comments.
Duncan Sands [Mon, 29 Sep 2008 13:35:31 +0000 (13:35 +0000)]
Tweak some comments.

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

16 years agoAdd some hands-on documentation about which files to create and edit when
Matthijs Kooijman [Mon, 29 Sep 2008 11:52:22 +0000 (11:52 +0000)]
Add some hands-on documentation about which files to create and edit when
adding a backend.

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

16 years agoRename isWeakForLinker to mayBeOverridden. Use it
Duncan Sands [Mon, 29 Sep 2008 11:25:42 +0000 (11:25 +0000)]
Rename isWeakForLinker to mayBeOverridden.  Use it
instead of hasWeakLinkage in a bunch of optimization
passes.

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

16 years agoAdd a testcase showing that scalarrepl supports first class structs.
Matthijs Kooijman [Mon, 29 Sep 2008 10:42:13 +0000 (10:42 +0000)]
Add a testcase showing that scalarrepl supports first class structs.

I originally made this script to show that scalarrepl didn't support them, but
it turned out it does. Better to still add the testcase then.

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

16 years agoMove the code that handles DAGISel error conditions into
Dan Gohman [Sat, 27 Sep 2008 23:53:14 +0000 (23:53 +0000)]
Move the code that handles DAGISel error conditions into
helper functions instead of duplicating it inline each time
it is needed. This eliminates a few hundred or so copies
of this code in each target.

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

16 years agoAdd IRBuilder::{CreateIsNull, CreateIsNonNull} helper methods.
Daniel Dunbar [Sat, 27 Sep 2008 23:22:55 +0000 (23:22 +0000)]
Add IRBuilder::{CreateIsNull, CreateIsNonNull} helper methods.
 - I'm open to the idea that these could have better names. I think
   these read better than CreateEQNull and CreateNENull.

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

16 years agoRe-apply 56683 with fixes.
Evan Cheng [Sat, 27 Sep 2008 01:56:22 +0000 (01:56 +0000)]
Re-apply 56683 with fixes.

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

16 years agoUpdate tests.
Devang Patel [Sat, 27 Sep 2008 00:25:28 +0000 (00:25 +0000)]
Update tests.

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

16 years agoUnbreak build.
Daniel Dunbar [Sat, 27 Sep 2008 00:22:09 +0000 (00:22 +0000)]
Unbreak build.

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

16 years agoAdd missing #include for asserts.
Bill Wendling [Sat, 27 Sep 2008 00:08:24 +0000 (00:08 +0000)]
Add missing #include for asserts.

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

16 years agoImplement function notes as function attributes.
Devang Patel [Fri, 26 Sep 2008 23:51:19 +0000 (23:51 +0000)]
Implement function notes as function attributes.

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

16 years agoGenerated files for warning fix.
Dale Johannesen [Fri, 26 Sep 2008 23:46:20 +0000 (23:46 +0000)]
Generated files for warning fix.

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

16 years agoFix a compiler warning.
Dale Johannesen [Fri, 26 Sep 2008 23:45:53 +0000 (23:45 +0000)]
Fix a compiler warning.

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

16 years agoImplement "punpckldq %xmm0, $xmm0" as "pshufd $0x50, %xmm0, %xmm" unless optimizing...
Evan Cheng [Fri, 26 Sep 2008 23:41:32 +0000 (23:41 +0000)]
Implement "punpckldq  %xmm0, $xmm0" as "pshufd  $0x50, %xmm0, %xmm" unless optimizing for code size.

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

16 years agoNow Attributes are divided in three groups
Devang Patel [Fri, 26 Sep 2008 22:53:05 +0000 (22:53 +0000)]
Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn

Return attributes use 0 as the index.
Function attributes use ~0U as the index.

This patch requires corresponding changes in llvm-gcc and clang.

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

16 years agoTemporarily reverting r56683. This is causing a failure during the build of llvm...
Bill Wendling [Fri, 26 Sep 2008 22:10:44 +0000 (22:10 +0000)]
Temporarily reverting r56683. This is causing a failure during the build of llvm-gcc:

/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311.
../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
{standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
{standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression
{standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
...

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

16 years agoFix missing whitespace in the printing of function notes.
Dan Gohman [Fri, 26 Sep 2008 22:02:59 +0000 (22:02 +0000)]
Fix missing whitespace in the printing of function notes.

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

16 years agoRename ConstantSDNode's getSignExtended to getSExtValue, for
Dan Gohman [Fri, 26 Sep 2008 21:54:37 +0000 (21:54 +0000)]
Rename ConstantSDNode's getSignExtended to getSExtValue, for
consistancy with ConstantInt, and re-implement it in terms
of ConstantInt's getSExtValue.

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

16 years agoMake some minor reorganizations and comment changes to eliminate trivial
Dan Gohman [Fri, 26 Sep 2008 21:38:45 +0000 (21:38 +0000)]
Make some minor reorganizations and comment changes to eliminate trivial
differences between the CallInst and InvokeInst classes.

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

16 years agoMark lea fi# as being really rematerializable.
Dan Gohman [Fri, 26 Sep 2008 21:30:20 +0000 (21:30 +0000)]
Mark lea fi# as being really rematerializable.

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

16 years agounpckhps requires sse1, punpckhdq requires sse2.
Evan Cheng [Fri, 26 Sep 2008 21:26:30 +0000 (21:26 +0000)]
unpckhps requires sse1, punpckhdq requires sse2.

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

16 years agoUpdate LICENSE link.
Daniel Dunbar [Fri, 26 Sep 2008 21:12:29 +0000 (21:12 +0000)]
Update LICENSE link.

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

16 years agoFix X86FastISel's address folding to check displacement
Dan Gohman [Fri, 26 Sep 2008 20:04:15 +0000 (20:04 +0000)]
Fix X86FastISel's address folding to check displacement
values for overflow.

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

16 years agoFix @llvm.frameaddress codegen. FP elimination optimization should be disabled when...
Evan Cheng [Fri, 26 Sep 2008 19:48:35 +0000 (19:48 +0000)]
Fix @llvm.frameaddress codegen. FP elimination optimization should be disabled when frame address is desired. Also add support for depth > 0.

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

16 years agoCMake: Builds all examples. Corrected name of CBackend target.
Oscar Fuentes [Fri, 26 Sep 2008 19:48:03 +0000 (19:48 +0000)]
CMake: Builds all examples. Corrected name of CBackend target.

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

16 years agoGenerated files for previous patch.
Dale Johannesen [Fri, 26 Sep 2008 19:32:34 +0000 (19:32 +0000)]
Generated files for previous patch.

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

16 years agoAnother file I forgot.
Dale Johannesen [Fri, 26 Sep 2008 19:31:53 +0000 (19:31 +0000)]
Another file I forgot.

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

16 years agoAdd "inreg" field to CallSDNode (doesn't increase
Dale Johannesen [Fri, 26 Sep 2008 19:31:26 +0000 (19:31 +0000)]
Add "inreg" field to CallSDNode (doesn't increase
its size).  Adjust various lowering functions to
pass this info through from CallInst.  Use it to
implement sseregparm returns on X86.  Remove
X86_ssecall calling convention.

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

16 years agoFactor out the code for determining when symblic addresses
Dan Gohman [Fri, 26 Sep 2008 19:15:30 +0000 (19:15 +0000)]
Factor out the code for determining when symblic addresses
require RIP-relative addressing and use it to fix a bug
in X86FastISel in x86-64 PIC mode, where it was trying to
use base/index registers with RIP-relative addresses. This
fixes a bunch of x86-64 testsuite failures.

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

16 years agoAvoid spilling EBP / RBP twice in the prologue.
Evan Cheng [Fri, 26 Sep 2008 19:14:21 +0000 (19:14 +0000)]
Avoid spilling EBP / RBP twice in the prologue.

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

16 years agoWe don't need to insert copies for implicit_def's.
Owen Anderson [Fri, 26 Sep 2008 18:50:46 +0000 (18:50 +0000)]
We don't need to insert copies for implicit_def's.

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

16 years agoWhen looking for executable extensions, ignore .dSYM, as that's the debug info direct...
Jim Grosbach [Fri, 26 Sep 2008 17:27:58 +0000 (17:27 +0000)]
When looking for executable extensions, ignore .dSYM, as that's the debug info directory on Darwin.

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

16 years agoX86 address displacement field must be interpreted as a 32-bit value.
Evan Cheng [Fri, 26 Sep 2008 16:58:16 +0000 (16:58 +0000)]
X86 address displacement field must be interpreted as a 32-bit value.

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

16 years agoSet svn:ignore on AsmPrinter Release-Asserts directories.
Daniel Dunbar [Fri, 26 Sep 2008 04:50:04 +0000 (04:50 +0000)]
Set svn:ignore on AsmPrinter Release-Asserts directories.

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

16 years agoCMake: Builds all targets.
Oscar Fuentes [Fri, 26 Sep 2008 04:40:32 +0000 (04:40 +0000)]
CMake: Builds all targets.

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

16 years agoDisable support for x86_f80 in X86FastISel. Supporting it would
Dan Gohman [Fri, 26 Sep 2008 01:39:32 +0000 (01:39 +0000)]
Disable support for x86_f80 in X86FastISel. Supporting it would
require more work.

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

16 years agoIf we have a function with an unreachable statement such that the ending debug
Bill Wendling [Fri, 26 Sep 2008 00:28:12 +0000 (00:28 +0000)]
If we have a function with an unreachable statement such that the ending debug
information is in an unreachable block, then it's possible that the high/low pc
values won't be set for the dwarf information. E.g., this function:

void abort(void) __attribute__((__noreturn__));
void dead_beef(void) __attribute__ ((noreturn));

int *b;

void dead_beef(void) {
  *b=0xdeadbeef;
  abort();
}

has a call to "@llvm.dbg.region.end" only in the unreachable block:

define void @dead_beef() noreturn nounwind  {
entry:
call void @llvm.dbg.func.start(...)
call void @llvm.dbg.stoppoint(...)
...
call void @abort( ) noreturn nounwind
unreachable

return: ; No predecessors!
call void @llvm.dbg.stoppoint(...)
call void @llvm.dbg.region.end(...)
ret void
}

The dwarf information emitted is something like:

0x00000084:     TAG_subprogram [5]
                 AT_name( "dead_beef" )
                 AT_external( 0x01 )
                 AT_prototyped( 0x01 )
                 AT_decl_file( 0x01 )
                 AT_decl_line( 0x08 )

Note that this is *not* the best fix for this problem, but a band-aid for an
gaping wound. This code needs to be changed when we revamp our debugging
information.

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

16 years agoPrefer movlhps over punpcklqdq, etc. in more cases.
Evan Cheng [Thu, 25 Sep 2008 23:35:16 +0000 (23:35 +0000)]
Prefer movlhps over punpcklqdq, etc. in more cases.

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

16 years agoFix a bug in which address displacements were being added to the
Dan Gohman [Thu, 25 Sep 2008 23:34:02 +0000 (23:34 +0000)]
Fix a bug in which address displacements were being added to the
load from the stub, instead of the result of the load from the stub.

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

16 years agoMake pointer parameter const for isUsedInBasicBlock.
Bill Wendling [Thu, 25 Sep 2008 22:42:01 +0000 (22:42 +0000)]
Make pointer parameter const for isUsedInBasicBlock.

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

16 years ago Large mechanical patch.
Devang Patel [Thu, 25 Sep 2008 21:00:45 +0000 (21:00 +0000)]
 Large mechanical patch.

s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.

This requires corresponding changes in llvm-gcc and clang.

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

16 years agoReapply 56585:56589 with proper fix for some gcc versions
Anton Korobeynikov [Thu, 25 Sep 2008 21:00:33 +0000 (21:00 +0000)]
Reapply 56585:56589 with proper fix for some gcc versions

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

16 years agoWith sse3 and when the source is a load or has multiple uses, favors movddup over...
Evan Cheng [Thu, 25 Sep 2008 20:50:48 +0000 (20:50 +0000)]
With sse3 and when the source is a load or has multiple uses, favors movddup over shuffp*, pshufd, etc. Without sse3 or when the source is from a register, make use of movlhps

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

16 years agoAccept 'inreg' attribute on x86 functions as
Dale Johannesen [Thu, 25 Sep 2008 20:47:45 +0000 (20:47 +0000)]
Accept 'inreg' attribute on x86 functions as
meaning sse_regparm (i.e. float/double values go
in XMM0 instead of ST0).  Update documentation
to reflect reality.

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

16 years agoAvoid a spurious extra space character when printing empty structs.
Dan Gohman [Thu, 25 Sep 2008 17:37:20 +0000 (17:37 +0000)]
Avoid a spurious extra space character when printing empty structs.

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

16 years agoSupport for i1 XOR in FastISel. It is actually safe because
Dan Gohman [Thu, 25 Sep 2008 17:22:52 +0000 (17:22 +0000)]
Support for i1 XOR in FastISel. It is actually safe because
i1 operands are assumed to already by zero-extended.

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

16 years agoDon't print fast-isel debug messages by default. Thanks Chris!
Dan Gohman [Thu, 25 Sep 2008 17:21:42 +0000 (17:21 +0000)]
Don't print fast-isel debug messages by default. Thanks Chris!

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

16 years agoDon't forget the newline in debug output.
Dan Gohman [Thu, 25 Sep 2008 17:17:27 +0000 (17:17 +0000)]
Don't forget the newline in debug output.

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

16 years agoFastISel support for debug info.
Dan Gohman [Thu, 25 Sep 2008 17:05:24 +0000 (17:05 +0000)]
FastISel support for debug info.

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

16 years agobug 2812: Segmentation fault on a big emdiam processor.
Richard Pennington [Thu, 25 Sep 2008 16:15:10 +0000 (16:15 +0000)]
bug 2812: Segmentation fault on a big emdiam processor.

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

16 years agoPIC support in X86FastISel.
Dan Gohman [Thu, 25 Sep 2008 15:24:26 +0000 (15:24 +0000)]
PIC support in X86FastISel.

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

16 years agoTemporarily backing out 56585:56589 to unbreak the build.
Evan Cheng [Thu, 25 Sep 2008 07:38:08 +0000 (07:38 +0000)]
Temporarily backing out 56585:56589 to unbreak the build.

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

16 years agoFix a recent fast-isel coverage regression - don't bail out before
Dan Gohman [Thu, 25 Sep 2008 01:28:51 +0000 (01:28 +0000)]
Fix a recent fast-isel coverage regression - don't bail out before
giving the target a chance to materialize constants.

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

16 years agoEnable DeadMachineInstructionElim when Fast-ISel is enabled.
Dan Gohman [Thu, 25 Sep 2008 01:14:49 +0000 (01:14 +0000)]
Enable DeadMachineInstructionElim when Fast-ISel is enabled.

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

16 years agoAdd debug output to this pass.
Dan Gohman [Thu, 25 Sep 2008 01:06:50 +0000 (01:06 +0000)]
Add debug output to this pass.

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

16 years agopmovsxbq etc. requires sse4.1.
Evan Cheng [Thu, 25 Sep 2008 00:49:51 +0000 (00:49 +0000)]
pmovsxbq etc. requires sse4.1.

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

16 years agoRefactor the code that adds standard LLVM codegen passes into
Dan Gohman [Thu, 25 Sep 2008 00:37:07 +0000 (00:37 +0000)]
Refactor the code that adds standard LLVM codegen passes into
a separate function, eliminating duplication between the
add-passes-for-file and add-passes-for-machine-code code.

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

16 years ago<rdar://problem/6234798> Assertion failed: (!OpInfo.AssignedRegs.Regs.empty() &&...
Evan Cheng [Thu, 25 Sep 2008 00:14:04 +0000 (00:14 +0000)]
<rdar://problem/6234798> Assertion failed: (!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!")

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

16 years agoGive LowerSubregs.cpp a top-level description.
Dan Gohman [Wed, 24 Sep 2008 23:44:12 +0000 (23:44 +0000)]
Give LowerSubregs.cpp a top-level description.

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

16 years agoFix patterns for SSE4.1 move and sign extend instructions. Also add instructions...
Evan Cheng [Wed, 24 Sep 2008 23:27:55 +0000 (23:27 +0000)]
Fix patterns for SSE4.1 move and sign extend instructions. Also add instructions which fold VZEXT_MOVL and VZEXT_LOAD.

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

16 years agoX86ISD::VZEXT_LOAD should produce and fold a chain.
Evan Cheng [Wed, 24 Sep 2008 23:26:36 +0000 (23:26 +0000)]
X86ISD::VZEXT_LOAD should produce and fold a chain.

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

16 years agoRemove SelectionDag early allocation of registers
Dale Johannesen [Wed, 24 Sep 2008 23:13:09 +0000 (23:13 +0000)]
Remove SelectionDag early allocation of registers
for earlyclobbers.  Teach Local RA about earlyclobber,
and add some tests for it.

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

16 years agoFinally get rid of virtual inheritance in TAI
Anton Korobeynikov [Wed, 24 Sep 2008 22:23:17 +0000 (22:23 +0000)]
Finally get rid of virtual inheritance in TAI

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

16 years agoMinor cleanup
Anton Korobeynikov [Wed, 24 Sep 2008 22:22:54 +0000 (22:22 +0000)]
Minor cleanup

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

16 years agoGet rid of virtual inheritance for ARM TAI
Anton Korobeynikov [Wed, 24 Sep 2008 22:22:27 +0000 (22:22 +0000)]
Get rid of virtual inheritance for ARM TAI

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

16 years agoGet rid of virtual inheritance for PPC TAI
Anton Korobeynikov [Wed, 24 Sep 2008 22:22:03 +0000 (22:22 +0000)]
Get rid of virtual inheritance for PPC TAI

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

16 years agoUse crazy template-based inheritance instead of virtual one.
Anton Korobeynikov [Wed, 24 Sep 2008 22:21:39 +0000 (22:21 +0000)]
Use crazy template-based inheritance instead of virtual one.

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

16 years agoUse helper
Anton Korobeynikov [Wed, 24 Sep 2008 22:21:04 +0000 (22:21 +0000)]
Use helper

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

16 years agoSmallPtrSet will be better
Anton Korobeynikov [Wed, 24 Sep 2008 22:20:46 +0000 (22:20 +0000)]
SmallPtrSet will be better

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

16 years agoGet rid of ReadOnlySection duplicate
Anton Korobeynikov [Wed, 24 Sep 2008 22:20:27 +0000 (22:20 +0000)]
Get rid of ReadOnlySection duplicate

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

16 years agoUse named sections, where they should be
Anton Korobeynikov [Wed, 24 Sep 2008 22:19:13 +0000 (22:19 +0000)]
Use named sections, where they should be

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

16 years agoGet rid of now unused {Four,Eight,Sixteen}ByteConstantSection
Anton Korobeynikov [Wed, 24 Sep 2008 22:18:54 +0000 (22:18 +0000)]
Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection

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

16 years agoUse generic section-handling stuff to emit constant pool entries
Anton Korobeynikov [Wed, 24 Sep 2008 22:17:59 +0000 (22:17 +0000)]
Use generic section-handling stuff to emit constant pool entries

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

16 years agoCleanup
Anton Korobeynikov [Wed, 24 Sep 2008 22:17:27 +0000 (22:17 +0000)]
Cleanup

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

16 years agoGet rid of duplicate char*/Section* stuff for TLS sections
Anton Korobeynikov [Wed, 24 Sep 2008 22:17:06 +0000 (22:17 +0000)]
Get rid of duplicate char*/Section* stuff for TLS sections

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

16 years agoCleanup, no functionality change
Anton Korobeynikov [Wed, 24 Sep 2008 22:16:33 +0000 (22:16 +0000)]
Cleanup, no functionality change

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

16 years agoGet rid of duplicate char*/Section* DataSection
Anton Korobeynikov [Wed, 24 Sep 2008 22:16:16 +0000 (22:16 +0000)]
Get rid of duplicate char*/Section* DataSection

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

16 years agoGet rid of duplicate char*/Section* TextSection
Anton Korobeynikov [Wed, 24 Sep 2008 22:15:21 +0000 (22:15 +0000)]
Get rid of duplicate char*/Section* TextSection

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

16 years agoMove actual section printing stuff to AsmPrinter from TAI reducing heap traffic.
Anton Korobeynikov [Wed, 24 Sep 2008 22:14:23 +0000 (22:14 +0000)]
Move actual section printing stuff to AsmPrinter from TAI reducing heap traffic.

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

16 years agoDrop obsolete hook and change all usage to new interface
Anton Korobeynikov [Wed, 24 Sep 2008 22:13:07 +0000 (22:13 +0000)]
Drop obsolete hook and change all usage to new interface

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

16 years agoProvide direct function to switch to Section
Anton Korobeynikov [Wed, 24 Sep 2008 22:12:10 +0000 (22:12 +0000)]
Provide direct function to switch to Section

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

16 years agoSPU section handling is really huge mess. Replace remaining TAI calls for sections...
Anton Korobeynikov [Wed, 24 Sep 2008 22:11:42 +0000 (22:11 +0000)]
SPU section handling is really huge mess. Replace remaining TAI calls for sections with explicit names in order not to block existing backends during section handling migration. SPU folks! Please consider using new section handling facility someday.

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

16 years agoRemove dead code for PIC16 (preparation to switch to new section handling stuff)
Anton Korobeynikov [Wed, 24 Sep 2008 22:11:26 +0000 (22:11 +0000)]
Remove dead code for PIC16 (preparation to switch to new section handling stuff)

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

16 years agoXMM6-XMM15 are callee-saved on Win64. Patch by Nicolas Capens!
Anton Korobeynikov [Wed, 24 Sep 2008 22:03:04 +0000 (22:03 +0000)]
XMM6-XMM15 are callee-saved on Win64. Patch by Nicolas Capens!

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

16 years agoFix off-by-one error when updating live intervals.
Owen Anderson [Wed, 24 Sep 2008 21:30:38 +0000 (21:30 +0000)]
Fix off-by-one error when updating live intervals.

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

16 years agoCMake: Disabled some warnings for MSVC.
Oscar Fuentes [Wed, 24 Sep 2008 19:27:54 +0000 (19:27 +0000)]
CMake: Disabled some warnings for MSVC.

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

16 years agoAdd Attributes.cpp to the vcproj.
Steve Naroff [Wed, 24 Sep 2008 17:23:28 +0000 (17:23 +0000)]
Add Attributes.cpp to the vcproj.

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

16 years agoAdd DisableGVCompilation which forces the JIT to assert when it tries to allocate...
Evan Cheng [Wed, 24 Sep 2008 16:25:55 +0000 (16:25 +0000)]
Add DisableGVCompilation which forces the JIT to assert when it tries to allocate space for a GlobalVariable.

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

16 years agoReapplying r56550
Bill Wendling [Wed, 24 Sep 2008 10:25:02 +0000 (10:25 +0000)]
Reapplying r56550

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

16 years agoForgot this part with my last patch. Sorry about the breakage.
Bill Wendling [Wed, 24 Sep 2008 10:16:24 +0000 (10:16 +0000)]
Forgot this part with my last patch. Sorry about the breakage.

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

16 years agoTemporarily revert r56550 until missing commit can be added.
Eric Christopher [Wed, 24 Sep 2008 08:30:44 +0000 (08:30 +0000)]
Temporarily revert r56550 until missing commit can be added.

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

16 years agoRefactor the constant folding code into it's own function. And call it from both
Bill Wendling [Wed, 24 Sep 2008 07:11:26 +0000 (07:11 +0000)]
Refactor the constant folding code into it's own function. And call it from both
the SelectionDAG and DAGCombiner code. The only functionality change is that now
the DAG combiner is performing the constant folding for these operations instead
of being a no-op.

This is *not* in response to a bug, so there isn't a testcase.

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

16 years agoCommit CodeGenPrepare.cpp changes which was accidentially left out of 56526.
Evan Cheng [Wed, 24 Sep 2008 06:48:55 +0000 (06:48 +0000)]
Commit CodeGenPrepare.cpp changes which was accidentially left out of 56526.

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

16 years agoFix fallout in CodeGenPrepare from 56526. Will likely need more work.
Eric Christopher [Wed, 24 Sep 2008 05:32:41 +0000 (05:32 +0000)]
Fix fallout in CodeGenPrepare from 56526. Will likely need more work.

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

16 years agoFix fallout from revision r56535.
Eric Christopher [Wed, 24 Sep 2008 04:55:49 +0000 (04:55 +0000)]
Fix fallout from revision r56535.

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

16 years agoCMake: Lists of source files updated. Removed bogus dependency from
Oscar Fuentes [Wed, 24 Sep 2008 01:58:12 +0000 (01:58 +0000)]
CMake: Lists of source files updated. Removed bogus dependency from
lib/VMCore/CMakeLists.txt

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

16 years agoCMake: Removed unnecessary messages from msvc_llvm_config macro.
Oscar Fuentes [Wed, 24 Sep 2008 01:54:03 +0000 (01:54 +0000)]
CMake: Removed unnecessary messages from msvc_llvm_config macro.

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