Skip to content

F lca swift tests#588

Merged
janniclas merged 29 commits intodevelopmentfrom
f-lca_swift_tests
Feb 19, 2023
Merged

F lca swift tests#588
janniclas merged 29 commits intodevelopmentfrom
f-lca_swift_tests

Conversation

@janniclas
Copy link
Copy Markdown
Member

Besides many unit tests for LCA for Swift-based LLVM IR, a utility function to check llvm types for "integer like" structs (isIntegerLikeType) was added. Further, the LCA's getNormalEdge function was fixed to correctly take the getElementPtr workaround from the getNormalFlow function into account and correctly generate the edge for the desired alloca instruction.

@janniclas
Copy link
Copy Markdown
Member Author

Global Variables follow this pattern in Swift-based LLVM IR.

@"$s9global_012g1Sivp" = hidden global %TSi <{ i64 10 }>, align 8, !dbg !0

define hidden swiftcc i8* @"$s9global_012g1Sivau"() #0 !dbg !41 {
entry:
  ret i8* bitcast (%TSi* @"$s9global_012g1Sivp" to i8*), !dbg !45
}

Currently, we don't support this behavior, however all other test cases translated from C++ work as expected with the changes included in this PR.
I'll extend the LCA with support for globals at a later point

@janniclas janniclas marked this pull request as ready for review February 19, 2023 00:19
Copy link
Copy Markdown
Member

@fabianbs96 fabianbs96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm except minor

Comment thread lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDELinearConstantAnalysis.cpp Outdated
Comment thread lib/PhasarLLVM/Utils/LLVMShorthands.cpp Outdated
janniclas and others added 2 commits February 19, 2023 12:20
…ysis.cpp

Co-authored-by: Fabian Schiebel <52407375+fabianbs96@users.noreply.github.com>
…ntAnalysisSwiftTest.cpp

Co-authored-by: Fabian Schiebel <52407375+fabianbs96@users.noreply.github.com>
Co-authored-by: Fabian Schiebel <52407375+fabianbs96@users.noreply.github.com>
janniclas and others added 3 commits February 19, 2023 12:24
…ntAnalysisSwiftTest.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@janniclas janniclas merged commit ea2a087 into development Feb 19, 2023
@janniclas janniclas deleted the f-lca_swift_tests branch February 21, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants