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

27669 Commits

Author SHA1 Message Date
Dan Gohman
7a9e8cbf79 I was convinced that it's ok to allow a second i8 return value
to be returned in DL. LLVM's multiple-return-value support is
not ABI-conforming; front-ends that wish to have code emitted
that conforms to an ABI are currently expected to make
arrangements for this on their own rather than assuming that
multiple-return-values will automatically do the right thing.
This commit doesn't fundamentally change this situation.

llvm-svn: 67588
2009-03-24 01:04:34 +00:00
Dan Gohman
547cfc882e Minor compile-time optimization; don't bother checking
canClobberPhysRegDefs if the successor node doesn't
clobber any physical registers.

llvm-svn: 67587
2009-03-24 00:50:07 +00:00
Dan Gohman
e6d7478bc1 Add a pre-pass to the burr-list scheduler which makes adjustments to
help out the register pressure reduction heuristics in the case of
nodes with multiple uses. Currently this uses very conservative
heuristics, so it doesn't have a broad impact, but in cases where it
does help it can make a big difference.

llvm-svn: 67586
2009-03-24 00:49:12 +00:00
Evan Cheng
b3196f1298 Do not emit comments unless -asm-verbose.
llvm-svn: 67580
2009-03-24 00:17:40 +00:00
Dale Johannesen
0f8e2bcd98 Use a SmallPtrSet instead of std::set.
llvm-svn: 67578
2009-03-23 23:39:20 +00:00
Evan Cheng
702a8b4399 Fix a bug in spill weight computation. If the alias is a super-register, and the super-register is in the register class we are trying to allocate. Then add the weight to all sub-registers of the super-register even if they are not aliases.
e.g. allocating for GR32, bh is not used, updating bl spill weight.                                                                                                        
     bl should get the same spill weight otherwise it will be choosen                                                                                              
     as a spill candidate since spilling bh doesn't make ebx available.
This fix PR2866.

llvm-svn: 67574
2009-03-23 22:57:19 +00:00
Dale Johannesen
34123aba43 Fix internal representation of fp80 to be the
same as a normal i80 {low64, high16} rather
than its own {high64, low16}.  A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.

llvm-svn: 67562
2009-03-23 21:16:53 +00:00
Dan Gohman
60c652de57 When unfolding a load during scheduling, the new operator node has
a data dependency on the load node, so it really needs a
data-dependence edge to the load node, even if the load previously
existed.

And add a few comments.

llvm-svn: 67554
2009-03-23 20:20:43 +00:00
Evan Cheng
7e4a6972d6 Fix PR3391 and PR3864. Reg allocator infinite looping.
llvm-svn: 67544
2009-03-23 18:24:37 +00:00
Dan Gohman
a6842708e6 Don't set SUnit::hasPhysRegDefs to true unless the defs are
actually have uses, which reflects the way it's used.

llvm-svn: 67540
2009-03-23 17:39:36 +00:00
Dan Gohman
b6b24c5fc1 Fix canClobberPhysRegDefs to check all SDNodes grouped together
in an SUnit, instead of just the first one. This fix is needed
by some upcoming scheduler changes.

llvm-svn: 67531
2009-03-23 16:23:01 +00:00
Dan Gohman
78a1698ac0 Add a new bit to SUnit to record whether a node has implicit physreg
defs, regardless of whether they are actually used.

llvm-svn: 67528
2009-03-23 16:10:52 +00:00
Dan Gohman
18daca0895 Now that errs() is properly non-buffered, there's no need to
explicitly flush it.

llvm-svn: 67526
2009-03-23 15:57:19 +00:00
Dan Gohman
b10c534b89 LoopVR is not CFGOnly.
llvm-svn: 67524
2009-03-23 15:50:52 +00:00
Dan Gohman
9ef382068e Enhance LiveValues to work on PHI operands.
llvm-svn: 67523
2009-03-23 15:49:37 +00:00
Dan Gohman
e9cf3083d2 Correct some comments. Operand numbers start at 0.
llvm-svn: 67518
2009-03-23 15:40:10 +00:00
Evan Cheng
2ec94dd447 Model inline asm constraint which ties an input to an output register as machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies.
llvm-svn: 67512
2009-03-23 08:01:15 +00:00
Evan Cheng
4b11d96b62 Do not fold away subreg_to_reg if the source register has a sub-register index. That means the source register is taking a sub-register of a larger register. e.g. On x86
%RAX<def> = ...
%RAX<def> = SUBREG_TO_REG 0, %EAX:3<kill>, 3
The first def is defining RAX, not EAX so the top bits were not zero-extended.

llvm-svn: 67511
2009-03-23 07:19:58 +00:00
Chris Lattner
095a3938e4 fix a bug Alexei Svitkine pointed out.
llvm-svn: 67510
2009-03-23 06:46:20 +00:00
Chris Lattner
910f31715e When we restore signal handlers, restore them back to what they
were when we came around, not to their default handler.  This 
should fix PR3848

llvm-svn: 67509
2009-03-23 05:55:36 +00:00
Chris Lattner
429a82ad30 factorize signal registration, part of PR3848.
llvm-svn: 67508
2009-03-23 05:42:29 +00:00
Dan Gohman
745c0acc79 Fix a grammaro in a comment that Bill noticed.
llvm-svn: 67507
2009-03-23 05:02:44 +00:00
Dan Gohman
16b4a33039 Add comments explaining why there's only one register for
i8 return values.

