Commit Graph

49842 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes 98fcfdbf9d Remove accidental commited comment
llvm-svn: 78177
2009-08-05 07:00:43 +00:00
Bruno Cardoso Lopes 2b1dc9a783 - Remove custom handling of jumptables by the elf writter (this was
a dirty hack and isn't need anymore since the last x86 code emitter patch)
- Add a target-dependent modifier to addend calculation
- Use R_X86_64_32S relocation for X86::reloc_absolute_word_sext
- Use getELFSectionFlags whenever possible
- fix getTextSection to use TLOF and emit the right text section 
- Handle global emission for static ctors, dtors and Type::PointerTyID
- Some minor fixes

llvm-svn: 78176
2009-08-05 06:57:03 +00:00
Evan Cheng e219be7346 80 col violations.
llvm-svn: 78175
2009-08-05 06:41:25 +00:00
Chris Lattner 0aff0b2b58 common globals may also not be marked constant.
llvm-svn: 78169
2009-08-05 05:41:44 +00:00
Dan Gohman e32c0fe584 Revert changes accidentally committed along with r78163.
llvm-svn: 78165
2009-08-05 05:38:13 +00:00
Dan Gohman 8c79569853 Teach X86FastISel how to handle CCValAssign::BCvt, which is used for
MMX arguments. This fixes PR4684.

llvm-svn: 78163
2009-08-05 05:33:42 +00:00
Chris Lattner d055488c72 Clarify common linkage and the requirements on it. Enforce
them in the verifier.

llvm-svn: 78160
2009-08-05 05:21:07 +00:00
Andreas Bolka 13b860992a ZIV tester for LDA.
llvm-svn: 78157
2009-08-05 04:26:05 +00:00
Chris Lattner cbc7b26542 expose SectionKindForGlobal to curious clients, named as
getKindForGlobal.

llvm-svn: 78156
2009-08-05 04:25:40 +00:00
Andreas Bolka d3a44b52c6 Restrict LDA to GEPs with the same pointer offset.
We can not simply apply ZIV testing to the pointer offsets, as this
would incorrectly return independence for e.g. (GEP x,0,i; GEP x,1,-i).

llvm-svn: 78155
2009-08-05 04:13:41 +00:00
Chris Lattner 3e5b272361 add a temporary hook to allow reuse of the asmprinter from the disassembler.
llvm-svn: 78154
2009-08-05 04:09:18 +00:00
Andreas Bolka 2979eb8f35 Fix LDA testcases.
llvm-svn: 78153
2009-08-05 04:03:29 +00:00
Evan Cheng 379429200e Turn some insert_subreg, extract_subreg, subreg_to_reg into implicit_defs.
llvm-svn: 78151
2009-08-05 03:53:14 +00:00
Bob Wilson 85f60cc5a8 Oops. I didn't mean to commit this piece yet.
llvm-svn: 78146
2009-08-05 02:47:13 +00:00
Evan Cheng 1f7b549c79 One more. Transfer kill of the larger register when lowering an EXTRACT_SUBREG.
llvm-svn: 78145
2009-08-05 02:25:11 +00:00
Evan Cheng 6376367356 One more place where subreg lowering forgot to transfer undefness.
llvm-svn: 78144
2009-08-05 01:57:22 +00:00
Dan Gohman f9bbcd1afd Major calling convention code refactoring.
Instead of awkwardly encoding calling-convention information with ISD::CALL,
ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
provides three virtual functions for targets to override:
LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
lowering done on the special nodes. They provide the same information, but
in a more immediately usable format.

This also reworks much of the target-independent tail call logic. The
decision of whether or not to perform a tail call is now cleanly split
between target-independent portions, and the target dependent portion
in IsEligibleForTailCallOptimization.

This also synchronizes all in-tree targets, to help enable future
refactoring and feature work.

llvm-svn: 78142
2009-08-05 01:29:28 +00:00
Evan Cheng cdb125ce66 If the insert_subreg source is <undef>, insert an implicit_def instead of a copy.
llvm-svn: 78141
2009-08-05 01:29:24 +00:00
Dan Gohman 5d79a2c62c Various comment fixes.
llvm-svn: 78139
2009-08-05 01:19:01 +00:00
Dan Gohman cbf1e16ad9 Remove an unnecessary flush in the CppBackend's output.
llvm-svn: 78138
2009-08-05 01:06:38 +00:00
Dan Gohman c6b5e8a5c5 Don't flush the raw_ostream between each MachineFunction. These flush
calls were originally put in place because errs() at one time was
not unbuffered, and these print routines are commonly used with errs()
for debugging. However, errs() is now properly unbuffered, so the
flush calls are no longer needed. This significantly reduces the
number of write(2) calls for regular asm printing when there are many
small functions.

llvm-svn: 78137
2009-08-05 00:49:25 +00:00
Bob Wilson 20f79e321e Change DAG nodes for Neon VLD2/3/4 operations to return multiple results.
Get rid of yesterday's code to fix the register usage during isel.
Select the new DAG nodes to machine instructions.  The new pre-alloc pass
to choose adjacent registers for these results is not done, so the
results of this will generally not assemble yet.

llvm-svn: 78136
2009-08-05 00:49:09 +00:00
Dan Gohman 400cd1a87a cerr isn't buffered so it doesn't need to be flushed.
llvm-svn: 78135
2009-08-05 00:44:01 +00:00
Dan Gohman b880939834 lli doesn't need <iostream> anymore.
llvm-svn: 78133
2009-08-05 00:28:59 +00:00
Dan Gohman 7ce1fe2d04 Remove needless uses of std::flush in the parent process after a
fork call. This eliminates a need for <iostream>. Also remove
needless fsync calls.

llvm-svn: 78131
2009-08-05 00:17:00 +00:00
Owen Anderson e565995c65 Privatize the PointerType factory.
llvm-svn: 78130
2009-08-05 00:15:12 +00:00
Bruno Cardoso Lopes 1b02ceeb41 1) Proper emit displacements for x86, using absolute relocations where necessary
for ELF to work.  
2) RIP addressing: Use SIB bytes for absolute relocations where RegBase=0, 
IndexReg=0.
3) The JIT can get the real address of cstpools and jmptables during
code emission, fix that for object code emission

