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

2966 Commits

Author SHA1 Message Date
Dan Gohman
c421549beb Make isLCSSA ignore uses in blocks not reachable from the entry block,
as LCSSA no longer transforms such uses.

llvm-svn: 98033
2010-03-09 01:53:33 +00:00
Dale Johannesen
d79b87c260 Another place where debug info affected codegen.
llvm-svn: 98026
2010-03-09 01:08:11 +00:00
Devang Patel
4995bb0450 Start using DIFile. See updated SourceLevelDebugging.html for more information.
This patch updates LLVMDebugVersion to 8.
Debug info descriptors encoded using LLVMDebugVersion 7 is supported.

Corresponding llvmgcc and clang FE commits are required.

llvm-svn: 98020
2010-03-09 00:44:10 +00:00
Devang Patel
a7387f4ecc Introduce DIFile. This will be used to represent header files and source file(s) in debug info.
llvm-svn: 97994
2010-03-08 22:27:22 +00:00
Devang Patel
ea239f6e0a Derive DIType from DIScope. This simplifies getContext() where for members the context is a type. This also eliminates need of CompileUnitMaps maintained by dwarf writer.
llvm-svn: 97990
2010-03-08 22:02:50 +00:00
Devang Patel
21633192f3 Remove DbgNode checks in constructor. Debug descriptors are intended to be light weight wrappers.
llvm-svn: 97988
2010-03-08 21:32:10 +00:00
Devang Patel
176dc29a62 Avoid using DIDescriptor.isNull().
This is a first step towards eliminating checks in Descriptor constructors.

llvm-svn: 97975
2010-03-08 20:52:55 +00:00
Devang Patel
a716e313d6 Revert r97947.
llvm-svn: 97963
2010-03-08 19:20:38 +00:00
Devang Patel
1527b2657b Avoid using DIDescriptor.isNull().
This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.

llvm-svn: 97947
2010-03-08 18:25:48 +00:00
Dale Johannesen
6489147b8e Fix another case where LSR was affected by debug info.
llvm-svn: 97865
2010-03-06 02:45:26 +00:00
Dale Johannesen
5c83d9b9b8 Fix a case where LSR is sensitive to debug info.
llvm-svn: 97830
2010-03-05 21:12:40 +00:00
Eric Christopher
3e3c445c81 Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.
No functionality change.

llvm-svn: 97793
2010-03-05 06:58:57 +00:00
Chris Lattner
9e230fb6b2 fix incorrect folding of icmp with undef, PR6481.
llvm-svn: 97659
2010-03-03 19:46:03 +00:00
Dan Gohman
4d2339f18d Make SCEVExpander and LSR more aggressive about hoisting expressions out
of loops.

llvm-svn: 97642
2010-03-03 05:29:13 +00:00
Dan Gohman
da13ee1220 Revert r97580; that's not the right way to fix this.
llvm-svn: 97639
2010-03-03 04:36:42 +00:00
Dan Gohman
f06941597a When expanding an expression such as (A + B + C + D), sort the operands
by loop depth and emit loop-invariant subexpressions outside of loops.
This speeds up MultiSource/Applications/viterbi and others.

llvm-svn: 97580
2010-03-02 19:32:21 +00:00
Dan Gohman
1625456786 Non-affine post-inc SCEV expansions have more code which must be
emitted after the increment. Make sure the insert position
reflects this. This fixes PR6453.

llvm-svn: 97537
2010-03-02 01:59:21 +00:00
Ted Kremenek
328c095a12 Update CMake build.
llvm-svn: 97488
2010-03-01 19:42:47 +00:00
Chris Lattner
ebb4fbf691 remove anders-aa from mainline, it isn't maintained and is
tantalyzing enough that people keep trying to use it.

llvm-svn: 97483
2010-03-01 19:24:17 +00:00
Dan Gohman
6d21428325 Add a comment.
llvm-svn: 97459
2010-03-01 17:56:04 +00:00
Dan Gohman
c08c48c9f3 Spelling fixes.
llvm-svn: 97453
2010-03-01 17:49:51 +00:00
Dan Gohman
47608d937a Fix a missing newline in debug output.
llvm-svn: 97449
2010-03-01 17:42:55 +00:00
Dan Gohman
52ed61204b Make LoopSimplify change conditional branches in loop exiting blocks
which branch on undef to branch on a boolean constant for the edge
exiting the loop. This helps ScalarEvolution compute trip counts for
loops.

Teach ScalarEvolution to recognize single-value PHIs, when safe, and
ForgetSymbolicName to forget such single-value PHI nodes as apprpriate
in ForgetSymbolicName.

llvm-svn: 97126
2010-02-25 06:57:05 +00:00
Dan Gohman
4d65bd9c6a ConstantFoldInstOperands can theoretically return null if it
didn't fold anything.

