1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

83649 Commits

Author SHA1 Message Date
Chad Rosier
5395ec6ee4 Add support for dynamic stack realignment in the presence of dynamic allocas on
X86.  Basically, this is a reapplication of r158087 with a few fixes.

Specifically, (1) the stack pointer is restored from the base pointer before
popping callee-saved registers and (2) in obscure cases (see comments in patch)
we must cache the value of the original stack adjustment in the prologue and
apply it in the epilogue.

rdar://11496434

llvm-svn: 160002
2012-07-10 17:45:53 +00:00
Chandler Carruth
7837c8dbb9 Fix a bug where I didn't test for an empty range before inspecting the
back of it.

I don't have anything even remotely close to a test case for this. It
only broke two build bots, both of them doing bootstrap builds, one of
them a dragonegg bootstrap. It doesn't break for me when I bootstrap
either. It doesn't reproduce every time or on many machines during the
bootstrap. Many thanks to Duncan Sands who got the exact command (and
stage of the bootstrap) which failed on the dragonegg bootstrap and
managed to get it to trigger under valgrind with debug symbols. The fix
was then found by inspection.

llvm-svn: 159993
2012-07-10 15:41:33 +00:00
Nadav Rotem
5f6e9d5ffe Improve the loading of load-anyext vectors by allowing the codegen to load
multiple scalars and insert them into a vector. Next, we shuffle the elements
into the correct places, as before.
Also fix a small dagcombine bug in SimplifyBinOpWithSameOpcodeHands, when the
migration of bitcasts happened too late in the SelectionDAG process.

llvm-svn: 159991
2012-07-10 13:25:08 +00:00
Richard Barton
2bacde8589 Fix instruction description of VMOV (between two ARM core registers and two single-precision resiters) (and do it properly this time!
llvm-svn: 159989
2012-07-10 12:51:09 +00:00
Craig Topper
b346ce8240 Reverse assembler/disassembler operand order for gather instructions.
llvm-svn: 159983
2012-07-10 06:38:33 +00:00
Chandler Carruth
3ce0f2a6de Add an efficient merge operation to LiveInterval and use it to avoid
quadratic behavior when performing pathological merges. Fixes the core
element of PR12652.

There is only one user of addRangeFrom left: join. I'm hoping to
refactor further in a future patch and have join use this merge
operation as well.

llvm-svn: 159982
2012-07-10 05:16:17 +00:00
Chandler Carruth
9c9af3cc67 Teach LiveIntervals how to verify themselves and start using it in some
of the trick merge routines. This adds a layer of testing that was
necessary when implementing more efficient (and complex) merge logic for
this datastructure.

No functionality changed here.

llvm-svn: 159981
2012-07-10 05:06:03 +00:00
Jim Grosbach
83589b60dc ARM: Allow more flexible patterns in NEON formats.
Some NEON instructions want to match against normal SDNodes for some
operand types and Intrinsics for others. For example, CTLZ. To enable this,
switch from explicitly requiring Intrinsic on the class templates to using
SDPatternOperator instead.

llvm-svn: 159974
2012-07-10 00:51:13 +00:00
Jim Grosbach
2a3f12f4b0 Allow intrinsics to be used in place of node matchables.
TableGen has support for using an intrinics name directly in a DAG,
but this breaks down when referring to just a node, as that's
handled initializer list stuff entirely via subclassing in the
parser. That is, using an instrinsic like "(int_my_intrinsic ...)"
works fine. Using it standalone for parameterizing the operator
in such a DAG does not.

Fixing this is simple enough, as we simply declare Intrinsic
as deriving from SDPatternOperator, which is the class name
intended for exactly this purpose in TargetSelectionDAG.td.

When the intrinsic is actually used in the DAG pattern, it will
be recognized and expanded to an intrinsic_wo_chain (et. al.)
just like when it's used directly.

Incoming ARM NEON cleanup based on this and a bit of functionality
improvement after that.

llvm-svn: 159973
2012-07-10 00:51:11 +00:00
Akira Hatanaka
96b3eb563a Make register Mips::RA allocatable if not in mips16 mode.
llvm-svn: 159971
2012-07-10 00:19:06 +00:00
Dan Gohman
737eca66a6 Delete code for folding undefs in ScalarEvolution. It's invalid in
obscure ways, and it isn't actually important in the real world.

llvm-svn: 159969
2012-07-09 23:51:20 +00:00
Chad Rosier
b986265e3b Revert r159938 (and r159945) to appease the buildbots.
llvm-svn: 159960
2012-07-09 20:43:34 +00:00
Andrew Trick
48d244a45f Machine model: allow itineraries to be shared by different processor models.
llvm-svn: 159959
2012-07-09 20:43:03 +00:00
Andrew Trick
6b62cb7b17 indentation
llvm-svn: 159958
2012-07-09 20:43:01 +00:00
Owen Anderson
e0c4f94d45 Teach the DAG combiner to turn sitofp/uitofp from i1 into a conditional move, since there are only two possible values.
Previously, this would become an integer extension operation, followed by a real integer->float conversion.

llvm-svn: 159957
2012-07-09 20:31:12 +00:00
Manman Ren
dc41586be4 X86: implement functions to analyze & synthesize CMOV|SET|Jcc
getCondFromSETOpc, getCondFromCMovOpc, getSETFromCond, getCMovFromCond

No functional change intended.
If we want to update the condition code of CMOV|SET|Jcc, we first analyze the
opcode to get the condition code, then update the condition code, finally
synthesize the new opcode form the new condition code.

llvm-svn: 159955
2012-07-09 18:57:12 +00:00
Akira Hatanaka
3d2bcefaf1 Reapply r158846.
Access mips register classes via MCRegisterInfo's functions instead of via the
TargetRegisterClasses defined in MipsGenRegisterInfo.inc.

llvm-svn: 159953
2012-07-09 18:46:47 +00:00
Nuno Lopes
c676931bb9 instcombine: merge the functions that remove dead allocas and dead mallocs/callocs/...
This patch removes ~70 lines in InstCombineLoadStoreAlloca.cpp and makes both functions a bit more aggressive than before :)
In theory, we can be more aggressive when removing an alloca than a malloc, because an alloca pointer should never escape, but we are not taking advantage of this anyway

