[polly] r252813 - [FIX] Do not generate code for parameters referencing dead values
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 14:40:51 PST 2015
Author: jdoerfert
Date: Wed Nov 11 16:40:51 2015
New Revision: 252813
URL: http://llvm.org/viewvc/llvm-project?rev=252813&view=rev
Log:
[FIX] Do not generate code for parameters referencing dead values
Check if a value that is referenced by a parameter is dead and do not
generate code for the parameter in such a case.
Added:
polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_1.ll
polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_2.ll
polly/trunk/test/Isl/CodeGen/error_block_contains_invalid_memory_access.ll
Modified:
polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=252813&r1=252812&r2=252813&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Wed Nov 11 16:40:51 2015
@@ -827,7 +827,38 @@ bool IslNodeBuilder::materializeValue(is
// and if so make sure its equivalence class is preloaded.
SetVector<Value *> Values;
findValues(ParamSCEV, Values);
- for (auto *Val : Values)
+ for (auto *Val : Values) {
+
+ // Check if the value is an instruction in a dead block within the SCoP
+ // and if so do not code generate it.
+ if (auto *Inst = dyn_cast<Instruction>(Val)) {
+ if (S.getRegion().contains(Inst)) {
+ bool IsDead = true;
+
+ // Check for "undef" loads first, then if there is a statement for
+ // the parent of Inst and lastly if the parent of Inst has an empty
+ // domain. In the first and last case the instruction is dead but if
+ // there is a statement or the domain is not empty Inst is not dead.
+ auto *Address = getPointerOperand(*Inst);
+ if (Address &&
+ SE.getUnknown(UndefValue::get(Address->getType())) ==
+ SE.getPointerBase(SE.getSCEV(Address))) {
+ } else if (S.getStmtForBasicBlock(Inst->getParent())) {
+ IsDead = false;
+ } else {
+ auto *Domain = S.getDomainConditions(Inst->getParent());
+ isl_set_dump(Domain);
+ IsDead = isl_set_is_empty(Domain);
+ isl_set_free(Domain);
+ }
+
+ if (IsDead) {
+ V = UndefValue::get(ParamSCEV->getType());
+ break;
+ }
+ }
+ }
+
if (const auto *IAClass = S.lookupInvariantEquivClass(Val)) {
// Check if this invariant access class is empty, hence if we never
@@ -841,9 +872,9 @@ bool IslNodeBuilder::materializeValue(is
return false;
}
}
+ }
- if (!V)
- V = generateSCEV(ParamSCEV);
+ V = V ? V : generateSCEV(ParamSCEV);
IDToValue[Id] = V;
}
Added: polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_1.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_1.ll?rev=252813&view=auto
==============================================================================
--- polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_1.ll (added)
+++ polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_1.ll Wed Nov 11 16:40:51 2015
@@ -0,0 +1,127 @@
+; RUN: opt %loadPolly -polly-codegen < %s
+;
+; Check we do not crash even though the dead %tmp8 is referenced by a parameter
+; and we do not pre-load it (as it is dead).
+;
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+%struct.hoge = type { %struct.widget*, i32, i32, i32, %struct.hoge*, %struct.hoge*, %struct.barney, %struct.ham, %struct.wombat }
+%struct.widget = type { i32, i32, i32, i32, %struct.quux* }
+%struct.quux = type { i8*, i32, i32, i32, %struct.hoge.0 }
+%struct.hoge.0 = type { [2 x i64] }
+%struct.barney = type { %struct.hoge* }
+%struct.ham = type { i32 }
+%struct.wombat = type { %struct.hoge** }
+%struct.foo = type { %struct.wibble*, %struct.wibble*, i32, i32, i32, %struct.hoge.2, %struct.blam, %struct.wombat.5, i16, i8*, i8*, i16, i8*, i16, i16*, i16, %struct.blam.6**, i16, %struct.foo.7**, i8*, i16, i8**, i8* }
+%struct.wibble = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct.foo.1*, %struct.wibble*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
+%struct.foo.1 = type { %struct.foo.1*, %struct.wibble*, i32 }
+%struct.hoge.2 = type { i16, i16 }
+%struct.blam = type { i16, %struct.barney.3* }
+%struct.barney.3 = type { i8, %struct.foo.4 }
+%struct.foo.4 = type { i64 }
+%struct.wombat.5 = type { i16 }
+%struct.blam.6 = type <{ %struct.wombat.5, [6 x i8], i8*, i8*, i32, i16, [2 x i8] }>
+%struct.foo.7 = type { %struct.wombat.5, i8*, i8*, i8, i8, i32, i8*, i16, %struct.bar*, i16, %struct.barney.9*, i16, %struct.hoge.10*, i8**, i8**, i32*, i32*, i8*, i32, i32, i32* }
+%struct.bar = type { i32, i16, i16, %struct.wibble.8, i16, %struct.hoge* }
+%struct.wibble.8 = type { i32 }
+%struct.barney.9 = type { i16, i16 }
+%struct.hoge.10 = type { i16, i16, i16, i16, i16 }
+%struct.bar.11 = type { i64, i64 }
+
+ at global = external global i32, align 4
+ at global1 = external global i32, align 4
+ at global2 = external global i8*, align 8
+ at global3 = external global %struct.hoge**, align 8
+ at global4 = external global %struct.hoge**, align 8
+
+; Function Attrs: uwtable
+define i32 @foo(%struct.foo* %arg) #0 personality i8* bitcast (i32 (...)* @blam to i8*) {
+bb:
+ br label %bb3
+
+bb3: ; preds = %bb
+ %tmp = load i32, i32* @global, align 4, !tbaa !1
+ %tmp4 = add i32 %tmp, -1
+ %tmp5 = icmp eq i32 0, 0
+ br i1 %tmp5, label %bb12, label %bb6
+
+bb6: ; preds = %bb3
+ br label %bb7
+
+bb7: ; preds = %bb7, %bb6
+ %tmp8 = load i32, i32* @global, align 4, !tbaa !1
+ %tmp9 = and i32 %tmp8, 3
+ %tmp10 = icmp eq i32 %tmp9, 0
+ br i1 %tmp10, label %bb11, label %bb7
+
+bb11: ; preds = %bb7
+ br label %bb12
+
+bb12: ; preds = %bb11, %bb3
+ invoke void @zot(%struct.hoge* nonnull undef, i32 %tmp4, i32 undef, i32 9, i32 0, i32 39, %struct.hoge* undef, i32 undef, i32 undef, %struct.bar.11* nonnull undef)
+ to label %bb13 unwind label %bb17
+
+bb13: ; preds = %bb12
+ br i1 undef, label %bb16, label %bb14
+
+bb14: ; preds = %bb13
+ br label %bb19
+
+bb15: ; preds = %bb19
+ br label %bb16
+
+bb16: ; preds = %bb15, %bb13
+ ret i32 0
+
+bb17: ; preds = %bb12
+ %tmp18 = landingpad { i8*, i32 }
+ cleanup
+ resume { i8*, i32 } %tmp18
+
+bb19: ; preds = %bb19, %bb14
+ br i1 undef, label %bb15, label %bb19
+}
+
+; Function Attrs: argmemonly nounwind
+declare void @llvm.lifetime.start(i64, i8* nocapture) #1
+
+; Function Attrs: nounwind readnone
+declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2
+
+; Function Attrs: nobuiltin
+declare noalias i8* @eggs(i64) #3
+
+; Function Attrs: nobuiltin
+declare noalias i8* @bar(i64) #3
+
+; Function Attrs: uwtable
+declare void @zot(%struct.hoge*, i32, i32, i32, i32, i32, %struct.hoge*, i32, i32, %struct.bar.11*) unnamed_addr #0 align 2
+
+declare i32 @blam(...)
+
+; Function Attrs: nobuiltin nounwind
+declare void @zot5(i8*) #4
+
+; Function Attrs: argmemonly nounwind
+declare void @llvm.lifetime.end(i64, i8* nocapture) #1
+
+; Function Attrs: uwtable
+declare i32 @eggs6(%struct.foo*) #0
+
+; Function Attrs: nounwind uwtable
+declare void @eggs7(%struct.widget*, i32, i32, i32) unnamed_addr #5 align 2
+
+attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { argmemonly nounwind }
+attributes #2 = { nounwind readnone }
+attributes #3 = { nobuiltin "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #4 = { nobuiltin nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #5 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
+!llvm.ident = !{!0}
+
+!0 = !{!"clang version 3.8.0 (trunk 252700) (llvm/trunk 252705)"}
+!1 = !{!2, !2, i64 0}
+!2 = !{!"int", !3, i64 0}
+!3 = !{!"omnipotent char", !4, i64 0}
+!4 = !{!"Simple C/C++ TBAA"}
Added: polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_2.ll?rev=252813&view=auto
==============================================================================
--- polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_2.ll (added)
+++ polly/trunk/test/Isl/CodeGen/dead_invariant_load_instruction_referenced_by_parameter_2.ll Wed Nov 11 16:40:51 2015
@@ -0,0 +1,186 @@
+; RUN: opt %loadPolly -polly-codegen < %s
+;
+; Check we do not crash even though there is a dead load that is referenced by
+; a parameter and we do not pre-load it (as it is dead).
+;
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+ at REGISTER = external global [10 x i32], align 16
+
+; Function Attrs: nounwind uwtable
+define void @FORMAT3_4() #0 {
+entry:
+ %INSTR = alloca [32 x i32], align 16
+ br label %entry.split
+
+entry.split: ; preds = %entry
+ %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @REGISTER, i64 0, i64 8), align 16
+ %add = add nsw i32 %0, 2
+ %cmp = icmp sgt i32 %add, 1048575
+ br i1 %cmp, label %if.end.36, label %if.else
+
+if.else: ; preds = %entry.split
+ call void (i32, i32, i32*, ...) bitcast (void (...)* @BYTES_TO_BITS to void (i32, i32, i32*, ...)*)(i32 undef, i32 1, i32* undef) #2
+ %1 = load i32, i32* undef, align 4
+ %cmp14 = icmp eq i32 %1, 1
+ br i1 %cmp14, label %land.lhs.true, label %if.end.36
+
+land.lhs.true: ; preds = %if.else
+ %arrayidx16 = getelementptr inbounds [32 x i32], [32 x i32]* %INSTR, i64 0, i64 6
+ br i1 false, label %land.lhs.true.19, label %if.then.23
+
+land.lhs.true.19: ; preds = %land.lhs.true
+ %arrayidx20 = getelementptr inbounds [32 x i32], [32 x i32]* %INSTR, i64 0, i64 7
+ br i1 false, label %if.end.36, label %if.then.23
+
+if.then.23: ; preds = %land.lhs.true.19, %land.lhs.true
+ br i1 false, label %if.end.36, label %if.else.28
+
+if.else.28: ; preds = %if.then.23
+ br label %if.end.36
+
+if.end.36: ; preds = %if.else.28, %if.then.23, %land.lhs.true.19, %if.else, %entry.split
+ %RANGE_ERROR.0 = phi i1 [ false, %land.lhs.true.19 ], [ false, %if.else.28 ], [ false, %if.else ], [ true, %entry.split ], [ true, %if.then.23 ]
+ br i1 %RANGE_ERROR.0, label %if.then.37, label %if.end.38
+
+if.then.37: ; preds = %if.end.36
+ br label %return
+
+if.end.38: ; preds = %if.end.36
+ br i1 undef, label %land.lhs.true.43, label %if.else.50
+
+land.lhs.true.43: ; preds = %if.end.38
+ br i1 undef, label %if.then.47, label %if.else.50
+
+if.then.47: ; preds = %land.lhs.true.43
+ br label %if.end.107
+
+if.else.50: ; preds = %land.lhs.true.43, %if.end.38
+ br i1 undef, label %if.then.53, label %if.else.89
+
+if.then.53: ; preds = %if.else.50
+ br i1 undef, label %land.lhs.true.59, label %if.end.64
+
+land.lhs.true.59: ; preds = %if.then.53
+ br i1 undef, label %if.then.63, label %if.end.64
+
+if.then.63: ; preds = %land.lhs.true.59
+ br label %return
+
+if.end.64: ; preds = %land.lhs.true.59, %if.then.53
+ br i1 undef, label %if.then.80, label %if.end.107
+
+if.then.80: ; preds = %if.end.64
+ br i1 undef, label %if.then.83, label %if.else.85
+
+if.then.83: ; preds = %if.then.80
+ br label %if.end.107
+
+if.else.85: ; preds = %if.then.80
+ br label %if.end.107
+
+if.else.89: ; preds = %if.else.50
+ br i1 undef, label %if.then.96, label %lor.lhs.false
+
+lor.lhs.false: ; preds = %if.else.89
+ br i1 undef, label %if.then.96, label %if.end.97
+
+if.then.96: ; preds = %lor.lhs.false, %if.else.89
+ br label %return
+
+if.end.97: ; preds = %lor.lhs.false
+ br i1 undef, label %if.then.103, label %if.end.107
+
+if.then.103: ; preds = %if.end.97
+ br label %if.end.107
+
+if.end.107: ; preds = %if.then.103, %if.end.97, %if.else.85, %if.then.83, %if.end.64, %if.then.47
+ br i1 undef, label %land.lhs.true.111, label %if.end.142
+
+land.lhs.true.111: ; preds = %if.end.107
+ br i1 undef, label %if.then.115, label %if.end.142
+
+if.then.115: ; preds = %land.lhs.true.111
+ br i1 undef, label %if.then.118, label %return
+
+if.then.118: ; preds = %if.then.115
+ br i1 undef, label %if.then.125, label %for.cond.preheader
+
+for.cond.preheader: ; preds = %if.then.118
+ br i1 undef, label %for.body.lr.ph, label %for.end
+
+for.body.lr.ph: ; preds = %for.cond.preheader
+ br label %for.body
+
+if.then.125: ; preds = %if.then.118
+ br label %return
+
+for.body: ; preds = %for.body, %for.body.lr.ph
+ br i1 undef, label %for.body, label %for.cond.for.end_crit_edge
+
+for.cond.for.end_crit_edge: ; preds = %for.body
+ br label %for.end
+
+for.end: ; preds = %for.cond.for.end_crit_edge, %for.cond.preheader
+ br label %return
+
+if.end.142: ; preds = %land.lhs.true.111, %if.end.107
+ br i1 undef, label %land.lhs.true.146, label %if.end.206
+
+land.lhs.true.146: ; preds = %if.end.142
+ br i1 undef, label %if.then.150, label %if.end.206
+
+if.then.150: ; preds = %land.lhs.true.146
+ br i1 undef, label %if.then.157, label %lor.lhs.false.153
+
+lor.lhs.false.153: ; preds = %if.then.150
+ br i1 undef, label %if.then.157, label %if.end.158
+
+if.then.157: ; preds = %lor.lhs.false.153, %if.then.150
+ br label %return
+
+if.end.158: ; preds = %lor.lhs.false.153
+ br i1 undef, label %if.then.179, label %return
+
+if.then.179: ; preds = %if.end.158
+ br i1 undef, label %if.then.183, label %for.cond.185.preheader
+
+for.cond.185.preheader: ; preds = %if.then.179
+ br i1 undef, label %for.body.188.lr.ph, label %for.end.198
+
+for.body.188.lr.ph: ; preds = %for.cond.185.preheader
+ br label %for.body.188
+
+if.then.183: ; preds = %if.then.179
+ br label %return
+
+for.body.188: ; preds = %for.body.188, %for.body.188.lr.ph
+ br i1 undef, label %for.body.188, label %for.cond.185.for.end.198_crit_edge
+
+for.cond.185.for.end.198_crit_edge: ; preds = %for.body.188
+ br label %for.end.198
+
+for.end.198: ; preds = %for.cond.185.for.end.198_crit_edge, %for.cond.185.preheader
+ br label %return
+
+if.end.206: ; preds = %land.lhs.true.146, %if.end.142
+ br i1 undef, label %land.lhs.true.210, label %return
+
+land.lhs.true.210: ; preds = %if.end.206
+ br i1 undef, label %if.then.214, label %return
+
+if.then.214: ; preds = %land.lhs.true.210
+ br i1 undef, label %if.then.219, label %return
+
+if.then.219: ; preds = %if.then.214
+ br label %return
+
+return: ; preds = %if.then.219, %if.then.214, %land.lhs.true.210, %if.end.206, %for.end.198, %if.then.183, %if.end.158, %if.then.157, %for.end, %if.then.125, %if.then.115, %if.then.96, %if.then.63, %if.then.37
+ ret void
+}
+
+declare void @BYTES_TO_BITS(...) #1
+
+attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="haswell" "target-features"="+aes,+avx,+avx2,+bmi,+bmi2,+cmov,+cx16,+f16c,+fma,+fsgsbase,+fxsr,+hle,+lzcnt,+mmx,+movbe,+pclmul,+popcnt,+rdrnd,+rtm,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+xsave,+xsaveopt,-adx,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512pf,-avx512vl,-fma4,-prfchw,-rdseed,-sha,-sse4a,-tbm,-xop,-xsavec,-xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="haswell" "target-features"="+aes,+avx,+avx2,+bmi,+bmi2,+cmov,+cx16,+f16c,+fma,+fsgsbase,+fxsr,+hle,+lzcnt,+mmx,+movbe,+pclmul,+popcnt,+rdrnd,+rtm,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+xsave,+xsaveopt,-adx,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512pf,-avx512vl,-fma4,-prfchw,-rdseed,-sha,-sse4a,-tbm,-xop,-xsavec,-xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #2 = { nounwind }
Added: polly/trunk/test/Isl/CodeGen/error_block_contains_invalid_memory_access.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/error_block_contains_invalid_memory_access.ll?rev=252813&view=auto
==============================================================================
--- polly/trunk/test/Isl/CodeGen/error_block_contains_invalid_memory_access.ll (added)
+++ polly/trunk/test/Isl/CodeGen/error_block_contains_invalid_memory_access.ll Wed Nov 11 16:40:51 2015
@@ -0,0 +1,78 @@
+; RUN: opt %loadPolly -polly-codegen < %s
+;
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+%struct.img_par.12.33.54.243.348.558.600.852.999.1209.2070.2154.2175.2238.2259.2280.2322 = type { i32, i32, i32, i32, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x [16 x i16]], [6 x [32 x i32]], [16 x [16 x i32]], [4 x [12 x [4 x [4 x i32]]]], [16 x i32], i8**, i32*, i32***, i32**, i32, i32, i32, i32, %struct.Slice.8.29.50.239.344.554.596.848.995.1205.2066.2150.2171.2234.2255.2276.2318*, %struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319*, i32, i32, i32, i32, i32, i32, %struct.DecRefPicMarking_s.10.31.52.241.346.556.598.850.997.1207.2068.2152.2173.2236.2257.2278.2320*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32***, i32***, i32****, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32,
i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x [2 x i32]], [3 x [2 x i32]], i32, i32, i64, i64, %struct.timeb.11.32.53.242.347.557.599.851.998.1208.2069.2153.2174.2237.2258.2279.2321, %struct.timeb.11.32.53.242.347.557.599.851.998.1208.2069.2153.2174.2237.2258.2279.2321, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
+%struct.Slice.8.29.50.239.344.554.596.848.995.1205.2066.2150.2171.2234.2255.2276.2318 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.datapartition.3.24.45.234.339.549.591.843.990.1200.2061.2145.2166.2229.2250.2271.2313*, %struct.MotionInfoContexts.5.26.47.236.341.551.593.845.992.1202.2063.2147.2168.2231.2252.2273.2315*, %struct.TextureInfoContexts.6.27.48.237.342.552.594.846.993.1203.2064.2148.2169.2232.2253.2274.2316*, i32, i32*, i32*, i32*, i32, i32*, i32*, i32*, i32 (%struct.img_par.12.33.54.243.348.558.600.852.999.1209.2070.2154.2175.2238.2259.2280.2322*, %struct.inp_par.7.28.49.238.343.553.595.847.994.1204.2065.2149.2170.2233.2254.2275.2317*)*, i32, i32, i32, i32 }
+%struct.datapartition.3.24.45.234.339.549.591.843.990.1200.2061.2145.2166.2229.2250.2271.2313 = type { %struct.Bitstream.0.21.42.231.336.546.588.840.987.1197.2058.2142.2163.2226.2247.2268.2310*, %struct.DecodingEnvironment.1.22.43.232.337.547.589.841.988.1198.2059.2143.2164.2227.2248.2269.2311, i32 (%struct.syntaxelement.2.23.44.233.338.548.590.842.989.1199.2060.2144.2165.2228.2249.2270.2312*, %struct.img_par.12.33.54.243.348.558.600.852.999.1209.2070.2154.2175.2238.2259.2280.2322*, %struct.datapartition.3.24.45.234.339.549.591.843.990.1200.2061.2145.2166.2229.2250.2271.2313*)* }
+%struct.Bitstream.0.21.42.231.336.546.588.840.987.1197.2058.2142.2163.2226.2247.2268.2310 = type { i32, i32, i32, i32, i8*, i32 }
+%struct.DecodingEnvironment.1.22.43.232.337.547.589.841.988.1198.2059.2143.2164.2227.2248.2269.2311 = type { i32, i32, i32, i32, i32, i8*, i32* }
+%struct.syntaxelement.2.23.44.233.338.548.590.842.989.1199.2060.2144.2165.2228.2249.2270.2312 = type { i32, i32, i32, i32, i32, i32, i32, i32, void (i32, i32, i32*, i32*)*, void (%struct.syntaxelement.2.23.44.233.338.548.590.842.989.1199.2060.2144.2165.2228.2249.2270.2312*, %struct.img_par.12.33.54.243.348.558.600.852.999.1209.2070.2154.2175.2238.2259.2280.2322*, %struct.DecodingEnvironment.1.22.43.232.337.547.589.841.988.1198.2059.2143.2164.2227.2248.2269.2311*)* }
+%struct.MotionInfoContexts.5.26.47.236.341.551.593.845.992.1202.2063.2147.2168.2231.2252.2273.2315 = type { [4 x [11 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [2 x [9 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [2 x [10 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [2 x [6 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [4 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314], [4 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314], [3 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314] }
+%struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314 = type { i16, i8 }
+%struct.TextureInfoContexts.6.27.48.237.342.552.594.846.993.1203.2064.2148.2169.2232.2253.2274.2316 = type { [2 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314], [4 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314], [3 x [4 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [10 x [4 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [10 x [15 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [10 x [15 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [10 x [5 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [10 x [5 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [10 x [15 x %struct.BiContextType.4.2
5.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]], [10 x [15 x %struct.BiContextType.4.25.46.235.340.550.592.844.991.1201.2062.2146.2167.2230.2251.2272.2314]] }
+%struct.inp_par.7.28.49.238.343.553.595.847.994.1204.2065.2149.2170.2233.2254.2275.2317 = type { [1000 x i8], [1000 x i8], [1000 x i8], i32, i32, i32, i32, i32, i32, i32, i32 }
+%struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319 = type { i32, [2 x i32], i32, i32, %struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319*, %struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319*, i32, [2 x [4 x [4 x [2 x i32]]]], i32, i64, i64, i32, i32, [4 x i8], [4 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
+%struct.DecRefPicMarking_s.10.31.52.241.346.556.598.850.997.1207.2068.2152.2173.2236.2257.2278.2320 = type { i32, i32, i32, i32, i32, %struct.DecRefPicMarking_s.10.31.52.241.346.556.598.850.997.1207.2068.2152.2173.2236.2257.2278.2320* }
+%struct.timeb.11.32.53.242.347.557.599.851.998.1208.2069.2153.2174.2237.2258.2279.2321 = type { i64, i16, i16, i16 }
+%struct.pix_pos.13.34.55.244.349.559.601.853.1000.1210.2071.2155.2176.2239.2260.2281.2323 = type { i32, i32, i32, i32, i32, i32 }
+
+declare void @getLuma4x4Neighbour() #0
+
+; Function Attrs: nounwind uwtable
+define void @readCBP_CABAC(%struct.img_par.12.33.54.243.348.558.600.852.999.1209.2070.2154.2175.2238.2259.2280.2322* %img) #1 {
+entry:
+ %block_a = alloca %struct.pix_pos.13.34.55.244.349.559.601.853.1000.1210.2071.2155.2176.2239.2260.2281.2323, align 4
+ %mb_data = getelementptr inbounds %struct.img_par.12.33.54.243.348.558.600.852.999.1209.2070.2154.2175.2238.2259.2280.2322, %struct.img_par.12.33.54.243.348.558.600.852.999.1209.2070.2154.2175.2238.2259.2280.2322* %img, i64 0, i32 39
+ br label %for.cond.1.preheader
+
+for.cond.1.preheader: ; preds = %for.inc.84, %entry
+ br label %for.body.3
+
+for.body.3: ; preds = %if.end.72, %for.cond.1.preheader
+ %mb_x.056 = phi i32 [ 0, %for.cond.1.preheader ], [ undef, %if.end.72 ]
+ br i1 undef, label %if.end.35, label %if.else.14
+
+if.else.14: ; preds = %for.body.3
+ br i1 undef, label %if.end.35, label %if.else.19
+
+if.else.19: ; preds = %if.else.14
+ br label %if.end.35
+
+if.end.35: ; preds = %if.else.19, %if.else.14, %for.body.3
+ %b.0 = zext i1 undef to i64
+ %cmp36 = icmp eq i32 %mb_x.056, 0
+ br i1 %cmp36, label %if.then.38, label %if.else.66
+
+if.then.38: ; preds = %if.end.35
+ call void @getLuma4x4Neighbour() #2
+ %0 = load i32, i32* null, align 4
+ %tobool = icmp eq i32 %0, 0
+ br i1 %tobool, label %if.end.72, label %if.then.42
+
+if.then.42: ; preds = %if.then.38
+ %mb_addr = getelementptr inbounds %struct.pix_pos.13.34.55.244.349.559.601.853.1000.1210.2071.2155.2176.2239.2260.2281.2323, %struct.pix_pos.13.34.55.244.349.559.601.853.1000.1210.2071.2155.2176.2239.2260.2281.2323* %block_a, i64 0, i32 1
+ %1 = load %struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319*, %struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319** %mb_data, align 8
+ %mb_type46 = getelementptr inbounds %struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319, %struct.macroblock.9.30.51.240.345.555.597.849.996.1206.2067.2151.2172.2235.2256.2277.2319* %1, i64 0, i32 6
+ br i1 false, label %if.end.72, label %if.else.50
+
+if.else.50: ; preds = %if.then.42
+ br label %if.end.72
+
+if.else.66: ; preds = %if.end.35
+ br label %if.end.72
+
+if.end.72: ; preds = %if.else.66, %if.else.50, %if.then.42, %if.then.38
+ %mul73 = shl nuw nsw i64 %b.0, 1
+ br i1 undef, label %for.body.3, label %for.inc.84
+
+for.inc.84: ; preds = %if.end.72
+ br i1 undef, label %for.cond.1.preheader, label %for.end.86
+
+for.end.86: ; preds = %for.inc.84
+ ret void
+}
+
+attributes #0 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="haswell" "target-features"="+aes,+avx,+avx2,+bmi,+bmi2,+cmov,+cx16,+f16c,+fma,+fsgsbase,+fxsr,+hle,+lzcnt,+mmx,+movbe,+pclmul,+popcnt,+rdrnd,+rtm,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+xsave,+xsaveopt,-adx,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512pf,-avx512vl,-fma4,-prfchw,-rdseed,-sha,-sse4a,-tbm,-xop,-xsavec,-xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="haswell" "target-features"="+aes,+avx,+avx2,+bmi,+bmi2,+cmov,+cx16,+f16c,+fma,+fsgsbase,+fxsr,+hle,+lzcnt,+mmx,+movbe,+pclmul,+popcnt,+rdrnd,+rtm,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+xsave,+xsaveopt,-adx,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512pf,-avx512vl,-fma4,-prfchw,-rdseed,-sha,-sse4a,-tbm,-xop,-xsavec,-xsaves" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #2 = { nounwind }
More information about the llvm-commits
mailing list