Commit Graph

49834 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 5d8ace0902 Fix Bug 4657: register scavenger asserts with subreg lowering
When LowerSubregsInstructionPass::LowerInsert eliminates an INSERT_SUBREG
instriction because it is an identity copy, make sure that the same registers
are alive before and after the elimination.

When the super-register is marked <undef> this requires inserting an
IMPLICIT_DEF instruction to make sure the super register is live.

Fix a related bug where a kill flag on the inserted sub-register was not transferred properly.

Finally, clear the undef flag in MachineInstr::addRegisterKilled. Undef implies dead and kill implies live, so they cant both be valid.

llvm-svn: 77989
2009-08-03 20:08:18 +00:00
Jakob Stoklund Olesen a73416bd1c Minor stylistic cleanups in the Blackfin target.
Thanks Chris.

llvm-svn: 77987
2009-08-03 19:32:30 +00:00
Eli Friedman cfd3bbe643 Make SimplifyDemandedUseBits generate vector constants where
appropriate.  Patch per report on llvmdev.  No testcase because the 
original report didn't come with a testcase, and I can't come up with a case
that actually fails.

llvm-svn: 77986
2009-08-03 19:15:42 +00:00
Chris Lattner 9170f36f5c make getObjFileLowering() return a non-const reference.
llvm-svn: 77984
2009-08-03 19:12:26 +00:00
Chris Lattner 87a2ebd77d remove a dead switch directive, replace it with some
code that I will be using shortly.

llvm-svn: 77983
2009-08-03 19:10:44 +00:00
Bob Wilson 5f6f72605b Revert 77974. It breaks 3 of the ARM tests.
llvm-svn: 77982
2009-08-03 19:06:29 +00:00
Evan Cheng 3aa1e77572 Remove neverHasSideEffects on MMX_MOVD64rrv164 since it has a matching pattern.
llvm-svn: 77978
2009-08-03 18:07:19 +00:00
Chris Lattner 21f54a7572 eliminate textual section switching from intel asm printer.
This will cause it to enter the ".text" section instead of "_text"
but masm is already broken.

llvm-svn: 77977
2009-08-03 18:06:07 +00:00
Chris Lattner c85652192c make SwitchToSection accept null sections for now.
llvm-svn: 77976
2009-08-03 18:04:42 +00:00
Daniel Dunbar 1b7868ec54 Change C, CBE, MSIL to not provide target data via getTargetData().
- The theory is these should never actually be called, since these boil down to
   passes which can access the target data via the standard mechanism.

llvm-svn: 77975
2009-08-03 17:40:25 +00:00
Sanjiv Gupta 9503900c60 Allow targets to custom handle softening of results or operands before trying the standard stuff.
llvm-svn: 77974
2009-08-03 17:35:21 +00:00
Daniel Dunbar c0deed3263 Provide target data from the module if the target machine doesn't have any.
llvm-svn: 77973
2009-08-03 17:34:19 +00:00
Benjamin Kramer c28b306423 llvm_report_error already prints "LLVM ERROR:". So stop reporting errors like "LLVM ERROR: llvm: error:" or "LLVM ERROR: ERROR:".
llvm-svn: 77971
2009-08-03 13:33:33 +00:00
Anton Korobeynikov f48daf5823 Unbreak win64 compilation callback.
Since we're generating stubs by hands we don't follow the ABI and don't
create a register spill area.
Don't use this area in compilation callback!

