oota-llvm.git
15 years agoAlpha: Get section directives right
Andrew Lenharth [Wed, 5 Aug 2009 13:59:57 +0000 (13:59 +0000)]
Alpha: Get section directives right

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

15 years agoRemove unused forward decls.
Benjamin Kramer [Wed, 5 Aug 2009 11:33:27 +0000 (11:33 +0000)]
Remove unused forward decls.

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

15 years agoAdd executable suffix for the tool. This is needed e.g. for 'make install' on mingw32.
Anton Korobeynikov [Wed, 5 Aug 2009 09:37:43 +0000 (09:37 +0000)]
Add executable suffix for the tool. This is needed e.g. for 'make install' on mingw32.

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

15 years agoPass user only if it's non-empty. Patch by Sandeep.
Anton Korobeynikov [Wed, 5 Aug 2009 09:32:53 +0000 (09:32 +0000)]
Pass user only if it's non-empty. Patch by Sandeep.

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

15 years agoAdd save-temps option to bugpoint to keep temporary stuff.
Anton Korobeynikov [Wed, 5 Aug 2009 09:32:10 +0000 (09:32 +0000)]
Add save-temps option to bugpoint to keep temporary stuff.
Patch by Sandeep Patel

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

15 years agoCleanup in dbg_stoppoint handling in CBE. Patch by Sandeep Patel.
Anton Korobeynikov [Wed, 5 Aug 2009 09:31:40 +0000 (09:31 +0000)]
Cleanup in dbg_stoppoint handling in CBE. Patch by Sandeep Patel.

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

15 years agoMinor arm CBE fixes. Patch by Sandeep.
Anton Korobeynikov [Wed, 5 Aug 2009 09:31:07 +0000 (09:31 +0000)]
Minor arm CBE fixes. Patch by Sandeep.

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

15 years agoEmit module-level inline asm for CBE.
Anton Korobeynikov [Wed, 5 Aug 2009 09:29:56 +0000 (09:29 +0000)]
Emit module-level inline asm for CBE.
Patch by Sandeep Patel

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

15 years agoDisable stack coloring with register for now. It's not able to set kill markers.
Evan Cheng [Wed, 5 Aug 2009 07:26:17 +0000 (07:26 +0000)]
Disable stack coloring with register for now. It's not able to set kill markers.

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

15 years agoAnother nasty coalescer bug (is there another kind):
Evan Cheng [Wed, 5 Aug 2009 07:05:41 +0000 (07:05 +0000)]
Another nasty coalescer bug (is there another kind):

After coalescing reg1027's def and kill are both at the same point:
 %reg1027,0.000000e+00 = [56,814:0)  0@70-(814)

bb5:
60   %reg1027<def> = t2MOVr %reg1027, 14, %reg0, %reg0
68   %reg1027<def> = t2LDRi12 %reg1027<kill>, 8, 14, %reg0
76   t2CMPzri %reg1038<kill,undef>, 0, 14, %reg0, %CPSR<imp-def>
84   %reg1027<def> = t2MOVr %reg1027, 14, %reg0, %reg0
96   t2Bcc mbb<bb5,0x2030910>, 1, %CPSR<kill>

Do not remove the kill marker on t2LDRi12.

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

15 years agoRemove accidental commited comment
Bruno Cardoso Lopes [Wed, 5 Aug 2009 07:00:43 +0000 (07:00 +0000)]
Remove accidental commited comment

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

