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

40522 Commits

Author SHA1 Message Date
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
Devang Patel
35e3dd45c0 Fix typo in comment.
llvm-svn: 110244
2010-08-04 20:32:36 +00:00
Dan Gohman
bafce59252 Fix a minor bug which resulted in intermediate calculations
using wider types than are necessary.

llvm-svn: 110241
2010-08-04 19:52:50 +00:00
Dan Gohman
670b397ecc Change this llvm_unreachable to report_fatal_error, since it can
be triggered by valid, if dubious, IR.

llvm-svn: 110240
2010-08-04 18:51:09 +00:00
Devang Patel
cd5912c7bf While spilling live registers at the end of block check whether they are used by DBG_VALUE machine instructions or not. If a spilled register is used by DBG_VALUE machine instruction then insert a new DBG_VALUE machine instruction to encode variable's new location on stack.
llvm-svn: 110235
2010-08-04 18:42:02 +00:00
Devang Patel
eb7cff69c8 If a variable is spilled by code generator then use DW_OP_fbreg to describe its location on stack.
llvm-svn: 110234
2010-08-04 18:40:52 +00:00
Owen Anderson
0c1fe93d7c Experiments show that we can safely increase our unrolling threshold without unduly impacting code size, particularly
since unrolling is not enabled at -Os.

llvm-svn: 110233
2010-08-04 18:32:46 +00:00
Dale Johannesen
53bc276b33 Remove switch for disabling ARM tail calls. They
seem to be working correctly.  No functional change.

llvm-svn: 110226
2010-08-04 18:07:17 +00:00
Devang Patel
e48431509c Add DEBUG message.
llvm-svn: 110224
2010-08-04 18:06:05 +00:00
Dan Gohman
88d90617de Fix whitespace.
llvm-svn: 110223
2010-08-04 17:43:57 +00:00
Benjamin Kramer
8bce8e326c Enable COFF writer on mingw32 and cygwin.
llvm-svn: 110200
2010-08-04 15:32:40 +00:00
Kalle Raiskila
ce1e4d80cb Make SPU backend handle insertelement and
store for "half vectors"

llvm-svn: 110198
2010-08-04 13:59:48 +00:00
Benjamin Kramer
968cc0119f Print an error message when someone tries -integrated-as on an unsupported target.
- The COFF backend doesn't support MingW/Cygwin at the moment, it'll report an
  error, but it's still much better than random assertions from the MachO backend.
- We want to make ELF the default eventually, it's what the majority of targets use.

llvm-svn: 110197
2010-08-04 13:16:30 +00:00
Torok Edwin
967fc5164f Add a missing function.
llvm-svn: 110195
2010-08-04 11:42:45 +00:00
Gabor Greif
50fb0419ea by Alexander Herz:
"The CWriter::GetValueName() method does not check if a value as an alias 
and emits the alias name which will never be defined in the output .c 
file (so the output file fails to compile). This can happen if you have 
multiple inheritance with several destructors defined by clang (...D0Ev, 
...D1Ev, ...D2Ev)."

-- applied with minor tweaks. Thanks!

llvm-svn: 110194
2010-08-04 10:00:52 +00:00
Dan Gohman
227c4f64ac Eliminate unnecessary empty string literals.
llvm-svn: 110183
2010-08-04 01:39:08 +00:00
Dan Gohman
bea5c99638 Fix a comment.
llvm-svn: 110181
2010-08-04 01:16:35 +00:00
Dan Gohman
ab805c5aae Don't print the filename twice in file-not-found errors.
llvm-svn: 110179
2010-08-04 01:13:48 +00:00
Bob Wilson
6a2437480a Combine NEON VABD (absolute difference) intrinsics with ADDs to make VABA
(absolute difference with accumulate) intrinsics.  Radar 8228576.