llvm-svn: 77968
2009-08-03 08:43:36 +00:00
Evan Cheng 093e124256 Fix a coaelescer bug. If a copy val# is extended to eliminate a non-trivially coalesced copy, and the copy kills its source register. Trim the source register's live range to the last use if possible. This fixes up kill marker to make the scavenger happy.
llvm-svn: 77967
2009-08-03 08:41:59 +00:00
Anton Korobeynikov 03056efe01 Create proper frame index for FP
llvm-svn: 77966
2009-08-03 08:14:30 +00:00
Anton Korobeynikov 7d80ab1593 Perform bitconvert to proper type
llvm-svn: 77965
2009-08-03 08:14:14 +00:00
Anton Korobeynikov 442beabbf7 Add 'Indirect' LocInfo class and use to pass __m128 on win64. Also minore fixes here and there (mostly __m64).
llvm-svn: 77964
2009-08-03 08:13:56 +00:00
Anton Korobeynikov 72bc3846bc Cleanup Darwin MMX calling conv stuff - make the stuff more generic. This also fixes a subtle bug, when 6th v1i64 argument passed wrongly.
llvm-svn: 77963
2009-08-03 08:13:24 +00:00
Anton Korobeynikov 71386e08fe Unbreak Win64 CC. Step one: honour register save area, fix some alignment and provide a different set of call-clobberred registers.
llvm-svn: 77962
2009-08-03 08:12:53 +00:00
Nick Lewycky 129bb4165f Remove the GCC path from libLTO. This has been superceded by setAssemblerPath.
llvm-svn: 77960
2009-08-03 07:16:42 +00:00
Devang Patel 79238d7e6b Add NamedMDNode destructor.
llvm-svn: 77959
2009-08-03 06:19:01 +00:00
Rafael Espindola 70e9816624 Use movd instead of movq
llvm-svn: 77956
2009-08-03 05:21:05 +00:00
Daniel Dunbar 75bc528442 Add FileUpdate tool, conditionally updates its output based on its input.
- Gratuitous and unused, but possibly useful one day.

llvm-svn: 77954
2009-08-03 05:12:16 +00:00
Daniel Dunbar 1a6a39eb46 Fix a race condition in getting the process exit code on Win32.
llvm-svn: 77953
2009-08-03 05:02:46 +00:00
Daniel Dunbar 719d235520 Remove now unused arguments from TargetRegistry::lookupTarget.
llvm-svn: 77950
2009-08-03 04:20:57 +00:00
Evan Cheng 97f7dfb862 These are done.
llvm-svn: 77949
2009-08-03 04:08:36 +00:00
Daniel Dunbar 0f16ea5c30 Pass target triple string in to TargetMachine constructor.
This is not just a matter of passing in the target triple from the module;
currently backends are making decisions based on the build and host
architecture. The goal is to migrate to making these decisions based off of the
triple (in conjunction with the feature string). Thus most clients pass in the
target triple, or the host triple if that is empty.

This has one important change in the way behavior of the JIT and llc.

For the JIT, it was previously selecting the Target based on the host
(naturally), but it was setting the target machine features based on the triple
from the module. Now it is setting the target machine features based on the
triple of the host.

For LLC, -march was previously only used to select the target, the target
machine features were initialized from the module's triple (which may have been
empty). Now the target triple is taken from the module, or the host's triple is
used if that is empty. Then the triple is adjusted to match -march.

The take away is that -march for llc is now used in conjunction with the host
triple to initialize the subtarget. If users want more deterministic behavior
from llc, they should use -mtriple, or set the triple in the input module.

llvm-svn: 77946
2009-08-03 04:03:51 +00:00
Rafael Espindola 7bdf4c2cec Fix the instruction encoding.
llvm-svn: 77944
2009-08-03 03:27:05 +00:00
Rafael Espindola 854d34a9fb Remove a bitcast that was a no-op.
Thanks to Eli Friedman for noticing it.

llvm-svn: 77942
2009-08-03 03:00:05 +00:00
Rafael Espindola 18ba271a79 Use movq to move 64 bits in and out of mmx registers.
Fixes PR4669

llvm-svn: 77940
2009-08-03 02:45:34 +00:00
Evan Cheng 8b9deebba3 Use the i12 variant of load / store opcodes if offset is zero. Now we pass all of multisource as well.
llvm-svn: 77939
2009-08-03 02:38:06 +00:00
Eli Friedman 57c11da8df Remove -disable-mips-abicall and -enable-mips-absolute-call command-line
options, which don't appear to be useful.  -enable-mips-absolute-call is
completely unused (and unless I'm mistaken, is supposed to have the 
same effect that -relocation-model=dynamic-no-pic should have), 
and -disable-mips-abicall appears to be effectively a 
synonym for -relocation-model=static. Adjust the few users of hasABICall
to checks which seem more appropriate.  Update MipsSubtarget, 
MipsTargetMachine, and MipselTargetMachine to synchronize with recent 
changes.

