oota-llvm.git
14 years agoAdd encoding for moving a value between two ARM core registers and a doublework
Bill Wendling [Wed, 20 Oct 2010 23:37:40 +0000 (23:37 +0000)]
Add encoding for moving a value between two ARM core registers and a doublework
extension register.

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

14 years agoRemember to keep track of rematted values.
Jakob Stoklund Olesen [Wed, 20 Oct 2010 22:50:42 +0000 (22:50 +0000)]
Remember to keep track of rematted values.

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

14 years agoAdd encodings for movement between ARM core registers and single-precision
Bill Wendling [Wed, 20 Oct 2010 22:44:54 +0000 (22:44 +0000)]
Add encodings for movement between ARM core registers and single-precision
registers.

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

14 years agoMemdep says that an instruction clobbers itself
Dan Gohman [Wed, 20 Oct 2010 22:37:41 +0000 (22:37 +0000)]
Memdep says that an instruction clobbers itself
when it means there is no specific clobber instruction.

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

14 years agoAttempt to fix valgrind complaining about (benign) leaks in pass registration by...
Owen Anderson [Wed, 20 Oct 2010 22:22:30 +0000 (22:22 +0000)]
Attempt to fix valgrind complaining about (benign) leaks in pass registration by having PassRegistry
delete PassInfo objects that were created using new-style initialization.

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

14 years agoFactor out the main aliasing check into a separate function.
Dan Gohman [Wed, 20 Oct 2010 22:11:14 +0000 (22:11 +0000)]
Factor out the main aliasing check into a separate function.

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

14 years agoAdd some comments.
Dan Gohman [Wed, 20 Oct 2010 22:04:02 +0000 (22:04 +0000)]
Add some comments.

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

14 years agoMore accurate estimate / tracking of register pressure.
Evan Cheng [Wed, 20 Oct 2010 22:03:58 +0000 (22:03 +0000)]
More accurate estimate / tracking of register pressure.
- Initial register pressure in the loop should be all the live defs into the
  loop. Not just those from loop preheader which is often empty.
- When an instruction is hoisted, update register pressure from loop preheader
  to the original BB.
- Treat only use of a virtual register as kill since the code is still SSA.

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

14 years agoFix crash introduced in 116852. 8573915.
Dale Johannesen [Wed, 20 Oct 2010 22:03:37 +0000 (22:03 +0000)]
Fix crash introduced in 116852.  8573915.

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

14 years agoFix comments; the type graph is currently a tree, not a DAG.
Dan Gohman [Wed, 20 Oct 2010 22:02:58 +0000 (22:02 +0000)]
Fix comments; the type graph is currently a tree, not a DAG.

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

14 years agoCut unneeded global variable.
Jason W Kim [Wed, 20 Oct 2010 22:01:39 +0000 (22:01 +0000)]
Cut unneeded global variable.

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

14 years agoMove some of the InlineSpiller rematerialization code into LiveRangeEdit.
Jakob Stoklund Olesen [Wed, 20 Oct 2010 22:00:51 +0000 (22:00 +0000)]
Move some of the InlineSpiller rematerialization code into LiveRangeEdit.

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

14 years agoRemove Synthesizable from the Type system; as MMX vector
Dale Johannesen [Wed, 20 Oct 2010 21:32:10 +0000 (21:32 +0000)]
Remove Synthesizable from the Type system; as MMX vector
types are no longer Legal on X86, we don't need it.
No functional change.  8499854.

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

14 years agoWhen SimpleRegisterCoalescing is trimming kill flags on a physical register
Jakob Stoklund Olesen [Wed, 20 Oct 2010 18:45:55 +0000 (18:45 +0000)]
When SimpleRegisterCoalescing is trimming kill flags on a physical register
operand, also check if subregisters are killed.

Add <imp-def> operands for subregisters that remain alive after a super register
is killed.

I don't have a testcase for this that reproduces on trunk. <rdar://problem/8441758>

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