llvm-svn: 97049
2010-02-24 19:31:47 +00:00
Dan Gohman
fa19b098dc Simplify this code; these casts aren't necessary.
llvm-svn: 97048
2010-02-24 19:31:06 +00:00
Dan Gohman
6aacf4728c Convert a few more backedge-taken count functions to use BackedgeTakenInfo.
llvm-svn: 97042
2010-02-24 17:31:30 +00:00
Daniel Dunbar
8adb7774dc Reapply r97010, the speculative revert failed.
llvm-svn: 97036
2010-02-24 08:48:04 +00:00
Daniel Dunbar
8b33ce41d0 Speculatively revert r97010, "Add an argument to PHITranslateValue to specify
the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap.

llvm-svn: 97027
2010-02-24 06:55:22 +00:00
Bob Wilson
437d85dd57 Add an argument to PHITranslateValue to specify the DominatorTree. If this
argument is non-null, pass it along to PHITranslateSubExpr so that it can
prefer using existing values that dominate the PredBB, instead of just
blindly picking the first equivalent value that it finds on a uselist.
Also when the DominatorTree is specified, have PHITranslateValue filter
out any result that does not dominate the PredBB.  This is basically just
refactoring the check that used to be in GetAvailablePHITranslatedSubExpr
and also in GVN.

Despite my initial expectations, this change does not affect the results
of GVN for any testcases that I could find, but it should help compile time.
Before this change, if PHITranslateSubExpr picked a value that does not
dominate, PHITranslateWithInsertion would then insert a new value, which GVN
would later determine to be redundant and would replace.  By picking a good
value to begin with, we save GVN the extra work of inserting and then
replacing a new value.

llvm-svn: 97010
2010-02-24 01:39:00 +00:00
Dan Gohman
5a6b9ad7db Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to
getelementptr. Despite only doing so in the case where x is a known
array object and c can be converted to an index within range, this
could still be invalid if c is actually the address of an object
allocated outside of LLVM. Also, SCEVExpander, the original motivation
for this code, has since been improved to avoid inttoptr+ptroint in
more cases.

llvm-svn: 96950
2010-02-23 16:35:41 +00:00
Dan Gohman
97481fb5e0 Canonicalize ConstantInts to the right operand of commutative
operators.

The test difference is just due to the multiplication operands
being commuted (and thus requiring a more elaborate match). In
optimized code, that expression would be folded.

llvm-svn: 96816
2010-02-22 22:43:23 +00:00
Dan Gohman
90cc88c00f Minor formatting cleanup.
llvm-svn: 96808
2010-02-22 22:07:27 +00:00
Dan Gohman
2575392bf1 Remove unused variables and parameters.
llvm-svn: 96780
2010-02-22 04:11:59 +00:00
Dan Gohman
dcc3634e46 Constant-fold certain comparisons with infinity and negative infinity.
llvm-svn: 96777
2010-02-22 04:06:03 +00:00
Dan Gohman
39b7e5961e Add a comment.
llvm-svn: 96688
2010-02-19 18:49:22 +00:00
Dan Gohman
9268d67079 Teach ScalarEvolution how to compute a tripcount for a loop with
true or false as its exit condition. These are usually eliminated by
SimplifyCFG, but the may be left around during a pass which wishes
to preserve the CFG.

llvm-svn: 96683
2010-02-19 18:12:07 +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
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
Dan Gohman
1cc421b590 Fix SCEVExpander's existing PHI reuse checking to recognize the
case where there are loop-invariant instructions somehow left
inside the loop, and in a position where they won't dominate
the IV increment position.

llvm-svn: 96448
2010-02-17 02:39:31 +00:00
Dan Gohman
2a4208c74e Fold bswap(undef) to undef.
llvm-svn: 96432
2010-02-17 00:54:58 +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
a866c660db Split critical edges as needed for load PRE.
llvm-svn: 96378
2010-02-16 19:51:59 +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
Dan Gohman
7d5c463d8e When reusing an existing PHI node in a loop, be even more
strict about the requirements.

llvm-svn: 96301
2010-02-16 00:20:08 +00:00
Duncan Sands
2acaf3609c Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy.  Requested by Chris!

llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Dan Gohman
adc600ceb5 When testing whether a given SCEV depends on a temporary symbolic
name, test whether the SCEV itself is that temporary symbolic name,
in addition to checking whether the symbolic name appears as a
possibly-indirect operand.

llvm-svn: 96216
2010-02-15 10:28:37 +00:00
Dan Gohman
6c0fdcea5e When restoring a saved insert location, check to see if the saved
insert location has become an "inserted" instruction since the time
it was saved. If so, advance to the first non-"inserted" instruction.

llvm-svn: 96203
2010-02-15 00:21:43 +00:00
Dan Gohman
4d5f3b74e4 In rememberInstruction, if the value being remembered is the
current insertion point, advance the current insertion point.
This avoids a use-before-def situation in a testcase extracted
from clang which is difficult to reduce to a reasonable-sized
regression test.

llvm-svn: 96151
2010-02-14 03:12:47 +00:00
Dan Gohman
47756a8549 Simplify this code; no need for a custom subclass if it doesn't need
to override anything from the parent class.

llvm-svn: 96150
2010-02-14 02:48:58 +00:00