mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
1afcace3a3
patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
69 lines
2.3 KiB
LLVM
69 lines
2.3 KiB
LLVM
; RUN: llc %s -o -
|
|
|
|
; PR6332
|
|
%struct.AVCodecTag = type {}
|
|
@ff_codec_bmp_tags = external global [0 x %struct.AVCodecTag]
|
|
@tags = global [1 x %struct.AVCodecTag*] [%struct.AVCodecTag* getelementptr
|
|
inbounds ([0 x %struct.AVCodecTag]* @ff_codec_bmp_tags, i32 0, i32 0)]
|
|
|
|
|
|
; rdar://8878965
|
|
|
|
%struct.CAMERA = type { [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], double, double, i32, double, double, i32, double, i32* }
|
|
|
|
define void @Parse_Camera(%struct.CAMERA** nocapture %Camera_Ptr) nounwind {
|
|
entry:
|
|
%.pre = load %struct.CAMERA** %Camera_Ptr, align 4
|
|
%0 = getelementptr inbounds %struct.CAMERA* %.pre, i32 0, i32 1, i32 0
|
|
%1 = getelementptr inbounds %struct.CAMERA* %.pre, i32 0, i32 1, i32 2
|
|
br label %bb32
|
|
|
|
bb32: ; preds = %bb6
|
|
%2 = load double* %0, align 4
|
|
%3 = load double* %1, align 4
|
|
%4 = load double* %0, align 4
|
|
call void @Parse_Vector(double* %0) nounwind
|
|
%5 = call i32 @llvm.objectsize.i32(i8* undef, i1 false)
|
|
%6 = icmp eq i32 %5, -1
|
|
br i1 %6, label %bb34, label %bb33
|
|
|
|
bb33: ; preds = %bb32
|
|
unreachable
|
|
|
|
bb34: ; preds = %bb32
|
|
unreachable
|
|
|
|
}
|
|
|
|
declare void @Parse_Vector(double*)
|
|
declare i32 @llvm.objectsize.i32(i8*, i1)
|
|
|
|
|
|
; PR9578
|
|
%struct.S0 = type { i32, i8, i32 }
|
|
|
|
define void @func_82() nounwind optsize {
|
|
entry:
|
|
br label %for.body.i
|
|
|
|
for.body.i: ; preds = %for.body.i, %entry
|
|
br i1 undef, label %func_74.exit.for.cond29.thread_crit_edge, label %for.body.i
|
|
|
|
func_74.exit.for.cond29.thread_crit_edge: ; preds = %for.body.i
|
|
%f13576.pre = getelementptr inbounds %struct.S0* undef, i64 0, i32 1
|
|
store i8 0, i8* %f13576.pre, align 4, !tbaa !0
|
|
br label %lbl_468
|
|
|
|
lbl_468: ; preds = %lbl_468, %func_74.exit.for.cond29.thread_crit_edge
|
|
%f13577.ph = phi i8* [ %f13576.pre, %func_74.exit.for.cond29.thread_crit_edge ], [ %f135.pre, %lbl_468 ]
|
|
store i8 1, i8* %f13577.ph, align 1
|
|
%f135.pre = getelementptr inbounds %struct.S0* undef, i64 0, i32 1
|
|
br i1 undef, label %lbl_468, label %for.end74
|
|
|
|
for.end74: ; preds = %lbl_468
|
|
ret void
|
|
}
|
|
|
|
!0 = metadata !{metadata !"omnipotent char", metadata !1}
|
|
!1 = metadata !{metadata !"Simple C/C++ TBAA", null}
|