mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Remove a bunch more now-unnecessary Context arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78809 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1558,8 +1558,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) {
|
||||
// If we need to invert the condition in the pred block to match, do so now.
|
||||
if (InvertPredCond) {
|
||||
Value *NewCond =
|
||||
BinaryOperator::CreateNot(BI->getParent()->getContext(),
|
||||
PBI->getCondition(),
|
||||
BinaryOperator::CreateNot(PBI->getCondition(),
|
||||
PBI->getCondition()->getName()+".not", PBI);
|
||||
PBI->setCondition(NewCond);
|
||||
BasicBlock *OldTrue = PBI->getSuccessor(0);
|
||||
@ -1598,8 +1597,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) {
|
||||
static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) {
|
||||
assert(PBI->isConditional() && BI->isConditional());
|
||||
BasicBlock *BB = BI->getParent();
|
||||
LLVMContext &Context = BB->getContext();
|
||||
|
||||
|
||||
// If this block ends with a branch instruction, and if there is a
|
||||
// predecessor that ends on a branch of the same condition, make
|
||||
// this conditional branch redundant.
|
||||
@ -1715,12 +1713,12 @@ static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) {
|
||||
// Make sure we get to CommonDest on True&True directions.
|
||||
Value *PBICond = PBI->getCondition();
|
||||
if (PBIOp)
|
||||
PBICond = BinaryOperator::CreateNot(Context, PBICond,
|
||||
PBICond = BinaryOperator::CreateNot(PBICond,
|
||||
PBICond->getName()+".not",
|
||||
PBI);
|
||||
Value *BICond = BI->getCondition();
|
||||
if (BIOp)
|
||||
BICond = BinaryOperator::CreateNot(Context, BICond,
|
||||
BICond = BinaryOperator::CreateNot(BICond,
|
||||
BICond->getName()+".not",
|
||||
PBI);
|
||||
// Merge the conditions.
|
||||
|
Reference in New Issue
Block a user