1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

46039 Commits

Author SHA1 Message Date
Evan Cheng
bd35a81da5 Avoid making the transformation enabled by my last patch if the new destinations have phi nodes.
llvm-svn: 69121
2009-04-15 00:43:54 +00:00
Devang Patel
7323064183 While inlining, clone llvm.dbg.func.start intrinsic and adjust
llvm.dbg.region.end instrinsic. This nested llvm.dbg.func.start/llvm.dbg.region.end pair now enables DW_TAG_inlined_subroutine support in code generator.

llvm-svn: 69118
2009-04-15 00:17:06 +00:00
Chris Lattner
1e863d93e9 silence a warning.
llvm-svn: 69117
2009-04-15 00:16:05 +00:00
Devang Patel
f2b9c22687 Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine scopes (only in FastISel mode).
llvm-svn: 69116
2009-04-15 00:10:26 +00:00
Dan Gohman
56227ee26e Do for GR16_NOREX what r69049 did for GR8_NOREX, to avoid trouble with
the local register allocator.

llvm-svn: 69115
2009-04-15 00:10:16 +00:00
Devang Patel
ec716faf9e Add a method to check that the subprogram holds debug info for the given Function or not.
llvm-svn: 69113
2009-04-15 00:06:07 +00:00
Dan Gohman
a1fe2a3741 Add a new MOV8rr_NOREX, and make X86's copyRegToReg use it when
either the source or destination is a physical h register.

This fixes sqlite3 with the post-RA scheduler enabled.

llvm-svn: 69111
2009-04-15 00:04:23 +00:00
Bill Wendling
0861f3e874 Testcase for r69104.
llvm-svn: 69110
2009-04-15 00:04:11 +00:00
Dan Gohman
1e76e65007 GR8_NOREX can contain the H registers, since they don't require
REX prefixes.

llvm-svn: 69108
2009-04-15 00:00:48 +00:00
Evan Cheng
dba98a0669 Optimize conditional branch on i1 phis with non-constant inputs.
This turns:

eq:
        %3 = icmp eq i32 %1, %2
        br label %join

ne:
        %4 = icmp ne i32 %1, %2
        br label %join

join:
        %5 = phi i1 [%3, %eq], [%4, %ne]
        br i1 %5, label %yes, label %no

=>

eq:
        %3 = icmp eq i32 %1, %2
        br i1 %3, label %yes, label %no

ne:
        %4 = icmp ne i32 %1, %2
        br i1 %4, label %yes, label %no

llvm-svn: 69102
2009-04-14 23:40:03 +00:00
Dan Gohman
e1c4d4c5be Fix the RUN lines so that this test actually tests.
llvm-svn: 69096
2009-04-14 22:50:17 +00:00
Dan Gohman
365c457893 For the h-register addressing-mode trick, use the correct value for
any non-address uses of the address value. This fixes 186.crafty.

llvm-svn: 69094
2009-04-14 22:45:05 +00:00
Evan Cheng
b9bcbb730d Mac OS X 10.6 and above do not use key manager to register EH frames.
llvm-svn: 69090
2009-04-14 22:31:59 +00:00
Dan Gohman
3c19cf07d9 When the result of an EXTRACT_SUBREG, INSERT_SUBREG, or SUBREG_TO_REG
operator is used by a CopyToReg to export the value to a different
block, don't reuse the CopyToReg's register for the subreg operation
result if the register isn't precisely the right class for the
subreg operation.

Also, rename the h-registers.ll test, now that there are more
than one.

llvm-svn: 69087
2009-04-14 22:17:14 +00:00
Mikhail Glushenkov
df9499583d Call CreateProcess with bInheritHandles = TRUE.
Makes llvmc show error messages printed by child processes when run from the
Cygwin/MSYS shell. Since ExecuteAndWait does not return until the child program
has finished execution, this change should be harmless.

llvm-svn: 69082
2009-04-14 21:31:36 +00:00
Mikhail Glushenkov
c249ce5be4 Delete trailing whitespace.
llvm-svn: 69081
2009-04-14 21:31:14 +00:00
Evan Cheng
b64f2c1b08 Some of GR8_NOREX registers are only available in 64-bit mode.
llvm-svn: 69049
2009-04-14 16:57:43 +00:00
Sanjiv Gupta
b03b007054 Handle aggregate type arguments to direct and indirect calls.
llvm-svn: 69022
2009-04-14 02:49:52 +00:00
Dale Johannesen
862ade6f10 Use the output of the asm so the optimizer won't
delete it.

