oota-llvm.git
15 years agoDon't setCalleeSavedInfoValid() until spills are interted.
Jakob Stoklund Olesen [Sat, 15 Aug 2009 13:10:46 +0000 (13:10 +0000)]
Don't setCalleeSavedInfoValid() until spills are interted.

In a naked function, the flag is never set and getPristineRegs() returns an
empty list. That means naked functions are able to clobber callee saved
registers, but that is the whole point of naked functions.

This fixes PR4716.

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

15 years agoAllow double defs in the machine code verifier after the addPreRegAlloc passes.
Jakob Stoklund Olesen [Sat, 15 Aug 2009 13:10:15 +0000 (13:10 +0000)]
Allow double defs in the machine code verifier after the addPreRegAlloc passes.

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

15 years agoMove XCore AsmPrinter to XCore/AsmPrinter directory.
Richard Osborne [Sat, 15 Aug 2009 12:53:15 +0000 (12:53 +0000)]
Move XCore AsmPrinter to XCore/AsmPrinter directory.

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

15 years agoAdd XFAIL testcase for setcc undef.
Jakob Stoklund Olesen [Sat, 15 Aug 2009 12:10:22 +0000 (12:10 +0000)]
Add XFAIL testcase for setcc undef.

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

15 years agoAdd XFAIL test case for a scavenger assert.
Jakob Stoklund Olesen [Sat, 15 Aug 2009 12:09:56 +0000 (12:09 +0000)]
Add XFAIL test case for a scavenger assert.

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

15 years agoAdd support for the PowerPC 64-bit SVR4 ABI.
Tilmann Scheller [Sat, 15 Aug 2009 11:54:46 +0000 (11:54 +0000)]
Add support for the PowerPC 64-bit SVR4 ABI.

The Link Register is volatile when using the 32-bit SVR4 ABI.
Make it possible to use the 64-bit SVR4 ABI.
Add non-volatile registers for the 64-bit SVR4 ABI.
Make sure r2 is a reserved register when using the 64-bit SVR4 ABI.
Update PPCFrameInfo for the 64-bit SVR4 ABI.
Add FIXME for 64-bit Darwin PPC.
Insert NOP instruction after direct function calls.
Emit official procedure descriptors.
Create TOC entries for GlobalAddress references.
Spill 64-bit non-volatile registers to the correct slots.
Only custom lower VAARG when using the 32-bit SVR4 ABI.
Use simple VASTART lowering for the 64-bit SVR4 ABI.

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

15 years agoUpdate LocalRewriter::DistanceMap when inserting stack loads.
Jakob Stoklund Olesen [Sat, 15 Aug 2009 11:03:03 +0000 (11:03 +0000)]
Update LocalRewriter::DistanceMap when inserting stack loads.

In the included test case, a stack load was not included in DistanceMap. That
caused TransferDeadness to ignore the instruction, leading to a scavenger
assert.

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

15 years agoReformatting and some cleanup.
Bill Wendling [Sat, 15 Aug 2009 08:56:09 +0000 (08:56 +0000)]
Reformatting and some cleanup.

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

15 years ago80 col violations.
Evan Cheng [Sat, 15 Aug 2009 08:38:52 +0000 (08:38 +0000)]
80 col violations.

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

15 years agoFix tests.
Evan Cheng [Sat, 15 Aug 2009 08:23:11 +0000 (08:23 +0000)]
Fix tests.

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

15 years agoTurn on if-conversion for thumb2.
Evan Cheng [Sat, 15 Aug 2009 07:59:10 +0000 (07:59 +0000)]
Turn on if-conversion for thumb2.

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

15 years agoupdate for rename.
Chris Lattner [Sat, 15 Aug 2009 06:14:07 +0000 (06:14 +0000)]
update for rename.

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

15 years agorename PIC16Section.h -> MCSectionPIC16.h for consistency with
Chris Lattner [Sat, 15 Aug 2009 06:13:40 +0000 (06:13 +0000)]
rename PIC16Section.h -> MCSectionPIC16.h for consistency with
the class it defines.

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