15 years ago- Remove custom handling of jumptables by the elf writter (this was
Bruno Cardoso Lopes [Wed, 5 Aug 2009 06:57:03 +0000 (06:57 +0000)]
- 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

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

15 years ago80 col violations.
Evan Cheng [Wed, 5 Aug 2009 06:41:25 +0000 (06:41 +0000)]
80 col violations.

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

15 years agocommon globals may also not be marked constant.
Chris Lattner [Wed, 5 Aug 2009 05:41:44 +0000 (05:41 +0000)]
common globals may also not be marked constant.

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

15 years agoRevert changes accidentally committed along with r78163.
Dan Gohman [Wed, 5 Aug 2009 05:38:13 +0000 (05:38 +0000)]
Revert changes accidentally committed along with r78163.

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

15 years agoTeach X86FastISel how to handle CCValAssign::BCvt, which is used for
Dan Gohman [Wed, 5 Aug 2009 05:33:42 +0000 (05:33 +0000)]
Teach X86FastISel how to handle CCValAssign::BCvt, which is used for
MMX arguments. This fixes PR4684.

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

15 years agoClarify common linkage and the requirements on it. Enforce
Chris Lattner [Wed, 5 Aug 2009 05:21:07 +0000 (05:21 +0000)]
Clarify common linkage and the requirements on it.  Enforce
them in the verifier.

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

15 years agoZIV tester for LDA.
Andreas Bolka [Wed, 5 Aug 2009 04:26:05 +0000 (04:26 +0000)]
ZIV tester for LDA.

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

15 years agoexpose SectionKindForGlobal to curious clients, named as
Chris Lattner [Wed, 5 Aug 2009 04:25:40 +0000 (04:25 +0000)]
expose SectionKindForGlobal to curious clients, named as
getKindForGlobal.

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

15 years agoRestrict LDA to GEPs with the same pointer offset.
Andreas Bolka [Wed, 5 Aug 2009 04:13:41 +0000 (04:13 +0000)]
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).

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

15 years agoadd a temporary hook to allow reuse of the asmprinter from the disassembler.
Chris Lattner [Wed, 5 Aug 2009 04:09:18 +0000 (04:09 +0000)]
add a temporary hook to allow reuse of the asmprinter from the disassembler.

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

15 years agoFix LDA testcases.
Andreas Bolka [Wed, 5 Aug 2009 04:03:29 +0000 (04:03 +0000)]
Fix LDA testcases.

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

15 years agoTurn some insert_subreg, extract_subreg, subreg_to_reg into implicit_defs.
Evan Cheng [Wed, 5 Aug 2009 03:53:14 +0000 (03:53 +0000)]
Turn some insert_subreg, extract_subreg, subreg_to_reg into implicit_defs.

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

15 years agoOops. I didn't mean to commit this piece yet.
Bob Wilson [Wed, 5 Aug 2009 02:47:13 +0000 (02:47 +0000)]
Oops.  I didn't mean to commit this piece yet.

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

15 years agoOne more. Transfer kill of the larger register when lowering an EXTRACT_SUBREG.
Evan Cheng [Wed, 5 Aug 2009 02:25:11 +0000 (02:25 +0000)]
One more. Transfer kill of the larger register when lowering an EXTRACT_SUBREG.

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

15 years agoOne more place where subreg lowering forgot to transfer undefness.
Evan Cheng [Wed, 5 Aug 2009 01:57:22 +0000 (01:57 +0000)]
One more place where subreg lowering forgot to transfer undefness.

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

15 years agoMajor calling convention code refactoring.
Dan Gohman [Wed, 5 Aug 2009 01:29:28 +0000 (01:29 +0000)]
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.

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

15 years agoIf the insert_subreg source is <undef>, insert an implicit_def instead of a copy.
Evan Cheng [Wed, 5 Aug 2009 01:29:24 +0000 (01:29 +0000)]
If the insert_subreg source is <undef>, insert an implicit_def instead of a copy.

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

15 years agoVarious comment fixes.
Dan Gohman [Wed, 5 Aug 2009 01:19:01 +0000 (01:19 +0000)]
Various comment fixes.

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

15 years agoRemove an unnecessary flush in the CppBackend's output.
Dan Gohman [Wed, 5 Aug 2009 01:06:38 +0000 (01:06 +0000)]
Remove an unnecessary flush in the CppBackend's output.

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

