Update prebuilt Clang to match Android kernel.
Bug: 132428451
Change-Id: I8f6e2cb23f381fc0c02ddea99b867e58e925e5be
diff --git a/linux-x64/clang/include/llvm/Analysis/LegacyDivergenceAnalysis.h b/linux-x64/clang/include/llvm/Analysis/LegacyDivergenceAnalysis.h
index 173ca28..0a338b8 100644
--- a/linux-x64/clang/include/llvm/Analysis/LegacyDivergenceAnalysis.h
+++ b/linux-x64/clang/include/llvm/Analysis/LegacyDivergenceAnalysis.h
@@ -1,9 +1,8 @@
//===- llvm/Analysis/LegacyDivergenceAnalysis.h - KernelDivergence Analysis -*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -19,9 +18,11 @@
#include "llvm/ADT/DenseSet.h"
#include "llvm/IR/Function.h"
#include "llvm/Pass.h"
+#include "llvm/Analysis/DivergenceAnalysis.h"
namespace llvm {
class Value;
+class GPUDivergenceAnalysis;
class LegacyDivergenceAnalysis : public FunctionPass {
public:
static char ID;
@@ -41,7 +42,7 @@
//
// Even if this function returns false, V may still be divergent when used
// in a different basic block.
- bool isDivergent(const Value *V) const { return DivergentValues.count(V); }
+ bool isDivergent(const Value *V) const;
// Returns true if V is uniform/non-divergent.
//
@@ -53,6 +54,12 @@
void removeValue(const Value *V) { DivergentValues.erase(V); }
private:
+ // Whether analysis should be performed by GPUDivergenceAnalysis.
+ bool shouldUseGPUDivergenceAnalysis(const Function &F) const;
+
+ // (optional) handle to new DivergenceAnalysis
+ std::unique_ptr<GPUDivergenceAnalysis> gpuDA;
+
// Stores all divergent values.
DenseSet<const Value *> DivergentValues;
};