llvm-svn: 77938
2009-08-03 02:22:28 +00:00
Andreas Bolka c833d017c7 Restrict LDA to affine subscripts.
llvm-svn: 77932
2009-08-03 01:03:48 +00:00
Daniel Dunbar f72c0d6b19 Fix some comments referring to std::cerr.
llvm-svn: 77931
2009-08-03 01:02:24 +00:00
Bill Wendling 6eecd56efc - s/DOUT/DEBUG(errs()/g
- Tidy up some headers.

llvm-svn: 77929
2009-08-03 00:11:34 +00:00
Daniel Dunbar c3719c36e6 Move most targets TargetMachine constructor to only taking a target triple.
- The C, C++, MSIL, and Mips backends still need the module.

llvm-svn: 77927
2009-08-02 23:37:13 +00:00
Andreas Bolka 71fc19e991 Expand LDA testcases.
llvm-svn: 77926
2009-08-02 23:28:14 +00:00
Richard Osborne bbb772ace9 Add extra SEXT pattern.
llvm-svn: 77920
2009-08-02 22:45:24 +00:00
Bill Wendling d35fbe4595 The x86 jit doesn't generate a def_cfa_offset unwind instruction after the
pushes in the function prolog if the function doesn't have any stack space,
i.e. for a prolog like:

0x40011870:     push %r15
0x40011872:     push %r14
0x40011874:     push %rbx

Patch by Zoltan!

llvm-svn: 77919
2009-08-02 22:25:37 +00:00
Daniel Dunbar 31b44e8f6c Normalize Subtarget constructors to take a target triple string instead of
Module*.

Also, dropped uses of TargetMachine where unnecessary. The only target which
still takes a TargetMachine& is Mips, I would appreciate it if someone would
normalize this to match other targets.

llvm-svn: 77918
2009-08-02 22:11:08 +00:00
Jakob Stoklund Olesen 7dc3b72685 Remove unneeded intrinsics from Blackfin backend.
__builtin_bfin_ones does the same as ctpop, so it can be implemented in the front-end.

__builtin_bfin_loadbytes loads from an unaligned pointer with the disalignexcpt instruction. It does the same as loading from a pointer with the low bits masked. It is better if the front-end creates a masked load. We can always instruction select the masked to disalignexcpt+load.

We keep csync/ssync/idle. These intrinsics represent instructions that need workarounds for some silicon revisions. We may even want to convert inline assembler to intrinsics to enable the workarounds.

llvm-svn: 77917
2009-08-02 21:49:05 +00:00
Nick Lewycky 133d9105d3 Fix the build for people with oprofile installed.
llvm-svn: 77914
2009-08-02 20:51:44 +00:00
Daniel Dunbar 381b89d3f1 Empty arguments need to be quoted on Win32.
llvm-svn: 77913
2009-08-02 20:41:09 +00:00
Jakob Stoklund Olesen 185eb035e9 Fix issue in regscavenger when scavenging a callee-saved register that has not been spilled.
llvm-svn: 77912
2009-08-02 20:29:41 +00:00
Edward O'Callaghan 4bf58b8add One two many newlines at end of file LLVMContextImpl.cpp
llvm-svn: 77911
2009-08-02 20:06:26 +00:00
Daniel Dunbar b3f40651d3 Adjust comment to distinguish between target name and triple target name they
match.

llvm-svn: 77908
2009-08-02 19:41:20 +00:00
Edward O'Callaghan 2dd529c9ef Fix no newline at end of LLVMContextImpl.cpp
llvm-svn: 77907
2009-08-02 19:38:12 +00:00
Jakob Stoklund Olesen c59cd9bcd0 Never add a kill flag to a constrained physical register in a two-addr instruction.
llvm-svn: 77906
2009-08-02 19:13:03 +00:00
Jakob Stoklund Olesen 5d52bfbbc9 Scavenger asserts.
Allow imp-def and imp-use of anything in the scavenger asserts, just like the machine code verifier.
Allow redefinition of a sub-register of a live register.

llvm-svn: 77904
2009-08-02 18:28:41 +00:00
Jakob Stoklund Olesen 2a21149b20 Add some basic blackfin intrinsics.
llvm-svn: 77903
2009-08-02 18:28:11 +00:00
Jakob Stoklund Olesen ddddf2d549 Add support for CPU features (i.e., bugs) and workarounds.
This is just the framework to identify the needed workarounds. They are not actually implemented.

llvm-svn: 77902
2009-08-02 18:27:36 +00:00
Jakob Stoklund Olesen b052972a58 Inline assembly support for Blackfin.
We use the same constraints as GCC, including those that are slightly insane for inline assembler.

llvm-svn: 77899
2009-08-02 17:39:17 +00:00
Jakob Stoklund Olesen 526e803f6a Build Blackfin target with autoconf and cmake.
Note that configure was edited by hand. Will somebody with the correct version of autoconf please regenerate?

llvm-svn: 77898
2009-08-02 17:32:37 +00:00
Jakob Stoklund Olesen 552d8d6618 Analog Devices Blackfin back-end.
Generate code for the Blackfin family of DSPs from Analog Devices:

  http://www.analog.com/en/embedded-processing-dsp/blackfin/processors/index.html
  
We aim to be compatible with the exsisting GNU toolchain found at:

  http://blackfin.uclinux.org/gf/project/toolchain
  
The back-end is experimental.

llvm-svn: 77897
2009-08-02 17:32:10 +00:00
Dan Gohman 3f323847bc Avoid forming a SELECT_CC in a type that the target doesn't
support. This isn't immediately interesting, because Legalize
ends up lowering SELECT_CC if the target doesn't support it,
but this simplifies the process.

Also, if the SELECT_CC would be expanded in Legalize, it
can potentially end up with two copies of the condition
expression. By leaving it as SELECT+SETCC, the SELECT can be
expanded into two SELECTs that use a single SETCC.

The two comparisons are usually CSE'd, but depending on
when various expressions get legalized, the comparison
expression could involve calls to library functions, such
that the comparison expression may not be able to be CSE'd.
This will be needed by a future patch.

llvm-svn: 77896
2009-08-02 16:19:38 +00:00
Dan Gohman 757eee8a27 Fix indentation.
llvm-svn: 77895
2009-08-02 16:10:52 +00:00
Dan Gohman 73efcaf6e1 Add a comment.
llvm-svn: 77894
2009-08-02 16:10:01 +00:00
Dan Gohman 1ccfa8bdc1 Resync lea32addr and lea64addr.
llvm-svn: 77893
2009-08-02 16:09:17 +00:00
Benjamin Kramer 666cf9d2f2 Remove duplicated colons and spaces.
llvm-svn: 77892
2009-08-02 12:13:02 +00:00
Jakob Stoklund Olesen f70d50419e Handle <undef> flag in machine code verifier.
Use of an <undef> register is treated like an <imp-use>. It is not an error to use a dead <undef> register.

llvm-svn: 77890
2009-08-02 07:38:21 +00:00
Chris Lattner 1472cf5b3f move dwarf debug info section selection stuff from TAI to
TLOF, unifying all the dwarf targets at the same time.

llvm-svn: 77889
2009-08-02 07:24:22 +00:00
Chris Lattner c784feba8e convert EHFrameSection to be managed by TLOF instead of TAI.
llvm-svn: 77888
2009-08-02 06:52:36 +00:00
Chris Lattner bdde99bd42 I need Triple information, 10.6 shouldn't set this, it bloats
object files.

llvm-svn: 77887
2009-08-02 06:51:58 +00:00
Chris Lattner 8a0db7516e ARM TAI no longer needs a TM, but createTargetAsmInfo() still does.
llvm-svn: 77878
2009-08-02 05:23:52 +00:00
Chris Lattner e98a3c3ca3 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.

llvm-svn: 77877
2009-08-02 05:20:37 +00:00
Chris Lattner 0161419259 move a virtual method body to its .cpp file to avoid a #include
in a header.

llvm-svn: 77874
2009-08-02 04:58:19 +00:00
Chris Lattner 1fe76c385b turn some templated inline functions into static functions.
llvm-svn: 77873
2009-08-02 04:52:00 +00:00
Chris Lattner df672c2bb2 alpha TAI doesn't need TM.
llvm-svn: 77872
2009-08-02 04:46:05 +00:00
Chris Lattner d4c8fd44ee MSP430 TAI doesn't need TM.
llvm-svn: 77871
2009-08-02 04:45:22 +00:00
Chris Lattner d45a7860ec simplify SPULinuxTargetAsmInfo, remove use of TM.
llvm-svn: 77869
2009-08-02 04:44:33 +00:00
Chris Lattner 2be66ce420 xcore TAI doesn't need TM.
llvm-svn: 77868
2009-08-02 04:42:09 +00:00
Chris Lattner 3ea23cff65 PIC16 TAI doesn't need TM
llvm-svn: 77867
2009-08-02 04:41:14 +00:00
Chris Lattner fb53861ee0 remove the dead ELFTargetAsmInfo.h/cpp file. TargetAsmInfo
defaults to being ELF.

llvm-svn: 77866
2009-08-02 04:33:09 +00:00
Chris Lattner 7ee0246f51 eliminate the TM argument to the TAI class, remove comment about supporting
solaris :)