15 years agocmake likes its explicit list of files to build.
Chris Lattner [Sat, 15 Aug 2009 06:10:23 +0000 (06:10 +0000)]
cmake likes its explicit list of files to build.

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

15 years agouse XCore-specific section with xcore specific cp/dp flags to restore
Chris Lattner [Sat, 15 Aug 2009 06:09:35 +0000 (06:09 +0000)]
use XCore-specific section with xcore specific cp/dp flags to restore
support for globals going into the appropriate sections with the flags.

This hopefully finishes unbreaking the previous behavior that I broke before.

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

15 years agoIf ELF subtargets don't want to support 4/8/16-byte mergable sections, allow
Chris Lattner [Sat, 15 Aug 2009 06:08:34 +0000 (06:08 +0000)]
If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow
them to null out the default section pointers.

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

15 years agoadd support for target-specific ELF section flags, add a new MCSectionXCore
Chris Lattner [Sat, 15 Aug 2009 05:56:11 +0000 (05:56 +0000)]
add support for target-specific ELF section flags, add a new MCSectionXCore
class which represents the XCore cp/dp section flags.  No functionality
change yet.

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

15 years agoSimplify a few more things, eliminating a few more dependencies on
Dan Gohman [Sat, 15 Aug 2009 02:07:36 +0000 (02:07 +0000)]
Simplify a few more things, eliminating a few more dependencies on
"the current basic block".

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

15 years agoSimplify this code to not depend as much on CurMBB.
Dan Gohman [Sat, 15 Aug 2009 02:06:22 +0000 (02:06 +0000)]
Simplify this code to not depend as much on CurMBB.

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

15 years agoDo not use frame register to reference fixed stack objects if the function is frameless.
Evan Cheng [Sat, 15 Aug 2009 02:05:35 +0000 (02:05 +0000)]
Do not use frame register to reference fixed stack objects if the function is frameless.

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

15 years agoAlways check to see if raw_fd_ostream's file descriptor is attached to
Dan Gohman [Sat, 15 Aug 2009 02:05:19 +0000 (02:05 +0000)]
Always check to see if raw_fd_ostream's file descriptor is attached to
a terminal, not just when it's STDOUT_FILENO.

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

15 years agoAdd support for column computation on unbuffered streams.
Dan Gohman [Sat, 15 Aug 2009 02:02:59 +0000 (02:02 +0000)]
Add support for column computation on unbuffered streams.

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

15 years agoMove FormattedStream's write_impl out of line.
Dan Gohman [Sat, 15 Aug 2009 02:01:04 +0000 (02:01 +0000)]
Move FormattedStream's write_impl out of line.

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

15 years agoRemove an unnecessary #include.
Dan Gohman [Sat, 15 Aug 2009 01:56:38 +0000 (01:56 +0000)]
Remove an unnecessary #include.

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

15 years agoswitch DominanceFrontier::splitBlock to use a smallvector for
Chris Lattner [Sat, 15 Aug 2009 01:39:28 +0000 (01:39 +0000)]
switch DominanceFrontier::splitBlock to use a smallvector for
the pred list instead of a vector, saving a boat load of malloc/free's.

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

15 years agoOn x86-64, for a varargs function, don't store the xmm registers to
Dan Gohman [Sat, 15 Aug 2009 01:38:56 +0000 (01:38 +0000)]
On x86-64, for a varargs function, don't store the xmm registers to
the register save area if %al is 0. This avoids touching xmm
regsiters when they aren't actually used.

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

15 years agoDo not completely skip subrange info for a zero sized array.
Devang Patel [Fri, 14 Aug 2009 20:59:16 +0000 (20:59 +0000)]
Do not completely skip subrange info for a zero sized array.

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

15 years agoLeaf functions which do not save CSRs can be frameless even with -disable-fp-elim.
Evan Cheng [Fri, 14 Aug 2009 20:48:13 +0000 (20:48 +0000)]
Leaf functions which do not save CSRs can be frameless even with -disable-fp-elim.

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