llvm-svn: 67502
2009-03-23 04:28:24 +00:00
Duncan Sands
3c115770e7 Factorize out a concept - no functionality change.
llvm-svn: 67454
2009-03-21 21:27:31 +00:00
Chris Lattner
38c6f460d2 add a fastpath to ConstantExpr::getBitCast to handle the case when an obviously
unneeded bitcast is requested.  This is common for frontends who just unconditionally
cast even if the target is often the right type already.  THis prevents going into
getFoldedCast which switches on the opcode and does a bunch of other stuff before
doing the same opzn.

llvm-svn: 67435
2009-03-21 06:55:54 +00:00
Bruno Cardoso Lopes
fb1cd21342 Removed AFGR32 register class
Handle odd registers allocation in FGR32.

llvm-svn: 67422
2009-03-21 00:05:07 +00:00
Bob Wilson
8aaf1c6085 Fix a few more indentation problems and an 80-column violation.
llvm-svn: 67416
2009-03-20 23:16:43 +00:00
Bob Wilson
49a4ec2e00 No functional changes. Fix indentation and whitespace only.
llvm-svn: 67412
2009-03-20 22:42:55 +00:00
Chris Lattner
623662e8e1 Fix instcombine to not introduce undefined shifts when merging two
shifts together.  This fixes PR3851.

llvm-svn: 67411
2009-03-20 22:41:15 +00:00
Duncan Sands
926d062a48 Don't load values out of global constants with weak
linkage: the value may be replaced with something
different at link time.  (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).

llvm-svn: 67407
2009-03-20 21:53:29 +00:00
Dan Gohman
60cfa194d4 Simplify this code; use a while instead of an if and a do-while.
llvm-svn: 67400
2009-03-20 20:42:23 +00:00
Evan Cheng
0c629db2aa For inline asm output operand that matches an input. Encode the input operand index in the high bits.
llvm-svn: 67387
2009-03-20 18:03:34 +00:00
Sanjiv Gupta
d5c51dc50c Fixed comment for libcalls.
llvm-svn: 67373
2009-03-20 14:10:20 +00:00
Sanjiv Gupta
15d6146126 Fixed build warnings for unused variables.
llvm-svn: 67372
2009-03-20 13:49:20 +00:00
Sanjiv Gupta
19dc27b7cf Reformatting. Inserted code comments. Cleaned interfaces.
Removed unncessary code. No functionality change.

llvm-svn: 67371
2009-03-20 13:42:20 +00:00
Sanjiv Gupta
5957bb99ba Fixed the comment. No functionality change.
llvm-svn: 67370
2009-03-20 09:38:50 +00:00
Chris Lattner
b18e8617be Apply the patch requested in PR3846.
llvm-svn: 67364
2009-03-20 05:08:24 +00:00
Mon P Wang
6ac3a9ac9d Added option to enable generating less precise mad (multiply addition)
for those architectures that support the instruction.

llvm-svn: 67363
2009-03-20 05:06:58 +00:00
Dan Gohman
0d6f464b57 The last use in a block that doesn't have successors
(return or unreachable) is a kill.

llvm-svn: 67357
2009-03-20 01:28:21 +00:00
Sebastian Redl
e4e5b1c2f2 Fix the Win32 VS2008 build:
- Make type declarations match the struct/class keyword of the definition.
 - Move AddSignalHandler into the namespace where it belongs.
 - Correctly call functions from template base.
 - Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.

llvm-svn: 67347
2009-03-19 23:26:52 +00:00
Evan Cheng
f47c144bff Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
llvm-svn: 67335
2009-03-19 20:30:06 +00:00
Dale Johannesen
672ef54d0f Clear the cached cost when removing a function in
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.

llvm-svn: 67311
2009-03-19 18:03:56 +00:00
Dan Gohman
c6899f6200 Add a liveness analysis pass for LLVM IR values. This computes
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.

llvm-svn: 67309
2009-03-19 17:29:04 +00:00
Dale Johannesen
1d76ebc9ed Fix comment typo.
llvm-svn: 67307
2009-03-19 17:23:29 +00:00
Dale Johannesen
15de950459 This pass keeps a map of Instructions to Rank numbers,
and was deleting Instructions without clearing the
corresponding map entry.  This led to nondeterministic
behavior if the same address got allocated to another
Instruction within a short time.

llvm-svn: 67306
2009-03-19 17:22:53 +00:00
Chris Lattner
3181caa065 Fix PEI to not walk off the start of a block when an updated instruction
is the first in its block.  This is PR3842.

llvm-svn: 67304
2009-03-19 17:15:43 +00:00
Duncan Sands
45d4adde66 Fix comment typo.
llvm-svn: 67302
2009-03-19 11:37:15 +00:00
Nick Lewycky
6ec09863f0 Fix a couple glaring whitespace issues. This file isn't internally consistent
either.

llvm-svn: 67288
2009-03-19 06:31:22 +00:00
Nick Lewycky
a0dcd7e173 Remove strange extra semicolons.
llvm-svn: 67287
2009-03-19 05:51:39 +00:00
Nate Begeman
0eed59a7df Add support to tablegen for naming the nodes themselves, not just the operands,
in selectiondag patterns.  This is required for the upcoming shuffle_vector rewrite,
and as it turns out, cleans up a hack in the Alpha instruction info.

llvm-svn: 67286
2009-03-19 05:21:56 +00:00