14 years agoHandle _GLOBAL_OFFSET_TABLE_ correctly.
Rafael Espindola [Wed, 20 Oct 2010 16:46:08 +0000 (16:46 +0000)]
Handle _GLOBAL_OFFSET_TABLE_ correctly.

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

14 years agoUse C++03...
Michael J. Spencer [Wed, 20 Oct 2010 16:00:45 +0000 (16:00 +0000)]
Use C++03...

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

14 years agoSystem-Win32/Path: Fix incorrect assumption in isValid.
Michael J. Spencer [Wed, 20 Oct 2010 15:23:58 +0000 (15:23 +0000)]
System-Win32/Path: Fix incorrect assumption in isValid.

A recent commit to clang exposed a bug in the Win32 Path code. This is a
minimal fix for it.

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

14 years agoAdd a comment about ATTRIBUTE_UNUSED to avoid further confusion over when to
Chandler Carruth [Wed, 20 Oct 2010 08:44:27 +0000 (08:44 +0000)]
Add a comment about ATTRIBUTE_UNUSED to avoid further confusion over when to
use it.

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

14 years agoRemove remaining uses of ATTRIBUTE_UNUSED on variables, and delete three
Chandler Carruth [Wed, 20 Oct 2010 08:27:02 +0000 (08:27 +0000)]
Remove remaining uses of ATTRIBUTE_UNUSED on variables, and delete three
#includes in the process.

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

14 years agoFix a TODO by removing some unnecesary copies.
Eric Christopher [Wed, 20 Oct 2010 08:02:24 +0000 (08:02 +0000)]
Fix a TODO by removing some unnecesary copies.

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

14 years agoRecord sysbols created by aliases. Fixes PR8414.
Rafael Espindola [Wed, 20 Oct 2010 04:57:22 +0000 (04:57 +0000)]
Record sysbols created by aliases. Fixes PR8414.

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

14 years agoAdd ATTRIBUTE_UNUSED for -Asserts.
NAKAMURA Takumi [Wed, 20 Oct 2010 04:05:29 +0000 (04:05 +0000)]
Add ATTRIBUTE_UNUSED for -Asserts.

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

14 years agoAdd RegionPass support.
Tobias Grosser [Wed, 20 Oct 2010 01:54:44 +0000 (01:54 +0000)]
Add RegionPass support.

A RegionPass is executed like a LoopPass but on the regions detected by the
RegionInfo pass instead of the loops detected by the LoopInfo pass.

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

14 years agoFix CMake build
Douglas Gregor [Wed, 20 Oct 2010 01:36:56 +0000 (01:36 +0000)]
Fix CMake build

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

14 years agoAdd a way to emit StringSwitch of clang attribute spellings.
Anders Carlsson [Wed, 20 Oct 2010 01:21:53 +0000 (01:21 +0000)]
Add a way to emit StringSwitch of clang attribute spellings.

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

14 years agoFix backwards conditional.
Jim Grosbach [Wed, 20 Oct 2010 01:10:01 +0000 (01:10 +0000)]
Fix backwards conditional.

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

14 years agoMake CodeGen TBAA-aware.
Dan Gohman [Wed, 20 Oct 2010 00:31:05 +0000 (00:31 +0000)]
Make CodeGen TBAA-aware.

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

14 years agoAdd dynamic realignment when rematerializing the base register.
Jim Grosbach [Wed, 20 Oct 2010 00:02:50 +0000 (00:02 +0000)]
Add dynamic realignment when rematerializing the base register.

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

14 years agoNuke a commented out bit that got missed a while back.
Jim Grosbach [Tue, 19 Oct 2010 23:48:47 +0000 (23:48 +0000)]
Nuke a commented out bit that got missed a while back.

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

14 years agoSpelling typo fix. s/incput/input/. Thanks, Bob!
Jim Grosbach [Tue, 19 Oct 2010 23:39:23 +0000 (23:39 +0000)]
Spelling typo fix. s/incput/input/. Thanks, Bob!

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

14 years agoAdd a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
Jim Grosbach [Tue, 19 Oct 2010 23:27:08 +0000 (23:27 +0000)]
Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268

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

