1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/MergeFunc
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
..
2011-02-08-RemoveEqual.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2013-01-10-MergeFuncAssert.ll
address-spaces.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
alloca.ll MergeFunctions: Two different sized allocas are *not* the same 2015-05-12 21:42:22 +00:00
apply_function_attributes.ll MergeFunc: Transfer the callee's attributes when replacing a direct caller 2015-07-21 17:07:07 +00:00
call-and-invoke-with-ranges.ll Accelerate MergeFunctions with hashing 2015-08-15 01:18:18 +00:00
constant-entire-value.ll Improve the determinism of MergeFunctions 2015-08-21 23:27:24 +00:00
crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
fold-weak.ll MergeFunctions: Don't replace a weak function use by another equivalent weak function 2015-06-09 18:19:17 +00:00
functions.ll
inttoptr-address-space.ll Revert "MergeFuncs: Transfer the function parameter attributes to the call site" 2015-07-19 19:30:43 +00:00
inttoptr.ll Revert "MergeFuncs: Transfer the function parameter attributes to the call site" 2015-07-19 19:30:43 +00:00
linkonce_odr.ll MergeFunctions: Impose a total order on the replacement of functions 2015-06-09 00:03:29 +00:00
merge-block-address-other-function.ll Remove Merge Functions pointer comparisons 2015-08-28 16:49:09 +00:00
merge-block-address.ll Remove Merge Functions pointer comparisons 2015-08-28 16:49:09 +00:00
merge-const-ptr-and-int.ll Comparing operands should not require the same ValueID 2015-08-26 03:02:58 +00:00
merge-different-vector-types.ll Comparing operands should not require the same ValueID 2015-08-26 03:02:58 +00:00
merge-ptr-and-int.ll
mergefunc-struct-return.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
no-merge-block-address-different-labels.ll Remove Merge Functions pointer comparisons 2015-08-28 16:49:09 +00:00
no-merge-block-address-other-function.ll Remove Merge Functions pointer comparisons 2015-08-28 16:49:09 +00:00
no-merge-ptr-different-sizes.ll Comparing operands should not require the same ValueID 2015-08-26 03:02:58 +00:00
no-merge-ptr-int-different-values.ll Comparing operands should not require the same ValueID 2015-08-26 03:02:58 +00:00
phi-speculation1.ll
phi-speculation2.ll
ptr-int-transitivity-1.ll
ptr-int-transitivity-2.ll
ptr-int-transitivity-3.ll
ranges-multiple.ll Remove Merge Functions pointer comparisons 2015-08-28 16:49:09 +00:00
ranges.ll Fix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCI 2015-08-10 19:01:27 +00:00
self-referential-global.ll Fix mergefunc infinite loop 2015-07-15 21:51:33 +00:00
too-small.ll
undef-different-types.ll Comparing operands should not require the same ValueID 2015-08-26 03:02:58 +00:00
vector-GEP-crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
vector.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
vectors-and-arrays.ll