15 years agoCMake: Updated library dependence info.
Oscar Fuentes [Fri, 14 Aug 2009 20:30:18 +0000 (20:30 +0000)]
CMake: Updated library dependence info.

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

15 years agoAdd sse4.2 string/text processing intrinsics. We'll select these later.
Eric Christopher [Fri, 14 Aug 2009 20:27:57 +0000 (20:27 +0000)]
Add sse4.2 string/text processing intrinsics. We'll select these later.

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

15 years agoWhitespace cleanup.
Eric Christopher [Fri, 14 Aug 2009 20:27:12 +0000 (20:27 +0000)]
Whitespace cleanup.

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

15 years agoAllow targets to specify their choice of calling conventions per
Anton Korobeynikov [Fri, 14 Aug 2009 20:10:52 +0000 (20:10 +0000)]
Allow targets to specify their choice of calling conventions per
libcall. Take advantage of this in the ARM backend to rectify broken
choice of CC when hard float is in effect. PIC16 may want to see if
it could be of use in MakePIC16Libcall, which works unchanged.

Patch by Sandeep!

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

15 years agoAdd Thumb2 lsr hooks.
Evan Cheng [Fri, 14 Aug 2009 20:09:37 +0000 (20:09 +0000)]
Add Thumb2 lsr hooks.

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

15 years agollvm-mc: Fix bugs where bytes were unintentionally being printed as signed.
Daniel Dunbar [Fri, 14 Aug 2009 19:59:24 +0000 (19:59 +0000)]
llvm-mc: Fix bugs where bytes were unintentionally being printed as signed.
 - We now print all of 403.gcc cleanly (llvm-mc -> 'as' as diffed to 'as'), minus two
   'rep;movsl' instructions (which I missed before).

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

15 years agoCMake: Corrected variable check.
Oscar Fuentes [Fri, 14 Aug 2009 19:56:04 +0000 (19:56 +0000)]
CMake: Corrected variable check.

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

15 years ago*try* to use a better name to describe how common symbols are marked on the elf objec...
Bruno Cardoso Lopes [Fri, 14 Aug 2009 19:45:38 +0000 (19:45 +0000)]
*try* to use a better name to describe how common symbols are marked on the elf object file.

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

15 years agoAdd doxygen comments.
Owen Anderson [Fri, 14 Aug 2009 19:41:50 +0000 (19:41 +0000)]
Add doxygen comments.

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

15 years ago80 col violation.
Evan Cheng [Fri, 14 Aug 2009 19:11:20 +0000 (19:11 +0000)]
80 col violation.

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

15 years agollvm-mc: When handling a .set, make sure to print subsequent references to the
Daniel Dunbar [Fri, 14 Aug 2009 19:10:46 +0000 (19:10 +0000)]
llvm-mc: When handling a .set, make sure to print subsequent references to the
symbol as the symbol name itself, not the expression it was defined to. These
have different semantics due to the quirky .set behavior (which absolutizes an
expression that would otherwise be treated as a relocation).

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

15 years agoCleanup the mess in msp430 target registration and hopefully unbreak the build
Anton Korobeynikov [Fri, 14 Aug 2009 19:06:50 +0000 (19:06 +0000)]
Cleanup the mess in msp430 target registration and hopefully unbreak the build

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

15 years agoRevert r78424.
Argyrios Kyrtzidis [Fri, 14 Aug 2009 19:01:37 +0000 (19:01 +0000)]
Revert r78424.

In order for the changes in r78424 to work properly, cast_retty<X,Y> should return an object instead of a reference, and it's not clear that this approach has real advantages.

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

15 years agoIndentation.
Evan Cheng [Fri, 14 Aug 2009 19:01:37 +0000 (19:01 +0000)]
Indentation.

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

15 years agoForce reconfigure
Anton Korobeynikov [Fri, 14 Aug 2009 18:53:19 +0000 (18:53 +0000)]
Force reconfigure

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

