oota-llvm.git
14 years agoARM TAI no longer needs a TM, but createTargetAsmInfo() still does.
Chris Lattner [Sun, 2 Aug 2009 05:23:52 +0000 (05:23 +0000)]
ARM TAI no longer needs a TM, but createTargetAsmInfo() still does.

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

14 years agoMove the getInlineAsmLength virtual method from TAI to TII, where
Chris Lattner [Sun, 2 Aug 2009 05:20:37 +0000 (05:20 +0000)]
Move the getInlineAsmLength virtual method from TAI to TII, where
the only real caller (GetFunctionSizeInBytes) uses it.

The custom ARM implementation of this is basically reimplementing
an assembler poorly for negligible gain.  It should be removed
IMNSHO, but I'll leave that to ARMish folks to decide.

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

14 years agomove a virtual method body to its .cpp file to avoid a #include
Chris Lattner [Sun, 2 Aug 2009 04:58:19 +0000 (04:58 +0000)]
move a virtual method body to its .cpp file to avoid a #include
in a header.

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

14 years agoturn some templated inline functions into static functions.
Chris Lattner [Sun, 2 Aug 2009 04:52:00 +0000 (04:52 +0000)]
turn some templated inline functions into static functions.

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

14 years agoalpha TAI doesn't need TM.
Chris Lattner [Sun, 2 Aug 2009 04:46:05 +0000 (04:46 +0000)]
alpha TAI doesn't need TM.

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

14 years agoMSP430 TAI doesn't need TM.
Chris Lattner [Sun, 2 Aug 2009 04:45:22 +0000 (04:45 +0000)]
MSP430 TAI doesn't need TM.

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

14 years agosimplify SPULinuxTargetAsmInfo, remove use of TM.
Chris Lattner [Sun, 2 Aug 2009 04:44:33 +0000 (04:44 +0000)]
simplify SPULinuxTargetAsmInfo, remove use of TM.

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

14 years agoxcore TAI doesn't need TM.
Chris Lattner [Sun, 2 Aug 2009 04:42:09 +0000 (04:42 +0000)]
xcore TAI doesn't need TM.

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

14 years agoPIC16 TAI doesn't need TM
Chris Lattner [Sun, 2 Aug 2009 04:41:14 +0000 (04:41 +0000)]
PIC16 TAI doesn't need TM

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

14 years agoremove the dead ELFTargetAsmInfo.h/cpp file. TargetAsmInfo
Chris Lattner [Sun, 2 Aug 2009 04:33:09 +0000 (04:33 +0000)]
remove the dead ELFTargetAsmInfo.h/cpp file.  TargetAsmInfo
defaults to being ELF.

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

14 years agoeliminate the TM argument to the TAI class, remove comment about supporting
Chris Lattner [Sun, 2 Aug 2009 04:32:07 +0000 (04:32 +0000)]
eliminate the TM argument to the TAI class, remove comment about supporting
solaris :)

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

14 years agoeliminate TargetMAchine argument to sparc TAI
Chris Lattner [Sun, 2 Aug 2009 04:30:59 +0000 (04:30 +0000)]
eliminate TargetMAchine argument to sparc TAI

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

14 years agoremove TargetAsmInfo::TM, which is now dead. The basic TAI class now
Chris Lattner [Sun, 2 Aug 2009 04:27:24 +0000 (04:27 +0000)]
remove TargetAsmInfo::TM, which is now dead.  The basic TAI class now
no longer depends on TM!

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

14 years agoremove the x86/ppc impls of getEHGlobalPrefix, which is already dead.
Chris Lattner [Sun, 2 Aug 2009 04:13:22 +0000 (04:13 +0000)]
remove the x86/ppc impls of getEHGlobalPrefix, which is already dead.

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

14 years agoAdd missing flush().
Daniel Dunbar [Sun, 2 Aug 2009 04:12:28 +0000 (04:12 +0000)]
Add missing flush().

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

14 years agoclean up #includes of TargetAsmInfo.cpp
Chris Lattner [Sun, 2 Aug 2009 04:09:22 +0000 (04:09 +0000)]
clean up #includes of TargetAsmInfo.cpp

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

14 years agomove an enum from TM -> TargetOptions. This makes TargetOptions.h
Chris Lattner [Sun, 2 Aug 2009 04:08:52 +0000 (04:08 +0000)]
move an enum from TM -> TargetOptions.  This makes TargetOptions.h
be self contained, and it isn't used from TM.h

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