llvm-svn: 159952
2012-07-09 18:38:20 +00:00
Richard Barton
de6e2755f9 Some formatting to keep Clang happy
llvm-svn: 159948
2012-07-09 18:30:56 +00:00
Richard Barton
1f07c6525e Oops - correct broken disassembly for VMOV
llvm-svn: 159945
2012-07-09 18:20:02 +00:00
Richard Barton
cb28956a79 Fix instruction description of VMOV (between two ARM core registers and two single-precision resiters)
llvm-svn: 159938
2012-07-09 16:41:33 +00:00
Richard Barton
58c6ccbb1c Prevent ARM assembler from losing a right shift by #32 applied to a register
llvm-svn: 159937
2012-07-09 16:31:14 +00:00
Richard Barton
957a588c71 Spelling!
llvm-svn: 159936
2012-07-09 16:14:28 +00:00
Richard Barton
2ca50f6513 Teach the assembler to use the narrow thumb encodings of various three-register dp instructions where permissable.
llvm-svn: 159935
2012-07-09 16:12:24 +00:00
Benjamin Kramer
48674fdbd4 Remove some trivial copy ctors so the classes become trivially copyable and get the optimized SmallVector implementation.
llvm-svn: 159916
2012-07-08 19:47:51 +00:00
Benjamin Kramer
abb64d7556 SmallVector: Make use of move semantics to speed up moving objects in erase() and insert()
llvm-svn: 159914
2012-07-08 12:06:35 +00:00
Andrew Trick
b9c8074dcd I'm introducing a new machine model to simultaneously allow simple
subtarget CPU descriptions and support new features of
MachineScheduler.

MachineModel has three categories of data:
1) Basic properties for coarse grained instruction cost model.
2) Scheduler Read/Write resources for simple per-opcode and operand cost model (TBD).
3) Instruction itineraties for detailed per-cycle reservation tables.

These will all live side-by-side. Any subtarget can use any
combination of them. Instruction itineraries will not change in the
near term. In the long run, I expect them to only be relevant for
in-order VLIW machines that have complex contraints and require a
precise scheduling/bundling model. Once itineraries are only actively
used by VLIW-ish targets, they could be replaced by something more
appropriate for those targets.

This tablegen backend rewrite sets things up for introducing
MachineModel type #2: per opcode/operand cost model.