llvm-svn: 110170
2010-08-04 00:12:08 +00:00
Dan Gohman
aac19e4ffe Remove PointerAccessInfo, which nothing was using.
llvm-svn: 110167
2010-08-03 23:08:10 +00:00
Chris Lattner
a2e36c6b18 fix a win64 encoding problem, patch by Cameron Esfahani!
llvm-svn: 110164
2010-08-03 22:49:22 +00:00
Dan Gohman
a087b90950 Thread const correctness through a bunch of AliasAnalysis interfaces and
eliminate several const_casts.

Make CallSite implicitly convertible to ImmutableCallSite.

Rename the getModRefBehavior for intrinsic IDs to
getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite,
which happens to be implicitly convertible to bool.

llvm-svn: 110155
2010-08-03 21:48:53 +00:00
Nate Begeman
b506e13a32 Add support for getting & setting the FPSCR application register on ARM when VFP is enabled.
Add support for using the FPSCR in conjunction with the vcvtr instruction, for controlling fp to int rounding.
Add support for the FLT_ROUNDS_ node now that the FPSCR is exposed.

llvm-svn: 110152
2010-08-03 21:31:55 +00:00
Dan Gohman
3ea223305c The singular of "indices" is "index".
llvm-svn: 110135
2010-08-03 20:23:52 +00:00
Dan Gohman
b0d9b03b13 Delete an unused function.
llvm-svn: 110134
2010-08-03 20:20:56 +00:00
Dan Gohman
a80f89dbc7 Make instcombine set explicit alignments on load or store
instructions with alignment 0, so that subsequent passes don't
need to bother checking the TargetData ABI size manually.

llvm-svn: 110128
2010-08-03 18:20:32 +00:00
Oscar Fuentes
7186be986b CMake: Change somme target library names:
XCore->XCoreGen
PIC16->PIC16CodeGen

After updating your working copy, the first build will fail because it
is using the old library dependencies. Start the build again and it
will work fine.

llvm-svn: 110127
2010-08-03 17:40:31 +00:00
Dan Gohman
10d085dcba Make AliasAnalysis::getModRefInfo conservative in the face of volatility.
llvm-svn: 110120
2010-08-03 17:27:43 +00:00
Jakob Stoklund Olesen
38a3f83da5 Oops. Don't normalize spill weights twice.
When the normalizeSpillWeights function was introduced, I forgot to remove this
normalization.

This change could affect register allocation. Hopefully for the better.

llvm-svn: 110119
2010-08-03 17:21:16 +00:00
Chris Lattner
a18c40fa5f avoid undefined behavior negating minint.
llvm-svn: 110117
2010-08-03 16:57:03 +00:00
Dan Gohman
03b02a1ee1 Fix a typo Devang noticed.
llvm-svn: 110115
2010-08-03 16:48:31 +00:00
Chris Lattner
aa6eb3d13d avoid undef behavior on minint, fixing PR7783.
llvm-svn: 110114
2010-08-03 16:41:24 +00:00
Peter Collingbourne
10c4f9d6bd Add an atomic lowering pass
llvm-svn: 110113
2010-08-03 16:19:16 +00:00
Dan Gohman
8391bdbe95 Use unary + instead of a separate local variable for working
around std::min vs static const friction.

llvm-svn: 110112
2010-08-03 16:15:50 +00:00
Michael J. Spencer
59bd7389a4 MC: Fix symbol fragment offsets in COFF.
Patch by Cameron Esfahani!

llvm-svn: 110104
2010-08-03 05:02:46 +00:00
Michael J. Spencer
135ecc4689 Revert "MC: Fix symbol fragment offsets in COFF."
This reverts commit r110100

Wrong path caps.

llvm-svn: 110103
2010-08-03 04:53:28 +00:00
Michael J. Spencer
6ff92fbc86 MC: Add time travel support to COFF.
llvm-svn: 110101
2010-08-03 04:43:33 +00:00
Michael J. Spencer
b9653145e4 MC: Fix symbol fragment offsets in COFF.
Patch by Cameron Esfahani!

