1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

11210 Commits

Author SHA1 Message Date
Chris Lattner
11ea2e1578 teach OPC_CheckType to handle MVT::iPTR, down to 2 ppc failures.
llvm-svn: 96752
2010-02-21 20:10:43 +00:00
Chris Lattner
26215565bf make this check a bit more generous, it may be outliving its
utility.  Down to 6 ppc failures.

llvm-svn: 96751
2010-02-21 20:02:15 +00:00
Chris Lattner
3d7cc59f2c Relax an assertion a bit. We allow replacing things like
<4 x i32> with <4 x float> values if they end up the same
register class.  This gets us up to 231 passes on the ppc
tests (only 7 fails).

llvm-svn: 96750
2010-02-21 19:35:07 +00:00
Chris Lattner
c7fac8c8b2 when a match fails and we have to rollback, make sure to keep 'N' in
sync with the top of stack.  This fixes a bunch of failures on larger
testcases.

llvm-svn: 96732
2010-02-21 07:55:48 +00:00
Chris Lattner
e8842eb260 handle optional in flags that aren't present.
llvm-svn: 96731
2010-02-21 07:19:06 +00:00
Chris Lattner
8a969fb824 fix two bugs in OPC_EmitRegister, which makes ppc happier.
llvm-svn: 96728
2010-02-21 06:58:27 +00:00
Chris Lattner
0164635dad implement the last known missing feature: updating uses of results
of the matched pattern to use the newly created node results.  Onto
the "making it actually work" phase!

llvm-svn: 96724
2010-02-21 06:03:07 +00:00
Charles Davis
9dbf8d7899 Reduce size of 'StackAlignment' field from 5 to 3 bits. Seriously, who needs a
2GB-aligned stack anyway? 256 bytes is plenty. Requested by Chris.

llvm-svn: 96718
2010-02-21 04:26:06 +00:00
Chris Lattner
8983077c87 Lots of improvements to the new dagisel emitter. This gets it to
the point where it is to the 95% feature complete mark, it just
needs result updating to be done (then testing, optimization 
etc).

More specificallly, this adds support for chain and flag handling
on the result nodes, support for sdnodexforms, support for variadic
nodes, memrefs, pinned physreg inputs, and probably lots of other
stuff.

In the old DAGISelEmitter, this deletes the dead code related to
OperatorMap, cleans up a variety of dead stuff handling "implicit
remapping" from things like globaladdr -> targetglobaladdr (which
is no longer used because globaladdr always needs to be legalized),
and some minor formatting fixes.

llvm-svn: 96716
2010-02-21 03:22:59 +00:00
Chris Lattner
bb364c9b46 add a hook so that the new isel can run SDNodeXForms.
llvm-svn: 96714
2010-02-21 03:15:11 +00:00
Chris Lattner
ad9fa2075b Eliminate some uses of immAllOnes, just use -1, it does
the same thing and is more efficient for the matcher.

llvm-svn: 96713
2010-02-21 03:13:10 +00:00
Bob Wilson
df432a30b2 Revert 96634. It causes assertion failures for 126.gcc and 176.gcc in
the armv6 nightly tests.

llvm-svn: 96691
2010-02-19 18:59:53 +00:00
Bob Wilson
c03fbf812d Revert Anton's most recent EH patch (r96637), since it breaks a lot of
ARM and Thumb tests.

llvm-svn: 96680
2010-02-19 17:10:59 +00:00
Duncan Sands
88c859c900 Correct LastPrimitiveTyID: MetadataType is a primitive type.
This change probably has no functional effect.

llvm-svn: 96669
2010-02-19 09:18:53 +00:00
Chris Lattner
e6302b3565 add emitter support for integer constants and simple physreg references.
llvm-svn: 96663
2010-02-19 07:49:56 +00:00
Dale Johannesen
0f58c73229 recommit 96626, evidence that it broke things appears
to be spurious

llvm-svn: 96662
2010-02-19 07:14:22 +00:00
Dale Johannesen
d73b81bf12 Revert 96626, which causes build failure on ppc Darwin.
llvm-svn: 96653
2010-02-19 01:54:37 +00:00
Anton Korobeynikov
8aaa04a614 Use the same encoding for EH stuff uniformly on all MachO targets.
This hopefulyl should unbreak EH on PPC/Darwin.

llvm-svn: 96637
2010-02-19 00:29:36 +00:00
Jim Grosbach
53ef05fa82 Radar 7636153. In the presence of large call frames, it's not sufficient
for ARM to just check if a function has a FP to determine if it's safe
to simplify the stack adjustment pseudo ops prior to eliminating frame
indices. Allow targets to override the default behavior and does so for ARM
and Thumb2.

llvm-svn: 96634
2010-02-19 00:16:24 +00:00
Dan Gohman
2f0615ee5e Indvars needs to explicitly notify ScalarEvolution when it is replacing
a loop exit value, so that if a loop gets deleted, ScalarEvolution
isn't stick holding on to dangling SCEVAddRecExprs for that loop. This
fixes PR6339.

llvm-svn: 96626
2010-02-18 23:26:33 +00:00
Mon P Wang
64cd1a8d7f getSplatIndex assumes that the first element of the mask contains the splat index
which is not always true if the mask contains undefs. Modified it to return
the first non undef value.

llvm-svn: 96621
2010-02-18 22:33:18 +00:00
Chris Lattner
4cfdecc52b add support for referencing registers and immediates,
building the tree to represent them but not emitting 
table entries for them yet.

llvm-svn: 96617
2010-02-18 22:03:03 +00:00
Jakob Stoklund Olesen
5b9d14b55e Always normalize spill weights, also for intervals created by spilling.
Moderate the weight given to very small intervals.