llvm-svn: 77865
2009-08-02 04:32:07 +00:00
Chris Lattner d39874e6ec eliminate TargetMAchine argument to sparc TAI
llvm-svn: 77864
2009-08-02 04:30:59 +00:00
Chris Lattner b25afe081c remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM!

llvm-svn: 77863
2009-08-02 04:27:24 +00:00
Chris Lattner cecdb9e772 remove the x86/ppc impls of getEHGlobalPrefix, which is already dead.
llvm-svn: 77861
2009-08-02 04:13:22 +00:00
Daniel Dunbar 2eaf396c41 Add missing flush().
llvm-svn: 77859
2009-08-02 04:12:28 +00:00
Chris Lattner f526fb7e9a clean up #includes of TargetAsmInfo.cpp
llvm-svn: 77858
2009-08-02 04:09:22 +00:00
Chris Lattner 77f686713f move an enum from TM -> TargetOptions. This makes TargetOptions.h
be self contained, and it isn't used from TM.h

llvm-svn: 77857
2009-08-02 04:08:52 +00:00
Chris Lattner 29c6c43cd0 remove the dead PreferredEHDataFormat TAI hook: its now dead
even considering #if 0 code.

llvm-svn: 77856
2009-08-02 04:02:52 +00:00
Chris Lattner 7005cd3fa0 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.