14 years agoremove the dead PreferredEHDataFormat TAI hook: its now dead
Chris Lattner [Sun, 2 Aug 2009 04:02:52 +0000 (04:02 +0000)]
remove the dead PreferredEHDataFormat TAI hook: its now dead
even considering #if 0 code.

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

14 years agoFix some fixme's in #if 0'd code by making it dependent on the structural
Chris Lattner [Sun, 2 Aug 2009 03:59:56 +0000 (03:59 +0000)]
Fix some fixme's in #if 0'd code by making it dependent on the structural
behavior of the LSDA section instead of on some random target hook that
needs to be kept in synch with other points of truth.

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

14 years agoTest both darwin and linux.
Evan Cheng [Sun, 2 Aug 2009 02:54:34 +0000 (02:54 +0000)]
Test both darwin and linux.

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

14 years agomove getDwarfExceptionSection from TAI to TLOF and rename it to
Chris Lattner [Sun, 2 Aug 2009 01:34:32 +0000 (01:34 +0000)]
move getDwarfExceptionSection from TAI to TLOF and rename it to
getLSDASection() to be more specific.  This makes it pretty obvious
that the ELF LSDA section is being specified wrong in PIC mode.  We're
probably getting a lot of startup-time relocations to a readonly page,
which is expensive and bad.

Someone who cares about ELF C++ should investigate this.

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

14 years agoFix a possible crash on delete of an uninitialized variable.
Daniel Dunbar [Sun, 2 Aug 2009 01:25:15 +0000 (01:25 +0000)]
Fix a possible crash on delete of an uninitialized variable.

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

14 years agoFix an ENABLE_EXPENSIVE_CHECKS error.
Daniel Dunbar [Sun, 2 Aug 2009 01:21:22 +0000 (01:21 +0000)]
Fix an ENABLE_EXPENSIVE_CHECKS error.

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

14 years agoDon't call SectionForGlobal for hasAvailableExternallyLinkage()
Dan Gohman [Sun, 2 Aug 2009 01:18:44 +0000 (01:18 +0000)]
Don't call SectionForGlobal for hasAvailableExternallyLinkage()
variables either.

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

14 years agodon't call SectionForGlobal on declarations, you can't tell the section a
Chris Lattner [Sun, 2 Aug 2009 01:02:43 +0000 (01:02 +0000)]
don't call SectionForGlobal on declarations, you can't tell the section a
declaration will end up in.

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

14 years agoconvert ctors/dtors section to be in TLOF instead of
Chris Lattner [Sun, 2 Aug 2009 00:34:36 +0000 (00:34 +0000)]
convert ctors/dtors section to be in TLOF instead of
TAI.

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

14 years agoswitch to filecheck format
Chris Lattner [Sun, 2 Aug 2009 00:32:26 +0000 (00:32 +0000)]
switch to filecheck format

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

14 years agoTweak svn:ignore
Daniel Dunbar [Sun, 2 Aug 2009 00:28:15 +0000 (00:28 +0000)]
Tweak svn:ignore

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

14 years agoTweak svn:ignore
Daniel Dunbar [Sun, 2 Aug 2009 00:26:53 +0000 (00:26 +0000)]
Tweak svn:ignore

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

14 years agodon't override the default of this, the only difference is \t instead of ' '.
Chris Lattner [Sun, 2 Aug 2009 00:12:20 +0000 (00:12 +0000)]
don't override the default of this, the only difference is \t instead of ' '.

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

14 years agoChange MCOperand to use Create style instead of Make style for constructing
Daniel Dunbar [Sun, 2 Aug 2009 00:09:22 +0000 (00:09 +0000)]
Change MCOperand to use Create style instead of Make style for constructing
operands.

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

14 years agomake SectionKind::Kind completely private now.
Chris Lattner [Sun, 2 Aug 2009 00:04:12 +0000 (00:04 +0000)]
make SectionKind::Kind completely private now.

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

14 years agoMake SectionKind::get() private.
Chris Lattner [Sun, 2 Aug 2009 00:02:44 +0000 (00:02 +0000)]
Make SectionKind::get() private.

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

14 years ago(re)introduce new simpler apis for creation sectionkinds.
Chris Lattner [Sat, 1 Aug 2009 23:57:16 +0000 (23:57 +0000)]
(re)introduce new simpler apis for creation sectionkinds.

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

14 years agoRemove "JumpTableDataSection" from TAI, instead, have AsmPrinter
Chris Lattner [Sat, 1 Aug 2009 23:46:12 +0000 (23:46 +0000)]
Remove "JumpTableDataSection" from TAI, instead, have AsmPrinter
compute it based on what it knows.  As part of this, rename getSectionForMergeableConstant
to getSectionForConstant because it works for non-mergable constants also.

