oota-llvm.git
16 years agoFix typo
Anton Korobeynikov [Tue, 9 Sep 2008 18:24:07 +0000 (18:24 +0000)]
Fix typo

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

16 years agoFix incorrect linker behaviour: we shouldn't resolve weak aliases.
Anton Korobeynikov [Tue, 9 Sep 2008 18:23:48 +0000 (18:23 +0000)]
Fix incorrect linker behaviour: we shouldn't resolve weak aliases.

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

16 years agoReplace explicit pointer-size constants to TargetData query.
Anton Korobeynikov [Tue, 9 Sep 2008 18:22:57 +0000 (18:22 +0000)]
Replace explicit pointer-size constants to TargetData query.
No functionality change.

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

16 years agoMake SimplifyDemandedVectorElts simplify vectors with multiple
Dan Gohman [Tue, 9 Sep 2008 18:11:14 +0000 (18:11 +0000)]
Make SimplifyDemandedVectorElts simplify vectors with multiple
users, and teach it about shufflevector instructions.

Also, fix a subtle bug in SimplifyDemandedVectorElts'
insertelement code.

This is a patch that was originally written by Eli Friedman,
with some fixes and cleanup by me.

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

16 years agoSimplify.
Devang Patel [Tue, 9 Sep 2008 17:56:50 +0000 (17:56 +0000)]
Simplify.
Fix outdated comment.

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

16 years agofit in 80 cols, minor tweaks
Gabor Greif [Tue, 9 Sep 2008 17:52:13 +0000 (17:52 +0000)]
fit in 80 cols, minor tweaks

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

16 years agoOptimization suggested by Matthijs Kooijman.
Duncan Sands [Tue, 9 Sep 2008 13:44:24 +0000 (13:44 +0000)]
Optimization suggested by Matthijs Kooijman.

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

16 years agoCorrect callgraph construction. It has two problems:
Duncan Sands [Tue, 9 Sep 2008 12:40:47 +0000 (12:40 +0000)]
Correct callgraph construction.  It has two problems:
(1) code left over from the days of ConstantPointerRef:
if a use of a function is a GlobalValue then that is
not considered a reason to add an edge from the external
node, even though the use may be as an initializer for
an externally visible global!  There might be some point
to this behaviour when the use is by an alias (though the
code predated aliases by some centuries), but I think
PR2782 is a better way of handling that.  (2) If function
F calls function G, and also G is a parameter to the
call, then an F->G edge is not added to the callgraph.
While this doesn't seem to matter much, adding such an
edge makes the callgraph more regular.
In addition, the new code should be faster as well as
simpler.

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

16 years agoUpdate VC++ project files.
Argyrios Kyrtzidis [Tue, 9 Sep 2008 11:38:37 +0000 (11:38 +0000)]
Update VC++ project files.

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

16 years agoCheck for type legality before materializing integer constants in fast isel. With...
Owen Anderson [Tue, 9 Sep 2008 06:32:02 +0000 (06:32 +0000)]
Check for type legality before materializing integer constants in fast isel.  With this change,
all of MultiSource/Applications passes on Darwin/X86 under FastISel.

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

16 years agoAllow use of ssh to perform remote execution.
Evan Cheng [Tue, 9 Sep 2008 06:11:26 +0000 (06:11 +0000)]
Allow use of ssh to perform remote execution.

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

16 years agoRemove the code that protected FastISel from aborting in
Dan Gohman [Tue, 9 Sep 2008 02:40:04 +0000 (02:40 +0000)]
Remove the code that protected FastISel from aborting in
the case of loads, stores, and conditional branches. It can
handle those now, so any that aren't handled should trigger
the abort.

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

16 years agoTemporarily disable vector select in the bitcode reader. The
Dan Gohman [Tue, 9 Sep 2008 02:08:49 +0000 (02:08 +0000)]
Temporarily disable vector select in the bitcode reader. The
way it handles the type of the condition is breaking plain
scalar select in the case that the value is a
forward-reference.

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