15 years agoDon't flush the raw_ostream between each MachineFunction. These flush
Dan Gohman [Wed, 5 Aug 2009 00:49:25 +0000 (00:49 +0000)]
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.

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

15 years agoChange DAG nodes for Neon VLD2/3/4 operations to return multiple results.
Bob Wilson [Wed, 5 Aug 2009 00:49:09 +0000 (00:49 +0000)]
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.

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

15 years agocerr isn't buffered so it doesn't need to be flushed.
Dan Gohman [Wed, 5 Aug 2009 00:44:01 +0000 (00:44 +0000)]
cerr isn't buffered so it doesn't need to be flushed.

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

15 years agolli doesn't need <iostream> anymore.
Dan Gohman [Wed, 5 Aug 2009 00:28:59 +0000 (00:28 +0000)]
lli doesn't need <iostream> anymore.

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

15 years agoRemove needless uses of std::flush in the parent process after a
Dan Gohman [Wed, 5 Aug 2009 00:17:00 +0000 (00:17 +0000)]
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.

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

15 years agoPrivatize the PointerType factory.
Owen Anderson [Wed, 5 Aug 2009 00:15:12 +0000 (00:15 +0000)]
Privatize the PointerType factory.

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

15 years ago1) Proper emit displacements for x86, using absolute relocations where necessary
Bruno Cardoso Lopes [Wed, 5 Aug 2009 00:11:21 +0000 (00:11 +0000)]
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

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

15 years agoUse _exit rather than exit in the child process after a failed exec.
Dan Gohman [Wed, 5 Aug 2009 00:09:12 +0000 (00:09 +0000)]
Use _exit rather than exit in the child process after a failed exec.
Add a comment explaining why.

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

15 years agoMake ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's old
Jeffrey Yasskin [Tue, 4 Aug 2009 23:53:16 +0000 (23:53 +0000)]
Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's old
address from the reverse mapping, and add a test that this works now.

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

15 years agoFix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.
Evan Cheng [Tue, 4 Aug 2009 23:47:55 +0000 (23:47 +0000)]
Fix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.

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

15 years agoPrivatize the VectorType uniquing.
Owen Anderson [Tue, 4 Aug 2009 23:47:44 +0000 (23:47 +0000)]
Privatize the VectorType uniquing.

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

15 years agoBegin the process of privatizing the type uniquing tables. No API changes yet, but...
Owen Anderson [Tue, 4 Aug 2009 23:33:01 +0000 (23:33 +0000)]
Begin the process of privatizing the type uniquing tables.  No API changes yet, but there will be in the near future.

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

15 years agoCheck for !isa<Constant> instead of isa<Instruction>. This
Dan Gohman [Tue, 4 Aug 2009 23:23:56 +0000 (23:23 +0000)]
Check for !isa<Constant> instead of isa<Instruction>. This
matches what the comment says, and it avoids spurious BitCast
instructions for Argument values.

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

15 years agoFollow Unix behavior and return 127 if the command is not found,
Dan Gohman [Tue, 4 Aug 2009 23:15:49 +0000 (23:15 +0000)]
Follow Unix behavior and return 127 if the command is not found,
and 126 if it is not executable.

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

15 years agorevert r78048, it isn't worth using assertingvh here.
Chris Lattner [Tue, 4 Aug 2009 23:07:12 +0000 (23:07 +0000)]
revert r78048, it isn't worth using assertingvh here.

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

15 years agoUpdate CMakeLists.
Benjamin Kramer [Tue, 4 Aug 2009 23:02:53 +0000 (23:02 +0000)]
Update CMakeLists.

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

15 years agoIt helps if I remember to actually add the file...
Owen Anderson [Tue, 4 Aug 2009 22:55:26 +0000 (22:55 +0000)]
It helps if I remember to actually add the file...

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

15 years agoFactor some of the constants+context related code out into a separate header, to...
Owen Anderson [Tue, 4 Aug 2009 22:41:48 +0000 (22:41 +0000)]
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.

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