14 years agoMove NoAA out of BasicAliasAnalysis.cpp into its own file, now that
Dan Gohman [Tue, 19 Oct 2010 23:09:08 +0000 (23:09 +0000)]
Move NoAA out of BasicAliasAnalysis.cpp into its own file, now that
it doesn't have a special relationship with BasicAliasAnalysis
anymore.

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

14 years agoReapply r116831 and r116839, converting AliasAnalysis to use
Dan Gohman [Tue, 19 Oct 2010 22:54:46 +0000 (22:54 +0000)]
Reapply r116831 and r116839, converting AliasAnalysis to use
uint64_t, plus fixes for places I missed before.

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

14 years agoExtend StringRef's edit-distance algorithm to permit an upper bound on the allowed...
Douglas Gregor [Tue, 19 Oct 2010 22:13:48 +0000 (22:13 +0000)]
Extend StringRef's edit-distance algorithm to permit an upper bound on the allowed edit distance

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

14 years agoUpdate comments to remove obsolete references.
Jim Grosbach [Tue, 19 Oct 2010 21:34:47 +0000 (21:34 +0000)]
Update comments to remove obsolete references.

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

14 years agoRevert r116831 and r116839, which are breaking selfhost builds.
Dan Gohman [Tue, 19 Oct 2010 21:06:16 +0000 (21:06 +0000)]
Revert r116831 and r116839, which are breaking selfhost builds.

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

14 years agoShrink MachineOperand from 40 to 32 bytes on 64-bit hosts.
Jakob Stoklund Olesen [Tue, 19 Oct 2010 20:56:32 +0000 (20:56 +0000)]
Shrink MachineOperand from 40 to 32 bytes on 64-bit hosts.

Pull an unsigned out of the Contents union such that it has the same size as two
pointers and no padding.

Arrange members such that the Contents union and all pointers can be 8-byte
aligned without padding.

This speeds up code generation by 0.8% on a 64-bit host. 32-bit hosts should be
unaffected.

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

14 years agoPasses do not need to recursively initialize passes that they preserve, if
Owen Anderson [Tue, 19 Oct 2010 20:08:44 +0000 (20:08 +0000)]
Passes do not need to recursively initialize passes that they preserve, if
they do not also require them.  This allows us to reduce inter-pass linkage
dependencies.

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

14 years agoEnable using vdup for vector constants which are splat of
Dale Johannesen [Tue, 19 Oct 2010 20:00:17 +0000 (20:00 +0000)]
Enable using vdup for vector constants which are splat of
integers by default, and remove the controlling flag, now
that LICM will hoist such vdup's.  8003375.

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

14 years agoRemove extraneous slash.
Owen Anderson [Tue, 19 Oct 2010 19:54:48 +0000 (19:54 +0000)]
Remove extraneous slash.

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

14 years agoSmall cleanups and fixes in preparation for fixing _GLOBAL_OFFSET_TABLE_.
Rafael Espindola [Tue, 19 Oct 2010 19:31:37 +0000 (19:31 +0000)]
Small cleanups and fixes in preparation for fixing _GLOBAL_OFFSET_TABLE_.

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

14 years agoRe-enable register pressure aware machine licm with fixes. Hoist() may have
Evan Cheng [Tue, 19 Oct 2010 18:58:51 +0000 (18:58 +0000)]
Re-enable register pressure aware machine licm with fixes. Hoist() may have
erased the instruction during LICM so UpdateRegPressureAfter() should not
reference it afterwards.

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

14 years agoOops, check in all the files for converting AliasAnalysis to
Dan Gohman [Tue, 19 Oct 2010 18:08:27 +0000 (18:08 +0000)]
Oops, check in all the files for converting AliasAnalysis to
use uint64_t.

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

14 years agounittests: Use the correct defines and global variables when building on CMake.
Michael J. Spencer [Tue, 19 Oct 2010 18:04:19 +0000 (18:04 +0000)]
unittests: Use the correct defines and global variables when building on CMake.

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

