- May 12, 2009
-
-
Bob Wilson authored
after finding the (unique) layout predecessor. Sometimes a block may be listed more than once, and processing it more than once in this loop can lead to inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not clear these values. There's no point in continuing the loop regardless. The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource test. llvm-svn: 71536
-
Dan Gohman authored
and generalize it so that it can be used by IndVarSimplify. Implement the base IndVarSimplify transformation code using IVUsers. This removes TestOrigIVForWrap and associated code, as ScalarEvolution now has enough builtin overflow detection and folding logic to handle all the same cases, and more. Run "opt -iv-users -analyze -disable-output" on your favorite loop for an example of what IVUsers does. This lets IndVarSimplify eliminate IV casts and compute trip counts in more cases. Also, this happens to finally fix the remaining testcases in PR1301. Now that IndVarSimplify is being more aggressive, it occasionally runs into the problem where ScalarEvolutionExpander's code for avoiding duplicate expansions makes it difficult to ensure that all expanded instructions dominate all the instructions that will use them. As a temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function to fix up instructions inserted by SCEVExpander. Fortunately, this code is contained, and can be easily removed once a more comprehensive solution is available. llvm-svn: 71535
-
Dan Gohman authored
These values aren't analyzable, so they don't care if more information about the loop trip count can be had. Also, SCEVUnknown is used for a PHI while the PHI itself is being analyzed, so it needs to be left in the Scalars map. This fixes a variety of subtle issues. llvm-svn: 71533
-
Dan Gohman authored
return the correct value when the cast operand is all zeros. This ought to be pretty rare, because it would mean that the regular SCEV folding routines missed a case, though there are cases they might legitimately miss. Also, it's unlikely anything currently using GetMinTrailingZeros cares about this case. llvm-svn: 71532
-
Evan Cheng authored
llvm-svn: 71520
-
Bill Wendling authored
blast it away. - Move InlineInfo bookkeeping to bookkeep the correct debug info object. llvm-svn: 71519
-
Lang Hames authored
llvm-svn: 71495
-
Evan Cheng authored
Teach LSR to optimize more loop exit compares, i.e. change them to use postinc iv value. Previously LSR would only optimize those which are in the loop latch block. However, if LSR can prove it is safe (and profitable), it's now possible to change those not in the latch blocks to use postinc values. Also, if the compare is the only use, LSR would place the iv increment instruction before the compare instead in the latch. llvm-svn: 71485
-
- May 11, 2009
-
-
Mike Stump authored
llvm-svn: 71479
-
Dale Johannesen authored
sucessor info. llvm-svn: 71478
-
Evan Cheng authored
llvm-svn: 71472
-
Jay Foad authored
llvm-svn: 71468
-
Dan Gohman authored
llvm-svn: 71466
-
Dan Gohman authored
llvm-svn: 71459
-
Dan Gohman authored
accidentally match something unrelated. llvm-svn: 71458
-
Evan Cheng authored
llvm-svn: 71457
-
Evan Cheng authored
llvm-svn: 71456
-
Dan Gohman authored
type, rather than assume that it does. If the operand is not vector, it shouldn't be run through ScalarizeVectorOp. This fixes one of the testcases in PR3886. llvm-svn: 71453
-
Dan Gohman authored
llvm-svn: 71449
-
Douglas Gregor authored
fix Clang PRs 4148 and 4183. llvm-svn: 71448
-
Dan Gohman authored
llvm-svn: 71447
-
Dan Gohman authored
address folding. llvm-svn: 71446
-
Chris Lattner authored
llvm-svn: 71443
-
Chris Lattner authored
llvm-svn: 71442
-
Dale Johannesen authored
count down to 0 instead, under very restricted circumstances. Adjust 4 testcases in which this optimization fires. llvm-svn: 71439
-
John Mosby authored
Shrink wrapping in PEI: - reduces _static_ callee saved register spills and restores similar to Chow's original algorithm. - iterative implementation with simple heuristic limits to mitigate compile time impact. - handles placing spills/restores for multi-entry, multi-exit regions in the Machine CFG without splitting edges. - passes test-suite in LLCBETA mode. Added contains() method to ADT/SparseBitVector. llvm-svn: 71438
-
Jay Foad authored
memcpy, memmove and memset. llvm-svn: 71427
-
Jay Foad authored
just a Type. llvm-svn: 71426
-
Sanjiv Gupta authored
compiler libcalls start with .lib. now. fixed section names. llvm-svn: 71424
-
Sanjiv Gupta authored
only for those. These extern declarations to intrinsics are currently being emitted at the bottom of generated .s file, which works fine with gpasm(not sure about MPSAM though). PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any extern declarations (even if no intrinsics are being used), but that needs to be fixed in the linker itself. llvm-svn: 71423
-
Bill Wendling authored
llvm-svn: 71413
-
Bill Wendling authored
The DwarfWriter expects DbgScopes and DIEs to behave themselves according to DwarfWriter's rules. However, inlined functions violate these rules. There are two different types of DIEs associated with an inlined function: an abstract instance, which has information about the original source code for the function being inlined; and concrete instances, which are created for each place the function was inlined and point back to the abstract instance. This patch tries to stay true to this schema. It bypasses how regular DbgScopes and DIEs are created and used when necessary. It provides special handling for DIEs of abstract and concrete instances. This doesn't take care of all of the problems with debug info for inlined functions, but it's a step in the right direction. For one thing, llvm-gcc generates wrong IR (it's missing some llvm.dbg intrinsics at the point where the function's inlined) for this example: #include <stdio.h> static __inline__ __attribute__((always_inline)) int bar(int x) { return 4; } void foo() { long long b = 1; int Y = bar(4); printf("%d\n", Y); } while clang generates correct IR. llvm-svn: 71410
-
- May 10, 2009
-
-
Nick Lewycky authored
Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
-
Sanjiv Gupta authored
Module iterator contains list of filescope functions as well, we don't need to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming. llvm-svn: 71394
-
Anton Korobeynikov authored
(imm is allowed to be source operand, not dest...) llvm-svn: 71393
-
Anton Korobeynikov authored
llvm-svn: 71392
-
Sanjiv Gupta authored
llvm-svn: 71386
-
Bill Wendling authored
U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Revert r71370. llvm-svn: 71373
-
Bill Wendling authored
None. However, we were always recording the region end. There's no longer a good reason for this code to be separated out between the different opt levels, as it was doing pretty much the same thing anyway. llvm-svn: 71370
-
- May 09, 2009
-
-
Evan Cheng authored
llvm-svn: 71363
-