The only functionality change from this is that Xcore will start dropping
its jump tables into readonly section instead of data section in -static mode.
This should be fine as the linker resolves the relocations.  If this is a
problem, let me know and we'll come up with another solution.

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

14 years agogive alpha its readonly section. This optimizes alpha, and prevents a
Chris Lattner [Sat, 1 Aug 2009 23:44:04 +0000 (23:44 +0000)]
give alpha its readonly section.  This optimizes alpha, and prevents a
testsuite regression with a coming patch.

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

14 years ago.rdata == .rodata on mips.
Chris Lattner [Sat, 1 Aug 2009 23:07:29 +0000 (23:07 +0000)]
.rdata == .rodata on mips.

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

14 years agono need to override the default with the default.
Chris Lattner [Sat, 1 Aug 2009 23:05:25 +0000 (23:05 +0000)]
no need to override the default with the default.

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

14 years agoone fewer license, yay. :)
Chris Lattner [Sat, 1 Aug 2009 22:54:39 +0000 (22:54 +0000)]
one fewer license, yay. :)

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

14 years agoeXtensible Systems doesn't exist any more and Reid donated this to the
Chris Lattner [Sat, 1 Aug 2009 22:54:17 +0000 (22:54 +0000)]
eXtensible Systems doesn't exist any more and Reid donated this to the
project under the normal license, yay. :)

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

14 years agoloweringinfo is always non-null.
Chris Lattner [Sat, 1 Aug 2009 22:48:40 +0000 (22:48 +0000)]
loweringinfo is always non-null.

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

14 years agoREmove dead fields of TAI.
Chris Lattner [Sat, 1 Aug 2009 22:40:22 +0000 (22:40 +0000)]
REmove dead fields of TAI.

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

14 years agofix a problem Eli noticed where we would compile the attached ptrtoint
Chris Lattner [Sat, 1 Aug 2009 22:25:12 +0000 (22:25 +0000)]
fix a problem Eli noticed where we would compile the attached ptrtoint
to:

.quad X

even on a 32-bit system, where X is not 64-bits.  There isn't much that
we can do here, so we just print:

.quad ((X) & 4294967295)

instead.

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

14 years agoupdate for rename
Chris Lattner [Sat, 1 Aug 2009 22:06:53 +0000 (22:06 +0000)]
update for rename

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

14 years agofix a fixme by sinking various target-specific directives down into
Chris Lattner [Sat, 1 Aug 2009 21:56:13 +0000 (21:56 +0000)]
fix a fixme by sinking various target-specific directives down into
the appropriate subclasses.

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

14 years agocoff also doesn't have a ReadOnlySection yet, (!)
Chris Lattner [Sat, 1 Aug 2009 21:49:24 +0000 (21:49 +0000)]
coff also doesn't have a ReadOnlySection yet, (!)

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

14 years agocoff doesn't set a .bss seciton, so this is dead.
Chris Lattner [Sat, 1 Aug 2009 21:48:25 +0000 (21:48 +0000)]
coff doesn't set a .bss seciton, so this is dead.

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

14 years agoit turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
Chris Lattner [Sat, 1 Aug 2009 21:46:23 +0000 (21:46 +0000)]
it turns out that isWeak() was basically dead anyway.  Kill off SectionInfo :-/

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

14 years agodon't use isWeak anymore.
Chris Lattner [Sat, 1 Aug 2009 21:42:58 +0000 (21:42 +0000)]
don't use isWeak anymore.

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

14 years agofix a layering violation by moving SectionKind out to its own header.
Chris Lattner [Sat, 1 Aug 2009 21:30:49 +0000 (21:30 +0000)]
fix a layering violation by moving SectionKind out to its own header.

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

14 years agoMinor whitespace tidiness.
Dan Gohman [Sat, 1 Aug 2009 21:25:46 +0000 (21:25 +0000)]
Minor whitespace tidiness.

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

14 years agoFix typos in comments.
Dan Gohman [Sat, 1 Aug 2009 21:25:00 +0000 (21:25 +0000)]
Fix typos in comments.

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

14 years agowith the previous refactoring, fixme fixed!
Chris Lattner [Sat, 1 Aug 2009 21:21:43 +0000 (21:21 +0000)]
with the previous refactoring, fixme fixed!

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