llvm-svn: 159891
2012-07-07 04:00:00 +00:00
Andrew Trick
39f96ecbe2 whitespace
llvm-svn: 159890
2012-07-07 03:59:51 +00:00
Andrew Trick
eb9b704bb8 Tweak spelling.
llvm-svn: 159889
2012-07-07 03:59:48 +00:00
Manman Ren
eca5886e50 X86: Fix optimizeCompare to correctly check safe condition.
It is safe if EFLAGS is killed or re-defined.
When we are done with the basic block, check whether EFLAGS is live-out.
Do not optimize away cmp if EFLAGS is live-out.

llvm-svn: 159888
2012-07-07 03:34:46 +00:00
NAKAMURA Takumi
84b04442bd LLVMConfig.cmake.in: Quote around @LLVM_INSTALL_PREFIX@, or it would not accept whitespace paths.
Thanks to Kai.

llvm-svn: 159887
2012-07-07 03:12:28 +00:00
Bill Wendling
ef19b7dfb9 Use the DebugInfo wrappers instead of mucking about with the MDNode directly.
llvm-svn: 159881
2012-07-07 00:52:35 +00:00
Bill Wendling
03654fab29 Print the name last.
llvm-svn: 159879
2012-07-06 23:43:12 +00:00
Chad Rosier
a9d216beac Fix the naming of ensureAlignment. Per the coding standard function names
should be camel case, and start with a lower case letter.

llvm-svn: 159877
2012-07-06 23:13:38 +00:00
Nuno Lopes
f3ba9a4d21 teach instcombine to remove allocated buffers even if there are stores, memcpy/memmove/memset, and objectsize users.
This means we can do cheap DSE for heap memory.
Nothing is done if the pointer excapes or has a load.

The churn in the tests is mostly due to objectsize, since we want to make sure we
don't delete the malloc call before evaluating the objectsize (otherwise it becomes -1/0)

llvm-svn: 159876
2012-07-06 23:09:25 +00:00
Dmitri Gribenko
452a9abd15 Since SmallMap was removed in r158644, remove documentation in ProgrammersManual.html.
llvm-svn: 159874
2012-07-06 23:06:47 +00:00
Bill Wendling
5c3e63dca0 Check if it's a scope last, because several things are scopes.
llvm-svn: 159873
2012-07-06 23:06:16 +00:00
Jim Grosbach
b9fd88619e ARM: Add test cleanup entry to the README.
llvm-svn: 159864
2012-07-06 21:52:04 +00:00
Akira Hatanaka
37565e70b6 revert r159851.
llvm-svn: 159854
2012-07-06 20:16:48 +00:00
Akira Hatanaka
4320724cc5 Reapply r158846.
Include file MipsGenRegisterInfo.inc.

llvm-svn: 159851
2012-07-06 19:29:11 +00:00
Bill Wendling
1c238d67b7 Add a print method to the ObjC property object.
llvm-svn: 159848
2012-07-06 19:12:31 +00:00
Bill Wendling
fe7effd5c8 Remove trailing comma in array initialization list.
llvm-svn: 159843
2012-07-06 17:49:19 +00:00
Bill Wendling
094156a2b9 Remove unnecessary 'llvm::'.
llvm-svn: 159842
2012-07-06 17:47:36 +00:00
Bill Wendling
b15d6a0392 Remove unnecessary 'llvm::'.
llvm-svn: 159841
2012-07-06 17:46:28 +00:00
Chad Rosier
9309733543 Whitespace.
llvm-svn: 159839
2012-07-06 17:44:22 +00:00
Manman Ren
8cbff1360f X86: peephole optimization to remove cmp instruction
For each Cmp, we check whether there is an earlier Sub which make Cmp
redundant. We handle the case where SUB operates on the same source operands as
Cmp, including the case where the two source operands are swapped.

llvm-svn: 159838
2012-07-06 17:36:20 +00:00
Chad Rosier
2bffb657ca [fast-isel] Tell fast-isel to do nothing with the new donothing intrinsic.
llvm-svn: 159837
2012-07-06 17:33:39 +00:00
Chad Rosier
e145692d89 Update getFunction parameter documentation. Fixes PR13268.
llvm-svn: 159835
2012-07-06 17:15:03 +00:00
Dmitri Gribenko
817a29123c Revert r159789.
llvm-svn: 159834
2012-07-06 16:42:25 +00:00
NAKAMURA Takumi
5db53aa56b llvm/include/llvm/CMakeLists.txt: Cut dependency to intrinsics_gen.
llvm-svn: 159831
2012-07-06 15:55:39 +00:00