1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/Transforms/IPO
JF Bastien 940c24167e Remove Merge Functions pointer comparisons
Summary:
This patch removes two remaining places where pointer value comparisons
are used to order functions: comparing range annotation metadata, and comparing
block address constants. (These are both rare cases, and so no actual
non-determinism was observed from either case).

The fix for range metadata is simple: the annotation always consists of a pair
of integers, so we just order by those integers.

The fix for block addresses is more subtle. Two constants are the same if they
are the same basic block in the same function, or if they refer to corresponding
basic blocks in each respective function. Note that in the first case, merging
is trivially correct. In the second, the correctness of merging relies on the
fact that the the values of block addresses cannot be compared. This change is
actually an enhancement, as these functions could not previously be merged (see
merge-block-address.ll).

There is still a problem with cross function block addresses, in that constants
pointing to a basic block in a merged function is not updated.

This also more robustly compares floating point constants by all fields of their
semantics, and fixes a dyn_cast/cast mixup.

Author: jrkoenig
Reviewers: dschuff, nlewycky, jfb
Subscribers llvm-commits
Differential revision: http://reviews.llvm.org/D12376

llvm-svn: 246305
2015-08-28 16:49:09 +00:00
..
ArgumentPromotion.cpp Use foreach loops for StructType::elements(). NFC. 2015-07-24 18:55:49 +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 Convert SampleProfile pass into a Module pass. 2015-08-25 15:25:11 +00:00
ConstantMerge.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DeadArgumentElimination.cpp IR: Do not consider available_externally linkage to be linker-weak. 2015-07-05 20:52:35 +00:00
ElimAvailExtern.cpp Remove unused variable. 2015-07-13 14:43:33 +00:00
ExtractGV.cpp [llvm-extract] Drop comdats from declarations 2015-07-06 18:48:02 +00:00
FunctionAttrs.cpp Remove unused variable. NFC. 2015-07-24 19:18:32 +00:00
GlobalDCE.cpp Rangify for loops in GlobalDCE, NFC. 2015-07-18 19:57:34 +00:00
GlobalOpt.cpp Assume intrinsic handling in global opt 2015-08-25 01:34:15 +00:00
InlineAlways.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Inliner.cpp Variable names should start with an upper case letter; NFC 2015-08-11 16:05:43 +00:00
InlineSimple.cpp
Internalize.cpp Internalize: internalize comdat members as a group, and drop comdat on such members. 2015-07-16 17:42:21 +00:00
IPConstantPropagation.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
IPO.cpp Convert SampleProfile pass into a Module pass. 2015-08-25 15:25:11 +00:00
LLVMBuild.txt Update libdeps in LLVMipo and LLVMScalarOpts, corresponding to r245940. 2015-08-25 17:11:17 +00:00
LoopExtractor.cpp Drive-by fixes for LandingPad -> EHPad 2015-08-04 08:21:40 +00:00
LowerBitSets.cpp LowerBitSets: Add debugging output. 2015-07-29 18:12:36 +00:00
Makefile
MergeFunctions.cpp Remove Merge Functions pointer comparisons 2015-08-28 16:49:09 +00:00
PartialInlining.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PassManagerBuilder.cpp Require Dominator Tree For SROA, improve compile-time 2015-08-23 22:15:49 +00:00
PruneEH.cpp [PruneEH] A naked, noinline function can return via InlineAsm 2015-06-27 07:52:53 +00:00
SampleProfile.cpp Fix memory leak in sample profile pass. 2015-08-26 20:00:27 +00:00
StripDeadPrototypes.cpp
StripSymbols.cpp Use foreach loop over constant operands. NFC. 2015-06-25 20:51:38 +00:00