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

76496 Commits

Author SHA1 Message Date
Andrew Trick
94a7b27585 Typo. Thanks Bob.
llvm-svn: 141188
2011-10-05 16:52:28 +00:00
Jakob Stoklund Olesen
6be9354316 Add a FIXME.
TwoAddressInstructionPass should annotate instructions with <undef>
flags when it lower REG_SEQUENCE instructions.  LiveIntervals should not
be in the business of modifying code (except for kill flags, perhaps).

llvm-svn: 141187
2011-10-05 16:51:21 +00:00
Duncan Sands
da96234020 Ensure OpCode is not used uninitialized.
llvm-svn: 141184
2011-10-05 15:13:13 +00:00
Duncan Sands
e0d53880e0 Comment out a variable that is only used in commented out code.
llvm-svn: 141183
2011-10-05 15:12:44 +00:00
Duncan Sands
443784b0d0 Remove a bunch of unused variables in the PTX backend (warned about by gcc-4.6).
llvm-svn: 141182
2011-10-05 15:11:08 +00:00
Duncan Sands
d655940f41 Fix compilation when using gcc-4.6. Patch by wanders.
llvm-svn: 141178
2011-10-05 14:36:12 +00:00
Duncan Sands
f7df28c1f5 GVN does simple propagation of conditions: when it sees a conditional
branch "br i1 %x, label %if_true, label %if_false" then it replaces
"%x" with "true" in places only reachable via the %if_true arm, and
with "false" in places only reachable via the %if_false arm.  Except
that actually it doesn't: if value numbering shows that %y is equal
to %x then, yes, %y will be turned into true/false in this way, but
any occurrences of %x itself are not transformed.  Fix this.  What's
more, it's often the case that %x is an equality comparison such as
"%x = icmp eq %A, 0", in which case every occurrence of %A that is
only reachable via the %if_true arm can be replaced with 0.  Implement
this and a few other variations on this theme.  This reduces the number
of lines of LLVM IR in "GCC as one big file" by 0.2%.  It has a bigger
impact on Ada code, typically reducing the number of lines of bitcode
by around 0.4% by removing repeated compiler generated checks.  Passes
the LLVM nightly testsuite and the Ada ACATS testsuite.

llvm-svn: 141177
2011-10-05 14:28:49 +00:00
Duncan Sands
348e8c285a Generalize GVN's conditional propagation logic slightly:
it's OK for the false/true destination to have multiple
predecessors as long as the extra ones are dominated by
the branch destination.

llvm-svn: 141176
2011-10-05 14:17:01 +00:00
NAKAMURA Takumi
c4e7d192d1 MipsDelaySlotFiller.cpp: Appease msvc to specify llvm::next() explicitly.
llvm-svn: 141174
2011-10-05 10:11:02 +00:00
Cameron Zwarich
1f890576e3 Add braces around something that throws me for a loop.
llvm-svn: 141173
2011-10-05 08:59:10 +00:00
Cameron Zwarich
0cb2071d35 There is no point in setting out-parameters for a ComplexPattern function when
it returns false, at least as far as I could tell by reading the code.

llvm-svn: 141172
2011-10-05 08:59:05 +00:00
Bill Wendling
ecebc1d04b Also update the EH with bitcode. I missed this earlier. Thanks to Duncan for pointing it out.
llvm-svn: 141169
2011-10-05 07:04:14 +00:00
Chandler Carruth
9fc5856d54 Fix a broken assert found by -Wparentheses.
llvm-svn: 141168
2011-10-05 07:02:23 +00:00
Andrew Trick
b4cabec37a Missing test case for r141164.
llvm-svn: 141166
2011-10-05 06:23:32 +00:00
Andrew Trick
79a14ca34e Fix disabled SCEV analysis caused r141161 and add unit test.
I noticed during self-review that my previous checkin disabled some
analysis. Even with the reenabled analysis the test case runs in about
5ms. Without the fix, it will take several minutes at least.

llvm-svn: 141164
2011-10-05 05:58:49 +00:00
Eric Christopher
29ebd25c99 Add more initializers to quiet a clang warning.
llvm-svn: 141163
2011-10-05 05:00:26 +00:00
Craig Topper
c211a8e5a6 Change C++ style comments to C style comments in X86 disassembler. Patch from Joe Abbey.
llvm-svn: 141162
2011-10-05 03:29:32 +00:00
Andrew Trick
5789485111 Avoid exponential recursion in SCEV getConstantEvolvingPHI and EvaluateExpression.
Note to compiler writers: never recurse on multiple instruction
operands without memoization.
Fixes rdar://10187945. Was taking 45s, now taking 5ms.

