OSDN Git Service

android-x86/external-llvm.git
16 years agoupdate svn:ignore
Nuno Lopes [Fri, 3 Oct 2008 18:13:54 +0000 (18:13 +0000)]
update svn:ignore

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

16 years agoNew test case.
Evan Cheng [Fri, 3 Oct 2008 18:12:59 +0000 (18:12 +0000)]
New test case.

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

16 years agoUse -1ULL instead of uint64_t(-1), at Anton's suggestion.
Dan Gohman [Fri, 3 Oct 2008 17:56:45 +0000 (17:56 +0000)]
Use -1ULL instead of uint64_t(-1), at Anton's suggestion.

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

16 years agoVerify function attributes.
Devang Patel [Fri, 3 Oct 2008 17:50:00 +0000 (17:50 +0000)]
Verify function attributes.

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

16 years agoFix typos pointed out by Duncan. Also untabify these files.
Evan Cheng [Fri, 3 Oct 2008 17:11:58 +0000 (17:11 +0000)]
Fix typos pointed out by Duncan. Also untabify these files.

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

16 years agoUnbreak build.
Daniel Dunbar [Fri, 3 Oct 2008 17:11:57 +0000 (17:11 +0000)]
Unbreak build.

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

16 years agoAvoid creating two TargetLowering objects for each target.
Dan Gohman [Fri, 3 Oct 2008 16:55:19 +0000 (16:55 +0000)]
Avoid creating two TargetLowering objects for each target.
Instead, just create one, and make sure everything that needs
it can access it. Previously most of the SelectionDAGISel
subclasses all had their own TargetLowering object, which was
redundant with the TargetLowering object in the TargetMachine
subclasses, except on Sparc, where SparcTargetMachine
didn't have a TargetLowering object. Change Sparc to work
more like the other targets here.

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

16 years agoRemove an unused field.
Dan Gohman [Fri, 3 Oct 2008 16:17:33 +0000 (16:17 +0000)]
Remove an unused field.

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

16 years agoOn Darwin ARM, memory needs special handling to do JIT. This patch expands
Jim Grosbach [Fri, 3 Oct 2008 16:17:20 +0000 (16:17 +0000)]
On Darwin ARM, memory needs special handling to do JIT. This patch expands
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..

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

16 years agoIndexing off by one resulted in errant encoding of source register for
Jim Grosbach [Fri, 3 Oct 2008 15:53:56 +0000 (15:53 +0000)]
Indexing off by one resulted in errant encoding of source register for
reg->reg moves.

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

16 years agoNeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
Jim Grosbach [Fri, 3 Oct 2008 15:52:42 +0000 (15:52 +0000)]
NeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
for global relocations that do need them (libc calls, for example).

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

16 years agoregenerate
Nuno Lopes [Fri, 3 Oct 2008 15:52:39 +0000 (15:52 +0000)]
regenerate

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

16 years agofix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
Nuno Lopes [Fri, 3 Oct 2008 15:51:46 +0000 (15:51 +0000)]
fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()

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

16 years agoregenerate with bison 2.3
Nuno Lopes [Fri, 3 Oct 2008 15:45:58 +0000 (15:45 +0000)]
regenerate with bison 2.3

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

16 years agoSwitch the MachineOperand accessors back to the short names like
Dan Gohman [Fri, 3 Oct 2008 15:45:36 +0000 (15:45 +0000)]
Switch the MachineOperand accessors back to the short names like
isReg, etc., from isRegister, etc.

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

16 years agofix memleak in FunctionHeaderH
Nuno Lopes [Fri, 3 Oct 2008 15:44:21 +0000 (15:44 +0000)]
fix memleak in FunctionHeaderH

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

16 years agoRename llvmc2/src to llvmc2/core.
Mikhail Glushenkov [Fri, 3 Oct 2008 10:27:23 +0000 (10:27 +0000)]
Rename llvmc2/src to llvmc2/core.

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

16 years agoFix build breakage when objdir!=srcdir (proper fix).
Mikhail Glushenkov [Fri, 3 Oct 2008 10:26:37 +0000 (10:26 +0000)]
Fix build breakage when objdir!=srcdir (proper fix).

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

