Commit Graph

49934 Commits

Author SHA1 Message Date
Eli Friedman
cdc0654b3e 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 19:15:42 +00:00
Chris Lattner
38c398808c make getObjFileLowering() return a non-const reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 19:12:26 +00:00
Chris Lattner
9a7a4d2a60 remove a dead switch directive, replace it with some
code that I will be using shortly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 19:10:44 +00:00
Bob Wilson
6e7a85c075 Revert 77974. It breaks 3 of the ARM tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 19:06:29 +00:00
Evan Cheng
d2aee8ce89 Remove neverHasSideEffects on MMX_MOVD64rrv164 since it has a matching pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 18:07:19 +00:00
Chris Lattner
1763766a57 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 18:06:07 +00:00
Chris Lattner
d54a6b8c58 make SwitchToSection accept null sections for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 18:04:42 +00:00
Daniel Dunbar
d1a919e139 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 17:40:25 +00:00
Sanjiv Gupta
2caf1b212e Allow targets to custom handle softening of results or operands before trying the standard stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 17:35:21 +00:00
Daniel Dunbar
4e02eb0f67 Provide target data from the module if the target machine doesn't have any.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 17:34:19 +00:00
Benjamin Kramer
d5fe92efbc llvm_report_error already prints "LLVM ERROR:". So stop reporting errors like "LLVM ERROR: llvm: error:" or "LLVM ERROR: ERROR:".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 13:33:33 +00:00
Anton Korobeynikov
0144280cfb 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77968 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 08:43:36 +00:00
Evan Cheng
eed0ff147c 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 08:41:59 +00:00
Anton Korobeynikov
dd93f5eb71 Create proper frame index for FP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77966 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 08:14:30 +00:00
Anton Korobeynikov
6dde14bc25 Perform bitconvert to proper type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 08:14:14 +00:00
Anton Korobeynikov
4ab15535e7 Add 'Indirect' LocInfo class and use to pass __m128 on win64. Also minore fixes here and there (mostly __m64).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 08:13:56 +00:00
Anton Korobeynikov
80cb8aa862 Cleanup Darwin MMX calling conv stuff - make the stuff more generic. This also fixes a subtle bug, when 6th v1i64 argument passed wrongly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 08:13:24 +00:00
Anton Korobeynikov
cf6b739d3d Unbreak Win64 CC. Step one: honour register save area, fix some alignment and provide a different set of call-clobberred registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 08:12:53 +00:00
Nick Lewycky
3e4c41a84a Remove the GCC path from libLTO. This has been superceded by setAssemblerPath.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 07:16:42 +00:00
Devang Patel
a82f8838c6 Add NamedMDNode destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 06:19:01 +00:00
Rafael Espindola
8d632c1e98 Use movd instead of movq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 05:21:05 +00:00
Daniel Dunbar
05084716c1 Add FileUpdate tool, conditionally updates its output based on its input.
- Gratuitous and unused, but possibly useful one day.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 05:12:16 +00:00
Daniel Dunbar
defc85327a Fix a race condition in getting the process exit code on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 05:02:46 +00:00
Daniel Dunbar
4bd03abe59 Remove now unused arguments from TargetRegistry::lookupTarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 04:20:57 +00:00
Evan Cheng
9072c8198d These are done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 04:08:36 +00:00
Daniel Dunbar
3c2d4bf97f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 04:03:51 +00:00
Rafael Espindola
0c794b8725 Fix the instruction encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 03:27:05 +00:00
Rafael Espindola
cc2b67af91 Remove a bitcast that was a no-op.
Thanks to Eli Friedman for noticing it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77942 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 03:00:05 +00:00
Rafael Espindola
def390a30a Use movq to move 64 bits in and out of mmx registers.
Fixes PR4669



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 02:45:34 +00:00
Evan Cheng
a8e8984ee4 Use the i12 variant of load / store opcodes if offset is zero. Now we pass all of multisource as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 02:38:06 +00:00
Eli Friedman
e2c7408199 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 02:22:28 +00:00
Andreas Bolka
5eca4525f4 Restrict LDA to affine subscripts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77932 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 01:03:48 +00:00
Daniel Dunbar
275872e799 Fix some comments referring to std::cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 01:02:24 +00:00
Bill Wendling
0ea8bf3590 - s/DOUT/DEBUG(errs()/g
- Tidy up some headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77929 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 00:11:34 +00:00
Daniel Dunbar
e28039cfd1 Move most targets TargetMachine constructor to only taking a target triple.
- The C, C++, MSIL, and Mips backends still need the module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 23:37:13 +00:00
Andreas Bolka
c20a6fd8ce Expand LDA testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 23:28:14 +00:00
Richard Osborne
d558ea5e0a Add extra SEXT pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 22:45:24 +00:00
Bill Wendling
3bb9b9a1ab 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 22:25:37 +00:00
Daniel Dunbar
3be03406c9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77918 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 22:11:08 +00:00
Jakob Stoklund Olesen
1391cc19d0 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 21:49:05 +00:00
Nick Lewycky
a9a03f9c12 Fix the build for people with oprofile installed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77914 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 20:51:44 +00:00
Daniel Dunbar
9a0b574ba4 Empty arguments need to be quoted on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 20:41:09 +00:00
Jakob Stoklund Olesen
b36eb9df20 Fix issue in regscavenger when scavenging a callee-saved register that has not been spilled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 20:29:41 +00:00
Edward O'Callaghan
7b4e503cdc One two many newlines at end of file LLVMContextImpl.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 20:06:26 +00:00
Daniel Dunbar
83c9e6bc0d Tweak svn:ignore more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 19:53:40 +00:00
Daniel Dunbar
b222956ecc Tweak svn:ignore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77909 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 19:53:19 +00:00
Daniel Dunbar
bf4fc28303 Adjust comment to distinguish between target name and triple target name they
match.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 19:41:20 +00:00
Edward O'Callaghan
079029b949 Fix no newline at end of LLVMContextImpl.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 19:38:12 +00:00
Jakob Stoklund Olesen
ece4818516 Never add a kill flag to a constrained physical register in a two-addr instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77906 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 19:13:03 +00:00
Jakob Stoklund Olesen
0e6a4efdd4 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77904 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 18:28:41 +00:00