diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-17 19:43:38 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-17 19:43:38 +0000 |
commit | d9b4996637a85e0bb42e7d763c7656c063a6ec83 (patch) | |
tree | e3be603420ae3178c0c844989b776e18bdba709c /lib/Transforms/Scalar/GVN.cpp | |
parent | c9ea771cb89567ba0df4a0dac58d707429e3fd31 (diff) | |
download | external_llvm-d9b4996637a85e0bb42e7d763c7656c063a6ec83.zip external_llvm-d9b4996637a85e0bb42e7d763c7656c063a6ec83.tar.gz external_llvm-d9b4996637a85e0bb42e7d763c7656c063a6ec83.tar.bz2 |
Set debug loc for new load instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GVN.cpp')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index c47fae1..cbb030e 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1576,6 +1576,9 @@ bool GVN::processNonLocalLoad(LoadInst *LI) { if (MDNode *Tag = LI->getMetadata(LLVMContext::MD_tbaa)) NewLoad->setMetadata(LLVMContext::MD_tbaa, Tag); + // Transfer DebugLoc. + NewLoad->setDebugLoc(LI->getDebugLoc()); + // Add the newly created load. ValuesPerBlock.push_back(AvailableValueInBlock::get(UnavailablePred, NewLoad)); |