15 years agollvm-mc: zerofill shouldn't print quotes around the section,segment.
Daniel Dunbar [Fri, 14 Aug 2009 18:51:45 +0000 (18:51 +0000)]
llvm-mc: zerofill shouldn't print quotes around the section,segment.

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

15 years agofix "pc" to be lower case in a target triple, patch by Yonggang Luo
Chris Lattner [Fri, 14 Aug 2009 18:48:13 +0000 (18:48 +0000)]
fix "pc" to be lower case in a target triple, patch by Yonggang Luo

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

15 years agoHopefully unbreak cmake builds
Anton Korobeynikov [Fri, 14 Aug 2009 18:46:49 +0000 (18:46 +0000)]
Hopefully unbreak cmake builds

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

15 years agoAlso shrink immediate branches; also more assembler workarounds.
Evan Cheng [Fri, 14 Aug 2009 18:31:44 +0000 (18:31 +0000)]
Also shrink immediate branches; also more assembler workarounds.

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

15 years agoGive MSP430 a separate asmprinter lib
Anton Korobeynikov [Fri, 14 Aug 2009 18:28:12 +0000 (18:28 +0000)]
Give MSP430 a separate asmprinter lib

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

15 years agollvm-mc: Support escaped characters in string literals (for .ascii and .asciz)
Daniel Dunbar [Fri, 14 Aug 2009 18:19:52 +0000 (18:19 +0000)]
llvm-mc: Support escaped characters in string literals (for .ascii and .asciz)

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

15 years agoProperly handle indirect win64 args when they're passed in memory
Anton Korobeynikov [Fri, 14 Aug 2009 18:19:10 +0000 (18:19 +0000)]
Properly handle indirect win64 args when they're passed in memory

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

15 years agoGet the CPP backend into some semblance of working by updating for numerous LLVMConte...
Owen Anderson [Fri, 14 Aug 2009 17:41:33 +0000 (17:41 +0000)]
Get the CPP backend into some semblance of working by updating for numerous LLVMContext changes,
as well as the StringRef change.

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

15 years agoCMake: Automatic regeneration of the library dependencies file.
Oscar Fuentes [Fri, 14 Aug 2009 16:59:41 +0000 (16:59 +0000)]
CMake: Automatic regeneration of the library dependencies file.

It doesn't stop or reconfigure the build, though, so the user will see
a broken build that magically succeeds at the next attempt. It is
technically possible to halt the build with a helpful message, and
even to automatically restart the build using the new dependencies as
it we did when llvm-config was used by cmake for learning
dependencies. This is left on the TODO list.

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

15 years agoTake another shot at disabling this when no ppc support is available.
Daniel Dunbar [Fri, 14 Aug 2009 16:40:12 +0000 (16:40 +0000)]
Take another shot at disabling this when no ppc support is available.

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

15 years agoA couple IRBuilder functions were still using getGlobalContext().
Erick Tryzelaar [Fri, 14 Aug 2009 06:12:30 +0000 (06:12 +0000)]
A couple IRBuilder functions were still using getGlobalContext().

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

15 years agoCMake: Builds main LLVM Target library before its sublibraries. This
Oscar Fuentes [Fri, 14 Aug 2009 05:17:24 +0000 (05:17 +0000)]
CMake: Builds main LLVM Target library before its sublibraries. This
way we ensure that tablegenned files exist before they are #include'd
by the LLVM Target sublibraries. Required for parallel builds.

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

