[LLVMdev] getSetCC
Relph, Richard
Richard.Relph at amd.com
Thu Feb 28 12:27:22 PST 2013
We have is a problem in getSetCCResult(), which we overload because we support setCC for vectors. However, where other targets can get away with merely converting the EVT that gets passed to getSetCCResult() to an integer type (which EVT conveniently provides a method to do), we need to convert to int AND promote to i32 (or, in some cases, i64). This requires doing something that the EVT 'class' does not currently support… we need to create a new type, which requires an LLVM Context, which most of the EVT methods that might create a new type expect to get, but NOT getSetCCResult()…
While we could easily create an MVT for this, we ALSO have to work with vec3, which isn't supported by MVTs… Note that getSetCCResult() is called before type legalization.
What I'm looking for is the ability to create a new Type * in getSetCCResult(), which requires an LLVM Context, which is simply not available to the method as near as I can tell… The incoming EVT doesn't seem to have a path to it's context that I can access (EVT.LLVMTy is 'private').
Suggestions?
Thanks,
Richard
More information about the llvm-dev
mailing list