The spill weight given to new intervals created when spilling was not
normalized in the same way as the original spill weights calculated by
CalcSpillWeights. That meant that restored registers would tend to hang around
because they had a much higher spill weight that unspilled registers.

This improves the runtime of a few tests by up to 10%, and there are no
significant regressions.

llvm-svn: 96613
2010-02-18 21:33:05 +00:00
Devang Patel
823a78e1f8 Fix comments.
llvm-svn: 96610
2010-02-18 21:03:36 +00:00
Devang Patel
5c67cb332e Destroy MDNodes gracefully while deleting llvm context.
llvm-svn: 96609
2010-02-18 20:53:16 +00:00
Duncan Sands
ca05b607b7 Refer to -help instead of --help since this is what tools themselves say.
Also, have tools output -help-hidden rather than refer to --help-hidden,
for consistency, and likewise adjust documentation.  This doesn't change
every mention of --help, only those which seemed clearly safe.

llvm-svn: 96578
2010-02-18 14:08:13 +00:00
Eric Christopher
88fe6775de Fix a few unused parameter warnings.
llvm-svn: 96533
2010-02-17 23:55:26 +00:00
David Greene
d93fb1f15d Make the non-temporal bit "significant" in MemSDNodes so they aren't
CSE'd or otherwise combined with temporal MemSDNodes.

llvm-svn: 96505
2010-02-17 20:21:42 +00:00
Daniel Dunbar
92e99d82a2 Add Regex::sub, for doing regular expression substitution with backreferences.
llvm-svn: 96503
2010-02-17 20:08:42 +00:00
Daniel Dunbar
27247dd1e8 Fix comment.
llvm-svn: 96498
2010-02-17 19:26:45 +00:00
Chris Lattner
2ec1f1a54a move isOnlyReachableByFallthrough out of MachineBasicBlock into AsmPrinter,
and add a sparc implementation that knows about delay slots.  Patch by
Nathan Keynes!

llvm-svn: 96492
2010-02-17 18:52:56 +00:00
Chris Lattner
4f86feb7ab add missing method, PR6284
llvm-svn: 96489
2010-02-17 18:39:56 +00:00
Chris Lattner
8f3afbc621 Emulate the current isel's "IsChainCompatible" logic for now.
I'd like to eventually rip it out, but for now producing the
same selections as the old matcher is more important.

llvm-svn: 96458
2010-02-17 06:23:39 +00:00
Chris Lattner
abb5e906a7 simplify IsChainCompatible codegen, add comments. no
functionality change.

llvm-svn: 96453
2010-02-17 05:35:28 +00:00
Chris Lattner
9625fb062a make the new isel's interpreter loop call the generated
CheckComplexPattern function.  Though it is logically const,
I don't have the fortitude to clean up all the targets now,
and it not being const doesn't block anything.

llvm-svn: 96426
2010-02-17 00:41:34 +00:00
Devang Patel
bebe8e55dc Use line and column number to distinguish two lexical blocks at the same level.
llvm-svn: 96395
2010-02-16 21:39:34 +00:00
Bob Wilson
86dded571f Rename SuccessorNumber to GetSuccessorNumber.
llvm-svn: 96387
2010-02-16 21:06:42 +00:00
Bob Wilson
a866c660db Split critical edges as needed for load PRE.
llvm-svn: 96378
2010-02-16 19:51:59 +00:00
Bob Wilson
1115365fcf Refactor to share code to find the position of a basic block successor in the
terminator's list of successors.

llvm-svn: 96377
2010-02-16 19:49:17 +00:00
Chris Lattner
ebcd505b14 convert the new matcher to check intermediate nodes for a single
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does.  This 
substantially simplifies the code and improves opportunities for
sharing.

llvm-svn: 96368
2010-02-16 19:15:55 +00:00
Duncan Sands
e9a13a3c60 Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
methods to try to have the type predicates be more logically positioned.

llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands
1b33dd3c83 There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy().  Convert most instances of the first form to the second form.
Requested by Chris.

llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Chris Lattner
a9550b6d27 generate code for node and pattern predicates. Note that this won't
build if enabled, it will fail with constness issues. I'll resolve 
these next.

llvm-svn: 96336
2010-02-16 07:21:10 +00:00
Chris Lattner
104828612b add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.

llvm-svn: 96331
2010-02-16 06:10:58 +00:00
Erick Tryzelaar
f4ca539af4 Fix a typo in an LLVMOpcode enum. LLVMTrunk -> LLVMTrunc.
llvm-svn: 96324
2010-02-16 03:45:23 +00:00
Anton Korobeynikov
ef1862e256 Move TLOF implementations to libCodegen to resolve layering violation.
llvm-svn: 96288
2010-02-15 22:37:53 +00:00
Anton Korobeynikov
dccd240998 Preliminary patch to improve dwarf EH generation - Hooks to return Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there
llvm-svn: 96285
2010-02-15 22:35:59 +00:00
Bill Wendling
bbf95aae9f Remove c++ style comments from c header.
llvm-svn: 96266
2010-02-15 20:53:17 +00:00
Bill Wendling
8ed10ca345 Renumber Instruction enums in llvm-c.
llvm-svn: 96264
2010-02-15 20:50:51 +00:00
Evan Cheng
b5fe25544c Split SelectionDAGISel::IsLegalAndProfitableToFold to
IsLegalToFold and IsProfitableToFold. The generic version of the later simply checks whether the folding candidate has a single use.

This allows the target isel routines more flexibility in deciding whether folding makes sense. The specific case we are interested in is folding constant pool loads with multiple uses.

llvm-svn: 96255
2010-02-15 19:41:07 +00:00