14 years agoFix VC2010 build.
Michael J. Spencer [Tue, 19 Oct 2010 18:04:06 +0000 (18:04 +0000)]
Fix VC2010 build.

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

14 years agoFactor out the call-once implementation into its own macro.
Owen Anderson [Tue, 19 Oct 2010 18:02:06 +0000 (18:02 +0000)]
Factor out the call-once implementation into its own macro.

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

14 years agoChange AliasAnalysis and its clients to use uint64_t instead of unsigned
Dan Gohman [Tue, 19 Oct 2010 18:00:02 +0000 (18:00 +0000)]
Change AliasAnalysis and its clients to use uint64_t instead of unsigned
for representing object sizes, for consistency with other parts of LLVM.

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

14 years agoFixing r116753 r116756 r116777
Jason W Kim [Tue, 19 Oct 2010 17:39:10 +0000 (17:39 +0000)]
Fixing r116753 r116756 r116777
The failures in r116753 r116756 were caused by a python issue -
Python likes to append 'L' suffix to stringified numbers if the number
is larger than a machine int. Unfortunately, this causes a divergence of
behavior between 32 and 64 bit python versions.

I re-crafted elf-dump/common_dump to take care of these issues by:

1. always printing 0x (makes for easy sed/regex)
2. always print fixed length (exactly 2 + numBits/4 digits long)
   by mod ((2^numBits) - 1)
3. left-padded with '0'

There is a residual common routine that is also used by
macho-dump (dataToHex) , so I left the 'section_data' test values alone.

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

14 years agoGet rid of static constructors for pass registration. Instead, every pass exposes...
Owen Anderson [Tue, 19 Oct 2010 17:21:58 +0000 (17:21 +0000)]
Get rid of static constructors for pass registration.  Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.

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

14 years agoRevert r116781 "- Add a hook for target to determine whether an instruction def
Daniel Dunbar [Tue, 19 Oct 2010 17:14:24 +0000 (17:14 +0000)]
Revert r116781 "- Add a hook for target to determine whether an instruction def
is", which breaks some nightly tests.

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

14 years agoConsistently use AliasAnalysis::UnknownSize instead of hardcoding ~0u.
Dan Gohman [Tue, 19 Oct 2010 17:06:23 +0000 (17:06 +0000)]
Consistently use AliasAnalysis::UnknownSize instead of hardcoding ~0u.

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

14 years agoGlobalOpt: EvaluateFunction() must not evaluate stores to weak_odr globals.
Mikhail Glushenkov [Tue, 19 Oct 2010 16:47:23 +0000 (16:47 +0000)]
GlobalOpt: EvaluateFunction() must not evaluate stores to weak_odr globals.

Fixes PR8389.

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

14 years agoTrailing whitespace.
Mikhail Glushenkov [Tue, 19 Oct 2010 16:47:15 +0000 (16:47 +0000)]
Trailing whitespace.

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

14 years agoAdd svn:ignore
Che-Liang Chiou [Tue, 19 Oct 2010 13:46:32 +0000 (13:46 +0000)]
Add svn:ignore

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

14 years agoAdd svn:ignore to lib/Target/PTX/
Che-Liang Chiou [Tue, 19 Oct 2010 13:28:18 +0000 (13:28 +0000)]
Add svn:ignore to lib/Target/PTX/

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

14 years agoAdd test case mov.ll for PTX device function
Che-Liang Chiou [Tue, 19 Oct 2010 13:21:51 +0000 (13:21 +0000)]
Add test case mov.ll for PTX device function

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

14 years agoAdd lower argument and return of device function
Che-Liang Chiou [Tue, 19 Oct 2010 13:14:40 +0000 (13:14 +0000)]
Add lower argument and return of device function

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

14 years agoFix spelling.
Bill Wendling [Tue, 19 Oct 2010 10:18:23 +0000 (10:18 +0000)]
Fix spelling.

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