16 years agoFix a constant lowering bug. Now we can do load and store instructions with funky...
Evan Cheng [Tue, 9 Sep 2008 01:26:59 +0000 (01:26 +0000)]
Fix a constant lowering bug. Now we can do load and store instructions with funky getelementptr embedded in the address operand.

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

16 years agoFix logic for not emitting no-dead-strip for some
Dale Johannesen [Tue, 9 Sep 2008 01:21:22 +0000 (01:21 +0000)]
Fix logic for not emitting no-dead-strip for some
objects in llvm.used (thanks Anton).  Makes visible
the magic 'l' prefix for symbols on Darwin which are
to be passed through the assembler, then removed at
linktime (previously all references to this had been
hidden in the ObjC FE code, oh well).

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

16 years agoUpdate generated files.
Dan Gohman [Tue, 9 Sep 2008 01:13:24 +0000 (01:13 +0000)]
Update generated files.

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

16 years agoFix simplifycfg crash in handing block merge.
Devang Patel [Tue, 9 Sep 2008 01:06:56 +0000 (01:06 +0000)]
Fix simplifycfg crash in handing block merge.

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

16 years agoExtend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
Dan Gohman [Tue, 9 Sep 2008 01:02:47 +0000 (01:02 +0000)]
Extend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
and, if so, to return a vector of boolean as a result;

Extend the select LLVM IR instruction to allow you to specify a result
type which is a vector of boolean, in which case the result will be an
element-wise selection instead of choosing one vector or the other; and

Update LangRef.html to describe these changes.

This patch was contributed by Preston Gurd!

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

16 years agoAdd support for floating-point calculations of log2 with limited precisions of 6
Bill Wendling [Tue, 9 Sep 2008 00:28:24 +0000 (00:28 +0000)]
Add support for floating-point calculations of log2 with limited precisions of 6
and 18.

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

16 years agos/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g
Devang Patel [Mon, 8 Sep 2008 22:14:17 +0000 (22:14 +0000)]
s/RemoveUnreachableBlocks/RemoveUnreachableBlocksFromFn/g

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

16 years agoDon't suppress no-dead-strip for used static functions.
Dale Johannesen [Mon, 8 Sep 2008 21:21:49 +0000 (21:21 +0000)]
Don't suppress no-dead-strip for used static functions.

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

16 years agoReapply 55902: Add test for checking proper lowering of eh_return & unwind init intri...
Anton Korobeynikov [Mon, 8 Sep 2008 21:14:36 +0000 (21:14 +0000)]
Reapply 55902: Add test for checking proper lowering of eh_return & unwind init intrinsics on 32bit x86 targets

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

16 years agoReapply 55903: Testcase for 64-bit lowering of eh_return & unwind_init
Anton Korobeynikov [Mon, 8 Sep 2008 21:14:19 +0000 (21:14 +0000)]
Reapply 55903: Testcase for 64-bit lowering of eh_return & unwind_init

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

16 years agoReapply 55904: Unbreak and fix indentation
Anton Korobeynikov [Mon, 8 Sep 2008 21:13:56 +0000 (21:13 +0000)]
Reapply 55904: Unbreak and fix indentation

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

16 years agoReapply 55901: Drop unused variable
Anton Korobeynikov [Mon, 8 Sep 2008 21:13:33 +0000 (21:13 +0000)]
Reapply 55901: Drop unused variable

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

16 years agoReapply 55900: We do support EH on x86-64!
Anton Korobeynikov [Mon, 8 Sep 2008 21:13:08 +0000 (21:13 +0000)]
Reapply 55900: We do support EH on x86-64!

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

16 years agoReapply 55899: First draft of EH support on x86/64-linux
Anton Korobeynikov [Mon, 8 Sep 2008 21:12:47 +0000 (21:12 +0000)]
Reapply 55899: First draft of EH support on x86/64-linux
Now with fix, which prevents subtle codegen bug to trigger on darwin.
No fix for bug though, it's still there.

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

