Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVM] Create TBAA information based on the unrelying buffer type #6046

Merged
merged 1 commit into from
Jul 13, 2020
Merged

[LLVM] Create TBAA information based on the unrelying buffer type #6046

merged 1 commit into from
Jul 13, 2020

Conversation

kparzysz-quic
Copy link
Contributor

Currently, the TBAA information is based on the access type, i.e. the data type from the load or store instruction. When the same
memory area is accessed with different types, the corresponding load/store instruction may end up not being aliased to each other. This could lead to incorrect code being generated.

An example of when such a situation can occur is when two different buffer_decls are created for the same buffer:

  ba = buffer_decl(... dtype = 'int16' ...)
  bb = buffer_decl(data = ba.data, dtype = 'int32x32' ...)

Then instructions

  ba[x] = 0
  ... = bb[x]

may be reordered in the final code due to the alias info indicating that they are not aliased.

Currently, the TBAA information is based on the access type, i.e.
the data type from the load or store instruction. When the same
memory area is accessed with different types, the corresponding
load/store instruction may end up not being aliased to each other.
This could lead to incorrect code being generated.

An example of when such a situation can occur is when two different
buffer_decl's are created for the same buffer:
  ba = buffer_decl(... dtype = 'int16' ...)
  bb = buffer_decl(data = ba.data, dtype = 'int32x32' ...)
Then instructions
  ba[x] = 0
  ... = bb[x]
may be reordered in the final code due to the alias info indicating
that they are not aliased.
@tqchen tqchen merged commit af8af0c into apache:master Jul 13, 2020
@tqchen
Copy link
Member

tqchen commented Jul 13, 2020

Thanks @kparzysz-quic !

@kparzysz-quic kparzysz-quic deleted the llvm-tbaa branch July 13, 2020 22:30
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jul 14, 2020
…ache#6046)

Currently, the TBAA information is based on the access type, i.e.
the data type from the load or store instruction. When the same
memory area is accessed with different types, the corresponding
load/store instruction may end up not being aliased to each other.
This could lead to incorrect code being generated.

An example of when such a situation can occur is when two different
buffer_decl's are created for the same buffer:
  ba = buffer_decl(... dtype = 'int16' ...)
  bb = buffer_decl(data = ba.data, dtype = 'int32x32' ...)
Then instructions
  ba[x] = 0
  ... = bb[x]
may be reordered in the final code due to the alias info indicating
that they are not aliased.
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jul 14, 2020
…ache#6046)

Currently, the TBAA information is based on the access type, i.e.
the data type from the load or store instruction. When the same
memory area is accessed with different types, the corresponding
load/store instruction may end up not being aliased to each other.
This could lead to incorrect code being generated.

An example of when such a situation can occur is when two different
buffer_decl's are created for the same buffer:
  ba = buffer_decl(... dtype = 'int16' ...)
  bb = buffer_decl(data = ba.data, dtype = 'int32x32' ...)
Then instructions
  ba[x] = 0
  ... = bb[x]
may be reordered in the final code due to the alias info indicating
that they are not aliased.
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