14 years agoFirst step to allowing the resource directory of Clang to be adjusted for
Chandler Carruth [Tue, 19 Oct 2010 08:21:25 +0000 (08:21 +0000)]
First step to allowing the resource directory of Clang to be adjusted for
strange packaging environments. The primary result of this is to expose
a (normally empty) CLANG_RESOURCE_DIR string in the autoconf and CMake builds.
This will in turn be used by a subsequent commit to Clang.

Regenerated configure and config.h.in thanks to Nick. =D

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

14 years agoX86: Add MS-CRT libcalls.
Michael J. Spencer [Tue, 19 Oct 2010 07:32:52 +0000 (07:32 +0000)]
X86: Add MS-CRT libcalls.

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

14 years agoFix Whitespace.
Michael J. Spencer [Tue, 19 Oct 2010 07:32:42 +0000 (07:32 +0000)]
Fix Whitespace.

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

14 years agolib/CodeGen/TargetLoweringObjectFileImpl.cpp: Tweak to emit ".{section}${name}" inste...
NAKAMURA Takumi [Tue, 19 Oct 2010 03:24:42 +0000 (03:24 +0000)]
lib/CodeGen/TargetLoweringObjectFileImpl.cpp: Tweak to emit ".{section}${name}" instead of ".{section}$linkonce_{name}" for linkonce sections.

It seems GNU ld/PECOFF relies on section names, linking with g++'s libstdc++.a would fail.

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

14 years agoFix for machine licm assert: RCCost <= RegPressure[RCId]
Andrew Trick [Tue, 19 Oct 2010 02:50:50 +0000 (02:50 +0000)]
Fix for machine licm assert: RCCost <= RegPressure[RCId]
in MultiSource/Benchmarks/VersaBench/beamformer/beamformer.
SmallSet.insert returns true if the element is inserted.

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

14 years agoFix PR8300 by remembering to keep the bitcast in all cases.
Rafael Espindola [Tue, 19 Oct 2010 02:02:57 +0000 (02:02 +0000)]
Fix PR8300 by remembering to keep the bitcast in all cases.

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

14 years agolib/System/Win32/ThreadLocal.inc: Suppress "unused" warning on -Asserts.
NAKAMURA Takumi [Tue, 19 Oct 2010 01:22:01 +0000 (01:22 +0000)]
lib/System/Win32/ThreadLocal.inc: Suppress "unused" warning on -Asserts.

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

14 years agolib/Support/raw_ostream.cpp: Fix Cygwin's build.
NAKAMURA Takumi [Tue, 19 Oct 2010 01:21:55 +0000 (01:21 +0000)]
lib/Support/raw_ostream.cpp: Fix Cygwin's build.

setmode is provided by io.h on Cygwin.

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

14 years ago- Add a hook for target to determine whether an instruction def is
Evan Cheng [Tue, 19 Oct 2010 00:55:07 +0000 (00:55 +0000)]
- Add a hook for target to determine whether an instruction def is
  "long latency" enough to hoist even if it may increase spilling. Reloading
  a value from spill slot is often cheaper than performing an expensive
  computation in the loop. For X86, that means machine LICM will hoist
  SQRT, DIV, etc. ARM will be somewhat aggressive with VFP and NEON
  instructions.
- Enable register pressure aware machine LICM by default.

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

14 years agoMove the definition of this to the source file to anchor the vtable.
Chandler Carruth [Tue, 19 Oct 2010 00:37:30 +0000 (00:37 +0000)]
Move the definition of this to the source file to anchor the vtable.

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

14 years agoSpeculatively revert 116753 and 116756 to attempt to fix the bots.
Eric Christopher [Tue, 19 Oct 2010 00:19:49 +0000 (00:19 +0000)]
Speculatively revert 116753 and 116756 to attempt to fix the bots.

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

14 years agoSupport alignment for NEON vld-lane and vst-lane instructions.
Bob Wilson [Tue, 19 Oct 2010 00:16:32 +0000 (00:16 +0000)]
Support alignment for NEON vld-lane and vst-lane instructions.

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