16 years agoReapply blindly reverted 55898: Implement FRAME_TO_ARGS_OFFSET for x86-64
Anton Korobeynikov [Mon, 8 Sep 2008 21:12:11 +0000 (21:12 +0000)]
Reapply blindly reverted 55898: Implement FRAME_TO_ARGS_OFFSET for x86-64

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

16 years agoFix a few I's that were meant to be renamed to BI's.
Dan Gohman [Mon, 8 Sep 2008 20:37:59 +0000 (20:37 +0000)]
Fix a few I's that were meant to be renamed to BI's.

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

16 years agoAdd a target triple; apparently LLVM doesn't use 64-bit
Dan Gohman [Mon, 8 Sep 2008 20:16:18 +0000 (20:16 +0000)]
Add a target triple; apparently LLVM doesn't use 64-bit
data directives on darwin.

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

16 years agoReverting r55898 as well. This wasn't reverted in the original revert...
Bill Wendling [Mon, 8 Sep 2008 19:42:32 +0000 (19:42 +0000)]
Reverting r55898 as well. This wasn't reverted in the original revert...

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

16 years agoAccidental commit of partial 'stack canaries' code
Bill Wendling [Mon, 8 Sep 2008 18:12:00 +0000 (18:12 +0000)]
Accidental commit of partial 'stack canaries' code

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

16 years agoRemove these testcases associated with changes between r 55898 and r 55909.
Bill Wendling [Mon, 8 Sep 2008 18:00:39 +0000 (18:00 +0000)]
Remove these testcases associated with changes between r 55898 and r 55909.

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

16 years agoRedo the 3 existing low-precision expansions to
Dale Johannesen [Mon, 8 Sep 2008 18:00:26 +0000 (18:00 +0000)]
Redo the 3 existing low-precision expansions to
use float constants.  An oversight by the numerics
people who supplied this.

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

16 years agoReverting r55898 to r55909. One of these patches was causing an ICE during the full...
Bill Wendling [Mon, 8 Sep 2008 17:59:12 +0000 (17:59 +0000)]
Reverting r55898 to r55909. One of these patches was causing an ICE during the full bootstrap on Darwin:

/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include
-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/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include
-DSHARED -m64 -DL_negdi2 -c ../../llvm-gcc.src/gcc/libgcc2.c -o
libgcc/x86_64/_negdi2_s.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) &&
TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical
register live information"), function runOnMachineFunction, file
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp,
line 311.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/bin/
-B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/lib/
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/include
-isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.4.0/sys-include
-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/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include
-I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include
-DSHARED -m64 -DL_lshrdi3 -c ../../llvm-gcc.src/gcc/libgcc2.c -o
libgcc/x86_64/_lshrdi3_s.o
../../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}:unknown:Undefined local symbol LBB21_11
{standard input}:unknown:Undefined local symbol LBB21_12
{standard input}:unknown:Undefined local symbol LBB21_13
{standard input}:unknown:Undefined local symbol LBB21_8

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

16 years agoHandle calls which produce i1 results: promote to i8 but and it with 1 to get the...
Evan Cheng [Mon, 8 Sep 2008 17:15:42 +0000 (17:15 +0000)]
Handle calls which produce i1 results: promote to i8 but and it with 1 to get the low bit.

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

16 years agoRemove unused counter.
Devang Patel [Mon, 8 Sep 2008 17:14:54 +0000 (17:14 +0000)]
Remove unused counter.

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

16 years agoIn visitUREM, arrange for the temporary UDIV node to be
Dan Gohman [Mon, 8 Sep 2008 16:59:01 +0000 (16:59 +0000)]
In visitUREM, arrange for the temporary UDIV node to be
revisited, consistent with the code in visitSREM.

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