llvm-svn: 77855
2009-08-02 03:59:56 +00:00
Evan Cheng 8e3889f12e Test both darwin and linux.
llvm-svn: 77852
2009-08-02 02:54:34 +00:00
Chris Lattner c16c75ea9b 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.

llvm-svn: 77847
2009-08-02 01:34:32 +00:00
Daniel Dunbar cc5e54e986 Fix a possible crash on delete of an uninitialized variable.
llvm-svn: 77846
2009-08-02 01:25:15 +00:00
Daniel Dunbar 6eca7ab91c Fix an ENABLE_EXPENSIVE_CHECKS error.
llvm-svn: 77845
2009-08-02 01:21:22 +00:00
Dan Gohman 321dc97adf Don't call SectionForGlobal for hasAvailableExternallyLinkage()
variables either.

llvm-svn: 77844
2009-08-02 01:18:44 +00:00
Chris Lattner a17d2e5c21 don't call SectionForGlobal on declarations, you can't tell the section a
declaration will end up in.

llvm-svn: 77843
2009-08-02 01:02:43 +00:00
Chris Lattner 4e7dfafc03 convert ctors/dtors section to be in TLOF instead of
TAI.

llvm-svn: 77842
2009-08-02 00:34:36 +00:00
Chris Lattner c4d6f83f20 switch to filecheck format
llvm-svn: 77841
2009-08-02 00:32:26 +00:00
Chris Lattner 9836976567 don't override the default of this, the only difference is \t instead of ' '.
llvm-svn: 77838
2009-08-02 00:12:20 +00:00
Daniel Dunbar b2aebed2dc Change MCOperand to use Create style instead of Make style for constructing
operands.

llvm-svn: 77837
2009-08-02 00:09:22 +00:00
Chris Lattner 7bb2097143 make SectionKind::Kind completely private now.
llvm-svn: 77836
2009-08-02 00:04:12 +00:00
Chris Lattner 73d577c933 Make SectionKind::get() private.
llvm-svn: 77835
2009-08-02 00:02:44 +00:00
Chris Lattner f8d9710b6f (re)introduce new simpler apis for creation sectionkinds.
llvm-svn: 77834
2009-08-01 23:57:16 +00:00
Chris Lattner 0c40266b5a 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.