llvm-svn: 110100
2010-08-03 04:43:24 +00:00
Michael J. Spencer
5878996848 Fix CMake build
llvm-svn: 110097
2010-08-03 02:38:20 +00:00
Dan Gohman
6604a72154 Introduce a symbolic constant for ~0u for use with AliasAnalysis.
llvm-svn: 110091
2010-08-03 01:03:11 +00:00
Dan Gohman
e0489ffe8e Add a convenient form of AliasAnalysis::alias for the case where the sizes
are unknown.

llvm-svn: 110090
2010-08-03 00:56:30 +00:00
Dan Gohman
68ac0492a4 Make SCEVUnknown a CallbackVH, so that it can be notified directly
of Value deletions and RAUWs, instead of relying on ScalarEvolution's
Scalars map being notified, as that's complicated at best, and
insufficient in general.

This means SCEVUnknown needs a non-trivial destructor, so introduce
a mechanism to allow ScalarEvolution to locate all the SCEVUnknowns.

llvm-svn: 110086
2010-08-02 23:49:30 +00:00
Dan Gohman
9d80b87a4d Sketch up a preliminary Type-Based Alias Analysis implementation.
llvm-svn: 110077
2010-08-02 23:11:01 +00:00
Dan Gohman
655a83cec4 Fix visitInvokeInst to call visitTerminatorInst, and remove
a redundant check from checkInstruction.

llvm-svn: 110076
2010-08-02 23:09:14 +00:00
Dan Gohman
5e090b7535 Add Verifier logic for indirectbr.
llvm-svn: 110075
2010-08-02 23:08:33 +00:00
Dan Gohman
abb2503036 Add a lint check for indirectbr with no successors.
llvm-svn: 110074
2010-08-02 23:06:43 +00:00
Devang Patel
f18faa5945 Add explicit constructors. Patch by Renato Golin.
llvm-svn: 110072
2010-08-02 22:51:46 +00:00
Bill Wendling
9cd35987d2 Early exit and reduce indentation. No functionality change.
llvm-svn: 110069
2010-08-02 22:06:08 +00:00
Dan Gohman
213f64b54c Fix namespace polution.
llvm-svn: 110056
2010-08-02 18:50:06 +00:00
Devang Patel
8a18e29b50 Free DbgScope created for dead functions.
llvm-svn: 110045
2010-08-02 17:32:15 +00:00
Kalle Raiskila
014c93befb More SPU v2f32 stuff added: insertelement and shuffle.
llvm-svn: 110038
2010-08-02 11:22:10 +00:00
Kalle Raiskila
766fd434df Add preliminary v2f32 support for SPU. Like with v2i32, we just
duplicate the instructions and operate on half vectors. 

Also reorder code in SPUInstrInfo.td for better coherency.

llvm-svn: 110037
2010-08-02 10:25:47 +00:00
Owen Anderson
e957c57ebb Re-apply the infamous r108614, with a fix pointed out by Dirk Steinke.
llvm-svn: 110036
2010-08-02 09:32:13 +00:00
Kalle Raiskila
21615cb06e Add preliminary v2i32 support for SPU backend. As there are no
such registers in SPU, this support boils down to "emulating" 
them by duplicating instructions on the general purpose registers. 

This adds the most basic operations on v2i32: passing parameters,
addition, subtraction, multiplication and a few others.

llvm-svn: 110035
2010-08-02 08:54:39 +00:00
Oscar Fuentes
4742c01c2a Prefix next' iterator operation with llvm::'.
Fixes potential ambiguity problems on VS 2010.

Patch by nobled!

llvm-svn: 110029
2010-08-02 06:00:15 +00:00
Daniel Dunbar
06a1d9ddcf Fix a -Wreorder warning.
llvm-svn: 110022
2010-08-02 05:43:46 +00:00
Nick Lewycky
747b2ba2b9 Work in progress.
Start cleaning up MergeFunctions to look more like the rest of LLVM. The
primary change here is to move the methods responsible for comparison into the
new FunctionComparator object. Some comments added. There's more to do.

llvm-svn: 110021
2010-08-02 05:23:03 +00:00
Eli Friedman
081daa15e1 PR7586: Make sure we don't claim that unknown bits are actually known in the
ISD::AND case of TargetLowering::SimplifyDemandedBits.

