search for: replaceusesofblockwith

Displaying 8 results from an estimated 8 matches for "replaceusesofblockwith".

2007 Jul 27
2
[LLVMdev] Couple of changes (2005 and other toolchain related)
...to do with the fact that the STL debug validator checks to make sure that if !(lhs < rhs) then (rhs < lhs || rhs == lhs), so the '<' operator needs to be non-ambiguous. * BranchFolding.cpp, line 927, replace with: std::size_t dist = std::distance(PI, MBB->pred_begin()); ReplaceUsesOfBlockWith(*PI, MBB, CurTBB, TII); PI = MBB->pred_begin(); std::advance(PI, dist); I'm not sure if that is the correct fix, but what is currently there is definitely not correct. ReplaceUsesOfBlockWith can invalidate iterators (because internally it adds or removes items from containers) so we need...
2018 Jan 01
2
Inspecting 'Triple' from arbitrary source files
Thanks Tim, Sometimes my hacks last longer than I want as it isn't always apparent how I can implement it properly. At the moment I am looking at changes I need to 'MachineBasicBlock::ReplaceUsesOfBlockWith'. It is most likely that I need to handle the issue in a different way, but the change I need works here for my target for the time being, but breaks X86 which I also build for (single clang, multiple targets). But eventually I retire these hacks as the correct solution becomes apparent, I pe...
2018 Jan 01
0
Inspecting 'Triple' from arbitrary source files
...On 1 January 2018 at 17:00, Martin J. O'Riordan <MartinO at theheart.ie> wrote: > Thanks Tim, > > Sometimes my hacks last longer than I want as it isn't always apparent how I can implement it properly. At the moment I am looking at changes I need to 'MachineBasicBlock::ReplaceUsesOfBlockWith'. It is most likely that I need to handle the issue in a different way, but the change I need works here for my target for the time being, but breaks X86 which I also build for (single clang, multiple targets). > > But eventually I retire these hacks as the correct solution becomes appar...
2007 Jul 27
0
[LLVMdev] Couple of changes (2005 and other toolchain related)
...to do with the fact that the STL debug validator checks to make sure that if !(lhs < rhs) then (rhs < lhs || rhs == lhs), so the '<' operator needs to be non-ambiguous. * BranchFolding.cpp, line 927, replace with: std::size_t dist = std::distance(PI, MBB->pred_begin()); ReplaceUsesOfBlockWith(*PI, MBB, CurTBB, TII); PI = MBB->pred_begin(); std::advance(PI, dist); I'm not sure if that is the correct fix, but what is currently there is definitely not correct. ReplaceUsesOfBlockWith can invalidate iterators (because internally it adds or removes items from containers) so we need...
2007 Aug 19
1
[LLVMdev] MBB Critical edges
Hi, This pass is similar to the one in BreakCriticalEdges.cpp, but it works for MachineFunction's, instead of Functions. The existence of critical edges complicates many optimizations. When doing register allocation, you don't necessarily have to remove critical edges (you can use conventional SSA-form, for instance. See "Translating Out of Static Single Assignment Form. SAS
2009 Feb 19
0
[LLVMdev] Bug in BranchFolding.cpp:OptimizeBlock
...;end()) { // TODO: Simplify preds to not branch here if possible! } else { // Rewrite all predecessors of the old block to go to the fallthrough // instead. while (!MBB->pred_empty()) { MachineBasicBlock *Pred = *(MBB->pred_end()-1); Pred->ReplaceUsesOfBlockWith(MBB, FallThrough); } // If MBB was the target of a jump table, update jump tables to go to the // fallthrough instead. MBB->getParent()->getJumpTableInfo()-> ReplaceMBBInJumpTables(MBB, FallThrough); MadeChange = true; } return;...
2018 Jan 01
0
Inspecting 'Triple' from arbitrary source files
Hi Martin, On 1 January 2018 at 12:42, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Is there a general purpose way of accessing the current 'Triple' from any > where in the code so that I can add these checks? In many places, I can > access it via some argument to a function, or from a member of the class to > which the function belongs,
2018 Jan 01
2
Inspecting 'Triple' from arbitrary source files
Hi LLVM-Devs, Sometimes when I am experimenting with a change for my out-of-tree target, I find that to get it working I have to make changes to the target-independent sources for LLVM. Generally I do not like to do this, but sometimes I have not been able to find a pure target-specific solution to the problem I am working on, and have to make these changes in the target-independent code. But