14 years agoupdate for API change.
Chris Lattner [Sat, 1 Aug 2009 21:14:30 +0000 (21:14 +0000)]
update for API change.

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

14 years agoChange SectionKind to be a property that is true of a *section*, it
Chris Lattner [Sat, 1 Aug 2009 21:11:14 +0000 (21:11 +0000)]
Change SectionKind to be a property that is true of a *section*, it
should have no state that is specific to particular globals in the
section.  In this case, it means the removal of the "isWeak" and
"ExplicitSection" bits.  MCSection uses the new form of SectionKind.

To handle isWeak, I introduced a new SectionInfo class, which is
SectionKind + isWeak, and it is used by the part of the code generator
that does classification of a specific global.

The ExplicitSection disappears.  It is moved onto MCSection as a new
"IsDirective" bit.  Since the Name of a section is either a section
or directive, it makes sense to keep this bit in MCSection.  Ultimately
the creator of MCSection should canonicalize (e.g.) .text to whatever
the actual section is.

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

14 years agoadd a note about the build bots
Chris Lattner [Sat, 1 Aug 2009 19:25:25 +0000 (19:25 +0000)]
add a note about the build bots

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

14 years agoMinor code cleanups.
Dan Gohman [Sat, 1 Aug 2009 19:14:37 +0000 (19:14 +0000)]
Minor code cleanups.

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

14 years agoPrint the target flags as an int instead of a char, as they aren't
Dan Gohman [Sat, 1 Aug 2009 19:13:38 +0000 (19:13 +0000)]
Print the target flags as an int instead of a char, as they aren't
actually characters.

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

14 years agoUse the default copy ctor and copy-assignment operators.
Dan Gohman [Sat, 1 Aug 2009 19:11:31 +0000 (19:11 +0000)]
Use the default copy ctor and copy-assignment operators.

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

14 years agoAdd nounwind to this test.
Dan Gohman [Sat, 1 Aug 2009 19:11:04 +0000 (19:11 +0000)]
Add nounwind to this test.

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

14 years agoAdd newline at end of file to remove gcc warning.
Nick Lewycky [Sat, 1 Aug 2009 19:09:44 +0000 (19:09 +0000)]
Add newline at end of file to remove gcc warning.

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

14 years agoRemove now empty unit test directory.
Benjamin Kramer [Sat, 1 Aug 2009 19:07:29 +0000 (19:07 +0000)]
Remove now empty unit test directory.

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

14 years agodaniel says it's fine to nuke this.
Chris Lattner [Sat, 1 Aug 2009 18:38:21 +0000 (18:38 +0000)]
daniel says it's fine to nuke this.

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

14 years agoupdate for new api
Chris Lattner [Sat, 1 Aug 2009 18:35:49 +0000 (18:35 +0000)]
update for new api

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

14 years agoAll MCSections are now required to have a SectionKind.
Chris Lattner [Sat, 1 Aug 2009 18:25:49 +0000 (18:25 +0000)]
All MCSections are now required to have a SectionKind.

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

14 years agoHack to make this test work on platforms which aren't Macs. Fixing this
Eli Friedman [Sat, 1 Aug 2009 16:37:18 +0000 (16:37 +0000)]
Hack to make this test work on platforms which aren't Macs.  Fixing this
myself because I'm getting tired of seeing the red buildbots, which have
been red since 5:30PM PDT last night.

Proposed supplement to developer policy: committers should make sure to
be around to watch for buildbot failures after committing.

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

14 years agoWorkaround a couple of Darwin assembler bugs.
Evan Cheng [Sat, 1 Aug 2009 06:13:52 +0000 (06:13 +0000)]
Workaround a couple of Darwin assembler bugs.

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

14 years agoGive MachineFunctionAnalysis a destructor so it can verify that
Dan Gohman [Sat, 1 Aug 2009 04:19:43 +0000 (04:19 +0000)]
Give MachineFunctionAnalysis a destructor so it can verify that
that it released its allocated memory.

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

14 years agoDelete a redundant variable.
Dan Gohman [Sat, 1 Aug 2009 04:18:29 +0000 (04:18 +0000)]
Delete a redundant variable.

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

14 years agoMinor code simplifications.
Dan Gohman [Sat, 1 Aug 2009 03:51:09 +0000 (03:51 +0000)]
Minor code simplifications.

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

14 years agoMinor code simplifications.
Dan Gohman [Sat, 1 Aug 2009 03:42:59 +0000 (03:42 +0000)]
Minor code simplifications.

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