15 years agoFix test.
Evan Cheng [Tue, 4 Aug 2009 22:22:58 +0000 (22:22 +0000)]
Fix test.

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

15 years agoConvert more Neon tests to use FileCheck.
Bob Wilson [Tue, 4 Aug 2009 22:01:41 +0000 (22:01 +0000)]
Convert more Neon tests to use FileCheck.

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

15 years agoReplace dregsingle operand modifier with explicit escaped curly brackets.
Bob Wilson [Tue, 4 Aug 2009 21:39:33 +0000 (21:39 +0000)]
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.

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

15 years agoConvert a few Neon tests to use FileCheck.
Bob Wilson [Tue, 4 Aug 2009 21:33:22 +0000 (21:33 +0000)]
Convert a few Neon tests to use FileCheck.

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

15 years agoClean up the handling of two-address operands in RegScavenger.
Jakob Stoklund Olesen [Tue, 4 Aug 2009 21:30:30 +0000 (21:30 +0000)]
Clean up the handling of two-address operands in RegScavenger.

This fixes PR4528.

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

15 years agoDon't give implicit machine operands special treatment in the register scavenger.
Jakob Stoklund Olesen [Tue, 4 Aug 2009 21:29:11 +0000 (21:29 +0000)]
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.

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

15 years agoRestlyize to match other targets, fixes cmake build to boot.
Mike Stump [Tue, 4 Aug 2009 21:27:06 +0000 (21:27 +0000)]
Restlyize to match other targets, fixes cmake build to boot.

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

15 years agoEnable load / store multiple pass for Thumb2. It's not using ldrd / strd yet.
Evan Cheng [Tue, 4 Aug 2009 21:12:13 +0000 (21:12 +0000)]
Enable load / store multiple pass for Thumb2. It's not using ldrd / strd yet.

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

15 years agoremove a random reference to subtarget. Even without this, we
Chris Lattner [Tue, 4 Aug 2009 21:12:08 +0000 (21:12 +0000)]
remove a random reference to subtarget.  Even without this, we
still get "intel syntax" instructions from llc with
-x86-asm-syntax=intel

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

15 years agoAdd NEON single-precision FP support for fabs and fneg.
David Goodwin [Tue, 4 Aug 2009 20:39:05 +0000 (20:39 +0000)]
Add NEON single-precision FP support for fabs and fneg.

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

15 years agoTableGen / AsmMatcher: Tweaks to avoid generating completely bogus match
Daniel Dunbar [Tue, 4 Aug 2009 20:36:45 +0000 (20:36 +0000)]
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").

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

15 years agoWhen exec() fails, return 127 instead of errno; the parent process has no way to
Daniel Dunbar [Tue, 4 Aug 2009 20:32:25 +0000 (20:32 +0000)]
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).

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

15 years agoPrivatize the last bit of Constant-creation state.
Owen Anderson [Tue, 4 Aug 2009 20:25:11 +0000 (20:25 +0000)]
Privatize the last bit of Constant-creation state.

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

15 years agorip out SectionEndDirectiveSuffix support, only uses by
Chris Lattner [Tue, 4 Aug 2009 20:09:41 +0000 (20:09 +0000)]
rip out SectionEndDirectiveSuffix support, only uses by
the masm backend.  If anyone cares about masm in the future,
we'll have semantic sections it can hang off of.

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

15 years agoDon't tamper with <undef> operands in MachineInstr::addRegisterKilled.
Jakob Stoklund Olesen [Tue, 4 Aug 2009 20:09:25 +0000 (20:09 +0000)]
Don't tamper with <undef> operands in MachineInstr::addRegisterKilled.

For an undef operand, MO.getReg() is meaningless and we should not use it.
Undef operands should be skipped entirely.

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

