LLVMVectorValuesAllEqual() improvements.
Clean up the API, so the caller doesn't have to pass in a vector so the function can track PHI nodes (do that internally instead.) Handle casts in lValuesAreEqual().
This commit is contained in:
@@ -228,8 +228,7 @@ extern llvm::Constant *LLVMMaskAllOff;
|
||||
/** Tests to see if all of the elements of the vector in the 'v' parameter
|
||||
are equal. Like lValuesAreEqual(), this is a conservative test and may
|
||||
return false for arrays where the values are actually all equal. */
|
||||
extern bool LLVMVectorValuesAllEqual(llvm::Value *v, int vectorLength,
|
||||
std::vector<llvm::PHINode *> &seenPhis);
|
||||
extern bool LLVMVectorValuesAllEqual(llvm::Value *v);
|
||||
|
||||
/** Given a vector-typed value v, if the vector is a vector with constant
|
||||
element values, this function extracts those element values into the
|
||||
|
||||
Reference in New Issue
Block a user