15 years agoNow that all the legal Neon shuffles (or at least the ones that have been
Bob Wilson [Fri, 14 Aug 2009 05:16:33 +0000 (05:16 +0000)]
Now that all the legal Neon shuffles (or at least the ones that have been
implemented so far) are recognized during legalization, it is easy to fall
back to the default expansion for other shuffles.

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

15 years agoCreate a new ARM-specific DAG node, VDUP, to represent a splat from a
Bob Wilson [Fri, 14 Aug 2009 05:13:08 +0000 (05:13 +0000)]
Create a new ARM-specific DAG node, VDUP, to represent a splat from a
scalar_to_vector.  Generate these VDUP nodes during legalization instead
of trying to recognize the pattern during selection.

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

15 years agoDuring legalization, change Neon vdup_lane operations from shuffles to
Bob Wilson [Fri, 14 Aug 2009 05:08:32 +0000 (05:08 +0000)]
During legalization, change Neon vdup_lane operations from shuffles to
target-specific VDUPLANE nodes.  This allows the subreg handling for the
quad-register version to be done easily with Pats in the .td file, instead
of with custom code in ARMISelDAGToDAG.cpp.

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

15 years agoCMake: Corrected indentation on a block of code.
Oscar Fuentes [Fri, 14 Aug 2009 04:55:21 +0000 (04:55 +0000)]
CMake: Corrected indentation on a block of code.

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

15 years agoCMake: Use LLVM_COMMON_DEPENDS on add_llvm_executable.
Oscar Fuentes [Fri, 14 Aug 2009 04:38:57 +0000 (04:38 +0000)]
CMake: Use LLVM_COMMON_DEPENDS on add_llvm_executable.

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

15 years agoCMake: propagate to the parent scope LLVM_COMMON_DEPENDS. This is
Oscar Fuentes [Fri, 14 Aug 2009 04:29:33 +0000 (04:29 +0000)]
CMake: propagate to the parent scope LLVM_COMMON_DEPENDS. This is
necessary for the changes being effective on the successive targets

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

15 years agoCMake: updated list of source files for library MC.
Oscar Fuentes [Fri, 14 Aug 2009 04:14:45 +0000 (04:14 +0000)]
CMake: updated list of source files for library MC.

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

15 years agoUpdate llvm-mc / MCAsmStreamer to print the instruction using the actual target
Daniel Dunbar [Fri, 14 Aug 2009 03:48:55 +0000 (03:48 +0000)]
Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
specific printer (this only works on x86, for now).
 - This makes it possible to do some correctness checking of the parsing and
   matching, since we can compare the results of 'as' on the original input, to
   those of 'as' on the output from llvm-mc.

 - In theory, we could now have an easy ATT -> Intel syntax converter. :)

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

15 years agoAdd virtual printMCInst method to AsmPrinter, as a quick way to expose the API
Daniel Dunbar [Fri, 14 Aug 2009 03:43:57 +0000 (03:43 +0000)]
Add virtual printMCInst method to AsmPrinter, as a quick way to expose the API
to print one instruction.

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

15 years agoAdd X86 instruction printer support for printing MCValue operands.
Daniel Dunbar [Fri, 14 Aug 2009 03:42:12 +0000 (03:42 +0000)]
Add X86 instruction printer support for printing MCValue operands.

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

15 years agoAdd MCSymbol::{print, dump}
Daniel Dunbar [Fri, 14 Aug 2009 03:41:23 +0000 (03:41 +0000)]
Add MCSymbol::{print, dump}

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

15 years agoAdd MCValue::{print, dump}
Daniel Dunbar [Fri, 14 Aug 2009 03:11:09 +0000 (03:11 +0000)]
Add MCValue::{print, dump}

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

15 years agollvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.
Daniel Dunbar [Fri, 14 Aug 2009 02:18:40 +0000 (02:18 +0000)]
llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.

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

15 years agoIndentation change.
Evan Cheng [Fri, 14 Aug 2009 01:56:37 +0000 (01:56 +0000)]
Indentation change.

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

15 years agoCMake: updated library dependencies.
Oscar Fuentes [Fri, 14 Aug 2009 01:55:28 +0000 (01:55 +0000)]
CMake: updated library dependencies.

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

15 years agoCMake: build llvm-config before the other tools.
Oscar Fuentes [Fri, 14 Aug 2009 01:55:05 +0000 (01:55 +0000)]
CMake: build llvm-config before the other tools.

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