15 years agoLowerSubregsInstructionPass::LowerExtract should not extend the live range of registers.
Jakob Stoklund Olesen [Tue, 4 Aug 2009 20:01:11 +0000 (20:01 +0000)]
LowerSubregsInstructionPass::LowerExtract should not extend the live range of registers.

When LowerExtract eliminates an EXTRACT_SUBREG with a kill flag, it moves the
kill flag to the place where the sub-register is killed. This can accidentally
overlap with the use of a sibling sub-register, and we have trouble.

In the test case we have this code:

Live Ins: %R0 %R1 %R2
%R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
%R2H<def> = LOAD16fi <fi#-1>, 0, Mem:LD(2,4) [FixedStack-1 + 0]
%R1L<def> = EXTRACT_SUBREG %R1<kill>, 1
%R0L<def> = EXTRACT_SUBREG %R0<kill>, 1
%R0H<def> = ADD16 %R2H<kill>, %R2L<kill>, %AZ<imp-def>, %AN<imp-def>, %AC0<imp-def>, %V<imp-def>, %VS<imp-def>

subreg: CONVERTING: %R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
subreg: eliminated!
subreg: killed here: %R0H<def> = ADD16 %R2H, %R2L, %R2<imp-use,kill>, %AZ<imp-def>, %AN<imp-def>, %AC0<imp-def>, %V<imp-def>, %VS<imp-def>

The kill flag on %R2 is moved to the last instruction, and the live range overlaps with the definition of %R2H:

*** Bad machine code: Redefining a live physical register ***
- function:    f
- basic block:  0x18358c0 (#0)
- instruction: %R2H<def> = LOAD16fi <fi#-1>, 0, Mem:LD(2,4) [FixedStack-1 + 0]
Register R2H was defined but already live.

The fix is to replace EXTRACT_SUBREG with IMPLICIT_DEF instead of eliminating
it completely:

subreg: CONVERTING: %R2L<def> = EXTRACT_SUBREG %R2<kill>, 1
subreg: replace by: %R2L<def> = IMPLICIT_DEF %R2<kill>

Note that these IMPLICIT_DEF instructions survive to the asm output. It is
necessary to fix the stack-color-with-reg test case because of that.

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

15 years agoEnforce stricter rules in machine code verifier.
Jakob Stoklund Olesen [Tue, 4 Aug 2009 19:18:01 +0000 (19:18 +0000)]
Enforce stricter rules in machine code verifier.

Implicit operands no longer get a free pass: Imp-use requires a live register
and imp-def requires a dead register.

There is also no special rule allowing redefinition of a sub-register when the
super-register is live. The super register must have imp-kill+imp-def operands
instead.

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

15 years agoMost flags are reserved registers on Blackfin.
Jakob Stoklund Olesen [Tue, 4 Aug 2009 19:16:55 +0000 (19:16 +0000)]
Most flags are reserved registers on Blackfin.
The only exception is CC.

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

15 years agoIn thumb mode, r7 is used as frame register. This fixes pr4681.
Evan Cheng [Tue, 4 Aug 2009 18:46:17 +0000 (18:46 +0000)]
In thumb mode, r7 is used as frame register. This fixes pr4681.

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

15 years agoMatch common pattern for FNMAC. Add NEON SP support.
David Goodwin [Tue, 4 Aug 2009 18:44:29 +0000 (18:44 +0000)]
Match common pattern for FNMAC. Add NEON SP support.

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

15 years agoImprove tests.
David Goodwin [Tue, 4 Aug 2009 18:11:59 +0000 (18:11 +0000)]
Improve tests.

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

15 years agoLegalize i64 store operations generated by inst-combine.
Sanjiv Gupta [Tue, 4 Aug 2009 17:59:16 +0000 (17:59 +0000)]
Legalize i64 store operations generated by inst-combine.

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

15 years agoInitial support for single-precision FP using NEON. Added "neonfp" attribute to enabl...
David Goodwin [Tue, 4 Aug 2009 17:53:06 +0000 (17:53 +0000)]
Initial support for single-precision FP using NEON. Added "neonfp" attribute to enable. Added patterns for some binary FP operations.

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

15 years agoAdd some type traits that are used for Clang's statically-checked
Douglas Gregor [Tue, 4 Aug 2009 17:04:52 +0000 (17:04 +0000)]
Add some type traits that are used for Clang's statically-checked
canonical types.

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

15 years agoFix PR4528. This scavenger assertion is too strict. The two-address value is
Evan Cheng [Tue, 4 Aug 2009 16:52:44 +0000 (16:52 +0000)]
Fix PR4528. This scavenger assertion is too strict. The two-address value is
killed by another operand.

There is probably a better fix. Either 1) scavenger can look at other operands, or
2) livevariables can be smarter about kill markers. Patches welcome.

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

