llvm-6502/lib
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
..
Analysis [PM] Split the CallGraph out from the ModulePass which creates the 2013-11-26 04:19:30 +00:00
AsmParser Make it explicit that nulls are not allowed in names. 2013-11-19 21:12:39 +00:00
Bitcode Fix spacing, forward declare order. 2013-11-18 02:51:33 +00:00
CodeGen Rename DwarfException methods so the new names are consistent with DwarfDebug and the style guide 2013-11-26 13:34:55 +00:00
DebugInfo DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect to a type unit. 2013-11-26 00:22:37 +00:00
ExecutionEngine [mips] Resolve relocation for the stubs in MCJIT when load address is known 2013-11-19 21:56:00 +00:00
IR [PM] Factor the overwhelming majority of the interface boiler plate out 2013-11-26 11:24:37 +00:00
IRReader [llvm-c] Expose IRReader interface 2013-11-06 09:21:15 +00:00
Linker Revert "Move copying of global initializers below the cloning of functions." 2013-11-09 00:43:18 +00:00
LTO Use array_pod_sort instead of std::sort 2013-11-16 16:15:56 +00:00
MC ARM integrated assembler generates incorrect nop opcode 2013-11-25 19:11:13 +00:00
Object Path: Recognize COFF import library file magic. 2013-11-15 21:22:02 +00:00
Option Use startswith_lower() where possible. 2013-11-04 19:22:50 +00:00
Support Lift self-copy protection up to the header file and add self-move 2013-11-26 00:54:44 +00:00
TableGen Fix most memory leaks in tablegen. 2013-10-31 04:07:41 +00:00
Target Darwin-ARM: use movw/movt for static relocations 2013-11-26 12:45:05 +00:00
Transforms PR17925 bugfix. 2013-11-26 16:11:03 +00:00
CMakeLists.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
LLVMBuild.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
Makefile Reformat Makefile. No other changes. 2013-10-30 04:03:03 +00:00