14 years agoAdded a few tweaks to the Intel Descriptor-table support instructions to allow
Kevin Enderby [Tue, 19 Oct 2010 00:01:44 +0000 (00:01 +0000)]
Added a few tweaks to the Intel Descriptor-table support instructions to allow
word forms and suffixed versions to match the darwin assembler in 32-bit and
64-bit modes.  This is again for use just with assembly source for llvm-mc .

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

14 years agoARM encoding information for [SU]SAT* instructions.
Jim Grosbach [Mon, 18 Oct 2010 23:35:38 +0000 (23:35 +0000)]
ARM encoding information for [SU]SAT* instructions.

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

14 years agoMake the representation of AliasSets explicitly differentiate
Dan Gohman [Mon, 18 Oct 2010 23:31:47 +0000 (23:31 +0000)]
Make the representation of AliasSets explicitly differentiate
between "not known yet" and "known no tbaa info" so that it
can merge them properly.

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

14 years agoAdd a virtual destructor to silence a GCC warning.
Chandler Carruth [Mon, 18 Oct 2010 23:18:51 +0000 (23:18 +0000)]
Add a virtual destructor to silence a GCC warning.

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

14 years agoRevert r116220 - thus turning arm fast isel back on by default.
Eric Christopher [Mon, 18 Oct 2010 22:53:53 +0000 (22:53 +0000)]
Revert r116220 - thus turning arm fast isel back on by default.

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

14 years agoGet rid of unneeded FormatOutput global variable
Jason W Kim [Mon, 18 Oct 2010 21:59:38 +0000 (21:59 +0000)]
Get rid of unneeded FormatOutput global variable

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

14 years agoCrashRecoveryContext: Add missing return, so that the signal fires after we our
Daniel Dunbar [Mon, 18 Oct 2010 21:55:18 +0000 (21:55 +0000)]
CrashRecoveryContext: Add missing return, so that the signal fires after we our
routine is off the stack. Otherwise we show up rather confusingly in the stack
trace.

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

14 years agoChanged elf-dump to output hex format by default.
Jason W Kim [Mon, 18 Oct 2010 21:32:41 +0000 (21:32 +0000)]
Changed elf-dump to output hex format by default.
Also updated tests.

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

14 years agoDon't pass the raw invalid pointer used to represent conflicting
Dan Gohman [Mon, 18 Oct 2010 21:28:00 +0000 (21:28 +0000)]
Don't pass the raw invalid pointer used to represent conflicting
TBAA information to AliasAnalysis.

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

14 years agoDon't recompute MachineRegisterInfo in the Optimize* method.
Bill Wendling [Mon, 18 Oct 2010 21:22:31 +0000 (21:22 +0000)]
Don't recompute MachineRegisterInfo in the Optimize* method.

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

14 years agoTrailing whitespace.
Mikhail Glushenkov [Mon, 18 Oct 2010 21:16:00 +0000 (21:16 +0000)]
Trailing whitespace.

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

14 years agoAdd a basic testcase for TBAA-aware LICM.
Dan Gohman [Mon, 18 Oct 2010 21:00:09 +0000 (21:00 +0000)]
Add a basic testcase for TBAA-aware LICM.

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

14 years agoImplement R_386_GOT32.
Rafael Espindola [Mon, 18 Oct 2010 20:47:21 +0000 (20:47 +0000)]
Implement R_386_GOT32.

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

14 years agoMake AliasSetTracker TBAA-aware, enabling TBAA-enabled LICM.
Dan Gohman [Mon, 18 Oct 2010 20:44:50 +0000 (20:44 +0000)]
Make AliasSetTracker TBAA-aware, enabling TBAA-enabled LICM.

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

14 years agoRelocate with .bss instead of using the symbol. Matches gas behavior.
Rafael Espindola [Mon, 18 Oct 2010 20:25:33 +0000 (20:25 +0000)]
Relocate with .bss instead of using the symbol. Matches gas behavior.

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

14 years agoReenable assert.
Rafael Espindola [Mon, 18 Oct 2010 19:33:01 +0000 (19:33 +0000)]
Reenable assert.

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

