Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-05 Thread Chris Lattner
>> I am not 100% sure, but I think that >> X86Subtarget::GVRequiresExtraLoad >> is the place to start looking. > > Right. If it's a load from GV and GVRequiresExtraLoad() returns true > then it's a load from a stub. > > Here is something to consider for further enhancement. There are > potentiall

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-05 Thread Bill Wendling
On Jan 5, 2008, at 12:53 AM, Evan Cheng wrote: > Right. If it's a load from GV and GVRequiresExtraLoad() returns true > then it's a load from a stub. > Okay. Once I did the check, it now seems to treat the example program: volatile char G[100]; int B(char *F, int N) { for (; N > 0; --N) F[

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-05 Thread Evan Cheng
On Jan 5, 2008, at 12:53 AM, Evan Cheng wrote: > > On Jan 5, 2008, at 12:28 AM, Chris Lattner wrote: > >> >> On Jan 4, 2008, at 11:21 PM, Bill Wendling wrote: >> >>> On Jan 4, 2008, at 11:02 PM, Chris Lattner wrote: You aren't looking for loads *from the global*, you're looking for load

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-05 Thread Evan Cheng
On Jan 5, 2008, at 12:28 AM, Chris Lattner wrote: > > On Jan 4, 2008, at 11:21 PM, Bill Wendling wrote: > >> On Jan 4, 2008, at 11:02 PM, Chris Lattner wrote: >>> You aren't looking for loads *from the global*, you're looking for >>> loads from the *stub for the global*, which are always invarian

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-05 Thread Chris Lattner
On Jan 4, 2008, at 11:21 PM, Bill Wendling wrote: > On Jan 4, 2008, at 11:02 PM, Chris Lattner wrote: >> You aren't looking for loads *from the global*, you're looking for >> loads from the *stub for the global*, which are always invariant. >> You >> just need to know whether the load is from

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-04 Thread Bill Wendling
On Jan 4, 2008, at 11:02 PM, Chris Lattner wrote: > You aren't looking for loads *from the global*, you're looking for > loads from the *stub for the global*, which are always invariant. You > just need to know whether the load is from a global or from its stub. > Okay. I just don't know how to ch

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-04 Thread Chris Lattner
On Jan 4, 2008, at 10:59 PM, Bill Wendling wrote: > On Jan 4, 2008, at 10:49 PM, Evan Cheng wrote: >> Although, isReallySideEffectFree looks wrong. How is this checked? >> ... >> Bill, how are you checking the Global address isn't redefined >> anywhere else? >> > How would you suggest I check t

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-04 Thread Bill Wendling
On Jan 4, 2008, at 10:49 PM, Evan Cheng wrote: > Although, isReallySideEffectFree looks wrong. How is this checked? > ... > Bill, how are you checking the Global address isn't redefined > anywhere else? > How would you suggest I check that? -bw ___ llv

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-04 Thread Chris Lattner
On Jan 4, 2008, at 10:49 PM, Evan Cheng wrote: > > On Jan 4, 2008, at 9:19 PM, Chris Lattner wrote: > >> Author: lattner >> Date: Fri Jan 4 23:19:56 2008 >> New Revision: 45620 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=45620&view=rev >> Log: >> factor some code better to avoid redundanc

Re: [llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-04 Thread Evan Cheng
On Jan 4, 2008, at 9:19 PM, Chris Lattner wrote: > Author: lattner > Date: Fri Jan 4 23:19:56 2008 > New Revision: 45620 > > URL: http://llvm.org/viewvc/llvm-project?rev=45620&view=rev > Log: > factor some code better to avoid redundancy between > isReallySideEffectFree and isReallyTriviallyReMa

[llvm-commits] [llvm] r45620 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

2008-01-04 Thread Chris Lattner
Author: lattner Date: Fri Jan 4 23:19:56 2008 New Revision: 45620 URL: http://llvm.org/viewvc/llvm-project?rev=45620&view=rev Log: factor some code better to avoid redundancy between isReallySideEffectFree and isReallyTriviallyReMaterializable. Why is a load from a global considered side-effec