1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Transforms/IPO
Chandler Carruth e28f591d48 [PM] Finish implementing and fix a chain of bugs uncovered by testing
the invalidation propagation logic from an SCC to a Function.

I wrote the infrastructure to test this but didn't actually use it in
the unit test where it was designed to be used. =[ My bad. Once
I actually added it to the test case I discovered that it also hadn't
been properly implemented, so I've implemented it. The logic in the FAM
proxy for an SCC pass to propagate invalidation follows the same ideas
as the FAM proxy for a Module pass, but the implementation is a bit
different to reflect the fact that it is forwarding just for an SCC.

However, implementing this correctly uncovered a surprising "bug" (it
was conservatively correct but relatively very expensive) in how we
handle invalidation when splitting one SCC into multiple SCCs. We did an
eager invalidation when in reality we should be deferring invaliadtion
for the *current* SCC to the CGSCC pass manager and just invaliating the
newly constructed SCCs. Otherwise we end up invalidating too much too
soon. This was exposed by the inliner test case that I've updated. Now,
we invalidate *just* the split off '(test1_f)' SCC when doing the CG
update, and then the inliner finishes and invalidates the '(test1_g,
test1_h)' SCC's analyses. The first few attempts at fixing this hit
still more bugs, but all of those are covered by existing tests. For
example, the inliner should also preserve the FAM proxy to avoid
unnecesasry invalidation, and this is safe because the CG update
routines it uses handle any necessary adjustments to the FAM proxy.

Finally, the unittests for the CGSCC pass manager needed a bunch of
updates where we weren't correctly preserving the FAM proxy because it
hadn't been fully implemented and failing to preserve it didn't matter.

Note that this doesn't yet fix the current crasher due to MemSSA finding
a stale dominator tree, but without this the fix to that crasher doesn't
really make any sense when testing because it relies on the proxy
behavior.

llvm-svn: 307487
2017-07-09 03:59:31 +00:00
..
AlwaysInliner.cpp [PM] Teach the always inliner in the new pass manager to support 2016-12-26 23:43:27 +00:00
ArgumentPromotion.cpp [ArgPromotion] Fix a truncated variable 2017-05-04 10:54:35 +00:00
BarrierNoopPass.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CMakeLists.txt IPO: Introduce ThinLTOBitcodeWriter pass. 2016-12-16 00:26:30 +00:00
ConstantMerge.cpp Don't merge global constants with non-dbg metadata. 2017-03-09 00:03:37 +00:00
CrossDSOCFI.cpp [cfi] CFI-ICall for ThinLTO. 2017-06-16 00:18:29 +00:00
DeadArgumentElimination.cpp [DAE] Simplify attribute list creation, NFC 2017-04-19 23:45:45 +00:00
ElimAvailExtern.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ExtractGV.cpp [ExtractGV] Fix the doxygen comment on the constructor and the class to refer to global values instead of functions. While there fix an 80 column violation. NFC 2017-06-08 23:38:19 +00:00
ForceFunctionAttrs.cpp [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
FunctionAttrs.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
FunctionImport.cpp Increase the import-threshold for crtical functions. 2017-07-07 21:01:00 +00:00
GlobalDCE.cpp Global DCE performance improvement 2017-01-27 19:48:57 +00:00
GlobalOpt.cpp [GlobalOpt] Remove unreachable blocks before optimizing a function. 2017-07-05 22:28:28 +00:00
GlobalSplit.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
InferFunctionAttrs.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Inliner.cpp [PM] Finish implementing and fix a chain of bugs uncovered by testing 2017-07-09 03:59:31 +00:00
InlineSimple.cpp Do not inline hot callsites for samplepgo in thinlto compile phase. 2017-03-21 19:55:36 +00:00
Internalize.cpp Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
IPConstantPropagation.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
IPO.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
LLVMBuild.txt IPO: Add missing build dep. 2017-05-01 20:57:20 +00:00
LoopExtractor.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
LowerTypeTests.cpp [cfi] CFI-ICall for ThinLTO. 2017-06-16 00:18:29 +00:00
MergeFunctions.cpp Rename WeakVH to WeakTrackingVH; NFC 2017-05-01 17:07:49 +00:00
PartialInlining.cpp Fix function name /NFC 2017-06-16 16:54:13 +00:00
PassManagerBuilder.cpp Avoid constructing GlobalExtensions only to find out it is empty. 2017-07-06 00:09:09 +00:00
PruneEH.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SampleProfile.cpp Hook the sample PGO machinery in the new PM 2017-06-29 23:33:05 +00:00
StripDeadPrototypes.cpp [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
StripSymbols.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ThinLTOBitcodeWriter.cpp Bitcode: Write the irsymtab to disk. 2017-06-27 23:50:11 +00:00
WholeProgramDevirt.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00