15 years agoAvoid compiler warning (in -Asserts mode)
Daniel Dunbar [Tue, 4 Aug 2009 16:46:12 +0000 (16:46 +0000)]
Avoid compiler warning (in -Asserts mode)

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

15 years agoenhance codegen to put 16-bit character strings into the
Chris Lattner [Tue, 4 Aug 2009 16:27:13 +0000 (16:27 +0000)]
enhance codegen to put 16-bit character strings into the
__TEXT,__ustring section on darwin.

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

15 years agofix a fixme: don't create an explicit "CStringSection" for ELF,
Chris Lattner [Tue, 4 Aug 2009 16:19:50 +0000 (16:19 +0000)]
fix a fixme: don't create an explicit "CStringSection" for ELF,
it is just being used as a prefix, so forward substitute it directly.

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

15 years agoAdd support emiting for 2/4 byte mergable strings to the ".rodata.str*"
Chris Lattner [Tue, 4 Aug 2009 16:13:09 +0000 (16:13 +0000)]
Add support emiting for 2/4 byte mergable strings to the ".rodata.str*"
section on ELF targets.

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

15 years ago* Use "svn export" instead of "svn co" and avoid cleaning up .svn dirs
Misha Brukman [Tue, 4 Aug 2009 15:47:18 +0000 (15:47 +0000)]
* Use "svn export" instead of "svn co" and avoid cleaning up .svn dirs
* Use "svn info" to get last revision in repo, will get matching tarballs
* Now run "svn -q" since "svn info" tells us the revision number

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

