m m via llvm-dev
2018-Dec-22 02:14 UTC
[llvm-dev] New to LLVM. Need help getting available register
Hi, I'm new to LLVM. I'd like to know if there is a method I can call whenever I need any available CPU register. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181222/e916b214/attachment.html>
David Greene via llvm-dev
2019-Jan-02 17:23 UTC
[llvm-dev] New to LLVM. Need help getting available register
m m via llvm-dev <llvm-dev at lists.llvm.org> writes:> I'm new to LLVM. I'd like to know if there is a method I can call > whenever I need any available CPU register.Take a look at RegisterScavenging. Of course, this only works after register allocation. Before register allocation you'd just create a new virtual register. -David
Josh Sharp via llvm-dev
2019-Feb-17 02:38 UTC
[llvm-dev] New to LLVM. Need help getting available register
Is it possible to get a virtual register and then use that to create a real register? I've seen it done in unittests/CodeGen/MachineInstrTest.cpp like this: unsigned VirtualDef1 = -42; VD1VU->addOperand(*MF, MachineOperand::CreateReg(VirtualDef1, /*isDef*/ true)); But when I do that in my code I get an assertion so I wasn't sure if it's legal or not. Thanks. ________________________________ From: David Greene <dag at cray.com> Sent: Wednesday, January 2, 2019 9:23 AM To: m m Cc: via llvm-dev Subject: Re: [llvm-dev] New to LLVM. Need help getting available register m m via llvm-dev <llvm-dev at lists.llvm.org> writes:> I'm new to LLVM. I'd like to know if there is a method I can call > whenever I need any available CPU register.Take a look at RegisterScavenging. Of course, this only works after register allocation. Before register allocation you'd just create a new virtual register. -David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190217/de1b5b70/attachment.html>
Seemingly Similar Threads
- New to LLVM. Need help getting available register
- [LLVMdev] VirtRegRewriter.cpp: LocalRewriter::ProcessUses()
- [LLVMdev] VirtRegRewriter.cpp: LocalRewriter::ProcessUses()
- Using an MCStreamer Directly to produce an object file?
- [LLVMdev] <IsKill> getting from MachineOperand is just <Used> attribute from logic.