15 years agoShrink ADR and LDR from constantpool late during constantpool island pass.
Evan Cheng [Fri, 14 Aug 2009 00:32:16 +0000 (00:32 +0000)]
Shrink ADR and LDR from constantpool late during constantpool island pass.

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

15 years agoAdd helpers for fetching basic types.
Owen Anderson [Fri, 14 Aug 2009 00:30:41 +0000 (00:30 +0000)]
Add helpers for fetching basic types.

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

15 years agoNew entry.
Evan Cheng [Fri, 14 Aug 2009 00:16:47 +0000 (00:16 +0000)]
New entry.

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

15 years agoMake TargetData optional in GlobalOpt and ArgumentPromotion.
Dan Gohman [Fri, 14 Aug 2009 00:11:03 +0000 (00:11 +0000)]
Make TargetData optional in GlobalOpt and ArgumentPromotion.

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

15 years agoMake these matching rules more strict so that they don't
Dan Gohman [Fri, 14 Aug 2009 00:10:19 +0000 (00:10 +0000)]
Make these matching rules more strict so that they don't
accidentally match unrelated things.

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

15 years agoExpose LLVMContext to llvm-c.
Erick Tryzelaar [Fri, 14 Aug 2009 00:01:31 +0000 (00:01 +0000)]
Expose LLVMContext to llvm-c.

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

15 years agoFix MCSectionELF::ShouldOmitSectionDirective's matching of .data and
Dan Gohman [Thu, 13 Aug 2009 23:56:34 +0000 (23:56 +0000)]
Fix MCSectionELF::ShouldOmitSectionDirective's matching of .data and
friends so that it doesn't match sections like .data.rel.local, which
should not be emitted as section directives.

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

15 years agoTargetRegistry: Change AsmPrinter constructor to be typed as returning an
Daniel Dunbar [Thu, 13 Aug 2009 23:48:47 +0000 (23:48 +0000)]
TargetRegistry: Change AsmPrinter constructor to be typed as returning an
AsmPrinter instance (instead of just a FunctionPass)

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

15 years agoMark this test as requiring the powerpc target.
Daniel Dunbar [Thu, 13 Aug 2009 23:47:58 +0000 (23:47 +0000)]
Mark this test as requiring the powerpc target.

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

15 years agollvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.
Daniel Dunbar [Thu, 13 Aug 2009 23:36:34 +0000 (23:36 +0000)]
llvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.
 - Currently unused.

 - A few other random comment fixes lumped in.

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

15 years agoRemove HasCrazyBSS and add a flag in TAI to indicate that '.section'
Bruno Cardoso Lopes [Thu, 13 Aug 2009 23:30:21 +0000 (23:30 +0000)]
Remove HasCrazyBSS and add a flag in TAI to indicate that '.section'
must be emitted for PowerPC-Linux '.bss' section

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

15 years agoActually privatize a IntegerTypes, and fix a few bugs exposed by this.
Owen Anderson [Thu, 13 Aug 2009 23:27:32 +0000 (23:27 +0000)]
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.

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

15 years agoWhen standard output is a terminal, set outs() to be unbuffered, to
Dan Gohman [Thu, 13 Aug 2009 23:18:56 +0000 (23:18 +0000)]
When standard output is a terminal, set outs() to be unbuffered, to
mimic the behavior of stdtout, which is line-buffered when the output
is a terminal. This fixes some issues with bugpoint output appearing
being printed out of order.

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

15 years agoMake formatted_raw_ostream restore the buffer settings of the
Dan Gohman [Thu, 13 Aug 2009 23:16:59 +0000 (23:16 +0000)]
Make formatted_raw_ostream restore the buffer settings of the
underlying stream when it is finished, so that clients don't
have to do this manually.

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

15 years agoTake the fast path for any named value and any GlobalValue, which doesn't
Dan Gohman [Thu, 13 Aug 2009 23:07:11 +0000 (23:07 +0000)]
Take the fast path for any named value and any GlobalValue, which doesn't
need TypePrinting despite being a subclass of Constant. This fixes
compile-time problems especially visible on 403.gcc when -asm-verbose is
enabled.

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

