llvm-6502/lib/Transforms/IPO
Stepan Dyatkovskiy dff57f19a1 PR17925 bugfix.
Short description.

This issue is about case of treating pointers as integers.
We treat pointers as different if they references different address space.
At the same time, we treat pointers equal to integers (with machine address
width). It was a point of false-positive. Consider next case on 32bit machine:

void foo0(i32 addrespace(1)* %p)
void foo1(i32 addrespace(2)* %p)
void foo2(i32 %p)

foo0 != foo1, while
foo1 == foo2 and foo0 == foo2.

As you can see it breaks transitivity. That means that result depends on order
of how functions are presented in module. Next order causes merging of foo0
and foo1: foo2, foo0, foo1
First foo0 will be merged with foo2, foo0 will be erased. Second foo1 will be
merged with foo2.
Depending on order, things could be merged we don't expect to.

The fix:
Forbid to treat any pointer as integer, except for those, who belong to address space 0.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195769 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-26 16:11:03 +00:00
..
ArgumentPromotion.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
BarrierNoopPass.cpp
CMakeLists.txt
ConstantMerge.cpp Corruptly merge constants with explicit and implicit alignments. 2013-11-12 20:21:43 +00:00
DeadArgumentElimination.cpp Fix spelling, grammar, and match naming convention for test files. 2013-10-21 23:14:06 +00:00
ExtractGV.cpp Add a fixed version of r195470 back. 2013-11-22 17:58:12 +00:00
FunctionAttrs.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
GlobalDCE.cpp Implement function prefix data as an IR feature. 2013-09-16 01:08:15 +00:00
GlobalOpt.cpp Remove dead code 2013-11-04 21:44:01 +00:00
InlineAlways.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
Inliner.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
InlineSimple.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
Internalize.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
IPConstantPropagation.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
IPO.cpp Use LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN instead of the "dso list". 2013-10-31 20:51:58 +00:00
LLVMBuild.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
LoopExtractor.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
Makefile
MergeFunctions.cpp PR17925 bugfix. 2013-11-26 16:11:03 +00:00
PartialInlining.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
PassManagerBuilder.cpp Add a loop rerolling flag to the PassManagerBuilder 2013-11-17 16:02:50 +00:00
PruneEH.cpp [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
StripDeadPrototypes.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
StripSymbols.cpp Debug Info: move StripDebugInfo from StripSymbols.cpp to DebugInfo.cpp. 2013-11-22 22:06:31 +00:00