Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] Custom allocators for MachineBasicBlocks and STL containers"
2017 Nov 11
2
Update control flow graph when splitting a machine basic block?
Thank you for your reply!
> Every MachineBasicBlock has a list of successors; you can access it with
> the successors() accessor. That's what you should be using for any CFG
> analysis.
I am aware of these methods of class MachineBasicBlock, which allows one to access a MachineBasicBlock's successors and predecessors in the CFG.
But the CFG itself may no longer be valid if a
2020 Jul 11
3
is a MachineBasicBlock a kind of superblock?
MachineBasicBlock allows for multiple terminators. Unconditional branches
and returns are marked as terminators; the MIPS backend also marks
conditional branches as terminators. The MachineBasicBlock then has a
helper function getFirstTerminator which iterates from the first terminator
to the end of the MBB.
So it seems to me that an MBB is a kind of superblock, single entrance and
multiple side
2008 Apr 16
3
[LLVMdev] Possible bug in LiveIntervalAnalysis?
Hi,
In the LiveIntervalAnalysis::runOnMachineFunction, there is a code to
compute the MBB2IdxMap, by remembering for each MBB its start and end
instruction numbers:
unsigned MIIndex = 0;
for (MachineFunction::iterator MBB = mf_->begin(), E = mf_->end();
MBB != E; ++MBB) {
unsigned StartIdx = MIIndex;
for (MachineBasicBlock::iterator I = MBB->begin(), E =
2010 Nov 05
4
[LLVMdev] Basic block liveouts
Is there an easy way to obtain all liveout variables of a basic block? Liveins
can be found for each MachineBasicBlock, but I can only find liveouts for the
whole function, at MachineRegisterInfo. Do I need to find them out manually?
2009 Dec 11
2
[LLVMdev] How to check for "SPARC code generation" in MachineBasicBlock.cpp?
Hi, Chris
> That is target independent code, so you should not put sparc specific changes there. It sounds like one of the sparc-specific target hooks is wrong.
Since sparc does not provide any hooks for operation of branches (e.g.
AnalyzeBranch and friends) it might be possible that generic codegen
code is broken in absence of these hooks.
--
With best regards, Anton Korobeynikov
Faculty
2008 Apr 16
0
[LLVMdev] Possible bug in LiveIntervalAnalysis?
Hi
I'm seeing something probably related to this. I'm getting an assert
from the lower_bound in LiveIntervals::findLiveinMBBs (from a checking
std:: VS2005 implementation). Idx2MBBMap has two elements in it, both
of which have a .first of 0. (I believe because of an empty MBB in the
function below, so StartIndex doesn't advance).
scott
On Wed, Apr 16, 2008 at 2:52 AM, Roman
2008 Apr 18
1
[LLVMdev] Possible bug in LiveIntervalAnalysis?
Can you file a bug so I don't forget? I'm a little occupied right now.
But I'll take care of this soon.
Evan
On Apr 16, 2008, at 10:52 AM, Scott Graham wrote:
> Hi
>
> I'm seeing something probably related to this. I'm getting an assert
> from the lower_bound in LiveIntervals::findLiveinMBBs (from a checking
> std:: VS2005 implementation). Idx2MBBMap has two
2010 Feb 08
2
[LLVMdev] How to check for "SPARC code generation" in MachineBasicBlock.cpp?
On 11/12/2009, at 10:43 AM, Anton Korobeynikov wrote:
> Hi, Chris
>
>> That is target independent code, so you should not put sparc specific changes there. It sounds like one of the sparc-specific target hooks is wrong.
> Since sparc does not provide any hooks for operation of branches (e.g.
> AnalyzeBranch and friends) it might be possible that generic codegen
> code is
2009 Mar 12
4
[LLVMdev] Shrink Wrapping - RFC and initial implementation
Hi John,
It looks pretty good. Thanks for working on this. Some comments:
1. Some of the functions that you introduced, e.g. stringifyCSRegSet
probably ought to be "static" and ifdef'ed out when NDEBUG is defined.
2. + // DEBUG
+ if (! MBB->empty() && ! CSRUsed[MBB].intersects(restore)) {
+ MachineInstr* MI = BeforeI;
+ DOUT <<
2009 Feb 05
2
[LLVMdev] LLVM misses some cross-MBB and loop optimizations compared to GCC
Hi,
While testing my new register allocators on some test-cases, I've
noticed that LLVM misses sometimes some optimization opportunities:
1) LocalSpiller::RewriteMBB seems not to propagate the information
about e.g. Spills between MBBs.In many cases, where MBB B1 has only
one predecessor MBB B2, B1 could reuse the information about the
physical registers that are in the live-out set of B2.
2010 Nov 05
0
[LLVMdev] Basic block liveouts
Because I feel bad for giving a non-answer:
An easy way to find if a virtual register is alive after the basic block is
to
While iterating over the virtual registers
- Check to see if the virtual register's "next" value exists outside of the
basic block.
for instance:
std::vector<unsigned> findLiveOut( MachineBasicBlock * mbb ) {
std::vector<unsigned> liveout;
for(
2009 Mar 05
0
[LLVMdev] Shrink Wrapping - RFC and initial implementation
Here is an updated patch for shrink wrapping with:
- spills/restores done with stack slot stores/loads
- stack adjustment removed
- refactoring (but still in need of more)
- spill/restore insertion code unified with spill/restore placement code
Documentation available
here<http://wiki.github.com/jdmdj/llvm-work/shrink-wrapping-work>
illustrates shrink
wrapping with loops and discusses a
2010 Feb 08
0
[LLVMdev] How to check for "SPARC code generation" in MachineBasicBlock.cpp?
On Feb 8, 2010, at 12:37 AM, Nathan Keynes wrote:
> Firstly, the BNE/BA pair should be reduced to a BE (I assume this is
> the responsibility of AnalyzeBranch and friends that you mention).
Right. Implementing AnalyzeBranch will allow a bunch of block layout
and branch optimizations to happen.
> However I still wouldn't have expected that to result in the label
> being
2009 Mar 13
0
[LLVMdev] Shrink Wrapping - RFC and initial implementation
Hi Evan,
Thanks very much for the review, I am implementing your suggestions today
and will have the next patch together this weekend.
A few questions/comments:
On Thu, Mar 12, 2009 at 10:05 AM, Evan Cheng <echeng at apple.com> wrote:
>
> 1. Some of the functions that you introduced, e.g. stringifyCSRegSet
> probably ought to be "static" and ifdef'ed out when NDEBUG
2009 Mar 03
2
[LLVMdev] Shrink Wrapping - RFC and initial implementation
On Mon, Mar 2, 2009 at 10:35 AM, Evan Cheng <echeng at apple.com> wrote:
>
> On Mar 1, 2009, at 2:57 PM, John Mosby wrote:
>
> Obviously, all of this applies only when spills are done with push/pop,
> which is the case on x86. I used this issue to start looking at generalizing
> how spills and restores are handled, before looking too closely at other
> targets, and
2014 Jul 26
2
[LLVMdev] Finding previous emitted instruction
Hi All,
For various obscure reasons I'd like to detect the condition when X86 CALL
instruction immediately precedes a function epilogue in the final emitted
code, and insert a NOP between them if that happens.
My initial attempt at it looked like this:
MachineBasicBlock& MBB;
MachineBasicBlock::iterator MBBI; <-- points to where the epilogue would
be inserted
if (MBBI != MBB.begin()
2010 Oct 20
1
[LLVMdev] MachineBasicBlock insertion
Hi all,
I am really stumped on a problem for long. I could not figure out why.
That is why i am here. OK, here is the problem:
I tried to insert a MachineBasicBlock into a function. Here is the code
snippet:
// insert a machine basic block with the error_label into MF and before I
// Pred is the predecessor of the block to be inserted
// the new basic block is inserted right before I
void
2009 Feb 06
0
[LLVMdev] LLVM misses some cross-MBB and loop optimizations compared to GCC
Thanks. Can you file bugzilla reports? I'll look at the first one soon.
Evan
On Feb 5, 2009, at 8:08 AM, Roman Levenstein wrote:
> Hi,
>
> While testing my new register allocators on some test-cases, I've
> noticed that LLVM misses sometimes some optimization opportunities:
>
> 1) LocalSpiller::RewriteMBB seems not to propagate the information
> about e.g. Spills
2009 Jan 13
2
[LLVMdev] Possible bug in the ARM backend?
Hi again,
2009/1/13 Evan Cheng <evan.cheng at apple.com>:
>
>
> On Jan 13, 2009, at 12:27 AM, Roman Levenstein <romix.llvm at googlemail.com>
> wrote:
>
>> 2009/1/13 Evan Cheng <echeng at apple.com>:
>>>
>>> On Jan 7, 2009, at 2:48 AM, Roman Levenstein wrote:
>>>
>>>> bb368: 0x8fdad00, LLVM BB @0x8fc2c98, ID#1:
2012 Jul 29
3
[LLVMdev] global control flow graph at machine code level
Hi all,
I am trying to build a global control flow graph at machine code level.
Essentially, I need the handles to the MachineFunction's corresponding to
every call site inside a MachineFunction in order to get the handles to
MachineBasicBlock's with return statements inside the callee. Currently,
the codegen module processes one MachineFunction at a time and hence I
can't find a way