[llvm-commits] [PATCH] CallSite simplification
Chris Lattner
clattner at apple.com
Sun Jan 11 12:57:45 PST 2009
On Jan 9, 2009, at 8:12 AM, Gabor Greif wrote:
> Hi all!
>
> Attached patch simplifies (and hopefully speeds up)
> the handling of call/invoke instructions by means of
> the CallSite helper.
>
> How it works:
> The 'Call'-ness of the instruction is now tracked in a
> flag, and there is no need to consult the instruction's
> opcode. This saves a memory access at the cost of some
> untagging operations.
>
> I did not do performance testing, though I expect a small
> speed advantage.
>
> Also I did not care about formatting, will do later, when
> folks think this can go into the tree. (80-col, trailing space...)
This looks great to me Gabor. One requestion: please introduce new
"isCall()" and "isInvoke()" predicates, and use them throughout
instead of I.getInt(). Also, please use getInstruction() instead of
I.getPointer() within CallInst. This just isolates the PtrIntPair
details a bit more.
Thanks!
-Chris
More information about the llvm-commits
mailing list