16 years agoFix build breakage (again) when srcdir != objdir, other small fixes.
Mikhail Glushenkov [Fri, 3 Oct 2008 09:09:34 +0000 (09:09 +0000)]
Fix build breakage (again) when srcdir != objdir, other small fixes.

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

16 years agoThe result of getSetCCResultType (eg: i32) may be larger
Duncan Sands [Fri, 3 Oct 2008 07:41:46 +0000 (07:41 +0000)]
The result of getSetCCResultType (eg: i32) may be larger
than the type an i1 is promoted to (eg: i8).  Account
for this.  Noticed by Tilmann Scheller on CellSPU; he
will hopefully take care of fixing this in LegalizeDAG
and adding a testcase!

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

16 years agoTeach internalize to preserve the callgraph.
Duncan Sands [Fri, 3 Oct 2008 07:36:09 +0000 (07:36 +0000)]
Teach internalize to preserve the callgraph.
Why?  Because it was there!

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

16 years agoAcquire the lock only when necessary. More precisely, do not acquire
Nicolas Geoffray [Fri, 3 Oct 2008 07:27:08 +0000 (07:27 +0000)]
Acquire the lock only when necessary. More precisely, do not acquire
the lock when calling a method which may materialize the llvm::Function.

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

16 years agoSplitBlock should only attempt to update LoopInfo if it is actually being used.
Owen Anderson [Fri, 3 Oct 2008 06:55:35 +0000 (06:55 +0000)]
SplitBlock should only attempt to update LoopInfo if it is actually being used.

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

16 years agoImplement fast-isel support for zero-extending from i1.
Dan Gohman [Fri, 3 Oct 2008 01:28:47 +0000 (01:28 +0000)]
Implement fast-isel support for zero-extending from i1.
It turns out that this is a fairly common operation,
and it's easy enough to handle.

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

16 years agoFix X86FastISel to handle dynamic allocas that have avoided
Dan Gohman [Fri, 3 Oct 2008 01:27:49 +0000 (01:27 +0000)]
Fix X86FastISel to handle dynamic allocas that have avoided
getting inserted into the ValueMap. This avoids infinite
recursion in some rare cases.

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

16 years agoUnbreak the build.
Bill Wendling [Fri, 3 Oct 2008 00:26:49 +0000 (00:26 +0000)]
Unbreak the build.

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

16 years agoFix a typo.
Dan Gohman [Fri, 3 Oct 2008 00:07:11 +0000 (00:07 +0000)]
Fix a typo.

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

16 years agoAdd support for Canadian Cross builds where the host executables are not
Jim Grosbach [Thu, 2 Oct 2008 22:56:44 +0000 (22:56 +0000)]
Add support for Canadian Cross builds where the host executables are not
runnable on the build machine.

There are a few bits that need built for the build environment (TableGen).
This patch builds those bits, and the associated libraries, for the build
environment as well as the (usual) host environment.

Thanks to Eric C. and Devang P. for pre-commit review.

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

16 years agoFix build breakage.
Mikhail Glushenkov [Thu, 2 Oct 2008 22:41:42 +0000 (22:41 +0000)]
Fix build breakage.

Forgot to include Makefile.plugins.

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

16 years agoOptimize conditional branches in X86FastISel. This replaces
Dan Gohman [Thu, 2 Oct 2008 22:15:21 +0000 (22:15 +0000)]
Optimize conditional branches in X86FastISel. This replaces
sequences like this:
       sete    %al
       testb   %al, %al
       jne     LBB11_1
with this:
       je      LBB11_1

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

16 years agoAdd a new MachineBasicBlock utility function, isLayoutSuccessor, that
Dan Gohman [Thu, 2 Oct 2008 22:09:09 +0000 (22:09 +0000)]
Add a new MachineBasicBlock utility function, isLayoutSuccessor, that
can be used when deciding if a block can transfer control to another
via a fall-through instead of a branch.

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

16 years agoBuild system tweaks to make it more convenient for the plugin authors.
Mikhail Glushenkov [Thu, 2 Oct 2008 21:15:05 +0000 (21:15 +0000)]
Build system tweaks to make it more convenient for the plugin authors.

Plugins can be now compiled in with a slight Makefile change.
For example, to compile the new Clang driver, use:

cd $LLVMC2_DIR
make TOOLNAME=ccc2 BUILTIN_PLUGINS=Clang

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

16 years agofix build gcc 4.3
Andrew Lenharth [Thu, 2 Oct 2008 20:15:08 +0000 (20:15 +0000)]
fix build gcc 4.3

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

16 years agoUse a multimap rather than a map for holding the list of copies to insert, so we...
Owen Anderson [Thu, 2 Oct 2008 19:40:33 +0000 (19:40 +0000)]
Use a multimap rather than a map for holding the list of copies to insert, so we don't lose copies when two of them have
the same source.  I don't know what I was thinking when I wrote this originally.
Note: There's probably a more efficient way to do this, but I need to think about it some more, and about what determinism
guarantees need to be present.

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

16 years agoHandle some 64-bit atomics on x86-32, some of the time.
Dale Johannesen [Thu, 2 Oct 2008 18:53:47 +0000 (18:53 +0000)]
Handle some 64-bit atomics on x86-32, some of the time.

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

16 years agoAvoid name shadowing with E variable defined in for(). This was giving VC++
Bill Wendling [Thu, 2 Oct 2008 18:39:11 +0000 (18:39 +0000)]
Avoid name shadowing with E variable defined in for(). This was giving VC++
grief.

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

16 years agoRemove redundant check.
Devang Patel [Thu, 2 Oct 2008 18:38:23 +0000 (18:38 +0000)]
Remove redundant check.

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

16 years agoA Partitioned Boolean Quadratic Programming (PBQP) based register allocator.
Evan Cheng [Thu, 2 Oct 2008 18:29:27 +0000 (18:29 +0000)]
A Partitioned Boolean Quadratic Programming (PBQP) based register allocator.

Contributed by Lang Hames.

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

16 years agoCMake: Added Host.cpp to lib/System/CMakeLists.txt.
Oscar Fuentes [Thu, 2 Oct 2008 17:39:29 +0000 (17:39 +0000)]
CMake: Added Host.cpp to lib/System/CMakeLists.txt.

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

16 years agoRename IRBuilder::IsNonNull -> IsNotNull in response to feedback.
Daniel Dunbar [Thu, 2 Oct 2008 17:05:03 +0000 (17:05 +0000)]
Rename IRBuilder::IsNonNull -> IsNotNull in response to feedback.

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

16 years agoFix a think-o in isSafeToMove. This fixes it from thinking that
Dan Gohman [Thu, 2 Oct 2008 15:04:30 +0000 (15:04 +0000)]
Fix a think-o in isSafeToMove. This fixes it from thinking that
volatile memory references are safe to move.

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

16 years agoWork around an interaction between fast-isel and regalloc=local. The
Dan Gohman [Thu, 2 Oct 2008 14:56:12 +0000 (14:56 +0000)]
Work around an interaction between fast-isel and regalloc=local. The
local register allocator's physreg liveness doesn't recognize subregs,
so it doesn't know that defs of %ecx that are immediately followed by
uses of %cl aren't dead. This comes up due to the way fast-isel emits
shift instructions.

This is a temporary workaround. Arguably, local regalloc should
handle subreg references correctly. On the other hand, perhaps
fast-isel should use INSERT_SUBREG instead of just assigning to the
most convenient super-register of %cl when lowering shifts.

This fixes MultiSource/Benchmarks/MallocBench/espresso,
MultiSource/Applications/hexxagon, and others, under -fast.

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