16 years agoAdd VISIBILITY_HIDDEN on SDISelAsmOperandInfo
Daniel Dunbar [Mon, 8 Sep 2008 16:56:08 +0000 (16:56 +0000)]
Add VISIBILITY_HIDDEN on SDISelAsmOperandInfo

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

16 years agoBitcasting two or from aggregate types is not permitted. Update
Dan Gohman [Mon, 8 Sep 2008 16:45:59 +0000 (16:45 +0000)]
Bitcasting two or from aggregate types is not permitted. Update
LangRef.html, and teach the verifier to check bitcast instructions.

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

16 years agoi128 and f80 are implemented for x86-64 now.
Dan Gohman [Mon, 8 Sep 2008 16:42:56 +0000 (16:42 +0000)]
i128 and f80 are implemented for x86-64 now.

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

16 years agoAdd AsmPrinter support for i128 and larger static initializer data.
Dan Gohman [Mon, 8 Sep 2008 16:40:13 +0000 (16:40 +0000)]
Add AsmPrinter support for i128 and larger static initializer data.

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

16 years agoFix copy+pastos in comments.
Dan Gohman [Mon, 8 Sep 2008 16:31:35 +0000 (16:31 +0000)]
Fix copy+pastos in comments.

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

16 years agoFix the string for ISD::UDIVREM.
Dan Gohman [Mon, 8 Sep 2008 16:30:29 +0000 (16:30 +0000)]
Fix the string for ISD::UDIVREM.

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

16 years agoFix typos in (generated) comments.
Dan Gohman [Mon, 8 Sep 2008 16:29:36 +0000 (16:29 +0000)]
Fix typos in (generated) comments.

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

16 years agoDelete an unused variable.
Dan Gohman [Mon, 8 Sep 2008 16:28:17 +0000 (16:28 +0000)]
Delete an unused variable.

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

16 years agoxfail
Devang Patel [Mon, 8 Sep 2008 16:24:30 +0000 (16:24 +0000)]
xfail

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

16 years agoRemove OptimizeIVType()
Devang Patel [Mon, 8 Sep 2008 16:13:27 +0000 (16:13 +0000)]
Remove OptimizeIVType()

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

16 years agoDidn't mean to commit this change to how the
Duncan Sands [Mon, 8 Sep 2008 16:04:03 +0000 (16:04 +0000)]
Didn't mean to commit this change to how the
callgraph is printed.

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

16 years agoAvoid redefinition and nnbreak windows build.
Evan Cheng [Mon, 8 Sep 2008 16:01:27 +0000 (16:01 +0000)]
Avoid redefinition and nnbreak windows build.

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

16 years agoUnbreak and fix indentation
Anton Korobeynikov [Mon, 8 Sep 2008 14:23:34 +0000 (14:23 +0000)]
Unbreak and fix indentation

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

16 years agoTestcase for 64-bit lowering of eh_return & unwind_init
Anton Korobeynikov [Mon, 8 Sep 2008 14:23:16 +0000 (14:23 +0000)]
Testcase for 64-bit lowering of eh_return & unwind_init

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

16 years agoAdd test for checking proper lowering of eh_return & unwind init intrinsics on 32bit...
Anton Korobeynikov [Mon, 8 Sep 2008 14:22:57 +0000 (14:22 +0000)]
Add test for checking proper lowering of eh_return & unwind init intrinsics on 32bit x86 targets

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

16 years agoDrop unused variable
Anton Korobeynikov [Mon, 8 Sep 2008 14:22:38 +0000 (14:22 +0000)]
Drop unused variable

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

16 years agoWe do support EH on x86-64!
Anton Korobeynikov [Mon, 8 Sep 2008 14:22:16 +0000 (14:22 +0000)]
We do support EH on x86-64!

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

16 years agoFirst draft of EH support on x86/64-linux
Anton Korobeynikov [Mon, 8 Sep 2008 14:21:53 +0000 (14:21 +0000)]
First draft of EH support on x86/64-linux

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

