diff options
author | Alexander Timofeev <Alexander.Timofeev@amd.com> | 2018-03-05 15:12:21 +0000 |
---|---|---|
committer | Alexander Timofeev <Alexander.Timofeev@amd.com> | 2018-03-05 15:12:21 +0000 |
commit | 2e5eeceeb7a100a4fe93d2535cad29829b87d101 (patch) | |
tree | ee0d108da103650da7d421f984a4f2f36efc9e3b /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | 15186d493818ca82087ef766d3f488cc16062787 (diff) | |
download | llvm-2e5eeceeb7a100a4fe93d2535cad29829b87d101.zip llvm-2e5eeceeb7a100a4fe93d2535cad29829b87d101.tar.gz llvm-2e5eeceeb7a100a4fe93d2535cad29829b87d101.tar.bz2 |
Pass Divergence Analysis data to Selection DAG to drive divergence
dependent instruction selection.
Differential revision: https://reviews.llvm.org/D35267
llvm-svn: 326703
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 81347fa..c0abfdb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -547,3 +547,13 @@ FunctionLoweringInfo::getOrCreateSwiftErrorVRegUseAt(const Instruction *I, const } return std::make_pair(It->second, false); } + +const Value * +FunctionLoweringInfo::getValueFromVirtualReg(unsigned Vreg) { + if (VirtReg2Value.empty()) { + for (auto &P : ValueMap) { + VirtReg2Value[P.second] = P.first; + } + } + return VirtReg2Value[Vreg]; +} |