llvm-svn: 69018
2009-04-14 01:51:40 +00:00
Owen Anderson
f127f4a7a9 LoopIndexSplit needs to inform the loop pass manager of the instructions it is
deleting, not just the basic block.

llvm-svn: 69011
2009-04-14 01:04:19 +00:00
Dale Johannesen
b423c8f205 Do not force asm's to be chained if they don't touch
memory and aren't volatile.  This was interfering with
good scheduling.

llvm-svn: 69008
2009-04-14 00:56:56 +00:00
Evan Cheng
9f44d3148c Fix PR3934 part 2. findOnlyInterestingUse() was not setting IsCopy and IsDstPhys which are returned by value and used by callee. This happened to work on the earlier test cases because of a logic error in the caller side.
llvm-svn: 69006
2009-04-14 00:32:25 +00:00
Daniel Dunbar
e2a54c13b3 Make these errors more noticable in build logs.
llvm-svn: 68998
2009-04-13 22:26:09 +00:00
Bob Wilson
355508e70f Change SelectionDAG type legalization to allow BUILD_VECTOR operands to be
promoted to legal types without changing the type of the vector.  This is
following a suggestion from Duncan
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html).
The transformation that used to be done during type legalization is now
postponed to DAG legalization.  This allows the BUILD_VECTORs to be optimized
and potentially handled specially by target-specific code.

It turns out that this is also consistent with an optimization done by the
DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by
replacing one of the BUILD_VECTOR operands with the newly inserted element;
but INSERT_VECTOR_ELT allows its scalar operand to be larger than the
element type, with any extra high bits being implicitly truncated.  The
result is a BUILD_VECTOR where one of the operands has a type larger the
the vector element type.

Any code that operates on BUILD_VECTORs may now need to be aware of the
potential type discrepancy between the vector element type and the
BUILD_VECTOR operands.  This patch updates all of the places that I could
find to handle that case.

llvm-svn: 68996
2009-04-13 22:05:19 +00:00
Dan Gohman
8393d29bc8 Rename COPY_TO_SUBCLASS to COPY_TO_REGCLASS, and generalize
it accordingly. Thanks to Jakob Stoklund Olesen for pointing
out how this might be useful.

llvm-svn: 68986
2009-04-13 21:06:25 +00:00
Bob Wilson
58529085d2 Refactor some code in SelectionDAGLegalize::ExpandBUILD_VECTOR.
llvm-svn: 68981
2009-04-13 20:20:30 +00:00
Evan Cheng
fa48d5c8d0 PR3934: Fix a bogus two-address pass assertion.
llvm-svn: 68979
2009-04-13 20:04:24 +00:00
Bill Wendling
2afc0d61c3 Get rid of some compile warnings.
llvm-svn: 68978
2009-04-13 19:45:05 +00:00
Douglas Gregor
d2b9d57e20 Add a static APInt::getNumWords
llvm-svn: 68977
2009-04-13 19:43:10 +00:00
Devang Patel
92d79ef835 Right now, Debugging information to encode scopes (DW_TAG_lexical_block) relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code.
This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode.

llvm-svn: 68973
2009-04-13 18:13:16 +00:00
Devang Patel
ad7f61c279 Reapply 68847.
Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default.

llvm-svn: 68964
2009-04-13 17:02:03 +00:00
Dan Gohman
be7227005f Implement x86 h-register extract support.
- Add patterns for h-register extract, which avoids a shift and mask,
   and in some cases a temporary register.
 - Add address-mode matching for turning (X>>(8-n))&(255<<n), where
   n is a valid address-mode scale value, into an h-register extract
   and a scaled-offset address.
 - Replace X86's MOV32to32_ and related instructions with the new
   target-independent COPY_TO_SUBREG instruction.

On x86-64 there are complicated constraints on h registers, and
CodeGen doesn't currently provide a high-level way to express all of them,
so they are handled with a bunch of special code. This code currently only
supports extracts where the result is used by a zero-extend or a store,
though these are fairly common.

These transformations are not always beneficial; since there are only
4 h registers, they sometimes require extra move instructions, and
this sometimes increases register pressure because it can force out
values that would otherwise be in one of those registers. However,
this appears to be relatively uncommon.

