summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h2
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h15
-rw-r--r--include/llvm/IR/GlobalValue.h4
-rw-r--r--include/llvm/Transforms/Utils/Local.h19
-rw-r--r--include/llvm/Transforms/Utils/SimplifyLibCalls.h2
5 files changed, 39 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 82c30d39afd6..df7c951743c9 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -295,7 +295,7 @@ public:
}
/// Should we be emitting segmented stack stuff for the function
- bool shouldSplitStack();
+ bool shouldSplitStack() const;
/// getNumBlockIDs - Return the number of MBB ID's allocated.
///
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 23816bde07c0..536fc656e8e2 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -369,6 +369,18 @@ public:
(UnsafeAlgebra << 3) | (NoNaNs << 4) | (NoInfs << 5) |
(NoSignedZeros << 6) | (AllowReciprocal << 7);
}
+
+ /// Clear any flags in this flag set that aren't also set in Flags.
+ void intersectWith(const SDNodeFlags *Flags) {
+ NoUnsignedWrap &= Flags->NoUnsignedWrap;
+ NoSignedWrap &= Flags->NoSignedWrap;
+ Exact &= Flags->Exact;
+ UnsafeAlgebra &= Flags->UnsafeAlgebra;
+ NoNaNs &= Flags->NoNaNs;
+ NoInfs &= Flags->NoInfs;
+ NoSignedZeros &= Flags->NoSignedZeros;
+ AllowReciprocal &= Flags->AllowReciprocal;
+ }
};
/// Represents one node in the SelectionDAG.
@@ -682,6 +694,9 @@ public:
/// and directly, but it is not to avoid creating a vtable for this class.
const SDNodeFlags *getFlags() const;
+ /// Clear any flags in this node that aren't also set in Flags.
+ void intersectFlagsWith(const SDNodeFlags *Flags);
+
/// Return the number of values defined/returned by this operator.
unsigned getNumValues() const { return NumValues; }
diff --git a/include/llvm/IR/GlobalValue.h b/include/llvm/IR/GlobalValue.h
index 4fa4e7daeab0..fa6469aa0ade 100644
--- a/include/llvm/IR/GlobalValue.h
+++ b/include/llvm/IR/GlobalValue.h
@@ -346,6 +346,10 @@ public:
return !(isDeclarationForLinker() || isWeakForLinker());
}
+ // Returns true if the alignment of the value can be unilaterally
+ // increased.
+ bool canIncreaseAlignment() const;
+
/// This method unlinks 'this' from the containing module, but does not delete
/// it.
virtual void removeFromParent() = 0;
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h
index 911c6f14da0b..3ae01657a2ec 100644
--- a/include/llvm/Transforms/Utils/Local.h
+++ b/include/llvm/Transforms/Utils/Local.h
@@ -331,6 +331,25 @@ unsigned replaceDominatedUsesWith(Value *From, Value *To, DominatorTree &DT,
/// during lowering by the GC infrastructure.
bool callsGCLeafFunction(ImmutableCallSite CS);
+//===----------------------------------------------------------------------===//
+// Intrinsic pattern matching
+//
+
+/// Try and match a bitreverse or bswap idiom.
+///
+/// If an idiom is matched, an intrinsic call is inserted before \c I. Any added
+/// instructions are returned in \c InsertedInsts. They will all have been added
+/// to a basic block.
+///
+/// A bitreverse idiom normally requires around 2*BW nodes to be searched (where
+/// BW is the bitwidth of the integer type). A bswap idiom requires anywhere up
+/// to BW / 4 nodes to be searched, so is significantly faster.
+///
+/// This function returns true on a successful match or false otherwise.
+bool recognizeBitReverseOrBSwapIdiom(
+ Instruction *I, bool MatchBSwaps, bool MatchBitReversals,
+ SmallVectorImpl<Instruction *> &InsertedInsts);
+
} // End llvm namespace
#endif
diff --git a/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/include/llvm/Transforms/Utils/SimplifyLibCalls.h
index 410a075aeb98..fc34f49a1255 100644
--- a/include/llvm/Transforms/Utils/SimplifyLibCalls.h
+++ b/include/llvm/Transforms/Utils/SimplifyLibCalls.h
@@ -125,8 +125,6 @@ private:
Value *optimizeStringMemoryLibCall(CallInst *CI, IRBuilder<> &B);
// Math Library Optimizations
- Value *optimizeUnaryDoubleFP(CallInst *CI, IRBuilder<> &B, bool CheckRetType);
- Value *optimizeBinaryDoubleFP(CallInst *CI, IRBuilder<> &B);
Value *optimizeCos(CallInst *CI, IRBuilder<> &B);
Value *optimizePow(CallInst *CI, IRBuilder<> &B);
Value *optimizeExp2(CallInst *CI, IRBuilder<> &B);