16 years ago"The original bug was a complaint that _mm_srli_si128 mis-compiled when passed
Bill Wendling [Thu, 2 Oct 2008 05:56:52 +0000 (05:56 +0000)]
"The original bug was a complaint that _mm_srli_si128 mis-compiled when passed
a constant vector ("{0x123, 0x456}" syntax).  The fix is to simplify the
_mm_srli_si128 macro, and  move the "* 8" from the macro into the compiler
back-end.  I can't change the existing __builtins because so many people are
using them :-(."
Patch by Stuart Hastings!

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

16 years agoAdd llvm::sys::{osName,osVersion} for retrieving operating system name
Daniel Dunbar [Thu, 2 Oct 2008 01:17:28 +0000 (01:17 +0000)]
Add llvm::sys::{osName,osVersion} for retrieving operating system name
& version as strings.
 - Win32 code is untested.

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

16 years agoDisable fast-isel for this test, as it doesn't emit the same
Dan Gohman [Wed, 1 Oct 2008 23:48:35 +0000 (23:48 +0000)]
Disable fast-isel for this test, as it doesn't emit the same
number of instructions.

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

16 years agoAttributes noinline alwaysinline are incompatible
Devang Patel [Wed, 1 Oct 2008 23:41:25 +0000 (23:41 +0000)]
Attributes noinline alwaysinline are incompatible

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

16 years agoRemove OptimizeForSize global. Use function attribute optsize.
Devang Patel [Wed, 1 Oct 2008 23:18:38 +0000 (23:18 +0000)]
Remove OptimizeForSize global. Use function attribute optsize.

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

16 years agoEnable FastISel by default (on x86 and x86-64) with the -fast option.
Dan Gohman [Wed, 1 Oct 2008 20:39:19 +0000 (20:39 +0000)]
Enable FastISel by default (on x86 and x86-64) with the -fast option.

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

16 years agoadd a new form of Type::dump that takes a module for type names,
Chris Lattner [Wed, 1 Oct 2008 20:16:19 +0000 (20:16 +0000)]
add a new form of Type::dump that takes a module for type names,
patch provided by Tomas Lindquist Olsen!

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

16 years agoMake some implicit conversions explicit, to avoid compiler warnings.
Dan Gohman [Wed, 1 Oct 2008 19:58:59 +0000 (19:58 +0000)]
Make some implicit conversions explicit, to avoid compiler warnings.

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

16 years agoSplit this test and move it into target-specific directories.
Dan Gohman [Wed, 1 Oct 2008 19:46:30 +0000 (19:46 +0000)]
Split this test and move it into target-specific directories.
This fixes failures on configurations that don't have one or the
other targets enabled.

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

16 years agoSplit x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.
Dan Gohman [Wed, 1 Oct 2008 18:28:06 +0000 (18:28 +0000)]
Split x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.
This allows the 64-bit forms to use+def RSP instead of ESP. This
doesn't fix any real bugs today, but it is more precise and it
makes the debug dumps on x86-64 look more consistent.

Also, add some comments describing the CALL instructions' physreg
operand uses and defs.

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

16 years agoFix typo s/ther/there/
Jim Grosbach [Wed, 1 Oct 2008 18:16:49 +0000 (18:16 +0000)]
Fix typo s/ther/there/

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

16 years agoFactorize code: remove variants of "strip off
Duncan Sands [Wed, 1 Oct 2008 15:25:41 +0000 (15:25 +0000)]
Factorize code: remove variants of "strip off
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject.  The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.

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

16 years agoFold trivial two-operand tokenfactors where the operands are equal
Dan Gohman [Wed, 1 Oct 2008 15:11:19 +0000 (15:11 +0000)]
Fold trivial two-operand tokenfactors where the operands are equal
immediately.

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

16 years agoDon't prepend a space character for constants in Value::print.
Dan Gohman [Wed, 1 Oct 2008 15:09:37 +0000 (15:09 +0000)]
Don't prepend a space character for constants in Value::print.

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

16 years agoFix typos in comments.
Dan Gohman [Wed, 1 Oct 2008 15:07:49 +0000 (15:07 +0000)]
Fix typos in comments.

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

16 years agonounwind-ify this test.
Dan Gohman [Wed, 1 Oct 2008 15:07:14 +0000 (15:07 +0000)]
nounwind-ify this test.

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

16 years agorevert the addition of Preverves(CallGraph), per Duncan's comments
Nuno Lopes [Wed, 1 Oct 2008 09:13:40 +0000 (09:13 +0000)]
revert the addition of Preverves(CallGraph), per Duncan's comments

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

16 years agoMark CALL instructions as having a Use of ESP/RSP.
Dan Gohman [Wed, 1 Oct 2008 04:14:30 +0000 (04:14 +0000)]
Mark CALL instructions as having a Use of ESP/RSP.

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

16 years agoDon't leave an output file in the test directory.
Dan Gohman [Wed, 1 Oct 2008 04:13:23 +0000 (04:13 +0000)]
Don't leave an output file in the test directory.

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

16 years agoCall ScalarEvolution's deleteValueFromRecords before deleting an
Dan Gohman [Wed, 1 Oct 2008 02:02:03 +0000 (02:02 +0000)]
Call ScalarEvolution's deleteValueFromRecords before deleting an
instruction, not after. This fixes some uses of free'd memory.

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

16 years agoMoved this option to the front-end.
Bill Wendling [Wed, 1 Oct 2008 01:02:18 +0000 (01:02 +0000)]
Moved this option to the front-end.

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

16 years agoImplement the -fno-builtin option in the front-end, not in the back-end.
Bill Wendling [Wed, 1 Oct 2008 00:59:58 +0000 (00:59 +0000)]
Implement the -fno-builtin option in the front-end, not in the back-end.

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

16 years agoUse explicit target-triples to unbreak this test on non-darwin systems.
Dan Gohman [Wed, 1 Oct 2008 00:25:38 +0000 (00:25 +0000)]
Use explicit target-triples to unbreak this test on non-darwin systems.

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

16 years agoMark merged-in VNInfo's as being PHIKilled.
Owen Anderson [Tue, 30 Sep 2008 23:58:47 +0000 (23:58 +0000)]
Mark merged-in VNInfo's as being PHIKilled.

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

16 years agoFix a simple error in renumbering kill markaers, that took an inordinant amount of...
Owen Anderson [Tue, 30 Sep 2008 22:51:54 +0000 (22:51 +0000)]
Fix a simple error in renumbering kill markaers, that took an inordinant amount of time to track down.

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

16 years agoJust don't transform this memset into "bzero" if no-builtin is specified.
Bill Wendling [Tue, 30 Sep 2008 22:05:33 +0000 (22:05 +0000)]
Just don't transform this memset into "bzero" if no-builtin is specified.

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

16 years agoadd preserversCFG() + preservers(CallGraph)
Nuno Lopes [Tue, 30 Sep 2008 22:04:30 +0000 (22:04 +0000)]
add preserversCFG() + preservers(CallGraph)

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

16 years ago- Initialize "--no-builtin" to "false".
Bill Wendling [Tue, 30 Sep 2008 21:40:30 +0000 (21:40 +0000)]
- Initialize "--no-builtin" to "false".
- Testcase for r56885.

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

16 years agoAdd the new `-no-builtin' flag. This flag is meant to mimic the GCC
Bill Wendling [Tue, 30 Sep 2008 21:22:07 +0000 (21:22 +0000)]
Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
`-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero"
instead of "__bzero" on Darwin10+. This arguably violates the meaning of this
flag, but is currently sufficient. The meaning of this flag should become more
specific over time.

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

16 years agoMove the primary fast-isel top-level comments to FastISel.cpp, where
Dan Gohman [Tue, 30 Sep 2008 20:48:29 +0000 (20:48 +0000)]
Move the primary fast-isel top-level comments to FastISel.cpp, where
they'll be a little more visible. Also, update and reword them a bit.

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

16 years agoadd AU.setPreservesCFG() since this pass only adds and removes function attributes
Nuno Lopes [Tue, 30 Sep 2008 18:34:38 +0000 (18:34 +0000)]
add AU.setPreservesCFG() since this pass only adds and removes function attributes

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

16 years agoOptimize SelectionDAG's AssignTopologicalOrder even further.
Dan Gohman [Tue, 30 Sep 2008 18:30:35 +0000 (18:30 +0000)]
Optimize SelectionDAG's AssignTopologicalOrder even further.

Completely eliminate the TopOrder std::vector. Instead, sort
the AllNodes list in place. This also eliminates the need to
call AllNodes.size(), a linear-time operation, before
performing the sort.

Also, eliminate the Sources temporary std::vector, since it
essentially duplicates the sorted result as it is being
built.

This also changes the direction of the topological sort
from bottom-up to top-down. The AllNodes list starts out in
roughly top-down order, so this reduces the amount of
reordering needed. Top-down is also more convenient for
Legalize, and ISel needed only minor adjustments.

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

16 years agoignore generated files
Nuno Lopes [Tue, 30 Sep 2008 18:15:04 +0000 (18:15 +0000)]
ignore generated files

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

16 years agoAdd runStaticConstructorsDestructors which runs ctors / dtors of a single module...
Evan Cheng [Tue, 30 Sep 2008 15:51:21 +0000 (15:51 +0000)]
Add runStaticConstructorsDestructors which runs ctors / dtors of a single module. Patch by David Chisnall.

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

16 years agoRe-apply 56835 along with header file changes.
Evan Cheng [Tue, 30 Sep 2008 15:44:16 +0000 (15:44 +0000)]
Re-apply 56835 along with header file changes.

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

16 years agoStacker is dead.
Duncan Sands [Tue, 30 Sep 2008 15:18:29 +0000 (15:18 +0000)]
Stacker is dead.

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

16 years agoRevert commit 56835 since it breaks the build.
Duncan Sands [Tue, 30 Sep 2008 10:00:30 +0000 (10:00 +0000)]
Revert commit 56835 since it breaks the build.
"If a re-materializable instruction has a register
operand, the spiller will change the register operand's
spill weight to HUGE_VAL to avoid it being spilled.
However, if the operand is already in the queue ready
to be spilled, avoid re-materializing it".

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

16 years agoIf a re-materializable instruction has a register operand, the spiller will change...
Evan Cheng [Tue, 30 Sep 2008 06:36:58 +0000 (06:36 +0000)]
If a re-materializable instruction has a register operand, the spiller will change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it.

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

16 years agoFix misoptimization of: xor i1 (icmp eq (X, C1), icmp s[lg]t (X, C2))
Nick Lewycky [Tue, 30 Sep 2008 06:08:34 +0000 (06:08 +0000)]
Fix misoptimization of:  xor i1 (icmp eq (X, C1), icmp s[lg]t (X, C2))

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

16 years agoFix X86FastISel's output for x86-32 PIC constant pool addresses.
Dan Gohman [Tue, 30 Sep 2008 01:21:32 +0000 (01:21 +0000)]
Fix X86FastISel's output for x86-32 PIC constant pool addresses.

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

16 years agoMove the GlobalBaseReg field out of X86ISelDAGToDAG.cpp
Dan Gohman [Tue, 30 Sep 2008 00:58:23 +0000 (00:58 +0000)]
Move the GlobalBaseReg field out of X86ISelDAGToDAG.cpp
and X86FastISel.cpp into X86MachineFunction.h, so that it
can be shared, instead of having each selector keep track
of its own.

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

16 years agoDisable all x87 usage, including f32 and f64 when the subtarget
Dan Gohman [Tue, 30 Sep 2008 00:48:39 +0000 (00:48 +0000)]
Disable all x87 usage, including f32 and f64 when the subtarget
doesn't have SSE(2), with X86FastISel.

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

16 years agoRemove misuse of ReplaceNodeResults for atomics with
Dale Johannesen [Mon, 29 Sep 2008 22:25:26 +0000 (22:25 +0000)]
Remove misuse of ReplaceNodeResults for atomics with
valid types.  No functional change.

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

16 years agoFix FastISel to not initialize the PIC-base register multiple times
Dan Gohman [Mon, 29 Sep 2008 21:55:50 +0000 (21:55 +0000)]
Fix FastISel to not initialize the PIC-base register multiple times
in functions with PIC references from more than one basic block.

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

16 years agoFix an over-pessimization about GlobalVariable addresses in X86FastISel.
Dan Gohman [Mon, 29 Sep 2008 21:13:15 +0000 (21:13 +0000)]
Fix an over-pessimization about GlobalVariable addresses in X86FastISel.

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

16 years agoSupport inreg, zext and sext as return value attributes.
Devang Patel [Mon, 29 Sep 2008 20:49:50 +0000 (20:49 +0000)]
Support inreg, zext and sext as return value attributes.

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

16 years agoFix grammar.
Devang Patel [Mon, 29 Sep 2008 18:34:44 +0000 (18:34 +0000)]
Fix grammar.

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

16 years agoFix grammer.
Devang Patel [Mon, 29 Sep 2008 18:16:38 +0000 (18:16 +0000)]
Fix grammer.

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

16 years agoFix sentence.
Devang Patel [Mon, 29 Sep 2008 18:16:09 +0000 (18:16 +0000)]
Fix sentence.

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

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