14 years agoAvoid a problem with ulimit on Solaris & friends, patch by Edward O'Callaghan!
Daniel Dunbar [Sat, 1 Aug 2009 03:37:54 +0000 (03:37 +0000)]
Avoid a problem with ulimit on Solaris & friends, patch by Edward O'Callaghan!

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

14 years agoSplit t2MOVCCs since some assemblers do not recognize mov shifted register alias...
Evan Cheng [Sat, 1 Aug 2009 01:43:45 +0000 (01:43 +0000)]
Split t2MOVCCs since some assemblers do not recognize mov shifted register alias with predicate.

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

14 years agoMake default ctor for ImmutableSet::iterator public.
Ted Kremenek [Sat, 1 Aug 2009 01:28:23 +0000 (01:28 +0000)]
Make default ctor for ImmutableSet::iterator public.

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

14 years agollvm-mc: More quoted identifier support.
Daniel Dunbar [Sat, 1 Aug 2009 00:48:30 +0000 (00:48 +0000)]
llvm-mc: More quoted identifier support.

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

14 years agoSelectionDAGISel no longer needs to check hasAvailableExternallyLinkage,
Dan Gohman [Sat, 1 Aug 2009 00:42:23 +0000 (00:42 +0000)]
SelectionDAGISel no longer needs to check hasAvailableExternallyLinkage,
as it is now a MachineFunctionPass, and MachineFunctionPass now handles
this.

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

14 years agoMake UnreachableMachineBlockElim preserve MachineDominatorTree and
Dan Gohman [Sat, 1 Aug 2009 00:34:30 +0000 (00:34 +0000)]
Make UnreachableMachineBlockElim preserve MachineDominatorTree and
MachineLoopInfo.

llc now runs MachineLoopInfo and MachineDominatorTree only twice, instead
of three times.

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

14 years agoThe X86 maximal stack alignment calculator preserves the CFG. Also,
Dan Gohman [Sat, 1 Aug 2009 00:31:02 +0000 (00:31 +0000)]
The X86 maximal stack alignment calculator preserves the CFG. Also,
be more careful about the return value of runOnMachineFunction.

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

14 years agoX86 floating-point passes don't modify the CFG.
Dan Gohman [Sat, 1 Aug 2009 00:26:16 +0000 (00:26 +0000)]
X86 floating-point passes don't modify the CFG.

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

14 years agoFix Thumb2 function call isel. Thumb1 and Thumb2 should share the same
Evan Cheng [Sat, 1 Aug 2009 00:16:10 +0000 (00:16 +0000)]
Fix Thumb2 function call isel. Thumb1 and Thumb2 should share the same
instructions for calls since BL and BLX are always 32-bit long and BX is always
16-bit long.

Also, we should be using BLX to call external function stubs.

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

14 years agoUse setPreservesAll in X86CodeEmitter.
Dan Gohman [Fri, 31 Jul 2009 23:44:16 +0000 (23:44 +0000)]
Use setPreservesAll in X86CodeEmitter.

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

14 years agoUse setPreservesAll and setPreservesCFG in CodeGen passes.
Dan Gohman [Fri, 31 Jul 2009 23:37:33 +0000 (23:37 +0000)]
Use setPreservesAll and setPreservesCFG in CodeGen passes.

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

14 years agoSelectionDAGISel does not "preserve all", since it makes lots of changes
Dan Gohman [Fri, 31 Jul 2009 23:36:22 +0000 (23:36 +0000)]
SelectionDAGISel does not "preserve all", since it makes lots of changes
to the MachineFunction.

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

14 years agoUse a range insert instead of an explicit loop.
Dan Gohman [Fri, 31 Jul 2009 23:36:06 +0000 (23:36 +0000)]
Use a range insert instead of an explicit loop.

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

14 years agollvm-mc: Add -triple, and fix some typos
Daniel Dunbar [Fri, 31 Jul 2009 23:13:12 +0000 (23:13 +0000)]
llvm-mc: Add -triple, and fix some typos

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

14 years agollvm-mc: Fix .s output to quote section & symbol names when necessary.
Daniel Dunbar [Fri, 31 Jul 2009 23:04:32 +0000 (23:04 +0000)]
llvm-mc: Fix .s output to quote section & symbol names when necessary.

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

14 years agoPrivatize all but one of the remaining constant tables.
Owen Anderson [Fri, 31 Jul 2009 22:45:43 +0000 (22:45 +0000)]
Privatize all but one of the remaining constant tables.

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