16 years agoImplement FRAME_TO_ARGS_OFFSET for x86-64
Anton Korobeynikov [Mon, 8 Sep 2008 14:21:10 +0000 (14:21 +0000)]
Implement FRAME_TO_ARGS_OFFSET for x86-64

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

16 years agoAdd testcase from bug 2770.
Rafael Espindola [Mon, 8 Sep 2008 11:17:54 +0000 (11:17 +0000)]
Add testcase from bug 2770.

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

16 years agoUpdate the callgraph correctly.
Duncan Sands [Mon, 8 Sep 2008 11:08:09 +0000 (11:08 +0000)]
Update the callgraph correctly.

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

16 years agoUpdate the callgraph correctly in ArgumentPromotion.
Duncan Sands [Mon, 8 Sep 2008 11:07:35 +0000 (11:07 +0000)]
Update the callgraph correctly in ArgumentPromotion.

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

16 years agoReapply 55859. This doesn't change anything as
Duncan Sands [Mon, 8 Sep 2008 11:05:51 +0000 (11:05 +0000)]
Reapply 55859.  This doesn't change anything as
long as the callgraph is correct.  It checks
for wrong callgraphs more strictly.

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

16 years agoCorrectly handle physical register inputs. They are not explicit input operands in...
Evan Cheng [Mon, 8 Sep 2008 08:39:33 +0000 (08:39 +0000)]
Correctly handle physical register inputs. They are not explicit input operands in the resulting machine instrs.

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

16 years agoAdd fast isel physical register definition support.
Evan Cheng [Mon, 8 Sep 2008 08:38:20 +0000 (08:38 +0000)]
Add fast isel physical register definition support.

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

16 years agoAdd support to extend call operands when needed. Enable x86 fastisel call support.
Evan Cheng [Mon, 8 Sep 2008 06:35:17 +0000 (06:35 +0000)]
Add support to extend call operands when needed. Enable x86 fastisel call support.

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

16 years agoRevert my previous change -- the subtraction of two constants was a no-op
Bill Wendling [Mon, 8 Sep 2008 01:56:32 +0000 (01:56 +0000)]
Revert my previous change -- the subtraction of two constants was a no-op
before. This is taken care of in the selection DAG pass. In my opinion, this
should be in one place or the other. I.e., it should probably be removed from
the DAG combiner (along with the other arithmetic transformations on constants
that are essentially no-ops).

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

16 years agoConvert
Bill Wendling [Sun, 7 Sep 2008 11:34:47 +0000 (11:34 +0000)]
Convert

    // fold (sub c1, c2) -> c1-c2

from a no-op into an actual transformation.

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

16 years agoClean up CSS validator errors: 'Property align doesn't exist : center'
Bill Wendling [Sun, 7 Sep 2008 10:29:20 +0000 (10:29 +0000)]
Clean up CSS validator errors: 'Property align doesn't exist : center'

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

16 years agoFormatting changes. to make the information cleaner.
Bill Wendling [Sun, 7 Sep 2008 10:26:33 +0000 (10:26 +0000)]
Formatting changes. to make the information cleaner.

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

16 years agoCorrect a comment and strip trailing whitespace.
Duncan Sands [Sun, 7 Sep 2008 09:54:09 +0000 (09:54 +0000)]
Correct a comment and strip trailing whitespace.

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

16 years agoInitial fastisel call support for C, Fast, and X86_FastCall calling conventions....
Evan Cheng [Sun, 7 Sep 2008 09:09:33 +0000 (09:09 +0000)]
Initial fastisel call support for C, Fast, and X86_FastCall calling conventions. It's meant to handle "simple" calls, i.e. no byval, structret, etc. It doesn't support multi-result returns either.

Not yet turned on, it needs to support sext / zext of arguments and result.

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

16 years agoSome code clean up.
Evan Cheng [Sun, 7 Sep 2008 09:07:23 +0000 (09:07 +0000)]
Some code clean up.

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