llvm-svn: 77833
2009-08-01 23:46:12 +00:00
Chris Lattner cc71620c86 give alpha its readonly section. This optimizes alpha, and prevents a
testsuite regression with a coming patch.

llvm-svn: 77832
2009-08-01 23:44:04 +00:00
Chris Lattner 84b453aca4 .rdata == .rodata on mips.
llvm-svn: 77827
2009-08-01 23:07:29 +00:00
Chris Lattner b1a3309a18 no need to override the default with the default.
llvm-svn: 77826
2009-08-01 23:05:25 +00:00
Chris Lattner 5038edb3ee one fewer license, yay. :)
llvm-svn: 77824
2009-08-01 22:54:39 +00:00
Chris Lattner 37d60ffce0 eXtensible Systems doesn't exist any more and Reid donated this to the
project under the normal license, yay. :)

llvm-svn: 77823
2009-08-01 22:54:17 +00:00
Chris Lattner 61990958d8 loweringinfo is always non-null.
llvm-svn: 77821
2009-08-01 22:48:40 +00:00
Chris Lattner b2bbb61f33 REmove dead fields of TAI.
llvm-svn: 77820
2009-08-01 22:40:22 +00:00
Chris Lattner b4b1012d29 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.

llvm-svn: 77818
2009-08-01 22:25:12 +00:00
Chris Lattner 5aa4952625 update for rename
llvm-svn: 77817
2009-08-01 22:06:53 +00:00
Chris Lattner d5c01136ef fix a fixme by sinking various target-specific directives down into
the appropriate subclasses.

llvm-svn: 77815
2009-08-01 21:56:13 +00:00
Chris Lattner 286326ed24 coff also doesn't have a ReadOnlySection yet, (!)
llvm-svn: 77814
2009-08-01 21:49:24 +00:00
Chris Lattner bc3d5f5db0 coff doesn't set a .bss seciton, so this is dead.
llvm-svn: 77813
2009-08-01 21:48:25 +00:00
Chris Lattner 26fb277f92 it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
llvm-svn: 77812
2009-08-01 21:46:23 +00:00
Chris Lattner 72c3e7746f don't use isWeak anymore.
llvm-svn: 77810
2009-08-01 21:42:58 +00:00
Chris Lattner 9ba71d12d8 fix a layering violation by moving SectionKind out to its own header.
llvm-svn: 77808
2009-08-01 21:30:49 +00:00
Dan Gohman a152345dfb Minor whitespace tidiness.
llvm-svn: 77807
2009-08-01 21:25:46 +00:00
Dan Gohman 9139b02cda Fix typos in comments.
llvm-svn: 77806
2009-08-01 21:25:00 +00:00
Chris Lattner fba48fbfdd with the previous refactoring, fixme fixed!
llvm-svn: 77805
2009-08-01 21:21:43 +00:00
Chris Lattner a61c05adc0 update for API change.
llvm-svn: 77804
2009-08-01 21:14:30 +00:00
Chris Lattner c9c277ba0f 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.

llvm-svn: 77803
2009-08-01 21:11:14 +00:00
Chris Lattner 6778f1f368 add a note about the build bots
llvm-svn: 77796
2009-08-01 19:25:25 +00:00
Dan Gohman c278621694 Minor code cleanups.
llvm-svn: 77795
2009-08-01 19:14:37 +00:00
Dan Gohman 3a9b9a59ea Print the target flags as an int instead of a char, as they aren't
actually characters.

llvm-svn: 77794
2009-08-01 19:13:38 +00:00
Dan Gohman 27f169c416 Use the default copy ctor and copy-assignment operators.
llvm-svn: 77793
2009-08-01 19:11:31 +00:00
Dan Gohman 9023fd2b2a Add nounwind to this test.
llvm-svn: 77792
2009-08-01 19:11:04 +00:00
Nick Lewycky 04e3a30a21 Add newline at end of file to remove gcc warning.
llvm-svn: 77791
2009-08-01 19:09:44 +00:00
Benjamin Kramer c10898ce3e Remove now empty unit test directory.
llvm-svn: 77790
2009-08-01 19:07:29 +00:00
Chris Lattner fb1b51c2ed daniel says it's fine to nuke this.
llvm-svn: 77789
2009-08-01 18:38:21 +00:00
Chris Lattner 41a866d30d update for new api
llvm-svn: 77788
2009-08-01 18:35:49 +00:00
Chris Lattner 95bad379a9 All MCSections are now required to have a SectionKind.
llvm-svn: 77787
2009-08-01 18:25:49 +00:00
Eli Friedman f165160724 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.

