[vmkit-commits] Investigated: changes in LLVM-2.8 Re: Error building VMkit:
Minas Abrahamyan
minas.subs at gmail.com
Wed Jul 7 06:06:11 PDT 2010
I've made some investigation on it and found the cause:
Exceprt from Instructions.h:
<<<
CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator
ArgEnd,
const Twine &NameStr, Instruction *InsertBefore)
:<<...>>
// Note: if you get compile errors about private methods then
// please update your code to use the high-level operand
// interfaces. See line 943 above.
===line 943:
/// @brief coerce out-of-tree code to abandon the low-level interfaces
/// @detail see below comments and update your code to high-level
interfaces
/// in LLVM v2.8-only code
/// - getOperand(N+1) ---> getArgOperand(N)
/// - setOperand(N+1, V) ---> setArgOperand(N, V)
/// - getNumOperands() ---> getNumArgOperands()+1 // note the "+1"!
///
/// in backward compatible code please consult llvm/Support/CallSite.h,
/// you should create a callsite using the CallInst pointer and call
its
/// methods
///
>>>
So, it seems, that it is a LLVM-2.8 new change in xxxOperand() functions
Now what I could easily do, to get latest buildable VMkit instance??
Look at this:
[ vmkit]$ find . -name "*.cpp" -o -name "*.h"|xargs grep -R -E
"\<[gs]etOperand\>|\<getNumOperands\>"|wc -l
13
13 places, not so bad. But after changing it will require for build only
newest LLVM-2.8, and all current users
will be required to upgrade their llvm
Are users ready for changes?
-Minas Abrahamyan
On Wed, Jul 7, 2010 at 5:09 PM, Minas Abrahamyan <minas.subs at gmail.com>wrote:
>
> Excerpt from EscapeAnalysis.cpp:
> <<<
> if (CallInst *CI = dyn_cast<CallInst>(I)) {
> Changed |= processMalloc(CI, CI->getOperand(1),
> CI->getOperand(2),
> CurLoop);
> } else if (InvokeInst *CI = dyn_cast<InvokeInst>(I)) {
> Changed |= processMalloc(CI, CI->getOperand(3),
> CI->getOperand(4),
> CurLoop);
> }
> >>>
>
> These getOperand()-s are private, how it should now be built and work?
>
> -Minas Abrahamyan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20100707/c148e7b0/attachment.html>
More information about the vmkit-commits
mailing list