16 years agoIndentation.
Evan Cheng [Sun, 7 Sep 2008 09:04:52 +0000 (09:04 +0000)]
Indentation.

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

16 years ago- Doh. Pass vector by value is bad.
Evan Cheng [Sun, 7 Sep 2008 09:02:18 +0000 (09:02 +0000)]
- Doh. Pass vector by value is bad.
- Add a AnalyzeCallResult specialized for calls which produce a single value. This is used by fastisel.

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

16 years agoEliminate a compile time warning.
Evan Cheng [Sun, 7 Sep 2008 09:00:57 +0000 (09:00 +0000)]
Eliminate a compile time warning.

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

16 years agoHandle x86 truncate to i8 with target hook for now.
Evan Cheng [Sun, 7 Sep 2008 08:47:42 +0000 (08:47 +0000)]
Handle x86 truncate to i8 with target hook for now.

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

16 years agoFix indentation of generated code.
Evan Cheng [Sun, 7 Sep 2008 08:23:06 +0000 (08:23 +0000)]
Fix indentation of generated code.

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

16 years agoIgnore multi-instruction patterns. e.g.
Evan Cheng [Sun, 7 Sep 2008 08:19:51 +0000 (08:19 +0000)]
Ignore multi-instruction patterns. e.g.
def : Pat<(i8 (trunc GR32:$src)),
          (i8 (EXTRACT_SUBREG (MOV32to32_ GR32:$src), x86_subreg_8bit))>

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

16 years agofix crash when the malloc/free function is defined or is a declaration with 0 parameters.
Nuno Lopes [Sat, 6 Sep 2008 17:44:06 +0000 (17:44 +0000)]
fix crash when the malloc/free function is defined or is a declaration with 0 parameters.
this pass doesnt seem to be used, but still it's now a little more correct

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

16 years agoWhen PruneEH turned an invoke into an ordinary
Duncan Sands [Sat, 6 Sep 2008 17:19:29 +0000 (17:19 +0000)]
When PruneEH turned an invoke into an ordinary
call (thus changing the call site) it didn't
inform the callgraph about this.  But the
call site does matter - as shown by the testcase,
the callgraph become invalid after the inliner
ran (with an edge between two functions simply
missing), resulting in wrong deductions by
GlobalsModRef.

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

16 years agoFix constant pool loads, and remove broken versions of addConstantPoolReference.
Owen Anderson [Sat, 6 Sep 2008 01:11:01 +0000 (01:11 +0000)]
Fix constant pool loads, and remove broken versions of addConstantPoolReference.

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

16 years agoFix the X86 addConstantPoolReference, which had the operands in the wrong order.
Owen Anderson [Sat, 6 Sep 2008 00:50:00 +0000 (00:50 +0000)]
Fix the X86 addConstantPoolReference, which had the operands in the wrong order.

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

16 years agoNext limited float precision expansion (log2 12 bits)
Dale Johannesen [Fri, 5 Sep 2008 23:49:37 +0000 (23:49 +0000)]
Next limited float precision expansion (log2 12 bits)

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

16 years agoRevert r55859. This is breaking the build in the abscence of its companion commit.
Owen Anderson [Fri, 5 Sep 2008 23:36:01 +0000 (23:36 +0000)]
Revert r55859.  This is breaking the build in the abscence of its companion commit.

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

16 years agoFix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x
Eli Friedman [Fri, 5 Sep 2008 23:07:03 +0000 (23:07 +0000)]
Fix for PR2687: Add patterns to match sint_to_fp and fp_to_sint for <2 x
i32>.  This is a little messy, but it works.

We should really get rid of the intrinsics, though, since they map
perfectly well to standard LLVM instructions.

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

16 years agoMove the code that inserts copies for function livein registers
Dan Gohman [Fri, 5 Sep 2008 22:59:21 +0000 (22:59 +0000)]
Move the code that inserts copies for function livein registers
out of ScheduleDAGEmit.cpp and into SelectionDAGISel.cpp. This
allows it to be run exactly once per function, even if multiple
SelectionDAG iterations happen in the entry block, as may happen
with FastISel.

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