llvm-svn: 77785
2009-08-01 16:37:18 +00:00
Evan Cheng e64f48ba8b Workaround a couple of Darwin assembler bugs.
llvm-svn: 77781
2009-08-01 06:13:52 +00:00
Dan Gohman c120612daa Give MachineFunctionAnalysis a destructor so it can verify that
that it released its allocated memory.

llvm-svn: 77775
2009-08-01 04:19:43 +00:00
Dan Gohman 859103d8e7 Delete a redundant variable.
llvm-svn: 77774
2009-08-01 04:18:29 +00:00
Dan Gohman 7153692bdf Minor code simplifications.
llvm-svn: 77769
2009-08-01 03:51:09 +00:00
Dan Gohman edfad17d9b Minor code simplifications.
llvm-svn: 77768
2009-08-01 03:42:59 +00:00
Daniel Dunbar e9feb71497 Avoid a problem with ulimit on Solaris & friends, patch by Edward O'Callaghan!
llvm-svn: 77767
2009-08-01 03:37:54 +00:00
Evan Cheng e6e8289d72 Split t2MOVCCs since some assemblers do not recognize mov shifted register alias with predicate.
llvm-svn: 77764
2009-08-01 01:43:45 +00:00
Ted Kremenek 13710adad9 Make default ctor for ImmutableSet::iterator public.
llvm-svn: 77762
2009-08-01 01:28:23 +00:00
Daniel Dunbar c54ecb384d llvm-mc: More quoted identifier support.
llvm-svn: 77761
2009-08-01 00:48:30 +00:00
Dan Gohman 1987bf4561 SelectionDAGISel no longer needs to check hasAvailableExternallyLinkage,
as it is now a MachineFunctionPass, and MachineFunctionPass now handles
this.

llvm-svn: 77760
2009-08-01 00:42:23 +00:00
Dan Gohman ac31be1e06 Make UnreachableMachineBlockElim preserve MachineDominatorTree and
MachineLoopInfo.

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

llvm-svn: 77759
2009-08-01 00:34:30 +00:00
Dan Gohman d0984565de The X86 maximal stack alignment calculator preserves the CFG. Also,
be more careful about the return value of runOnMachineFunction.

llvm-svn: 77758
2009-08-01 00:31:02 +00:00
Dan Gohman 6735e10fb0 X86 floating-point passes don't modify the CFG.
llvm-svn: 77757
2009-08-01 00:26:16 +00:00
Evan Cheng 6ab54fdb0a 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.

llvm-svn: 77756
2009-08-01 00:16:10 +00:00
Dan Gohman 82e72324dd Use setPreservesAll in X86CodeEmitter.
llvm-svn: 77755
2009-07-31 23:44:16 +00:00
Dan Gohman 0402315d41 Use setPreservesAll and setPreservesCFG in CodeGen passes.
llvm-svn: 77754
2009-07-31 23:37:33 +00:00
Dan Gohman 10b8898ac0 SelectionDAGISel does not "preserve all", since it makes lots of changes
to the MachineFunction.

llvm-svn: 77753
2009-07-31 23:36:22 +00:00
Dan Gohman dd3da92b4a Use a range insert instead of an explicit loop.
llvm-svn: 77752
2009-07-31 23:36:06 +00:00
Daniel Dunbar ce24e0043e llvm-mc: Add -triple, and fix some typos
llvm-svn: 77750
2009-07-31 23:13:12 +00:00
Daniel Dunbar e0cbd9b986 llvm-mc: Fix .s output to quote section & symbol names when necessary.
llvm-svn: 77749
2009-07-31 23:04:32 +00:00
Owen Anderson c8c302644c Privatize all but one of the remaining constant tables.
llvm-svn: 77748
2009-07-31 22:45:43 +00:00
Bob Wilson 84aa855ead 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.

llvm-svn: 77747
2009-07-31 22:41:21 +00:00