Displaying 3 results from an estimated 3 matches for "burnstack".
2014 Dec 10
2
[LLVMdev] Virtual register problem in X86 backend
...c.addr = alloca i32, align 4
%argv.addr = alloca i8**, align 8
store i32 0, i32* %retval
store i32 %argc, i32* %argc.addr, align 4
store i8** %argv, i8*** %argv.addr, align 8
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x
i8]* @.str, i32 0, i32 0))
call void @llvm.burnstack()
ret i32 0
}
declare i32 @printf(i8*, ...) #1
declare void @llvm.va_start(i8*)
declare void @llvm.va_end(i8*)
; Function Attrs: nounwind
declare void @llvm.burnstack() #2
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false"
"no-frame-pointer-elim"=&q...
2014 Dec 08
2
[LLVMdev] Virtual register problem in X86 backend
Hi,
I'm having trouble using virtual register in the X86 backend.
I implemented a new intrinsic and I use a custom inserter. The goal of
the intrinsic is to set the content of the stack to zero at the end of
each function.
Here is my code:
MachineBasicBlock *
X86TargetLowering::EmitBURNSTACKWithCustomInserter(
MachineInstr *MI,
MachineBasicBlock *MBB) const {
DebugLoc db = MI->getDebugLoc();
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
const BasicBlock *LLVM_BB = MBB->getBasicBlock();
MachineFunction *F...
2014 Oct 28
2
[LLVMdev] Problem in X86 backend (again)
...The binary works when it's compiled in -O0, but not in -O1,-O2,...
I really can't figure what I'm doing wrong... Any idea?
Here is the code of my custom inserter... The goal of this code is to erase the stack in the epilogue of a function:
MachineBasicBlock *
X86TargetLowering::EmitBURNSTACKWithCustomInserter(
MachineInstr *MI,
MachineBasicBlock *MBB) const {
MBB->getParent()->dump();
DebugLoc db = MI->getDebugLoc();
const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
const BasicBlock *LLVM_BB = MBB->getBasicBlock();
MachineFunction *F = MBB->getParent();
//...