15 years agoPush LLVMContexts through the IntegerType APIs.
Owen Anderson [Thu, 13 Aug 2009 21:58:54 +0000 (21:58 +0000)]
Push LLVMContexts through the IntegerType APIs.

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

15 years agoRemove hack used to strip unwanted chars from section name
Bruno Cardoso Lopes [Thu, 13 Aug 2009 21:25:27 +0000 (21:25 +0000)]
Remove hack used to strip unwanted chars from section name
Use MCSectionELF methods as much as possible, removing some
ELFWriter methods which are now unused

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

15 years agoAdd a method to return BSSSection from TargetLoweringObjectFile
Bruno Cardoso Lopes [Thu, 13 Aug 2009 21:10:28 +0000 (21:10 +0000)]
Add a method to return BSSSection from TargetLoweringObjectFile

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

15 years agoAdd a method to return if the ELF section contains only common symbols!
Bruno Cardoso Lopes [Thu, 13 Aug 2009 21:08:56 +0000 (21:08 +0000)]
Add a method to return if the ELF section contains only common symbols!

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

15 years agoAdd unimplemented destructor declarations to hopefully address
Dan Gohman [Thu, 13 Aug 2009 20:43:13 +0000 (20:43 +0000)]
Add unimplemented destructor declarations to hopefully address
compiler warnings on windows (PR4714).

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

15 years agoFix a compiler warning about comparing signed with unsigned.
Dan Gohman [Thu, 13 Aug 2009 20:32:03 +0000 (20:32 +0000)]
Fix a compiler warning about comparing signed with unsigned.

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

15 years ago* Moved all tool version requirements to the same place
Misha Brukman [Thu, 13 Aug 2009 20:29:30 +0000 (20:29 +0000)]
* Moved all tool version requirements to the same place
* Cleaned up multiple uses of literal version numbers and simplified 'cleaning'

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

15 years agoConverted tabs to spaces.
Misha Brukman [Thu, 13 Aug 2009 20:12:48 +0000 (20:12 +0000)]
Converted tabs to spaces.

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

15 years agoGrammar fix.
Misha Brukman [Thu, 13 Aug 2009 20:08:52 +0000 (20:08 +0000)]
Grammar fix.

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

15 years agoTweak svn:ignore
Daniel Dunbar [Thu, 13 Aug 2009 19:55:51 +0000 (19:55 +0000)]
Tweak svn:ignore

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

15 years agoTargetRegistry: Reorganize AsmPrinter construction so that clients pass in the
Daniel Dunbar [Thu, 13 Aug 2009 19:38:51 +0000 (19:38 +0000)]
TargetRegistry: Reorganize AsmPrinter construction so that clients pass in the
TargetAsmInfo. This eliminates a dependency on TargetMachine.h from
TargetRegistry.h, which technically was a layering violation.
 - Clients probably can only sensibly pass in the same TargetAsmInfo as the
   TargetMachine has, but there are only limited clients of this API.

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

15 years agoAdd an assert to check copy_to_buffer's precondition.
Dan Gohman [Thu, 13 Aug 2009 18:38:15 +0000 (18:38 +0000)]
Add an assert to check copy_to_buffer's precondition.

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

15 years agoSet raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be
Dan Gohman [Thu, 13 Aug 2009 17:41:40 +0000 (17:41 +0000)]
Set raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be
unbuffered. std::ostream does its own buffering, and std::string and
SmallVector both have allocation strategies intended to handle frequent
appending.

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

15 years agoAdd support to raw_ostream for sizing the buffer according to the
Dan Gohman [Thu, 13 Aug 2009 17:27:29 +0000 (17:27 +0000)]
Add support to raw_ostream for sizing the buffer according to the
needs of the underlying output mechanism. raw_fd_ostream now uses
st_blksize from fstat to determine a buffer size.

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