14 years agoAllow target intrinsics that return multiple values, i.e., struct types,
Bob Wilson [Fri, 31 Jul 2009 22:41:21 +0000 (22:41 +0000)]
Allow target intrinsics that return multiple values, i.e., struct types,
in SelectionDAGLowering::visitTargetIntrinsic.

This removes a bit of special-case code for vector types.  After staring
at it for a while, I managed to convince myself that it is not necessary.
The only case where TLI.getValueType() differs from MVT::getMVT is for iPTR,
so this code could potentially make a difference for a vector of pointers.
But, it looks like that is not supported.  Calling TLI.getValueType() on
a vector of pointers leads to the following sequence of calls:

TargetLowering::getValueType
MVT::getMVT
MVT::getVectorVT(iPTR, num elements)
MVT::getExtendedVectorVT
MVT::getTypeForMVT for iPTR
assertion fails "Type is not extended!"

So, unless I'm really missing something, this bit of code is irrelevant to
the current version of LLVM, which is consistent with the fact that I don't
see this code in other similar places.

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

14 years agoAdd a warning.
Mikhail Glushenkov [Fri, 31 Jul 2009 22:24:20 +0000 (22:24 +0000)]
Add a warning.

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

14 years agollvm-mc: A few more parsing / match tweaks.
Daniel Dunbar [Fri, 31 Jul 2009 22:22:54 +0000 (22:22 +0000)]
llvm-mc: A few more parsing / match tweaks.
 - Operands which are just a label should be parsed as immediates, not memory
   operands (from the assembler perspective).

 - Match a few more flavors of immediates.

 - Distinguish match functions for memory operands which don't take a segment
   register.

 - We match the .s for "hello world" now!

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

14 years agot2BR_JT is mov pc, it's 2 byte long, not 4.
Evan Cheng [Fri, 31 Jul 2009 22:22:22 +0000 (22:22 +0000)]
t2BR_JT is mov pc, it's 2 byte long, not 4.

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

14 years agoThumb2 movcc need .w suffix.
Evan Cheng [Fri, 31 Jul 2009 22:21:55 +0000 (22:21 +0000)]
Thumb2 movcc need .w suffix.

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

14 years agoadd some comments on how this is *supposed* to work. We don't
Chris Lattner [Fri, 31 Jul 2009 22:18:14 +0000 (22:18 +0000)]
add some comments on how this is *supposed* to work.  We don't
need the PreferredEHDataFormat hook, but I have yet-more refactoring to
do before I can zap it.

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

14 years agorearrange a conditional. Even if this weren't #if 0'd out, this would
Chris Lattner [Fri, 31 Jul 2009 22:03:47 +0000 (22:03 +0000)]
rearrange a conditional.  Even if this weren't #if 0'd out, this would
have no functionality change.

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

14 years agoSimplify operand padding by keying off tabs in the asm stream. If
David Greene [Fri, 31 Jul 2009 21:57:10 +0000 (21:57 +0000)]
Simplify operand padding by keying off tabs in the asm stream.  If
padding is disabled, tabs get replaced by spaces except in the case of
the first operand, where the tab is output to line up the operands after
the mnemonics.

Add some better comments and eliminate redundant code.

Fix some testcases to not assume tabs.

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

14 years agollvm-mc: Support quoted identifiers.
Daniel Dunbar [Fri, 31 Jul 2009 21:55:09 +0000 (21:55 +0000)]
llvm-mc: Support quoted identifiers.
 - Uses MCAsmToken::getIdentifier which returns the (sub)string representing the
   meaningfull contents a string or identifier token.

 - Directives aren't done yet.

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

14 years agoPreferredEHDataFormat is always call with data and global, but this whole
Chris Lattner [Fri, 31 Jul 2009 21:39:55 +0000 (21:39 +0000)]
PreferredEHDataFormat is always call with data and global, but this whole
thing is #if0'd out anyway.  Just simplify the code by reducing the interface.
Not deleting this is essential for Bill's continuing happiness.

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

14 years agoFix unit tests.
Owen Anderson [Fri, 31 Jul 2009 21:38:10 +0000 (21:38 +0000)]
Fix unit tests.

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

14 years agoMove the metadata constructors back to 2.5 syntax.
Owen Anderson [Fri, 31 Jul 2009 21:35:40 +0000 (21:35 +0000)]
Move the metadata constructors back to 2.5 syntax.

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

14 years agoUpdate unittest for LLVM API change.
Benjamin Kramer [Fri, 31 Jul 2009 20:56:31 +0000 (20:56 +0000)]
Update unittest for LLVM API change.

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