Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] PHI nodes in machine code"
2004 Jul 08
0
[LLVMdev] PHI nodes in machine code
On Thu, Jul 08, 2004 at 08:06:29PM +0400, Vladimir Prus wrote:
> Could anybody quickly explain why PHI nodes instructions are necessary
> in machine code? And why the code in LiveVariables.cpp which looks at
> those PHI nodes (line 249 and below) is necessary.
LLVM Machine code is in SSA.
Let's say you want to do
r = a cond b
But doing this:
if (a cond b) then
r = 1
2004 Jul 08
0
[LLVMdev] PHI nodes in machine code
PHI nodes within machine code were originally used by the Sparc
back-end but they turned out not to be necessary. Instead, LLVM phis
are lowered to copy instructions in the machine code (I believe this
happens just after instruction selection). As far as I know, the
machine PHI nodes are not used by the x86 back-end and you shouldn't
need them if you insert the right copies.
--Vikram
2004 Jul 09
2
[LLVMdev] PHI nodes in machine code
Misha Brukman wrote:
> LLVM Machine code is in SSA.
This explains quite a lot. I though it's possible to just reduce convert phis
into copy instructions in predecessors -- all of which will have the same
destination register.
> gets you two definitions of r. So we have machine PHI nodes merge the
> two possible values into one for result of r. These phis get removed
> after
2018 Sep 10
3
How to avoid multiple registers definitions in customInserter.
Hi,
I'm lowering some of the logical operators (by example the | operator) on integer32.
Sadly my target only provide native instruction on high and low parts of 32 bits registers.
So, I have to generate a sequence of two native instructions (LOR followed by HOR).
I've introduced an Pseudo instruction with a custom inserter.
def OR_A_oo : CLPPseudoInst<(ins
2011 Sep 05
1
Dealing with NA's in a data matrix
hello... I am trying to get this code to work, but as I get to the predict
command, it displays an error due to the length of the data sets from the
removal of the NA's. Here is the data, and the code that I am using so
far, if you run it, you'll see the error pop up.... please help me to get
around this problem. Thanks in advance.
Location Dist. Size
low1 .5 10.5
low2 .5 23
low3 .5 NA
2002 Aug 14
0
re: using mac-addr for selecting configfile now working
Hi everybody
hacking in the 200-pre4 i found everything i needed, so i gave it a try ...
and it works! But dont blame for the code, its just quick and dirty!
--- ../syslinux-2.00-pre4/pxelinux.asm Sat Jun 15 07:25:51 2002
+++ ./pxelinux.asm Wed Aug 14 10:05:00 2002
@@ -17,6 +17,11 @@
; version; incorporated herein by reference.
;
;
2012 Feb 07
1
[LLVMdev] Not Understanding Use
Let's say I have the following IR code:
21> %tmp = load i32* @myrand.z, align 4
22> %tmp1 = and i32 %tmp, 5535
23> %tmp2 = mul nsw i32 %tmp1, 36969
24> %tmp3 = ashr i32 %tmp, 16
And I have an Instruction *inst that is the instruction on line 22.
then have the code:
Use *operand1 = &(inst->getOperandUse(0));
I expect that operand1->getNext() will return the the Use*
2011 Mar 31
3
[LLVMdev] LiveValues removal
I've read that LiveValues has been removed from trunk. Did it bitrot or
was simply removed because a replacement is available?
If it's the former, what caused the bitrotting? If it's the latter,
what's the replacement? (I've found LiveVariables but I'm not sure it
can be used in a ModulePass).
b.r.
--
Carlo Alberto Ferraris <cafxx at strayorange.com
<mailto:cafxx
2012 Jan 23
3
[LLVMdev] clang branching using label
Hi,
Clang normally generates code that looks like
....
; <label>:22 ; preds = %0
%23 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([24 x i8]*
@.str, i32 0, i32 0))
br label %24
; <label>:24 ; preds = %22, %0
%25 = load i32* %tmphigh, align 4
%26 = and i32 %25, 65535
store i32 %26, i32*
2011 Mar 31
0
[LLVMdev] LiveValues removal
LiveVariables is the optimized and tested way to get variable liveness
information (it's used by register allocation). Unfortunately it
requires a MachineFunction to work - so you'll either need to lower to
one of the built-in targets or add your own target to acquire access to
this pass.
Andrew
On 03/31/2011 12:28 PM, Carlo Alberto Ferraris wrote:
> I've read that LiveValues
2012 Jan 24
0
[LLVMdev] clang branching using label
Hi Chris,
> Clang normally generates code that looks like
>
> ....
> ;<label>:22 ; preds = %0
> %23 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([24 x i8]*
> @.str, i32 0, i32 0))
> br label %24
>
> ;<label>:24 ; preds = %22, %0
> %25 = load i32* %tmphigh,
2012 Apr 27
1
[LLVMdev] clang branching using label
How does the verifier deal with this? I'm noticing that if I load a clang
compiled function (with -emit-llvm) and run the verifier, there is no
problem. If I start mucking with the function body (adding an instruction),
the verifier is unhappy saying the instructions that would have been in the
commented out block aren't part of a basic block. Does the clang compiled
function have some
2016 Aug 23
2
Help in understanding physreg LiveVariables
So if I first create the value in an entry BB and then build a CopyToReg
but then I have to read it in a BB that loops back to itself, with it's own
CopyToReg at the end, then I have two CopyToReg nodes for the same value.
In this case, I need to create 3 virt regs, 1 for each CopyToReg and a
third for the CopyFromReg in the beginning of the loop BB, right? And then
I need to build a PHI
2013 Feb 09
3
[LLVMdev] Deleting LiveVariables
On Feb 8, 2013, at 4:03 PM, Cameron Zwarich <zwarich at apple.com> wrote:
> How much of the work is done here? I'd be happy to do the phi elimination part, since I basically did that for StrongPhiElimination (RIP).
Any help would be appreciated.
I did a bit of the easy stuff in 2-addr, it has a LIS = getAnalysisIfAvailable<LiveIntervals>() member that it sometimes updates. It
2009 May 09
0
[LLVMdev] Instruction Conversion
Rotem Varon wrote:
> Hi,
>
> Let say i am writing a code inside basic block pass and iterating all
> the instructions inside,
> and i encountered in this instruction :
If you're asking how to get the operands of an Instruction, use the
getOperand() method:
Value * Operand1 = I->getOperand(0);
Value * Operand2 = I->getOperand(1);
The LLVM doxygen documentation
2013 Feb 09
0
[LLVMdev] Deleting LiveVariables
On Feb 8, 2013, at 4:20 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
> On Feb 8, 2013, at 4:03 PM, Cameron Zwarich <zwarich at apple.com> wrote:
>
>> How much of the work is done here? I'd be happy to do the phi elimination part, since I basically did that for StrongPhiElimination (RIP).
>
> Any help would be appreciated.
>
> I did a bit of the
2020 Feb 03
2
Eliminate some two entry PHI nodes - SimplifyCFG
SimplifyCFG FoldTwoEntryPhiNode looks to simplify all 2 entry phi nodes in
a block, if it can't do them all then it won't do any and returns. There is
a lot of code that is directly in this function geared toward this
requirement. Is it possible currently to get this function (or pass) to
simply fold "some" of the phis (without having to fold them all?). I
understand that
2011 Aug 31
4
[LLVMdev] Getting rid of phi instructions?
On 30.8.2011, at 19.19, Eli Friedman wrote:
> reg2mem won't do quite this transformation... not sure exactly what you need.
I need to get rid of phis. This code is compiled from C++ and for some functions
there are no phis, but multiple call instructions. I am targeting hardware
in the end, and the next tool reading the IR does not like phis when it's generating VHDL.
My questions may
2020 Feb 05
2
Eliminate some two entry PHI nodes - SimplifyCFG
Conditional on the target supporting cmov? Though that's probably not
optimal.
On Wed, Feb 5, 2020, 7:47 AM Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> Hi Ryan,
>
> On Mon, Feb 3, 2020 at 7:08 PM Ryan Taylor via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > SimplifyCFG FoldTwoEntryPhiNode looks to simplify all 2 entry phi nodes
> in a block, if it
2012 Mar 07
4
[LLVMdev] Updating value from PHI
I am splitting a one BB loop into two BB.
Basically, the one loop BB has 3 incoming values, one form back edge two
from other edges. I want to extract the PHIs from the other two edges out
into it's own BB and delete that from the loop, then redirect the backedge
to the loopbody (non extracted portion) and create a new PHI coming from
the extracted BB and the backedge.
I can do this;