Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: include/llvm/Analysis/ScalarEvolution.h

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « docs/ReleaseNotes.rst ('k') | include/llvm/IR/IntrinsicsNVVM.td » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- llvm/Analysis/ScalarEvolution.h - Scalar Evolution -------*- C++ -*-===// 1 //===- llvm/Analysis/ScalarEvolution.h - Scalar Evolution -------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // The ScalarEvolution class is an LLVM pass which can be used to analyze and 10 // The ScalarEvolution class is an LLVM pass which can be used to analyze and
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 /// ComputeExitLimit - Compute the number of times the backedge of the 446 /// ComputeExitLimit - Compute the number of times the backedge of the
447 /// specified loop will execute if it exits via the specified block. 447 /// specified loop will execute if it exits via the specified block.
448 ExitLimit ComputeExitLimit(const Loop *L, BasicBlock *ExitingBlock); 448 ExitLimit ComputeExitLimit(const Loop *L, BasicBlock *ExitingBlock);
449 449
450 /// ComputeExitLimitFromCond - Compute the number of times the backedge of 450 /// ComputeExitLimitFromCond - Compute the number of times the backedge of
451 /// the specified loop will execute if its exit condition were a conditional 451 /// the specified loop will execute if its exit condition were a conditional
452 /// branch of ExitCond, TBB, and FBB. 452 /// branch of ExitCond, TBB, and FBB.
453 ExitLimit ComputeExitLimitFromCond(const Loop *L, 453 ExitLimit ComputeExitLimitFromCond(const Loop *L,
454 Value *ExitCond, 454 Value *ExitCond,
455 BasicBlock *TBB, 455 BasicBlock *TBB,
456 BasicBlock *FBB, 456 BasicBlock *FBB);
457 bool IsSubExpr);
458 457
459 /// ComputeExitLimitFromICmp - Compute the number of times the backedge of 458 /// ComputeExitLimitFromICmp - Compute the number of times the backedge of
460 /// the specified loop will execute if its exit condition were a conditional 459 /// the specified loop will execute if its exit condition were a conditional
461 /// branch of the ICmpInst ExitCond, TBB, and FBB. 460 /// branch of the ICmpInst ExitCond, TBB, and FBB.
462 ExitLimit ComputeExitLimitFromICmp(const Loop *L, 461 ExitLimit ComputeExitLimitFromICmp(const Loop *L,
463 ICmpInst *ExitCond, 462 ICmpInst *ExitCond,
464 BasicBlock *TBB, 463 BasicBlock *TBB,
465 BasicBlock *FBB, 464 BasicBlock *FBB);
466 bool IsSubExpr);
467 465
468 /// ComputeLoadConstantCompareExitLimit - Given an exit condition 466 /// ComputeLoadConstantCompareExitLimit - Given an exit condition
469 /// of 'icmp op load X, cst', try to see if we can compute the 467 /// of 'icmp op load X, cst', try to see if we can compute the
470 /// backedge-taken count. 468 /// backedge-taken count.
471 ExitLimit ComputeLoadConstantCompareExitLimit(LoadInst *LI, 469 ExitLimit ComputeLoadConstantCompareExitLimit(LoadInst *LI,
472 Constant *RHS, 470 Constant *RHS,
473 const Loop *L, 471 const Loop *L,
474 ICmpInst::Predicate p); 472 ICmpInst::Predicate p);
475 473
476 /// ComputeExitCountExhaustively - If the loop is known to execute a 474 /// ComputeExitCountExhaustively - If the loop is known to execute a
477 /// constant number of times (the condition evolves only from constants), 475 /// constant number of times (the condition evolves only from constants),
478 /// try to evaluate a few iterations of the loop until we get the exit 476 /// try to evaluate a few iterations of the loop until we get the exit
479 /// condition gets a value of ExitWhen (true or false). If we cannot 477 /// condition gets a value of ExitWhen (true or false). If we cannot
480 /// evaluate the exit count of the loop, return CouldNotCompute. 478 /// evaluate the exit count of the loop, return CouldNotCompute.
481 const SCEV *ComputeExitCountExhaustively(const Loop *L, 479 const SCEV *ComputeExitCountExhaustively(const Loop *L,
482 Value *Cond, 480 Value *Cond,
483 bool ExitWhen); 481 bool ExitWhen);
484 482
485 /// HowFarToZero - Return the number of times an exit condition comparing 483 /// HowFarToZero - Return the number of times an exit condition comparing
486 /// the specified value to zero will execute. If not computable, return 484 /// the specified value to zero will execute. If not computable, return
487 /// CouldNotCompute. 485 /// CouldNotCompute.
488 ExitLimit HowFarToZero(const SCEV *V, const Loop *L, bool IsSubExpr); 486 ExitLimit HowFarToZero(const SCEV *V, const Loop *L);
489 487
490 /// HowFarToNonZero - Return the number of times an exit condition checking 488 /// HowFarToNonZero - Return the number of times an exit condition checking
491 /// the specified value for nonzero will execute. If not computable, return 489 /// the specified value for nonzero will execute. If not computable, return
492 /// CouldNotCompute. 490 /// CouldNotCompute.
493 ExitLimit HowFarToNonZero(const SCEV *V, const Loop *L); 491 ExitLimit HowFarToNonZero(const SCEV *V, const Loop *L);
494 492
495 /// HowManyLessThans - Return the number of times an exit condition 493 /// HowManyLessThans - Return the number of times an exit condition
496 /// containing the specified less-than comparison will execute. If not 494 /// containing the specified less-than comparison will execute. If not
497 /// computable, return CouldNotCompute. isSigned specifies whether the 495 /// computable, return CouldNotCompute. isSigned specifies whether the
498 /// less-than is signed. 496 /// less-than is signed.
499 ExitLimit HowManyLessThans(const SCEV *LHS, const SCEV *RHS, 497 ExitLimit HowManyLessThans(const SCEV *LHS, const SCEV *RHS,
500 const Loop *L, bool isSigned, bool IsSubExpr); 498 const Loop *L, bool isSigned);
501 499
502 /// getPredecessorWithUniqueSuccessorForBB - Return a predecessor of BB 500 /// getPredecessorWithUniqueSuccessorForBB - Return a predecessor of BB
503 /// (which may not be an immediate predecessor) which has exactly one 501 /// (which may not be an immediate predecessor) which has exactly one
504 /// successor from which BB is reachable, or null if no such block is 502 /// successor from which BB is reachable, or null if no such block is
505 /// found. 503 /// found.
506 std::pair<BasicBlock *, BasicBlock *> 504 std::pair<BasicBlock *, BasicBlock *>
507 getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB); 505 getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB);
508 506
509 /// isImpliedCond - Test whether the condition described by Pred, LHS, and 507 /// isImpliedCond - Test whether the condition described by Pred, LHS, and
510 /// RHS is true whenever the given FoundCondValue value evaluates to true. 508 /// RHS is true whenever the given FoundCondValue value evaluates to true.
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 BumpPtrAllocator SCEVAllocator; 884 BumpPtrAllocator SCEVAllocator;
887 885
888 /// FirstUnknown - The head of a linked list of all SCEVUnknown 886 /// FirstUnknown - The head of a linked list of all SCEVUnknown
889 /// values that have been allocated. This is used by releaseMemory 887 /// values that have been allocated. This is used by releaseMemory
890 /// to locate them all and call their destructors. 888 /// to locate them all and call their destructors.
891 SCEVUnknown *FirstUnknown; 889 SCEVUnknown *FirstUnknown;
892 }; 890 };
893 } 891 }
894 892
895 #endif 893 #endif
OLDNEW
« no previous file with comments | « docs/ReleaseNotes.rst ('k') | include/llvm/IR/IntrinsicsNVVM.td » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698