14 years agoTransfer debug loc to lowered call.
Devang Patel [Mon, 18 Oct 2010 18:53:44 +0000 (18:53 +0000)]
Transfer debug loc to lowered call.
Patch by Alexander Herz!

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

14 years agoAdd TypeBasedAliasAnalysis to the standard pass lists. Note that it
Dan Gohman [Mon, 18 Oct 2010 18:50:27 +0000 (18:50 +0000)]
Add TypeBasedAliasAnalysis to the standard pass lists. Note that it
is currently inert by default.

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

14 years agoRun tbaa before basicaa, since that's how it's expected to be used.
Dan Gohman [Mon, 18 Oct 2010 18:45:59 +0000 (18:45 +0000)]
Run tbaa before basicaa, since that's how it's expected to be used.

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

14 years agoFix BasicAA to pass TBAAInfo through to the chained analysis.
Dan Gohman [Mon, 18 Oct 2010 18:45:11 +0000 (18:45 +0000)]
Fix BasicAA to pass TBAAInfo through to the chained analysis.

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

14 years agoFor Thumb2, try to use frame pointer references for stack slots even when a
Jim Grosbach [Mon, 18 Oct 2010 18:39:46 +0000 (18:39 +0000)]
For Thumb2, try to use frame pointer references for stack slots even when a
base register is available. rdar://8525298

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

14 years agoProduce ELF::R_386_GOTPC relocations.
Rafael Espindola [Mon, 18 Oct 2010 18:36:12 +0000 (18:36 +0000)]
Produce ELF::R_386_GOTPC relocations.

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

14 years agoMake TypeBasedAliasAnalysis default to doing nothing, with a command-line
Dan Gohman [Mon, 18 Oct 2010 18:17:47 +0000 (18:17 +0000)]
Make TypeBasedAliasAnalysis default to doing nothing, with a command-line
option to enable it.

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

14 years agoUse chaining in TypeBasedAliasAnalysis::pointsToConstantMemory.
Dan Gohman [Mon, 18 Oct 2010 18:10:31 +0000 (18:10 +0000)]
Use chaining in TypeBasedAliasAnalysis::pointsToConstantMemory.

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

14 years agoMake BasicAliasAnalysis a normal AliasAnalysis implementation which
Dan Gohman [Mon, 18 Oct 2010 18:04:47 +0000 (18:04 +0000)]
Make BasicAliasAnalysis a normal AliasAnalysis implementation which
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.

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

14 years agoMake the bots happy.
Rafael Espindola [Mon, 18 Oct 2010 18:03:28 +0000 (18:03 +0000)]
Make the bots happy.

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

14 years agoAdded a handful of x86-32 instructions that were missing so that llvm-mc would
Kevin Enderby [Mon, 18 Oct 2010 17:04:36 +0000 (17:04 +0000)]
Added a handful of x86-32 instructions that were missing so that llvm-mc would
be more complete.  These are only expected to be used by llvm-mc with assembly
source so there is no pattern, [], in the .td files.  Most are being added to
X86InstrInfo.td as Chris suggested and only comments about register uses are
added.  Suggestions welcome on the .td changes as I'm not sure on every detail
of the x86 records.  More missing instructions will be coming.

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

14 years agoProduce a R_386_PLT32 when needed. Moved the default cases of switches to the
Rafael Espindola [Mon, 18 Oct 2010 16:58:03 +0000 (16:58 +0000)]
Produce a R_386_PLT32 when needed. Moved the default cases of switches to the
start for consistency.

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

14 years agoARM addrmode4 instructions (ldm, stm and friends) can't encode an immediate
Jim Grosbach [Mon, 18 Oct 2010 16:48:59 +0000 (16:48 +0000)]
ARM addrmode4 instructions (ldm, stm and friends) can't encode an immediate
offset for stack references. Make sure we take that into account when
deciding whether to reserver an emergency spill slot for the register
scavenger. rdar://8559625

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

14 years agoGrammar tweak.
Jim Grosbach [Mon, 18 Oct 2010 16:38:50 +0000 (16:38 +0000)]
Grammar tweak.

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