Displaying 20 results from an estimated 500 matches similar to: "Intrinsic opt failure"
2016 Feb 16
0
Intrinsic opt failure
On 2/16/2016 8:44 AM, Konstantin Vladimirov via llvm-dev wrote:
>
> CI->getArgOperand(0) returns operand with type (double*) rather then
> double, because in our ABI doubles are passed via memory.
The LLVM intrinsics in the LLVM IR must conform to whatever the IR's
requirements are. That means that even in the case of your backend, the
arguments to the intrinsic must be doubles,
2010 Feb 12
2
[LLVMdev] [PATCH] Fix off-by-one errors in the doxygen documentation
Some doxygen annotations are attached to the wrong entry, which can be
misleading. This patch fixes the mistake everywhere I could find it.
---
include/llvm/InstrTypes.h | 54 ++++++++++++++++++++--------------------
include/llvm/MC/MCDirectives.h | 42 +++++++++++++++---------------
include/llvm/Pass.h | 10 +++---
3 files changed, 53 insertions(+), 53 deletions(-)
diff
2020 Mar 02
4
RTLIB and Custom Library calls
Hello LLVM-Dev,
Most of the processing for i64 and f64 types for our backend are emulation library calls. Some of the library calls are not defined in the RuntimeLibcalls.def Libcall enum so we have to define custom library calls.
How is the ideal way of implementing the custom library calls? Providing us with a target backend having a similar functionality would also help us significantly.
Say
2011 Jan 19
0
[LLVMdev] How to get the name and argument of a function
Thanks a lot!
I finally fix my problem.
My code is like this:
//CallInst* pCall pCall is a printf called in my situation
if( ConstantExpr * pCE = dyn_cast<ConstantExpr>( pCall->getArgOperand(0))){
if( GlobalVariable * pGV = dyn_cast<GlobalVariable>( pCE->getOperand(0))){
if( ConstantArray * pCA = dyn_cast<ConstantArray>(
2010 Sep 25
2
[LLVMdev] Strange exception in SelectionDAGBuilder
I'm working on the code to handle GC tracing of "intermediate values" (as
described in the GC doc), and I've run into a weird problem. (Note, this has
nothing to do with the patch I have proposed, this error occurs with regular
old pointer-allocas.)
The exception I am getting occurs in this code here in
SelectionDAGBuilder.cpp:
*case* *Intrinsic*::gcroot:
*if* (GFI) {
2015 Aug 06
2
[LLVMdev] Cc llvmdev: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
On Wed, Aug 05, 2015 at 04:28:13PM +0800, Wangnan (F) wrote:
>
> It doesn't work for me at first since in my llvm there's only
> llvm.bpf.load.*.
>
> I think llvm.bpf.store.* belone to some patches you haven't posted yet?
nope. only loads have special instructions ld_abs/ld_ind
which are represented by these intrinsics.
stores, so far, are done via single
2012 Jun 18
0
[LLVMdev] Which pass converts call printf to puts?
Hi Thomson,
the new call to puts() is inserted right away, whereas the old call to
printf() is removed a bit later in SimplifyLibCalls::runOnFunction(). If
you browse the code a bit and backtrack the call stack to see what
happens with the return value of PrintFOpt::OptimizeFixedFormatString(),
you will stumble upon this segment in SimplifyLibCalls.cpp:1703ff.:
// Try to optimize this call.
2010 Sep 26
0
[LLVMdev] Strange exception in SelectionDAGBuilder
Hi Talin,
I think that the framework for GC assumes llvm.gcroot to be in the first
block. If it is not the case in your example, it will break these
assumptions.
Nicolas
On Sun, Sep 26, 2010 at 1:38 AM, Talin <viridia at gmail.com> wrote:
> I'm working on the code to handle GC tracing of "intermediate values" (as
> described in the GC doc), and I've run into a
2011 Jan 18
0
[LLVMdev] How to get the name and argument of a function
songlh at cs.wisc.edu wrote:
> Hi everyone:
>
> The code I am analyzing is :
>
> int main()
> {
> int i = 0;
> printf("hello world!");
> printf( "%d" , i );
> }
>
>
>
> I want to get each place where printf is called, and the argument used
> during that call.
>
> so I write llvm
2010 Oct 23
2
[LLVMdev] Cast failure in SelectionDAGBuilder
I'm trying to track down the problem with the assertion failure in
SelectionDAGBuilder.cpp. This is the code:
*case* *Intrinsic*::gcroot:
*if* (GFI) {
*const* Value *Alloca = I.getArgOperand(0);
*const* Constant *TypeMap = cast<Constant>(I.getArgOperand(1));
* FrameIndexSDNode *FI =
cast<FrameIndexSDNode>(getValue(Alloca).getNode());*
2017 Oct 07
2
Bug 20871 -- is there a fix or work around?
Ignore the suggested fix in my earlier post. How about this?
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 20c81c3..b8ebf42 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -1632,10 +1632,11 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
if (!Subtarget.is64Bit()) {
// These
2010 Jul 15
1
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi Duncan,
Thanks for pointing out my mistake. I will reword my questions.
//C code
int var1; //global
int a, b;
foo(a, b);
bar(c);
generates following
//LLVM IR
%1 = load a;
%2 = load b;
call foo(%1, %2)
call bar(@var1)
CallInst.getOperand(1).getNameStr() on foo, returns null,
but on bar returns var1.
Similarly, for
call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64))
nounwind,
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
I actually need this feature quite badly in my untyped language
compiler: since I support first-class functions, I've made the types of
all functions a standard vararg (so I can box them).
The implementation crashes when I try to read out the value of
gc.result. Hints as to what might be wrong?
Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com>
---
2014 Nov 05
3
[LLVMdev] How to lower the intrinsic function 'llvm.objectsize'?
The documentation of LLVM says that "The llvm.objectsize intrinsic is
lowered to a constant representing the size of the object concerned". I'm
attempting to lower this intrinsic function to a constant in a pass. Below
is the code snippet that I wrote:
for (BasicBlock::iterator i = b.begin(), ie = b.end();
(i != ie) && (block_split == false);) {
IntrinsicInst *ii =
2013 Apr 11
2
[LLVMdev] Bug in InstCombiner::FoldAndOfFCmps
Hey guys,
I've come across a bug when combining an AND of FCMPs. This bug occurs in
my compiler as well as Clang built from trunk.
A reduced test case is:
int foo( float a, double b ) {
return (a == a) & (b == b);
}
and the error is:
Assertion failed: (getOperand(0)->getType() == getOperand(1)->getType() &&
"Both operands to FCmp instruction are not of the same
2016 Sep 12
3
what is official way to determine if we are running lto 2nd stage?
Hi,
This is really basic block level pass. It is no difference what is
level, problem is the same.
After fixing for asm parser, assembler syntax is no more valid for
backend, without processing with asm parser.
May be it will be solution to process inline asm on insn printer level
to remove syntax fixes. But just switch it off without lto will make
compiler do less job
P.S. sorry for dup,
2016 Sep 13
2
what is official way to determine if we are running lto 2nd stage?
Hi,
Imagine that your backend has valid asm instruction written like this:
"%x mnem %y, %z"
And user puts it as inline assembler:
__asm__ ("%x mnem %y, %z");
It can not be parsed with current llvm asm parser, because it starts
with % (moreover it has mnemonic in second place)
Say you written pass, that makes it "mnem %x, %y, %z".
Now this guy can be parsed, but
2015 Nov 01
2
Re-numbering address space with a pass
Hi all,
I would like my optimization pass to change an object's address space that is created by llvm.lifetime.start intrinsic. Because I want to be able to identify them later in a codegen pass. I can get a pointer from the intrinsic using CallInst::getArgOperand() function. However, I don't know what to do with it (or if it is the pointer that I want). How can I change its address space?
2018 Sep 03
2
Replacing a function from one module into another one
Thank you Ahmad,
I figured out that, although the type of both p(oInst) and p(nInst) were
the same, I had to:
for (unsigned int i = 0; i < callOInst->getNumArgOperands(); i++) {
callOInst->getArgOperand(i)->mutateType(callNInst->getArgOperand(i)->getType());
}
that solves the issue at the calling instruction in the main function, but
now I see that *linkModules* does not work
2012 Jan 07
2
[LLVMdev] libcalls for shifts
Hello,
my target has libcall support for long long shifts. I already have the
following lines in my Lowering constructor:
setLibcallName(RTLIB::SHL_I64, "__llshl");
setLibcallName(RTLIB::SRL_I64, "__llshru");
setLibcallName(RTLIB::SRA_I64, "__llshr");
and
setOperationAction(ISD::SHL, MVT::i64, Expand);
setOperationAction(ISD::SRA, MVT::i64,