llvm-svn: 78129
2009-08-05 00:11:21 +00:00
Dan Gohman 23a419f361 Use _exit rather than exit in the child process after a failed exec.
Add a comment explaining why.

llvm-svn: 78128
2009-08-05 00:09:12 +00:00
Jeffrey Yasskin 337b124a24 Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's old
address from the reverse mapping, and add a test that this works now.

llvm-svn: 78127
2009-08-04 23:53:16 +00:00
Evan Cheng 7cc6aca1e6 Fix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.
llvm-svn: 78126
2009-08-04 23:47:55 +00:00
Owen Anderson d918649d5f Privatize the VectorType uniquing.
llvm-svn: 78125
2009-08-04 23:47:44 +00:00
Owen Anderson 542cffc3eb Begin the process of privatizing the type uniquing tables. No API changes yet, but there will be in the near future.
llvm-svn: 78122
2009-08-04 23:33:01 +00:00
Dan Gohman 298bce2aa9 Check for !isa<Constant> instead of isa<Instruction>. This
matches what the comment says, and it avoids spurious BitCast
instructions for Argument values.

llvm-svn: 78121
2009-08-04 23:23:56 +00:00
Dan Gohman 6faa1d2f8f Follow Unix behavior and return 127 if the command is not found,
and 126 if it is not executable.

llvm-svn: 78120
2009-08-04 23:15:49 +00:00
Chris Lattner 694285ca6d revert r78048, it isn't worth using assertingvh here.
llvm-svn: 78119
2009-08-04 23:07:12 +00:00
Benjamin Kramer 83c917a627 Update CMakeLists.
llvm-svn: 78118
2009-08-04 23:02:53 +00:00
Owen Anderson 9b67698574 It helps if I remember to actually add the file...
llvm-svn: 78116
2009-08-04 22:55:26 +00:00
Owen Anderson afd0c4cd56 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.

llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Evan Cheng 28c2d9809d Fix test.
llvm-svn: 78113
2009-08-04 22:22:58 +00:00
Bob Wilson 6092c8d231 Convert more Neon tests to use FileCheck.
llvm-svn: 78111
2009-08-04 22:01:41 +00:00
Bob Wilson a8720101b5 Replace dregsingle operand modifier with explicit escaped curly brackets.
For other VLDn and VSTn operations, we need to list the multiple registers
explicitly anyway, so there's no point in special-casing this one usage.

llvm-svn: 78109
2009-08-04 21:39:33 +00:00
Bob Wilson 2b60721464 Convert a few Neon tests to use FileCheck.
llvm-svn: 78108
2009-08-04 21:33:22 +00:00
Jakob Stoklund Olesen 0e0b5405f5 Clean up the handling of two-address operands in RegScavenger.
This fixes PR4528.

llvm-svn: 78107
2009-08-04 21:30:30 +00:00
Jakob Stoklund Olesen 86cdcdc3d2 Don't give implicit machine operands special treatment in the register scavenger.
Imp-def is *not* allowed to redefine a live register.
Imp-use is *not* allowed to use a dead register.

llvm-svn: 78106
2009-08-04 21:29:11 +00:00
Mike Stump f2dbd2e205 Restlyize to match other targets, fixes cmake build to boot.
llvm-svn: 78105
2009-08-04 21:27:06 +00:00
Evan Cheng 783b65b546 Enable load / store multiple pass for Thumb2. It's not using ldrd / strd yet.
llvm-svn: 78104
2009-08-04 21:12:13 +00:00
Chris Lattner cd450bbbe5 remove a random reference to subtarget. Even without this, we
still get "intel syntax" instructions from llc with  
-x86-asm-syntax=intel

llvm-svn: 78103
2009-08-04 21:12:08 +00:00
David Goodwin 30bf625ac2 Add NEON single-precision FP support for fabs and fneg.
llvm-svn: 78101
2009-08-04 20:39:05 +00:00
Daniel Dunbar f30f4a5887 TableGen / AsmMatcher: Tweaks to avoid generating completely bogus match
functions.
 - Fix variant flattening when the variant embeds an operand reference.

 - Ignore instructions which reference an operand multiple times (e.g., "xorb
   $dst, $dst"), and operands which have extra flags (e.g., "$dst:subreg32").

llvm-svn: 78099
2009-08-04 20:36:45 +00:00
Daniel Dunbar 8b6be17777 When exec() fails, return 127 instead of errno; the parent process has no way to
distinguish that the result is errno, so it can't use it to provide more
information about the error (it also exposes the numeric value of errno).

llvm-svn: 78098
2009-08-04 20:32:25 +00:00