llvm-svn: 110019
2010-08-02 04:42:25 +00:00
Eli Friedman
40cb7d9994 PR7781: Fix incorrect shifting in PPCTargetLowering::LowerBUILD_VECTOR.
llvm-svn: 109998
2010-08-02 00:18:19 +00:00
Eli Friedman
3c5289c381 PR7774: Fix undefined shifts in Alpha backend. As a bonus, this actually
improves the generated code in some cases.

llvm-svn: 109985
2010-08-01 21:13:28 +00:00
Benjamin Kramer
1f47ed839d Preallocate vector, avoid unnecessary vector growth.
llvm-svn: 109971
2010-08-01 11:43:26 +00:00
Bill Wendling
36376df573 Reference the personalities. Don't copy them into a new vector.
llvm-svn: 109966
2010-08-01 01:34:21 +00:00
Daniel Dunbar
e0737ebae3 Silence some -Asserts uninitialized variable warnings.
llvm-svn: 109956
2010-07-31 21:08:54 +00:00
Daniel Dunbar
f2be238c99 Speculatively revert r108614, "Another attempt at getting the clang self-host to
like my instcombine patch.", in an attempt to fix Clang i386 bootstrap.
 - Also PR7719.

llvm-svn: 109953
2010-07-31 19:51:11 +00:00
Michael J. Spencer
1f89cc1fe5 MC: Remove HasAbsolutizedSet from WindowsX86AsmBackend.
llvm-svn: 109949
2010-07-31 07:21:44 +00:00
Bob Wilson
58c8a5da9e Move newlines before inline jumptables from the asm strings in .td files to
the jtblock_operand print methods.  This avoids extra newlines in the
disassembler's output.  PR7757.

llvm-svn: 109948
2010-07-31 06:28:10 +00:00
Michael J. Spencer
b52ff1ba41 Add relax all support to the COFF object streamer.
llvm-svn: 109947
2010-07-31 06:22:29 +00:00
Bob Wilson
439e7b1d73 Add support for disassembling VMVN (immediate) instructions. PR7747.
llvm-svn: 109946
2010-07-31 05:57:44 +00:00
Rafael Espindola
75734bc143 The BlockExtractorPass() constructor was not reading the BlockFile and that was
exactly what bugpoint expected it to do.

There was also only one user of
BlockExtractorPass(const std::vector<BasicBlock*> &B), so just remove it and
make BlockExtractorPass read BlockFile.

This fixes bugpoint's block extraction.

Nick, please review.

llvm-svn: 109936
2010-07-31 00:32:17 +00:00
Owen Anderson
e1aed29cca Add an initial implementation of PHI translation for LazyValueInfo. This involves rolling back some
of my earlier data structure improvements until I can ensure that there are no iterator invalidation problems.

llvm-svn: 109935
2010-07-30 23:59:40 +00:00
Evan Cheng
ee59acf6dd Add -disable-shifter-op to disable isel of shifter ops. On Cortex-a9 the shifts cost extra instructions so it might be better to emit them separately to take advantage of dual-issues.
llvm-svn: 109934
2010-07-30 23:33:54 +00:00
Bob Wilson
6ce71251cc Add a check in the ARM disassembler for NEON instructions that would
reference registers past the end of the NEON register file, and report them
as invalid instead of asserting when trying to print them.  PR7746.

llvm-svn: 109933
2010-07-30 23:27:59 +00:00
Dale Johannesen
eb251be031 PPC doesn't supported VLA with large alignment. This was
formerly rejected by the FE, so asserted in the BE; now the FE only
warns, so we treat it as a legitimate fatal error in PPC BE.
This means the test for the feature won't pass, so it's xfail'd.