llvm-svn: 141161
2011-10-05 03:25:31 +00:00
Akira Hatanaka
e37b7fb90f Insert space.
llvm-svn: 141158
2011-10-05 02:22:49 +00:00
Akira Hatanaka
852a9caebd Do not examine variadic or implicit operands if instruction is a return (jr).
llvm-svn: 141157
2011-10-05 02:21:58 +00:00
Akira Hatanaka
eb59ca6c4c Clean up function Filler::delayHasHazard.
llvm-svn: 141156
2011-10-05 02:18:58 +00:00
Akira Hatanaka
1d80eaba44 Remove function Filler::insertCallUses.
Record the registers used and defined by a call in Filler::insertDefsUses.

llvm-svn: 141154
2011-10-05 02:04:17 +00:00
Akira Hatanaka
3707b9fec8 Clean up Filler::findDelayInstr.
llvm-svn: 141152
2011-10-05 01:57:46 +00:00
Akira Hatanaka
594683f3d7 Remove function Filler::isDelayFiller. Check if I is the same instruction that
filled the last delay slot visited.

llvm-svn: 141151
2011-10-05 01:30:09 +00:00
Akira Hatanaka
6698bae640 Clean up Filler::runOnMachineBasicBlock. Change interface of
Filler::findDelayInstr.

llvm-svn: 141150
2011-10-05 01:23:39 +00:00
Akira Hatanaka
716e3bea9c Define a statistic for the number of slots that were filled with useful
instructions (instructions that are not NOP).

llvm-svn: 141149
2011-10-05 01:19:13 +00:00
Akira Hatanaka
c073bd7709 Remove unnecessary check. isDelayFiller(MBB, I) will evaluate to true before
I->getDesc().hasDelaySlot() does.

llvm-svn: 141148
2011-10-05 01:15:31 +00:00
Akira Hatanaka
cf11c1bfbe Add comments and move assignment statement. If sawStore is true, sawLoad does
not have to be set.

llvm-svn: 141147
2011-10-05 01:09:37 +00:00
Akira Hatanaka
58d3445fd9 Correct description string of enable-mips-delay-filler.
llvm-svn: 141146
2011-10-05 01:06:57 +00:00
Bill Wendling
da6fd6f972 Look at the number of entries in the jump table and jump to a 'trap' block if
the value exceeds that number.

llvm-svn: 141143
2011-10-05 00:39:32 +00:00
Jakob Stoklund Olesen
82905dfc94 Add TRI::getSubClassWithSubReg(RC, Idx) function.
This function is used to constrain a register class to a sub-class that
supports the given sub-register index.

For example, getSubClassWithSubReg(GR32, sub_8bit) -> GR32_ABCD.

The function will be used to compute register classes when emitting
INSERT_SUBREG and EXTRACT_SUBREG nodes and for register class inflation
of sub-register operations.

The version provided by TableGen is usually adequate, but targets can
override.

llvm-svn: 141142
2011-10-05 00:35:49 +00:00
Bill Wendling
db8e0d2dee Checkpoint for SJLJ EH code.
This is a first pass at generating the jump table for the sjlj dispatch. It
currently generates something plausible, but hasn't been tested thoroughly.

llvm-svn: 141140
2011-10-05 00:02:33 +00:00
Jakob Stoklund Olesen
ed06c64ecb Also add <imp-use,kill> flags for redefined super-registers.
For example:

  %vreg10:dsub_0<def,undef> = COPY %vreg1
  %vreg10:dsub_1<def> = COPY %vreg2

is rewritten as:

  %D2<def> = COPY %D0, %Q1<imp-def>
  %D3<def> = COPY %D1, %Q1<imp-use,kill>, %Q1<imp-def>

The first COPY doesn't care about the previous value of %Q1, so it
doesn't read that register.

The second COPY is a partial redefinition of %Q1, so it implicitly kills
and redefines that register.

This makes it possible to recognize instructions that can harmlessly
clobber the full super-register.  The write and don't read the
super-register.

llvm-svn: 141139
2011-10-05 00:01:48 +00:00
Jakob Stoklund Olesen
5b02a59087 Also add <def,undef> flags when coalescing sub-registers.
RegisterCoalescer can create sub-register defs when it is joining a
register with a sub-register.  Add <undef> flags to these new
sub-register defs where appropriate.

llvm-svn: 141138
2011-10-05 00:01:46 +00:00
Owen Anderson
e255773f3d Teach the MC to output code/data region marker labels in MachO and ELF modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment.
llvm-svn: 141135
2011-10-04 23:26:17 +00:00
Kevin Enderby
5a09a8db55 Adding back support for printing operands symbolically to ARM's new disassembler
using llvm's public 'C' disassembler API now including annotations.

Hooked this up to Darwin's otool(1) so it can again print things like branch
targets for example this:
 blx _puts
instead of this:
 blx #-36
and includes support for annotations for branches to symbol stubs like:
 bl	0x40 @ symbol stub for: _puts
and annotations for pc relative loads like this:
 ldr	r3, #8 @ literal pool for: Hello, world!
Also again can print the expression encoded in the Mach-O relocation entries for
things like this:
 movt r0, :upper16:((_foo-_bar)+1234)

llvm-svn: 141129
2011-10-04 22:44:48 +00:00
Bill Wendling
9fd0512fd5 Create a mapping between the landing pad basic block and the call site index for later use.
llvm-svn: 141125
2011-10-04 22:00:35 +00:00
Jakob Stoklund Olesen
a6045464c8 Allow <undef> flags on def operands as well as uses.
The <undef> flag says that a MachineOperand doesn't read its register,
or doesn't depend on the previous value of its register.

A full register def never depends on the previous register value.  A
partial register def may depend on the previous value if it is intended
to update part of a register.

For example:

  %vreg10:dsub_0<def,undef> = COPY %vreg1
  %vreg10:dsub_1<def> = COPY %vreg2

The first copy instruction defines the full %vreg10 register with the
bits not covered by dsub_0 defined as <undef>.  It is not considered a
read of %vreg10.

The second copy modifies part of %vreg10 while preserving the rest.  It
has an implicit read of %vreg10.

This patch adds a MachineOperand::readsReg() method to determine if an
operand reads its register.

Previously, this was modelled by adding a full-register <imp-def>
operand to the instruction.  This approach makes it possible to
determine directly from a MachineOperand if it reads its register.  No
scanning of MI operands is required.

llvm-svn: 141124
2011-10-04 21:49:33 +00:00
Jim Grosbach
386f7cb041 Tidy up formatting.
llvm-svn: 141123
2011-10-04 21:43:51 +00:00
Bill Wendling
e8a545f260 Doxygen-ize comments. No functionality change.
llvm-svn: 141122
2011-10-04 21:25:01 +00:00
Daniel Dunbar
0ad2ef5104 Remove unused web page.
llvm-svn: 141118
2011-10-04 21:17:19 +00:00
Jim Grosbach
f3373734b4 Un-XFAIL file. Comment out individual failing instructions.
llvm-svn: 141117
2011-10-04 21:16:42 +00:00
Francois Pichet
fcf808502f Replace snprintf with raw_string_ostream.
llvm-svn: 141116
2011-10-04 21:08:56 +00:00
Jim Grosbach
6f00406f92 Tidy up formatting.
llvm-svn: 141115
2011-10-04 20:52:57 +00:00
Jim Grosbach
0db58d15e6 Un-XFAIL file. Fix incorrect CHECK lines. General format cleanup.
llvm-svn: 141114
2011-10-04 20:50:05 +00:00
Jim Grosbach
3df5c47ec8 Un-XFAIL file. Fix incorrect CHECK line. General format cleanup.
llvm-svn: 141113
2011-10-04 20:46:49 +00:00
Jim Grosbach
4770714494 Tidy up formatting.
llvm-svn: 141111
2011-10-04 20:42:35 +00:00
Jim Grosbach
dee6bd4517 Un-XFAIL file. Fix incorrect CHECK line.
llvm-svn: 141110
2011-10-04 20:42:09 +00:00
Jim Grosbach
d7449dd23f Un-XFAIL the file. Disable only the individual tests that aren't working yet.
llvm-svn: 141108
2011-10-04 20:34:11 +00:00
Bill Wendling
83ccbf4f1c Add method to determine if a begin label has a call site number associated with it.
llvm-svn: 141107
2011-10-04 20:31:56 +00:00