15 years agoOoops, I was too fast to commit the wrong fix :(
Anton Korobeynikov [Tue, 4 Aug 2009 11:18:31 +0000 (11:18 +0000)]
Ooops, I was too fast to commit the wrong fix :(

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

15 years agoFix a typo - this unbreaks llvm-gcc build on arm
Anton Korobeynikov [Tue, 4 Aug 2009 11:12:51 +0000 (11:12 +0000)]
Fix a typo - this unbreaks llvm-gcc build on arm

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

15 years agoThumb2 does not have ib (increment before) and da (decrement after) forms of ldm...
Evan Cheng [Tue, 4 Aug 2009 08:34:18 +0000 (08:34 +0000)]
Thumb2 does not have ib (increment before) and da (decrement after) forms of ldm / stm.

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

15 years agoUse separate ValueList for metadata.
Devang Patel [Tue, 4 Aug 2009 06:00:18 +0000 (06:00 +0000)]
Use separate ValueList for metadata.
This fixes PR4666.

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

15 years agomake MergeableCString be a SectionKind "abstract class", and
Chris Lattner [Tue, 4 Aug 2009 05:35:56 +0000 (05:35 +0000)]
make MergeableCString be a SectionKind "abstract class", and
add new concrete versions for 1/2/4-byte mergable strings.

These are not actually created yet.

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

15 years agoMinor www site formating improvements.
Edward O'Callaghan [Tue, 4 Aug 2009 05:24:28 +0000 (05:24 +0000)]
Minor www site formating improvements.

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

15 years agoRevert recent bitcode writer patches.
Devang Patel [Tue, 4 Aug 2009 05:01:35 +0000 (05:01 +0000)]
Revert recent bitcode writer patches.

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

15 years agollvm-gcc checks the static asm variable is valid in ValidateRegisterVariable. Make...
Bill Wendling [Tue, 4 Aug 2009 04:48:31 +0000 (04:48 +0000)]
llvm-gcc checks the static asm variable is valid in ValidateRegisterVariable. Make this work for PPC.

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

15 years agoswitch ValueMap to using AssertingVH. This is an old patch I had laying
Chris Lattner [Tue, 4 Aug 2009 04:31:02 +0000 (04:31 +0000)]
switch ValueMap to using AssertingVH.  This is an old patch I had laying
around in a tree I forgot about.

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

15 years agoNo really, it's unused.
Daniel Dunbar [Tue, 4 Aug 2009 04:08:40 +0000 (04:08 +0000)]
No really, it's unused.

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

15 years agoRemove unused function.
Daniel Dunbar [Tue, 4 Aug 2009 04:04:25 +0000 (04:04 +0000)]
Remove unused function.

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

15 years agoRemove now unused Module argument to createTargetMachine.
Daniel Dunbar [Tue, 4 Aug 2009 04:02:45 +0000 (04:02 +0000)]
Remove now unused Module argument to createTargetMachine.

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

15 years agoFixed now.
Bill Wendling [Tue, 4 Aug 2009 03:46:54 +0000 (03:46 +0000)]
Fixed now.

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

15 years agoAdd test for PR4678
Rafael Espindola [Tue, 4 Aug 2009 03:44:37 +0000 (03:44 +0000)]
Add test for PR4678

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

15 years agoXFAIL for the moment.
Bill Wendling [Tue, 4 Aug 2009 03:40:47 +0000 (03:40 +0000)]
XFAIL for the moment.

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

15 years agoRemove dead code.
Devang Patel [Tue, 4 Aug 2009 02:54:15 +0000 (02:54 +0000)]
Remove dead code.

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

15 years agoFix MDString Abbrev setup.
Devang Patel [Tue, 4 Aug 2009 02:36:39 +0000 (02:36 +0000)]
Fix MDString Abbrev setup.

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

15 years agoConstants and Metadata share ValueList. This means they must be emitted interleaved...
Devang Patel [Tue, 4 Aug 2009 02:26:56 +0000 (02:26 +0000)]
Constants and Metadata share ValueList. This means they must be emitted interleaved (using appropriate BLOCK_IDs) otherwise ValuePtrs index gets out of sync.

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

15 years agoRemove ARM specific getInlineAsmLength. We'll rely on the simpler (and faster) generi...
Evan Cheng [Tue, 4 Aug 2009 01:56:09 +0000 (01:56 +0000)]
Remove ARM specific getInlineAsmLength. We'll rely on the simpler (and faster) generic algorithm for now. If more accurate computation is needed, we'll rely on the disassembler.

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

15 years agoLoad / store multiple pass fixes for Thumb2. Not enabled yet.
Evan Cheng [Tue, 4 Aug 2009 01:43:45 +0000 (01:43 +0000)]
Load / store multiple pass fixes for Thumb2. Not enabled yet.

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

15 years agoEmit sub r, #c instead of transforming it to add r, #-c if c fits in 8-bit. This...
Evan Cheng [Tue, 4 Aug 2009 01:41:15 +0000 (01:41 +0000)]
Emit sub r, #c instead of transforming it to add r, #-c if c fits in 8-bit. This is a bit of pre-mature optimization. 8-bit variant makes it likely it will be narrowed to a 16-bit instruction.

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

15 years agoLower Neon VLD* intrinsics to custom DAG nodes, and manually allocate the
Bob Wilson [Tue, 4 Aug 2009 00:36:16 +0000 (00:36 +0000)]
Lower Neon VLD* intrinsics to custom DAG nodes, and manually allocate the
results to fixed registers.

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