mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
[opaque pointer type] Add textual IR support for explicit type parameter to gep operator
Similar to gep (r230786) and load (r230794) changes.
Similar migration script can be used to update test cases, which
successfully migrated all of LLVM and Polly, but about 4 test cases
needed manually changes in Clang.
(this script will read the contents of stdin and massage it into stdout
- wrap it in the 'apply.sh' script shown in previous commits + xargs to
apply it over a large set of test cases)
import fileinput
import sys
import re
rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL)
def conv(match):
line = match.group(1)
line += match.group(4)
line += ", "
line += match.group(2)
return line
line = sys.stdin.read()
off = 0
for match in re.finditer(rep, line):
sys.stdout.write(line[off:match.start()])
sys.stdout.write(conv(match))
off = match.end()
sys.stdout.write(line[off:])
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232184 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -39,7 +39,7 @@ bb5:
|
||||
%tmp13 = add i32 %tmp12, %tmp10
|
||||
%tmp14 = lshr i32 %tmp13, 2
|
||||
%tmp15 = trunc i32 %tmp14 to i16
|
||||
store i16 %tmp15, i16* getelementptr inbounds (%0* @images, i64 0, i32 47, i64 3, i64 0, i64 3), align 2
|
||||
store i16 %tmp15, i16* getelementptr inbounds (%0, %0* @images, i64 0, i32 47, i64 3, i64 0, i64 3), align 2
|
||||
%tmp16 = lshr i208 %tmp, 96
|
||||
%tmp17 = trunc i208 %tmp16 to i32
|
||||
%tmp18 = and i32 %tmp17, 65535
|
||||
@@ -48,12 +48,12 @@ bb5:
|
||||
%tmp21 = add i32 %tmp20, 0
|
||||
%tmp22 = lshr i32 %tmp21, 2
|
||||
%tmp23 = trunc i32 %tmp22 to i16
|
||||
store i16 %tmp23, i16* getelementptr inbounds (%0* @images, i64 0, i32 47, i64 3, i64 2, i64 3), align 2
|
||||
store i16 %tmp23, i16* getelementptr inbounds (%0, %0* @images, i64 0, i32 47, i64 3, i64 2, i64 3), align 2
|
||||
%tmp24 = add i32 %tmp6, %tmp9
|
||||
%tmp25 = add i32 %tmp24, 0
|
||||
%tmp26 = lshr i32 %tmp25, 2
|
||||
%tmp27 = trunc i32 %tmp26 to i16
|
||||
store i16 %tmp27, i16* getelementptr inbounds (%0* @images, i64 0, i32 47, i64 7, i64 1, i64 2), align 4
|
||||
store i16 %tmp27, i16* getelementptr inbounds (%0, %0* @images, i64 0, i32 47, i64 7, i64 1, i64 2), align 4
|
||||
%tmp28 = lshr i208 %tmp, 80
|
||||
%tmp29 = shl nuw nsw i208 %tmp28, 1
|
||||
%tmp30 = trunc i208 %tmp29 to i32
|
||||
@@ -61,7 +61,7 @@ bb5:
|
||||
%tmp32 = add i32 %tmp12, %tmp31
|
||||
%tmp33 = lshr i32 %tmp32, 2
|
||||
%tmp34 = trunc i32 %tmp33 to i16
|
||||
store i16 %tmp34, i16* getelementptr inbounds (%0* @images, i64 0, i32 47, i64 7, i64 1, i64 3), align 2
|
||||
store i16 %tmp34, i16* getelementptr inbounds (%0, %0* @images, i64 0, i32 47, i64 7, i64 1, i64 3), align 2
|
||||
br label %bb35
|
||||
|
||||
bb35: ; preds = %bb5, %bb4
|
||||
|
||||
Reference in New Issue
Block a user