IntrinsicLowering and several related problems

Dear all,

I'm using IntrinsicLowering class to remove all intrinsics in LLVM byte-code.
Unfortunately, I meet several problems:
1. Why I can not get the type of CallInst *CI?
   !CI->getType()->isVoidTy() is not working and how to solve it?
   This type information has some impacts with intrinsics such as flt_rounds.

2. Why Intrinsic::vastart and Intrinsic::powi are excluded from
IntrinsicLowering function?
There are no way to lower them at the byte-code level?

Best regards,

Hi Hao Shen,

1. Why I can not get the type of CallInst *CI?
    !CI->getType()->isVoidTy() is not working and how to solve it?

what does "not working" mean? It should work.

2. Why Intrinsic::vastart and Intrinsic::powi are excluded from
IntrinsicLowering function?
There are no way to lower them at the byte-code level?

For vastart, it probably isn't possible at the byte-code level.
For powi, my guess is that it is a mistake and should be lowered.

Ciao,

Duncan.

Hi Hao Shen,

1. Why I can not get the type of CallInst *CI?
    !CI->getType()->isVoidTy() is not working and how to solve it?

what does "not working" mean? It should work.

Here CI->getType()->isVoidTy() always returns true and it should be
true sometimes?

2. Why Intrinsic::vastart and Intrinsic::powi are excluded from
IntrinsicLowering function?
There are no way to lower them at the byte-code level?

For vastart, it probably isn't possible at the byte-code level.

From what I understand, the vastart will be compiled into some

stack operations realized with assembly code. So there will be
no byte-code level things?

For powi, my guess is that it is a mistake and should be lowered.

Thanks a lot, I will try to find why powi is not working.