search for: sval

Displaying 20 results from an estimated 56 matches for "sval".

Did you mean: _val
2012 Aug 15
0
[LLVMdev] Questions on Memory Optimizations
Hi, I would like to eliminate all the load instructions and replace their uses with the stored values in the following program. The stores and loads are in the same basic block. Is there an optimization pass in LLVM 3.0 that can do this? define void @testFunc() { entry: %sVal = alloca %sTy %f1 = getelementptr %sTy* %sVal, i32 0, i32 0 store i32 789, i32* %f1 %f2 = getelementptr %sTy* %sVal, i32 0, i32 1 store double 3.523460e+01, double* %f2 %f3 = getelementptr %sTy* %sVal, i32 0, i32 2 store double 0x41CD6F34588147AE, double* %f3 %f1a = getelementptr %sTy...
2013 Feb 16
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
..., David Blaikie <dblaikie at gmail.com> wrote: > Beyond that, though, I've hit one hierarchy in the Static Analyzer > that does this as well: ProgramPoint. On IRC Jordan Rose mentioned > that there's another more pervasive use of this pattern in the Static > Analyzer, the SVal hierarchy. > > So, Ted, how objectionable would it be for me to introduce something > like (names subject to adjustment): > > template<typename T> > T SVal::castAs(); > > template<typename T> > llvm::Optional<T> SVal::getAs(); > > (the implemen...
2012 Dec 04
4
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Hi All, I was debugging a clang binary when i found this problem. The following code is complied with clang. typedef struct s { short s; } SVAL; void recurse (SVAL a, int depth) { a.s = --depth; if (depth == 0) return; else recurse(a,depth); } int main () { SVAL s; s.s = 5; recurse (s, 5); return 0; } When i try to access value of a.s in function recurse through gdb(i.e gdb > p a.s) it gives me an uninitialized v...
2013 Feb 11
3
[LLVMdev] [cfe-dev] UB in TypeLoc casting
...862 (might need one other change there)) but otherwise seems achievable. Beyond that, though, I've hit one hierarchy in the Static Analyzer that does this as well: ProgramPoint. On IRC Jordan Rose mentioned that there's another more pervasive use of this pattern in the Static Analyzer, the SVal hierarchy. So, Ted, how objectionable would it be for me to introduce something like (names subject to adjustment): template<typename T> T SVal::castAs(); template<typename T> llvm::Optional<T> SVal::getAs(); (the implementations of these functions might involve invoking priva...
2012 Dec 06
2
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
...rgInfo::getIndirect(4, /*ByVal=*/true, /*Realign=*/true); // Do a realign of stack. ... This seems to have fixed the issue. Also in case we have a large structure - e.g. - typedef struct s { long s; long i; long l; long s1; long i1; long l1; } SVAL; in the above mentioned code the same issue(corruption of member variables when accessed through GDB) was observed which has got fixed after this change. Need input if this change is correct. Thanks On Wed, Dec 5, 2012 at 1:45 AM, David Blaikie <dblaikie at gmail.com> wrote: > This se...
2011 Oct 03
0
[LLVMdev] [RFC] Proposal to make LLVM-IR endian agnostic
...rary memory location. Actually I think having the 2 intrinsics you suggest and the is_bigendian() intrinsic would be optimal: you can use your 2 intrinsics for initial codegen, and mem2reg can transform it to is_bigendian(). For load/store: <type> %val = load <type>* %ptr <type> %sval = bswap.i<type> %val %result = <type> select @llvm.is_bigendian(), %val, %sval For htonl(): <type> %sval = bswap.i<type> %val %result = <type> select @llvm.is_bigendian(), %val, %sval (store is similar, byteswap before the store) At bytecode JIT time / assembly emis...
2012 Dec 04
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
...to commit a fix to this. On Tue, Dec 4, 2012 at 5:34 AM, Karthik Bhat <karthikthecool at gmail.com> wrote: > Hi All, > > I was debugging a clang binary when i found this problem. The > following code is complied with clang. > > typedef struct s > { > short s; > } SVAL; > > > void recurse (SVAL a, int depth) > { > a.s = --depth; > if (depth == 0) > return; > else > recurse(a,depth); > } > > int main () > { > SVAL s; s.s = 5; > recurse (s, 5); > return 0; > } > > When i try to access value...
2017 Sep 07
2
Status of debuginfo-tests
I was thinking of something along the lines of: // SCRIPT-POSIX: posix/aggregate-indirect-arg.s // SCRIPT-WIN: win/aggregate-indirect-arg.s class SVal { public: ~SVal() {} const void* Data; unsigned Kind; }; void bar(SVal &v) {} class A { public: void foo(SVal v) { bar(v); } }; int main() { SVal v; v.Data = 0; v.Kind = 2142; A a; a.foo(v); return 0; } Then, you could have: // posix/aggregate-indirect-arg.s // RUN: %cl...
2012 Dec 06
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
...gn=*/true); // Do a > realign of stack. > > ... > > > This seems to have fixed the issue. Also in case we have a large > structure - e.g. - > > typedef struct s > { > long s; > long i; > long l; > long s1; > long i1; > long l1; > } SVAL; > > in the above mentioned code the same issue(corruption of member > variables when accessed through GDB) was observed which has got fixed > after this change. > > Need input if this change is correct. I haven't looked at this carefully yet (& I'm not the authority...
2012 Dec 04
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
...Just a thought. Richard On Dec 4, 2012, at 5:34 AM, Karthik Bhat <karthikthecool at gmail.com> wrote: > Hi All, > > I was debugging a clang binary when i found this problem. The > following code is complied with clang. > > typedef struct s > { > short s; > } SVAL; > > > void recurse (SVAL a, int depth) > { > a.s = --depth; > if (depth == 0) > return; > else > recurse(a,depth); > } > > int main () > { > SVAL s; s.s = 5; > recurse (s, 5); > return 0; > } > > When i try to access value of...
2018 Mar 09
0
[SelectionDAG] [TargetOp] How to get sub-half of immediate?
...take an immediate node and get the lower 16 bits. // Transformation Function - get the higher 16 bits. def HI16 : SDNodeXForm<imm, [{ return getImm(N, (N->getZExtValue() >> 16) & 0xFFFF); }]>; Similarly, get the high 16 bits. def LUiORiPred : PatLeaf<(imm), [{ int64_t SVal = N->getSExtValue(); return isInt<32>(SVal) && (SVal & 0xffff); }]>; For completeness sake I've included this, but it's return true there are bits in both 16 bit fragments. Then we use (here VT = i32, ORiOp is our logical or which takes an immediate, LUiOp loads...
2012 Dec 05
1
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
...2012, at 5:34 AM, Karthik Bhat <karthikthecool at gmail.com> wrote: > >> Hi All, >> >> I was debugging a clang binary when i found this problem. The >> following code is complied with clang. >> >> typedef struct s >> { >> short s; >> } SVAL; >> >> >> void recurse (SVAL a, int depth) >> { >> a.s = --depth; >> if (depth == 0) >> return; >> else >> recurse(a,depth); >> } >> >> int main () >> { >> SVAL s; s.s = 5; >> recurse (s, 5); >&gt...
2018 Mar 09
2
[SelectionDAG] [TargetOp] How to get sub-half of immediate?
Hi all, This seems like a dumb question but while setting up a pattern in TD file, I got stuck on trying to get each half of an immediate as the half-sized type (ie. i64 imm -> pair of i32 imm's). Is there an existing way to do it? I've tried the 'EXTRACT_SUBREG' but that seems to error at the end of scheduling. Looking at Target.td, I'm not sure which opcode is meant
2010 Feb 08
0
[LLVMdev] Build broken on MSVC 9.0
...ng class template member function 'llvm::ImutAVLTree<ImutInfo> *llvm::ImutIntervalAVLFactory<ImutInfo>::Add(llvm::ImutAVLTree<ImutInfo> *,const std::pair<_Ty1,_Ty2> &)' 97> with 97> [ 97> ImutInfo=llvm::ImutIntervalInfo<clang::SVal>, 97> _Ty1=llvm::Interval, 97> _Ty2=clang::SVal 97> ] 97> D:\public\zorg\buildbot\osuosl\slave\clang-i686-xp-msvc9\llvm\include\llvm/ADT/ImmutableIntervalMap.h(203) : see reference to class template instantiation 'llvm::ImutIntervalAVLFactory&l...
2006 Oct 04
1
Optim: Function definition
...*x[2]*(1-x[2])))^2/fr[1])+ ifelse(fr[2]==0,0,(fr[2]-(1-x[1])*x[2]+x[3]*sqrt(x[1]*(1-x[1])*x[2]*(1-x[2])))^2/fr[2])+ ifelse(fr[3]==0,0,(fr[3]-x[1]*(1-x[2])+x[3]*sqrt(x[1]*(1-x[1])*x[2]*(1-x[2])))^2/fr[3])+ ifelse(fr[4]==0,0,(fr[4]-(1-x[1])*(1-x[2])-x[3]*sqrt(x[1]*(1-x[1])*x[2]*(1-x[2])))^2/fr[4]) } sval=rep(0.1,3) fr<-c(0,0.1,0.2,0.3) optim(sval,obj, method="BFGS")$par Thank you, Serguei -- ___________________________________________________________________ Austrian Institute of Economic Research (WIFO) Name: Serguei Kaniovski P.O.Box 91 Tel.: +43-1-7982601-231 Arsenal Objekt...
2017 Sep 07
2
Status of debuginfo-tests
...ld also transform the output to look more like the GDB > output that the CHECK-lines are looking for. > > > // CHECK: ${{[0-9]+}} = > // CHECK: Data ={{.*}} 0x0{{(0*)}} > // CHECK: Kind = 2142 > > In WinDbg this is going to be more like: > > Local var @ 0x6ffa50 Type SVal > > +0x000 Data : (null) +0x004 Kind : 0x85e > > > > Alternatively, this is still similar enough that we could relax the check > to look like > CHECK: Data{{.*[:=].*(0x0|.null.)}} > CHECK: Kind{{.*[:=].*(2142|0x85e)}} > without much lo...
2005 Apr 21
1
Fwd: (KAME-snap 9012) racoon in the kame project
FYI, looks like support for Racoon is ending. Does anyone have any experience with the version in ipsec-tools ? ---Mike >Racoon users, > >This is the announcement that the kame project will quit providing >a key management daemon, the racoon, and that "ipsec-tools" will become >the formal team to release the racoon. >The final release of the racoon in the
2012 Aug 01
0
[LLVMdev] Broken tests following r160899
...-------------------------------------------------------- Breakpoint 1 at 0x4007ec: file llvm/tools/clang/test/debuginfo-tests/aggregate-indirect-arg.cpp, line 22. Breakpoint 1, A::foo (this=0x7fffffffea80, v=...) at llvm/tools/clang/test/debuginfo-tests/aggregate-indirect-arg.cpp:22 22 void foo(SVal v) { bar(v); } $1 = (SVal &) @0x7fffffffea70: {Data = 0x0, Kind = 2142} A debugging session is active. Inferior 1 [process 9508] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal] Output from r160899 (broken) for aggregate-indirect-arg.cpp: -----------------------...
2012 Jul 31
2
[LLVMdev] Broken tests following r160899
Hi, I'm afraid it looks like commit r160899 has broken two test-cases which are part of the "debuginfo-tests" repository. I believe I have narrowed it down to the correct commit... Cheers Andy
2010 Jul 25
2
3d topographic map
Hi All- I would like to create a 3d topographic map using lat/lon and z(height). I have been scouring the R help pages and have not located the package I am looking for. Does anyone have a suggestion of package that will work for this? thanks- sherri