16 years agoRemove unused map.
Devang Patel [Fri, 5 Sep 2008 21:55:33 +0000 (21:55 +0000)]
Remove unused map.

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

16 years agoMark math lib intrinsics readonly, on the grounds
Dale Johannesen [Fri, 5 Sep 2008 21:49:30 +0000 (21:49 +0000)]
Mark math lib intrinsics readonly, on the grounds
that they read the rounding mode.  This is conservatively
correct, which they weren't before.  We can do more
optimization on these if we actually model the rounding
mode.

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

16 years agoDelete the removeCallEdgeTo callgraph method,
Duncan Sands [Fri, 5 Sep 2008 21:43:04 +0000 (21:43 +0000)]
Delete the removeCallEdgeTo callgraph method,
because it does not maintain a correct list
of callsites.  I discovered (see following
commit) that the inliner will create a wrong
callgraph if it is fed a callgraph with
correct edges but incorrect callsites.  These
were created by Prune-EH, and while it wasn't
done via removeCallEdgeTo, it could have been
done via removeCallEdgeTo, which is an accident
waiting to happen.  Use removeCallEdgeFor
instead.

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

16 years agoPrevent our own passes from promoting this to
Duncan Sands [Fri, 5 Sep 2008 21:34:32 +0000 (21:34 +0000)]
Prevent our own passes from promoting this to
readonly.

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

16 years agoFix X86FastISel's shift and select code to reject illegal types.
Dan Gohman [Fri, 5 Sep 2008 21:27:34 +0000 (21:27 +0000)]
Fix X86FastISel's shift and select code to reject illegal types.

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

16 years agoAdd the next limited-precision expansion.
Dale Johannesen [Fri, 5 Sep 2008 21:27:19 +0000 (21:27 +0000)]
Add the next limited-precision expansion.

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

16 years agoFix the opcodes used by X86FastISel for shifts and conditional moves.
Dan Gohman [Fri, 5 Sep 2008 21:13:04 +0000 (21:13 +0000)]
Fix the opcodes used by X86FastISel for shifts and conditional moves.

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

16 years agoFactor out code that emits load and store instructions.
Evan Cheng [Fri, 5 Sep 2008 21:00:03 +0000 (21:00 +0000)]
Factor out code that emits load and store instructions.

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

16 years agoRename method.
Owen Anderson [Fri, 5 Sep 2008 20:49:33 +0000 (20:49 +0000)]
Rename method.

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

16 years agoFix test.
Evan Cheng [Fri, 5 Sep 2008 20:04:37 +0000 (20:04 +0000)]
Fix test.

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

16 years agoFastISel support for AND and OR with type i1.
Dan Gohman [Fri, 5 Sep 2008 18:44:22 +0000 (18:44 +0000)]
FastISel support for AND and OR with type i1.

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

16 years agoAdd hooks for other intrinsics to get low-precision expansions.
Dale Johannesen [Fri, 5 Sep 2008 18:38:42 +0000 (18:38 +0000)]
Add hooks for other intrinsics to get low-precision expansions.

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

16 years agoX86FastISel support for shifts and conditional moves.
Dan Gohman [Fri, 5 Sep 2008 18:30:08 +0000 (18:30 +0000)]
X86FastISel support for shifts and conditional moves.

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

16 years agoFastISel support for ConstantExprs.
Dan Gohman [Fri, 5 Sep 2008 18:18:20 +0000 (18:18 +0000)]
FastISel support for ConstantExprs.

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

16 years agoRevert r55817. It broke PIC. FastISel will need to find a different
Dan Gohman [Fri, 5 Sep 2008 18:13:01 +0000 (18:13 +0000)]
Revert r55817. It broke PIC. FastISel will need to find a different
approach here.

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