OSDN Git Service

[ThinLTO] Attempt to recommit r365040 after caching fix
authorEugene Leviant <eleviant@accesssoftek.com>
Fri, 5 Jul 2019 12:00:10 +0000 (12:00 +0000)
committerEugene Leviant <eleviant@accesssoftek.com>
Fri, 5 Jul 2019 12:00:10 +0000 (12:00 +0000)
commit69d43aeac43838c7cfbb871af8109ce689f3f4d3
tree995a68d1395cd0a85eb5bd3a7aae2a7ae85bdc09
parent1fa2d68de31bbfe9e53ce1b3281091d76dc7c4d5
[ThinLTO] Attempt to recommit r365040 after caching fix

It's possible that some function can load and store the same
variable using the same constant expression:

store %Derived* @foo, %Derived** bitcast (%Base** @bar to %Derived**)
%42 = load %Derived*, %Derived** bitcast (%Base** @bar to %Derived**)

The bitcast expression was mistakenly cached while processing loads,
and never examined later when processing store. This caused @bar to
be mistakenly treated as read-only variable. See load-store-caching.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365188 91177308-0d34-0410-b5e6-96231b3b80d8
28 files changed:
include/llvm/IR/ModuleSummaryIndex.h
lib/Analysis/ModuleSummaryAnalysis.cpp
lib/AsmParser/LLParser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/IR/AsmWriter.cpp
lib/IR/ModuleSummaryIndex.cpp
lib/LTO/LTO.cpp
lib/Transforms/IPO/FunctionImport.cpp
lib/Transforms/Utils/FunctionImportUtils.cpp
test/Assembler/thinlto-summary.ll
test/Assembler/thinlto-vtable-summary.ll
test/Bitcode/summary_version.ll
test/Bitcode/thinlto-alias.ll
test/Bitcode/thinlto-alias2.ll
test/Bitcode/thinlto-function-summary-callgraph-cast.ll
test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
test/Bitcode/thinlto-function-summary-callgraph-sample-profile-summary.ll
test/Bitcode/thinlto-function-summary-callgraph.ll
test/Bitcode/thinlto-function-summary-refgraph.ll
test/ThinLTO/X86/Inputs/dot-dumper2.ll [new file with mode: 0644]
test/ThinLTO/X86/dot-dumper2.ll [new file with mode: 0644]
test/ThinLTO/X86/index-const-prop2.ll
test/ThinLTO/X86/load-store-caching.ll [new file with mode: 0644]
test/ThinLTO/X86/writeonly.ll [new file with mode: 0644]
test/ThinLTO/X86/writeonly2.ll [new file with mode: 0644]