Displaying 15 results from an estimated 15 matches for "getsub".
2019 Jan 31
2
MachineIRBuilder API
...representation. The DAG didn't really care which evaluation order happened as the de-duplication and unordered nature of the DAG produced the same result either way. For MIR, each builder needs to insert into a linear list so the evaluation order of those insertions matters. For example:
getAdd(getSub(a, b), getMul(c, d))
could produce either:
%0 = G_SUB %a, %b
%1 = G_MUL %c, %d
%2 = G_ADD %0, %1
or:
%0 = G_MUL %c, %d
%1 = G_SUB %a, %b
%2 = G_ADD %1, %0
depending on the (indeterminate) evaluation order of the arguments to getAdd(). The G_ADD is always last because getSub() and getMul() must exec...
2009 Sep 23
2
[LLVMdev] DebugFactory
...PointerNull::get(PointerType::getUnqual(type)),
> &one, 1), Type::Int32Ty);
> }
>
> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof
> (T)"
> return ConstantExpr::getSub(
> getSize(StructType::get(Type::Int8Ty, type, NULL)),
> getSize(type));
> }
Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what
you're looking for?
Dan
2009 Sep 22
0
[LLVMdev] DebugFactory
...tGetElementPtr(
ConstantPointerNull::get(PointerType::getUnqual(type)),
&one, 1), Type::Int32Ty);
}
Constant * DebugInfoBuilder::getAlignment(const Type * type) {
// Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
return ConstantExpr::getSub(
getSize(StructType::get(Type::Int8Ty, type, NULL)),
getSize(type));
}
This was code that was checked in before DebugInfoBuilder was replaced by
DIFactory.
--
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/piperm...
2019 Jan 31
3
MachineIRBuilder API
Hi,
I’m finding the API for MachineIRBuilder to be pretty annoying to use compared to SelectionDAG. I think it’s making the majority of code more verbose and unwieldly for anything less than trivial. I think changing it to behave more like the DAG.get* functions would make it easier to use, and decrease the mental overhead when porting code from SelectionDAG.
The main issue is needing to create
2009 Sep 22
3
[LLVMdev] DebugFactory
On Tue, Sep 22, 2009 at 9:21 AM, Devang Patel <devang.patel at gmail.com> wrote:
> On Tue, Sep 22, 2009 at 12:14 AM, Talin <viridia at gmail.com> wrote:
>> So, one feature of the late, lamented DebugInfoBuilder that I am missing
>> quite badly, and which is not available in the current DIFactory, is the
>> ability to specify structure offsets abstractly. The
2009 Sep 23
0
[LLVMdev] DebugFactory
...et(PointerType::getUnqual(type)),
>> &one, 1), Type::Int32Ty);
>> }
>>
>> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
>> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
>> return ConstantExpr::getSub(
>> getSize(StructType::get(Type::Int8Ty, type, NULL)),
>> getSize(type));
>> }
>>
>
> Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what
> you're looking for?
>
> That will work. Now all I need is for the methods of DIFactory to t...
2009 Sep 23
2
[LLVMdev] DebugFactory
...l(type)),
>>> &one, 1), Type::Int32Ty);
>>> }
>>>
>>> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
>>> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
>>> return ConstantExpr::getSub(
>>> getSize(StructType::get(Type::Int8Ty, type, NULL)),
>>> getSize(type));
>>> }
>>
>> Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what
>> you're looking for?
>>
> That will work. Now all I need is for the method...
2009 Sep 23
1
[LLVMdev] DebugFactory
...onstantPointerNull::get(PointerType::getUnqual(type)),
> &one, 1), Type::Int32Ty);
> }
>
> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
> return ConstantExpr::getSub(
> getSize(StructType::get(Type::Int8Ty, type, NULL)),
> getSize(type));
> }
>
> This was code that was checked in before DebugInfoBuilder was replaced by
> DIFactory.
This adds code to find the info that FE knows anyway. That is
undesirable IMO. If there is a nee...
2009 Oct 26
1
[LLVMdev] RegAllocSimple doesn't work
...lse {
escjunk = esc(arg, &i);
junk = addstr(escjunk, sub, &j, MAXPAT);
}
i = i + 1;
}
if (arg[i] != delim)
result = 0;
else {
junk = addstr(ENDSTR, &(*sub), &j, MAXPAT);
if ((!junk))
result = 0;
else
result = i;
}
return result;
}
bool
getsub(arg, sub)
char* arg;
char* sub;
{
int makeres;
makeres = makesub(arg, 0, ENDSTR, sub);
return (makeres > 0);
}
void subline();
bool
locate(c, pat, offset)
character c;
char * pat;
int offset;
{
int i;
bool flag;
flag = false;
i = offset + pat[offset];
wh...
2009 Oct 02
0
[LLVMdev] DebugFactory
...&one, 1), Type::Int32Ty);
> >>> }
> >>>
> >>> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
> >>> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
> >>> return ConstantExpr::getSub(
> >>> getSize(StructType::get(Type::Int8Ty, type, NULL)),
> >>> getSize(type));
> >>> }
> >>
> >> Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what
> >> you're looking for?
> >>
> > That wil...
2009 Oct 22
0
[LLVMdev] request for help writing a register allocator
Hi Susan,
> But this doesn't seem to be happening; the stores to memory are there but
> the loads are not.
>
> Any ideas what's going wrong?
Are you using VirtRegMap::addSpillPoint and VirtRegMap::addRestorePoint ? If
not you may need to add calls to them to let the rewriter know where to
insert the loads/stores.
> If not, any advice on how to generate the loads
2009 Oct 22
4
[LLVMdev] request for help writing a register allocator
I found the problem! My generated code is spilling correctly but is not
reloading at all. For example, if the original code has the equivalent of
this (where %1024 is a virtual reg):
%1024 = xxx
...
yyy = %1024
and I find no physical register for %1024, then I assign it to physical
register %edi and to a stackslot. That creates code like this:
%edi = xxx
store from %edi to the
2011 Feb 04
3
[LLVMdev] ConstantBuilder proposal
...c Constant *GetNot(Constant *C) {
return ConstantExpr::getNot(C);
}
static Constant *GetAdd(Constant *C1, Constant *C2) {
return ConstantExpr::getAdd(C1, C2);
}
static Constant *GetFAdd(Constant *C1, Constant *C2) {
return ConstantExpr::getFAdd(C1, C2);
}
static Constant *GetSub(Constant *C1, Constant *C2) {
return ConstantExpr::getSub(C1, C2);
}
static Constant *GetFSub(Constant *C1, Constant *C2) {
return ConstantExpr::getFSub(C1, C2);
}
static Constant *GetMul(Constant *C1, Constant *C2) {
return ConstantExpr::getMul(C1, C2);
}
static Constant...
2010 Feb 07
3
[LLVMdev] Help with Mac OS X 10.6.2 build
...ccHkdHVT.o
PrototypeAST::Codegen() in ccHkdHVT.o
PrototypeAST::Codegen() in ccHkdHVT.o
"llvm::ConstantExpr::getCompare(unsigned short, llvm::Constant*,
llvm::Constant*)", referenced from:
BinaryExprAST::Codegen() in ccHkdHVT.o
"llvm::ConstantExpr::getSub(llvm::Constant*, llvm::Constant*)",
referenced from:
BinaryExprAST::Codegen() in ccHkdHVT.o
"llvm::Instruction::~Instruction()", referenced from:
BinaryExprAST::Codegen() in ccHkdHVT.o
llvm::CmpInst::~CmpInst()in ccHkdHVT.o
llvm::CmpInst::~CmpInst(...
2010 Feb 07
0
[LLVMdev] Help with Mac OS X 10.6.2 build
...::Codegen() in ccHkdHVT.o
> PrototypeAST::Codegen() in ccHkdHVT.o
> "llvm::ConstantExpr::getCompare(unsigned short, llvm::Constant*,
> llvm::Constant*)", referenced from:
> BinaryExprAST::Codegen() in ccHkdHVT.o
> "llvm::ConstantExpr::getSub(llvm::Constant*, llvm::Constant*)",
> referenced from:
> BinaryExprAST::Codegen() in ccHkdHVT.o
> "llvm::Instruction::~Instruction()", referenced from:
> BinaryExprAST::Codegen() in ccHkdHVT.o
> llvm::CmpInst::~CmpInst()in ccHkdHVT.o
&...