Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] Question about shouldMergeGEPs in InstructionCombining"
2015 Feb 24
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
On Mon, Feb 23, 2015 at 2:17 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
> > From: "Francois Pichet" <pichet2000 at gmail.com>
> > To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> > Sent: Sunday, February 22, 2015 5:34:11 PM
> > Subject: [LLVMdev] Question about shouldMergeGEPs in
2015 Feb 25
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
----- Original Message -----
> From: "Hal Finkel" <hfinkel at anl.gov>
> To: "Francois Pichet" <pichet2000 at gmail.com>
> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>, "chandlerc" <chandlerc at gmail.com>
> Sent: Tuesday, February 24, 2015 11:27:43 PM
> Subject: Re: [LLVMdev] Question about
2015 Mar 12
3
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
I think it would make sense for (1) and (2). I am not sure if (3) is
feasible in instcombine. (I am not too familiar with LoopInfo)
For the Octasic's Opus platform, I modified shouldMergeGEPs in our fork to:
if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() &&
!Src.hasOneUse())
return false;
return Src.hasAllConstantIndices(); // was return false;
2015 Mar 12
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
Hi Mark,
It is not clear to me at all that preventing the merging is the right solution. There are a large number of analysis, including alias analysis, and optimizations that use GetUnderlyingObject, and related routines to search back through GEPs. They only do this up to some small finite depth (six, IIRC). So reducing the GEP depth is likely the right solution for InstCombine (which has the
2015 Mar 16
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
----- Original Message -----
> From: "Jingyue Wu" <jingyue at google.com>
> To: "Daniel Berlin" <dberlin at dberlin.org>, "Mark Heffernan" <meheff at google.com>, "Hal Finkel" <hfinkel at anl.gov>
> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Friday, March 13, 2015 1:31:59 PM
>
2015 Mar 13
3
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
On Fri, Mar 13, 2015 at 10:16 AM Mark Heffernan <meheff at google.com> wrote:
> On Thu, Mar 12, 2015 at 2:34 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>
>> It is not clear to me at all that preventing the merging is the right
>> solution. There are a large number of analysis, including alias analysis,
>> and optimizations that use GetUnderlyingObject, and
2013 Jan 27
2
[LLVMdev] Passing an array to an external function
Hi all,
I am new to LLVM, and I am learning how to use LLVM for profiling. I need to
pass an array to an external method, and insert a call instruction to the
method in the code.
After reading a few source files, I've tried using GetElementPtrInst to pass
an array, but it fails at llvm::GetElementPtrInst::hasAllZeroIndices() const
+ 0
std::vector<Value*> Args(1);
2008 Aug 20
1
[LLVMdev] new warning in InstructionCombining.cpp
/Volumes/mrs5/net/llvm/llvm/lib/Transforms/Scalar/
InstructionCombining.cpp: In member function
‘llvm::Instruction*<unnamed>::InstCombiner::visitAnd
(llvm::BinaryOperator&)’:
/Volumes/mrs5/net/llvm/llvm/lib/Transforms/Scalar/
InstructionCombining.cpp:3597: warning: ‘RHSCC’ may be used
uninitialized in this function
/Volumes/mrs5/net/llvm/llvm/lib/Transforms/Scalar/
2008 Jul 10
0
[LLVMdev] InstructionCombining forgets alignment of globals
I think I found it. In InstCombiner::ComputeMaskedBits we have the following
lines:
if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
unsigned Align = GV->getAlignment();
if (Align == 0 && TD && GV->getType()->getElementType()->isSized())
Align = TD->getPrefTypeAlignment(GV->getType()->getElementType());
It assumes that global
2016 Jun 12
2
Regarding a TODO in InstructionCombining
Hi,
This is regarding a TODO mentioned in getIdentityValue function in
InstructionCombining.cpp file.
//TODO: We can handle other cases e.g. Instruction::And, Instruction::Or
etc.
I wanted to know what could be the use cases of implementing these. When I
tried implementing these and wrote test cases for the same, the test cases
would be optimized in InstructionSimplify before hitting the code
2008 Jul 10
3
[LLVMdev] InstructionCombining forgets alignment of globals
Hi all,
The InstructionCombining pass causes alignment of globals to be ignored.
I've attached a replacement of Fibonacci.cpp which reproduces this (I used
2.3 release). Here's the x86 code it produces:
03C20019 movaps xmm0,xmmword ptr ds:[164E799h]
03C20020 mulps xmm0,xmmword ptr ds:[164E79Ah]
03C20027 movaps xmmword ptr ds:[164E799h],xmm0
03C2002E
2011 May 16
2
[LLVMdev] InstructionCombining.cpp inconsistency in whether it modifies the CFG?
InstCombine says in its getAnalysisUsage that it preserves the CFG,
but for the 4th argument in its INITIALIZE_PASS call, it says false,
which I believe corresponds to whether it preserves the CFG. Is this a
mistake, or is there deeper meaning here?
InstructionCombining.cpp:73-82
char InstCombiner::ID = 0;
INITIALIZE_PASS(InstCombiner, "instcombine",
"Combine
2011 May 16
0
[LLVMdev] InstructionCombining.cpp inconsistency in whether it modifies the CFG?
Hi Michael,
> InstCombine says in its getAnalysisUsage that it preserves the CFG,
> but for the 4th argument in its INITIALIZE_PASS call, it says false,
> which I believe corresponds to whether it preserves the CFG.
that argument should be set to true if the pass only looks at the CFG, i.e.
whatever it computes/does is only a function of the CFG, and doesn't otherwise
depend on what
2008 Jul 10
2
[LLVMdev] InstructionCombining forgets alignment of globals
Hi Nicolas,
> if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
>
> unsigned Align = GV->getAlignment();
>
> if (Align == 0 && TD && GV->getType()->getElementType()->isSized())
>
> Align = TD->getPrefTypeAlignment(GV->getType()->getElementType());
>
> It assumes that global values are always optimally
2008 Jul 10
0
[LLVMdev] InstructionCombining forgets alignment of globals
Hi Duncan,
I see. I didn't know GlobalValue had a method for changing the alignment
(and that 0 meant natural alignment). Explicitly calling setAlignment works
like a charm.
So it's not an LLVM bug.
Thanks,
Nicolas
-----Original Message-----
From: Duncan Sands [mailto:baldrick at free.fr]
Sent: Thursday, 10 July, 2008 14:41
To: llvmdev at cs.uiuc.edu
Cc: Nicolas Capens
Subject: Re:
2008 Jul 10
1
[LLVMdev] InstructionCombining forgets alignment of globals
On Thursday 10 July 2008 07:46, Nicolas Capens wrote:
> Hi Duncan,
>
> I see. I didn't know GlobalValue had a method for changing the alignment
> (and that 0 meant natural alignment). Explicitly calling setAlignment works
> like a charm.
Nicolas,
Where are you explicitly calling setAlignment? From llvm-gcc code?
-Dave
2010 Jan 05
0
[LLVMdev] [llvm-commits] [llvm] r92458 - in /llvm/trunk: lib/Target/README.txt lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/or.ll
Hi Bill-
For what it's worth, a simple truth table proves Chris correct.
Alastair
On 5 Jan 2010, at 02:46, Bill Wendling wrote:
> On Jan 3, 2010, at 10:04 PM, Chris Lattner wrote:
>
>> Author: lattner
>> Date: Mon Jan 4 00:03:59 2010
>> New Revision: 92458
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=92458&view=rev
>> Log:
>>
2002 Sep 17
1
[LLVMdev] Bug in InstructionCombining.cpp
ISSUE: This code:
%bob = type { int }
int %alias() {
%pbob1 = alloca %bob
%pbob2 = getelementptr %bob* %pbob1 ;pbob2 aliases
pbob1
%pbobel = getelementptr %bob* %pbob2, long 0, ubyte 0
%rval = load int* %pbobel
ret int %rval
}
Crashes when run through opt -instcombine. InstCombiner visits
instructions in reverse declaration order, but
2012 Jul 05
0
[LLVMdev] Need reviewers for SCCP, LoopUnswitch, LazyValueInfo and InstructionCombining passes.
Hi all. Guys in accordance to PR1255 I need to add case-ranges support for passes listed in subject. Who can review some of these passes in nearest future?
Thanks!
-Stepan.
2008 Sep 22
0
[LLVMdev] Overzealous PromoteCastOfAllocation
On Sep 13, 2008, at 1:07 PM, Matthijs Kooijman wrote:
> Hi Dan,
>
>> Changing PromoteCastOfAllocation to not replace aggregate allocas
>> with
>> non-aggregate allocas if they have GEP users sounds reasonable to me.
> This sounds reasonable indeed, but still a bit arbitrary. Haven't
> figured out
> anything better yet, though.
>
>> Finding the