llvm-svn: 109892
2010-07-30 21:09:48 +00:00
Dan Gohman
230d92b375 Move MaximumAlignment to be a member of the Value class.
llvm-svn: 109891
2010-07-30 21:07:05 +00:00
Owen Anderson
4e6f48d705 Revert my last two patches to LVI, which recent changes have exposed a miscompilation in.
llvm-svn: 109889
2010-07-30 20:56:07 +00:00
Nick Lewycky
b6db4aaeaa Add missing newline to debug statement.
llvm-svn: 109886
2010-07-30 20:27:01 +00:00
Bob Wilson
bd1dc153a5 Add the __TEXT,__StaticInit section to the list of sections emitted at the
beginning on ARM Darwin assembly files so that it won't be placed after
debug sections.  Radar 8252813.

llvm-svn: 109879
2010-07-30 19:55:47 +00:00
Bruno Cardoso Lopes
0c0dd2173c Support all 128-bit AVX vector intrinsics. Most part of them I already
declared during the addition of the assembler support, the additional
changes are:
- Add missing intrinsics
- Move all SSE conversion instructions in X86InstInfo64.td to the SSE.td file.
- Duplicate some patterns to AVX mode.
- Step into PCMPEST/PCMPIST custom inserter and add AVX versions.

llvm-svn: 109878
2010-07-30 19:54:33 +00:00
Bruno Cardoso Lopes
5d4afd0cb9 Fix typo!
llvm-svn: 109877
2010-07-30 19:41:24 +00:00
Daniel Dunbar
19ee08da53 MC: Initialize MCFragment::Offset, noticed by Cameron Esfahani.
llvm-svn: 109875
2010-07-30 18:32:09 +00:00
Daniel Dunbar
c97e760282 Fix -Wmissing-field-initializers warnings.
llvm-svn: 109872
2010-07-30 17:49:04 +00:00
Eli Friedman
bea7c851cf Fix for bug reported by Evzen Muller on llvm-commits: make sure to correctly
check the range of the constant when optimizing a comparison between a
constant and a sign_extend_inreg node.

llvm-svn: 109854
2010-07-30 06:44:31 +00:00
Jim Grosbach
1718345a30 Many Thumb2 instructions can reference the full ARM register set (i.e.,
have 4 bits per register in the operand encoding), but have undefined
behavior when the operand value is 13 or 15 (SP and PC, respectively).
The trivial coalescer in linear scan sometimes will merge a copy from
SP into a subsequent instruction which uses the copy, and if that
instruction cannot legally reference SP, we get bad code such as:
  mls r0,r9,r0,sp
instead of:
  mov r2, sp
  mls r0, r9, r0, r2

This patch adds a new register class for use by Thumb2 that excludes
the problematic registers (SP and PC) and is used instead of GPR
for those operands which cannot legally reference PC or SP. The
trivial coalescer explicitly requires that the register class
of the destination for the COPY instruction contain the source
register for the COPY to be considered for coalescing. This prevents
errant instructions like that above.

PR7499

llvm-svn: 109842
2010-07-30 02:41:01 +00:00
Nate Begeman
0b0f838c32 Add builtins for ssat/usat, similar to RealView's __ssat and __usat intrinsics.
llvm-svn: 109813
2010-07-29 22:48:09 +00:00
Bob Wilson
d70ec880ea Refactor ARM-specific DAG combining in preparation for adding some more
transformations.

llvm-svn: 109800
2010-07-29 20:34:14 +00:00
Dale Johannesen
717fbb2b32 Implement vector constants which are splat of
integers with mov + vdup.  8003375.  This is
currently disabled by default because LICM will
not hoist a VDUP, so it pessimizes the code if
the construct occurs inside a loop (8248029).

llvm-svn: 109799
2010-07-29 20:10:08 +00:00
Bob Wilson
823182c3e5 Don't assert on an unrecognized BrMiscFrm instruction.
PR7745.

llvm-svn: 109788
2010-07-29 18:29:28 +00:00
Eli Friedman
642f4c66c3 PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
if CExpr is a ConstantInt.

llvm-svn: 109773
2010-07-29 18:03:33 +00:00
Nate Begeman
b24fa8b8ae Add intrinsics __builtin_arm_qadd & __builtin_arm_qsub to allow access to the QADD & QSUB instructions.
Behave identically to __qadd & __qsub RealView instruction intrinsics.

