1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

40426 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes
d186fba555 Patterns to match AVX 256-bit horizontal arithmetic intrinsics
llvm-svn: 110427
2010-08-06 02:10:30 +00:00
Bruno Cardoso Lopes
5e9f9c921e Patterns to match AVX 256-bit arithmetic intrinsics
llvm-svn: 110425
2010-08-06 01:52:29 +00:00
Bill Wendling
0cd2ae5158 Add the Optimize Compares pass (disabled by default).
This pass tries to remove comparison instructions when possible. For instance,
if you have this code:

   sub r1, 1
   cmp r1, 0
   bz  L1

and "sub" either sets the same flag as the "cmp" instruction or could be
converted to set the same flag, then we can eliminate the "cmp" instruction all
together. This is a important for ARM where the ALU instructions could set the
CPSR flag, but need a special suffix ('s') to do so.

llvm-svn: 110423
2010-08-06 01:32:48 +00:00
Dan Gohman
1c3a757427 Move all the logic for function attributes and call attributes out of the
AliasAnalysis base class and into BasicAliasAnalyais. This avoids confusion
about where such logic is happening when there are other AliasAnalysis
implementations present.

Move the logic for translating two-callsite getModRefInfo queries into
other AliasAnalysis queries out of BasicAliasAnalysis and into the
AliasAnalysis base class, as it is useful for other AliasAnalysis
implementations.

llvm-svn: 110421
2010-08-06 01:25:49 +00:00
Owen Anderson
8ec30386ee Fix botched revert.
llvm-svn: 110416
2010-08-06 00:36:20 +00:00
Devang Patel
14cb55ddfe While emitting DBG_VALUE for registers spilled at the end of a block do not use location of MBB->end(). If a block does not have terminator then incoming iterator points to end().
llvm-svn: 110411
2010-08-06 00:26:18 +00:00
Owen Anderson
aadd8a89ca Revert r110396 to fix buildbots.
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Eric Christopher
cf17d8dfa7 Add an option to always emit realignment code for a particular module.
llvm-svn: 110404
2010-08-05 23:57:43 +00:00
Jakob Stoklund Olesen
0390da8c45 Be more aggressive about removing joined physreg copies.
When a joined COPY changes subreg liveness, we keep it around as a KILL,
otherwise it is safe to delete.

llvm-svn: 110403
2010-08-05 23:51:28 +00:00
Jakob Stoklund Olesen
1067cd1da0 Don't verify LiveVariables if LiveIntervals is available.
LiveVariables becomes horribly wrong while the coalescer is running, but the
analysis is not zapped until after the coalescer pass has run. This causes tons
of false reports when calling verify form the coalescer.

llvm-svn: 110402
2010-08-05 23:51:26 +00:00
Dan Gohman
c2e608a099 Fix 80-column violations.
llvm-svn: 110401
2010-08-05 23:48:14 +00:00
Owen Anderson
b9762c07cb Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.

llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Dan Gohman
8a813c4ded Remove IntrWriteMem, as it's the default. Rename IntrWriteArgMem
to IntrReadWriteArgMem, as it's for reading as well as writing.