llvm-svn: 68962
2009-04-13 16:09:41 +00:00
Dan Gohman
3873cb7a36 Add a new TargetInstrInfo MachineInstr opcode, COPY_TO_SUBCLASS.
This will be used to replace things like X86's MOV32to32_.

Enhance ScheduleDAGSDNodesEmit to be more flexible and robust
in the presense of subregister superclasses and subclasses. It
can now cope with the definition of a virtual register being in
a subclass of a use.

Re-introduce the code for recording register superreg classes and
subreg classes. This is needed because when subreg extracts and
inserts get coalesced away, the virtual registers are left in
the correct subclass.

llvm-svn: 68961
2009-04-13 15:38:05 +00:00
Dan Gohman
f117bbdbcd Remove x86's special-case handling for ISD::TRUNCATE and
ISD::SIGN_EXTEND_INREG. Tablegen-generated code can handle
these cases, and the scheduling issues observed earlier
appear to be resolved now.

llvm-svn: 68959
2009-04-13 15:29:31 +00:00
Dan Gohman
6e6f9e3a4f Fix copy+pastos in comments.
llvm-svn: 68958
2009-04-13 15:28:29 +00:00
Dan Gohman
e2eb4f1957 Generalize getRegisterClassForRegister to handle registers
in multiple classes in the case that the classes are all
in subset/superset relations. This function is used by the
fast-isel emitter, which always wants the super-most set.

llvm-svn: 68957
2009-04-13 15:24:11 +00:00
Dan Gohman
1070168ae0 Don't abort on an aliasing physical register that does not have
a live interval. This is needed for some upcoming subreg changes.

llvm-svn: 68956
2009-04-13 15:22:29 +00:00
Dan Gohman
29d211684c When assigning a physical register to a MachineOperand, set
the subreg field to 0, since the subreg field is only used
for virtual register subregs. This doesn't change
current functionality; it just eliminates bogus noise from
debug output.

llvm-svn: 68955
2009-04-13 15:21:32 +00:00
Dan Gohman
ac6a439313 List the l registers before h registers, for consistency.
llvm-svn: 68954
2009-04-13 15:18:42 +00:00
Dan Gohman
15fa207d12 Add an assertion to verify that a copy was actually emitted.
llvm-svn: 68953
2009-04-13 15:16:56 +00:00
Dan Gohman
e1db797df3 Use X86::SUBREG_8BIT instead of hard-coding the equivalent constant.
llvm-svn: 68951
2009-04-13 15:14:03 +00:00
Dan Gohman
a68d99c707 Add a comment about MOVSX64rr8.
llvm-svn: 68950
2009-04-13 15:13:28 +00:00
Dan Gohman
b09c13463a Add comments to INSERT_SUBREG, EXTRACT_SURBEG, SUBREG_TO_REG,
and IMPLICIT_DEF.

llvm-svn: 68949
2009-04-13 15:12:29 +00:00
Dan Gohman
65bafadd2b Fix another hard-coded constant to use X86AddrNumOperands.
This unbreaks the JIT on x86-64.

llvm-svn: 68948
2009-04-13 15:04:25 +00:00
Rafael Espindola
72347bffce X86-64 TLS support for local exec and initial exec.
llvm-svn: 68947
2009-04-13 13:02:49 +00:00
Sanjiv Gupta
04a7716d62 While passing arg of types larger than char only one byte at lower end was getting passed. We couldn't catch this as we did not have tests that were passing an int value larger than 256.
llvm-svn: 68946
2009-04-13 09:38:38 +00:00
Nick Lewycky
d84e130ecf Fix ocaml bindings; add "available_externally" linkage type.
llvm-svn: 68945
2009-04-13 07:02:32 +00:00
Nick Lewycky
ecd6602046 Fix warning in .ll parser, detect and reject available_externally on function
declarations.

llvm-svn: 68944
2009-04-13 07:02:02 +00:00
Chris Lattner
b34a57161a add AvailableExternally linkage to C bindings.
llvm-svn: 68942
2009-04-13 06:25:37 +00:00
Chris Lattner
c1bfdc9bb2 Add a new "available_externally" linkage type. This is intended
to support C99 inline, GNU extern inline, etc.  Related bugzilla's
include PR3517, PR3100, & PR2933.  Nothing uses this yet, but it
appears to work.

llvm-svn: 68940
2009-04-13 05:44:34 +00:00