This is an archive of the discontinued LLVM Phabricator instance.

[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints
ClosedPublic

Authored by alexfrol on Jun 18 2015, 7:13 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

alexfrol updated this revision to Diff 27930.Jun 18 2015, 7:13 AM
alexfrol retitled this revision from to [X86, inlineasm] Implement v,k,Y2,Yk,Yz constraints, improve analysis for x,Y*,L,e,Z,s.
alexfrol updated this object.
alexfrol edited the test plan for this revision. (Show Details)
alexfrol added a reviewer: echristo.
alexfrol set the repository for this revision to rL LLVM.
alexfrol added a subscriber: Unknown Object (MLST).
echristo edited edge metadata.Jun 25 2015, 11:09 AM

Sorry for the delay, I'll get to this soon.

Thanks!

-eric

Gentle ping

compnerd accepted this revision.Jul 12 2015, 4:12 PM
compnerd added a reviewer: compnerd.
compnerd added a subscriber: compnerd.

LGTM with the small change to rename isValidAsmValue at least.

include/clang/Basic/TargetInfo.h
591 ↗(On Diff #27930)

This would be better named as isValidAsmImmediate.

lib/Basic/Targets.cpp
3357 ↗(On Diff #27930)

Might be nice to have the interface take an ArrayRef instead.

test/Sema/inline-asm-validate-x86.c
56 ↗(On Diff #27930)

Invalid perhaps (instead of NotValid).

This revision is now accepted and ready to land.Jul 12 2015, 4:12 PM

This will need documentation updates yes? Also backend support?

-eric

I don't see a test for the 'k' support or a few other things either. Can you split this out a bit into the various parts for checking the existing constraints, and adding individual ones?

-eric

LGTM with the small change to rename isValidAsmValue at least.

All issues are fixed. I'll update the patch soon.

This will need documentation updates yes? Also backend support?

-eric

What documentation updates do you mean?
Backend support is necessary for ‘v’, ‘k’, and ‘Yk’ constraints. They are AVX-512 specific and as far as I know work for AVX512 backend support is still ongoing.

I don't see a test for the 'k' support or a few other things either. Can you split this out a bit into the various parts for checking the existing constraints, and adding individual ones?

-eric

Sure, will do.

alexfrol retitled this revision from [X86, inlineasm] Implement v,k,Y2,Yk,Yz constraints, improve analysis for x,Y*,L,e,Z,s to [X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints.Jul 17 2015, 8:48 AM
alexfrol updated this object.
alexfrol edited edge metadata.
alexfrol removed a subscriber: compnerd.
alexfrol updated this revision to Diff 30004.Jul 17 2015, 8:52 AM

Removed code for adding individual constraints (separate patch will be submitted later), fixed several reported issues

echristo accepted this revision.Jul 17 2015, 3:48 PM
echristo edited edge metadata.

LGTM, thanks so much for the work here!

-eric

Thank you, Eric and Saleem!
Glad to be useful :)

This revision was automatically updated to reflect the committed changes.