llvm-svn: 110395
2010-08-05 23:36:21 +00:00
Bruno Cardoso Lopes
a26a97510a Support very basic (doesn't include ABI support in the front-end, varags, ...) 256-bit argument passing and return for AVX
llvm-svn: 110394
2010-08-05 23:35:51 +00:00
Dan Gohman
9135b410fe Implement AccessesArguments checking in the two-callsite form
of BasicAA::getModRefInfo. This allows BasicAA to say that two
memset calls to non-aliasing memory locations don't interfere.

llvm-svn: 110393
2010-08-05 23:34:50 +00:00
Dan Gohman
db40449189 Yes, we can do better, but this is not the place for it.
llvm-svn: 110391
2010-08-05 23:23:32 +00:00
Owen Anderson
86690fa988 Add the beginnings of infrastructure for range tracking.
llvm-svn: 110388
2010-08-05 22:59:19 +00:00
Jakob Stoklund Olesen
2ea6a20c07 Add basic verification of LiveIntervals.
We verify that the LiveInterval is live at uses and defs, and that all
instructions have a SlotIndex.

Stuff we don't check yet:

- Is the LiveInterval minimal?
- Do all defs correspond to instructions or phis?
- Do all defs dominate all their live ranges?
- Are all live ranges continually reachable from their def?

llvm-svn: 110386
2010-08-05 22:32:21 +00:00
Owen Anderson
bbeb4e2e58 Give JumpThreading+LVI a long-form cl::opt so that it's easier to toggle the default.
llvm-svn: 110384
2010-08-05 22:11:31 +00:00
Owen Anderson
68ee87e057 Split the tag and value members of LVILatticeVal in preparation for expanding the lattice to something that won't fit in two bits.
llvm-svn: 110383
2010-08-05 22:10:46 +00:00
Dan Gohman
7260387710 Fix memdep's code for reasoning about dependences between two calls. A Ref
response from getModRefInfo is not useful here. Instead, check for identical
calls only in the NoModRef case.

Reapply r110270, and strengthen it to compensate for the memdep changes.
When both calls are readonly, there is no dependence between them.

llvm-svn: 110382
2010-08-05 22:09:15 +00:00
Gabor Greif
f2465b8757 remove the private hack from CallInst, it was not supposed to hit the branch anyway
as a positive consequence the CallSite::getCallee() methods now can be rewritten to be
a bit more efficient

llvm-svn: 110380
2010-08-05 21:25:49 +00:00
Eric Christopher
b10ca25085 Handle the memory barrier pseudo that goes to nothing for the JIT.
llvm-svn: 110371
2010-08-05 20:04:36 +00:00
Eric Christopher
bc14450d15 Set hasSideEffects on the 64-bit no-sse memory barrier.
llvm-svn: 110369
2010-08-05 19:54:59 +00:00
Jim Grosbach
fb6af5329d For local variables in functions with a frame pointer, use FP as a base
register for local access when it's closer to the stack slot being refererenced
than the stack pointer. Make sure to take into account any argument frame
SP adjustments that are in affect at the time.

rdar://8256090

llvm-svn: 110366
2010-08-05 19:27:37 +00:00
Bob Wilson
fbce203f20 Fix indentation.
llvm-svn: 110363
2010-08-05 19:00:21 +00:00
Jakob Stoklund Olesen
21e64c3fae Remove double-def checking from MachineVerifier, so a register does not have to
be killed before being redefined.

These checks are usually disabled, and usually fail when enabled. We de facto
allow live registers to be redefined without a kill, the corresponding
assertions in RegScavenger were removed long ago.

llvm-svn: 110362
2010-08-05 18:59:59 +00:00
Bob Wilson
4ba3c0a5e1 Add an ARM RSCrr instruction for disassembly only.
Partial fix for PR7792.

llvm-svn: 110361
2010-08-05 18:59:36 +00:00
Eric Christopher
61f3059ee1 Be a little bit more specific about target for the memory barrier
instructions.

llvm-svn: 110360
2010-08-05 18:36:20 +00:00
Eric Christopher
904ec3a392 Handle the pseudo in MCInstLower.
llvm-svn: 110359
2010-08-05 18:34:30 +00:00
Bob Wilson
9fbaea3765 Add an ARM RSBrr instruction for disassembly only.
Partial fix for PR7792.

llvm-svn: 110358
2010-08-05 18:23:43 +00:00
Jakob Stoklund Olesen
e00538e23e Avoid using a live std::multimap iterator while editing the map. It looks like
we sometimes compare singular iterators, reported by ENABLE_EXPENSIVE_CHECKS.
This fixes PR7825.

llvm-svn: 110355
2010-08-05 18:12:19 +00:00
Chandler Carruth
01c83a8512 Silence a GCC warning about && and || without explicit parentheses. This
preserves the existing behavior, as it seems a concious choice to allow RS to
be null and BigStack marked true.

llvm-svn: 110307
2010-08-05 03:04:21 +00:00
Dan Gohman
c42ed0aa91 Revert r110270 for now. It appears to uncover a memdep bug.
llvm-svn: 110293
2010-08-05 00:43:10 +00:00
Bob Wilson
214b004717 ARM "rrx" shift operands do not have an immediate. PR7790.
llvm-svn: 110292
2010-08-05 00:34:42 +00:00
Dan Gohman
fc6b043376 The trouble with testing for "ModRef" and "NoModRef" is that
one is a suffix of the other, and FileCheck accepts superstrings.
Adjust the output to avoid this problem.

llvm-svn: 110280
2010-08-04 23:37:55 +00:00
Bill Wendling
446a54d234 The lower invoke pass needs to have unreachable code elimination run after it
because it could create such things. This fixes a MingW buildbot test failure.

llvm-svn: 110279
2010-08-04 23:36:02 +00:00
Eric Christopher
0e09eb9f77 Make x86-64 membarriers work without sse and clean up some of the
uses.

llvm-svn: 110274
2010-08-04 23:03:04 +00:00
Dan Gohman
dcb6099f9e The two-callsite form of AliasAnalysis::getModRefInfo is documented
to return Ref if the left callsite only reads memory read or written
by the right callsite; fix BasicAliasAnalysis to implement this.

Add AliasAnalysisEvaluator support for testing the two-callsite
form of getModRefInfo.

llvm-svn: 110270
2010-08-04 22:56:29 +00:00
Jim Grosbach
511dbe9c8e and back in. false alarm on the tests from another unrelated local change.
llvm-svn: 110269
2010-08-04 22:46:09 +00:00
Eli Friedman
401dbe036d PR7814: Truncates cannot be ignored for signed comparisons.
llvm-svn: 110268
2010-08-04 22:40:58 +00:00
Devang Patel
53e2e4feae Implement target specific getDebugValueLocation().
llvm-svn: 110267
2010-08-04 22:39:39 +00:00
Jakob Stoklund Olesen
dc6e812510 Coalesce stack slot accesses that arise when spilling both sides of a COPY.
This helps avoid silly code:

    %R0<def = LOAD <fi#5>
    STORE <fi#5>, %R0<kill>

llvm-svn: 110266
2010-08-04 22:35:11 +00:00
Jim Grosbach
497c60502c oops. revert for a moment to clean up tests first.
llvm-svn: 110259
2010-08-04 22:12:43 +00:00
Jim Grosbach
ece51f94db Reserve a stack slot if the function adjusts the stack but doesn't
simplify the call frame pseudo instructions. In that situation, the
calculations for estimating the stack size will be way off, leading to
not having an emergency spill slot when we need one. It should be possible
to be more precise about tracking the adjustment values, but not really
necessary for correctness. Upcoming cleanups for PEI in general will
render that moot.

llvm-svn: 110258
2010-08-04 22:10:15 +00:00
Jakob Stoklund Olesen
ecaa9f6ba4 Checkpoint SplitKit progress.
We are now at a point where we can split around simple single-entry, single-exit
loops, although still with some bugs.

llvm-svn: 110257
2010-08-04 22:08:39 +00:00
Devang Patel
97a93285f5 Implement target specific getDebugValueLocation().
llvm-svn: 110256
2010-08-04 22:07:50 +00:00
Devang Patel
4c36d66bde Use location entry only of the location described by DBG_VALUE is valid.
llvm-svn: 110255
2010-08-04 22:07:27 +00:00
Bill Wendling
249580ed17 The EH prepare passes really want to be the last passes run before code-gen.
llvm-svn: 110248
2010-08-04 21:44:13 +00:00
Torok Edwin
319c3f56c8 Use indirect calls in PowerPC JIT.
See PR5201. There is no way to know if direct calls will be within the allowed
range for BL. Hence emit all calls as indirect when in JIT mode.
Without this long-running applications will fail to JIT on PowerPC with a
relocation failure.

llvm-svn: 110246
2010-08-04 20:47:44 +00:00