llvm-svn: 109770
2010-07-29 17:56:55 +00:00
Benjamin Kramer
d1340209a1 Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
llvm-svn: 109767
2010-07-29 17:48:06 +00:00
Dale Johannesen
71204e008b Comment typo.
llvm-svn: 109765
2010-07-29 17:45:24 +00:00
Jakob Stoklund Olesen
1dee3913d6 Revert r109652, and remove the offending assert in loadRegFromStackSlot instead.
We do sometimes load from a too small stack slot when dealing with x86 arguments
(varargs and smaller-than-32-bit args). It looks like we know what we are doing
in those cases, so I am going to remove the assert instead of artifically
enlarging stack slot sizes.

The assert in storeRegToStackSlot stays in. We don't want to write beyond the
bounds of a stack slot.

llvm-svn: 109764
2010-07-29 17:42:27 +00:00
Daniel Dunbar
d516b0a1bd CrashRecovery: Use ThreadLocal::erase() instead of set(0).
llvm-svn: 109752
2010-07-29 15:24:21 +00:00
Benjamin Kramer
85d8649a9c Stop leaking std::strings in GetDwarfFile.
llvm-svn: 109746
2010-07-29 13:53:19 +00:00
Benjamin Kramer
20e27bc59b COFFObjectWriter: Don't leak COFFSymbols and COFFSections.
llvm-svn: 109745
2010-07-29 11:57:59 +00:00
Daniel Dunbar
d62252d9f8 Make sure to include config.h, to pickup LLVM_ON_WIN32.
llvm-svn: 109721
2010-07-29 01:52:04 +00:00
Daniel Dunbar
7972ac4c88 MC: Destroy Macro instances.
llvm-svn: 109720
2010-07-29 01:51:55 +00:00
Eric Christopher
6a1da7b4a5 Speculatively revert r109705 since it seems to be causing some build bot
angst.

llvm-svn: 109718
2010-07-29 01:25:38 +00:00
Daniel Dunbar
a5b23b4df1 CrashRecoveryContext: Add a simple POSIX implementation.
- This works, but won't handle crashes on stack overflow, or signals delivered
   to a thread other than the one that crashed. The latter is particular annoying
   on Darwin, because SIGABRT tends to go to the main thread.

llvm-svn: 109717
2010-07-29 01:21:47 +00:00
Jakob Stoklund Olesen
7f337a8e64 Fix a bug in the -regalloc=fast handling of exotic two-address instruction with
multiple defs, like t2LDRSB_POST.

The first def could accidentally steal the physreg that the second, tied def was
required to be allocated to.

Now, the tied use-def is treated more like an early clobber, and the physreg is
reserved before allocating the other defs.

This would never be a problem when the tied def was the only def which is the
usual case.

This fixes MallocBench/gs for thumb2 -O0.

llvm-svn: 109715
2010-07-29 00:52:19 +00:00
Dan Gohman
ea1486b53c Factor out some of the code for updating old SCEVUnknown values, and
extend it to handle the case where multiple RAUWs affect a single
SCEVUnknown.

Add a ScalarEvolution unittest to test for this situation.

llvm-svn: 109705
2010-07-29 00:17:55 +00:00
Owen Anderson
712152a68e Pass the queried value by argument rather than in a member, in preparation for supporting PHI translation.
llvm-svn: 109701
2010-07-28 23:50:08 +00:00
Jim Grosbach
8764c0127d ARM mode version of r109693. Remove incorrect substitution pattern for UXTB16. It wrongly assumed the input shift was actually a rotate. rdar://8240138
llvm-svn: 109696
2010-07-28 23:25:44 +00:00
Jim Grosbach
17bec0f609 Remove incorrect substitution pattern for UXTB16. It wrongly assumed the input shift was actually a rotate. rdar://8240138
llvm-svn: 109693
2010-07-28 23:17:45 +00:00
Jim Grosbach
03b130774b Remove dead prototype
llvm-svn: 109691
2010-07-28 23:16:12 +00:00