search for: constantfolder

Displaying 20 results from an estimated 201 matches for "constantfolder".

2015 Apr 20
2
[LLVMdev] ConstantFolding code owner nomination
Hi, I would like to nominate David Majnemer as the code owner for constant folding: lib/IR/ConstantFold.cpp. He seems to be the most active developer based on the git history. David do you accept? -Tom
2012 Mar 02
4
[LLVMdev] replace hardcoded function names by intrinsics
Hi! in the llvm code there are several places with hardcoded function names for e.g. sin, sinf, sqrt, sqrtf etc., namely ConstantFolding.cpp InlineCost.cpp SelectionDAGBuilder.cpp IntrinsicLowering.cpp TargetLowering.cpp my question is: wouldn't it be beneficial to use intrinsics for this? for example a c/c++ frontend (clang) could translate the function calls to intrinsics and then in a
2010 Jul 07
2
[LLVMdev] ConstantFold 'undef xor undef'
On Jul 7, 2010, at 5:47 AM, Jianzhou Zhao wrote: >> >> Does this also apply to two different variables? say >> int z x y; >> z = x ^ y; >> If ConstantFoldBinaryInstruction also folds x ^ y into z, should this >> pass (which uses ConstantFold) also initialize x and y with a same >> initial value? Otherwise at runtime z may not be 0. > > I guess
2010 Jul 07
0
[LLVMdev] ConstantFold 'undef xor undef'
On Tue, Jul 6, 2010 at 10:07 PM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote: > On Tue, Jul 6, 2010 at 8:34 PM, Chris Lattner <clattner at apple.com> wrote: >> >> On Jul 6, 2010, at 3:37 PM, Jianzhou Zhao wrote: >> >>> Which semantics is better? I guess both are fine because if we assume >>> these two def's are same, then it is 0 as
2012 Jun 29
6
[LLVMdev] ConstantExpr refactoring
Hi all, It's been a long time, and I'm probably going to kill myself, but I want to try it anyway. Bug 10368 [1] tells me that ConstantExpr shouldn't automatically fold, and that this is source of many problems (most notably with traps) and code duplication. However, I'm a bit lost... There seem to be constant folding in many places like ConstantExpr::get*() uses
2010 Jul 07
2
[LLVMdev] ConstantFold 'undef xor undef'
On Tue, Jul 6, 2010 at 8:34 PM, Chris Lattner <clattner at apple.com> wrote: > > On Jul 6, 2010, at 3:37 PM, Jianzhou Zhao wrote: > >> Which semantics is better? I guess both are fine because if we assume >> these two def's are same, then it is 0 as >> 'ConstantFoldBinaryInstruction', while if we assume they are different >> then it is equal to
2014 Apr 22
2
[LLVMdev] InstCombine strips the inBounds attribute in GetElementPtr ConstantExpr
I can't upload my program due to confidentiality, but the problem is obvious. At lib/Analysis/ConstantFolding.cpp:646 Constant *C = ConstantExpr::getGetElementPtr(Ops[0], NewIdxs); if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { if (Constant *Folded = ConstantFoldConstantExpression(CE, TD, TLI)) C = Folded; } The generated ConstantExpr C doesn't inherit the
2012 Mar 02
2
[LLVMdev] replace hardcoded function names by intrinsics
Hi, >> in the llvm code there are several places with hardcoded function >> names for e.g. sin, sinf, sqrt, sqrtf etc., namely >> ConstantFolding.cpp >> InlineCost.cpp >> SelectionDAGBuilder.cpp >> IntrinsicLowering.cpp >> TargetLowering.cpp >> >> my question is: wouldn't it be beneficial to use intrinsics for this? >> for example a
2010 Jul 06
2
[LLVMdev] ConstantFold 'undef xor undef'
Hi, At line 2292, lib/VMCore/ConstantFold.cpp (llvm2.7 release) Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1, Constant *C2) { ... // Handle UndefValue up front. if (isa<UndefValue>(C1) || isa<UndefValue>(C2)) { switch (Opcode) { case Instruction::Xor: if (isa<UndefValue>(C1)
2010 Jul 07
0
[LLVMdev] ConstantFold 'undef xor undef'
On Jul 6, 2010, at 3:37 PM, Jianzhou Zhao wrote: > Which semantics is better? I guess both are fine because if we assume > these two def's are same, then it is 0 as > 'ConstantFoldBinaryInstruction', while if we assume they are different > then it is equal to undef. But the second case seems to include the > first one. If we let undef xor undef to be undef, later we can
2010 Jul 07
0
[LLVMdev] ConstantFold 'undef xor undef'
On Wed, Jul 7, 2010 at 11:38 AM, Chris Lattner <clattner at apple.com> wrote: > > On Jul 7, 2010, at 5:47 AM, Jianzhou Zhao wrote: > >>> >>> Does this also apply to two different variables? say >>>   int z x y; >>>   z = x ^ y; >>> If ConstantFoldBinaryInstruction also folds x ^ y into z, should this >>> pass (which uses
2014 Sep 19
2
[LLVMdev] More careful treatment of floating point exceptions
Hi Sanjay, Thanks, I saw this flag and it's definitely should be considered, but it appeared to me to be static characteristic of target platform. I'm not sure how appropriate it would be to change its value from a front-end. It says "Has", while optional flag would rather say "Uses" meaning that implementation cares about floating point exceptions. Regards, Sergey
2014 Jun 03
8
[PATCH v2 0/4] Constant folding of new Instructions
And another try for constant folding of Instructions for nvc0. Please Review this! Thanks, Tobias Klausmann Tobias Klausmann (4): nvc0/ir: clear subop when folding constant expressions nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant expressions nvc0/ir: Handle OP_BFIND when folding constant expressions nvc0/ir: Handle OP_POPCNT when folding constant expressions
2012 Mar 02
0
[LLVMdev] replace hardcoded function names by intrinsics
On Fri, 02 Mar 2012 13:55:18 +0100 Jochen Wilhelmy <jochen.wilhelmy at googlemail.com> wrote: > Hi! > > in the llvm code there are several places with hardcoded function > names for e.g. sin, sinf, sqrt, sqrtf etc., namely > ConstantFolding.cpp > InlineCost.cpp > SelectionDAGBuilder.cpp > IntrinsicLowering.cpp > TargetLowering.cpp > > my question is:
2014 Sep 25
2
[LLVMdev] More careful treatment of floating point exceptions
...on cases. if (OnlyIfReducedTy == C1->getType()) -- 1.8.4 -------------- next part -------------- Subject: [PATCH 6/7] Pass HonorFPExceptions flag around --- include/llvm/Analysis/ConstantFolding.h | 9 ++++++--- include/llvm/Analysis/TargetFolder.h | 13 +++++++----- include/llvm/IR/ConstantFolder.h | 15 ++++++++------ include/llvm/IR/Constants.h | 9 ++++++--- include/llvm/IR/IRBuilder.h | 5 +++-- lib/Analysis/ConstantFolding.cpp | 35 ++++++++++++++++++++++----------- lib/IR/Constants.cpp | 17 ++++++++++------ 7 files changed, 6...
2010 Mar 23
2
[LLVMdev] How to avoid memory leaks
...tFoldBinaryInstruction(unsigned int, llvm::Constant*, llvm::Constant*) (in /home/gabi/vgen/Debug/vgen) ==20504==    by 0x88BD87: llvm::ConstantExpr::getTy(llvm::Type const*, unsigned int, llvm::Constant*, llvm::Constant*, unsigned int) (in /home/gabi/vgen/Debug/vgen) ==20504==    by 0x423B2E: llvm::ConstantFolder::CreateSDiv(llvm::Constant*, llvm::Constant*) const (ConstantFolder.h:76) ==20504==    by 0x424D7C: llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateSDiv(llvm::Value*, llvm::Value*, llvm::Twine const&) (IRBuilder.h:394) ==20504==    by 0x4226...
2009 Sep 15
1
[LLVMdev] [llvm-commits] [llvm] r81845 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Assembler/insertextractvalue.ll
Chris Lattner wrote: > URL: http://llvm.org/viewvc/llvm-project?rev=81845&view=rev > Log: > fix PR4963: folding insertvalue would sometimes turn a packed struct into > an unpacked one. About this bug -- it happened because ConstantStruct::get has a default parameter for whether the struct should be packed or not, which defaults to not packed. This is strikingly error prone. We
2015 Mar 25
0
[PATCH] nv50/ir: take postFactor into account when doing peephole optimizations
Multiply operations can have a post-factor on them, which other ops don't support. Only perform the peephole optimizations when there is no post-factor involved. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89758 Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+),
2011 May 06
0
[LLVMdev] Question about linking llvm-mc when porting a new backend
...ution.cpp.o) llvm::FastISel::hasTrivialKill(llvm::Value const*) constin libLLVMSelectionDAG.a(FastISel.cpp.o) llvm::FastISel::materializeRegForValue(llvm::Value const*, llvm::MVT)in libLLVMSelectionDAG.a(FastISel.cpp.o) llvm::EmitStrLen(llvm::Value*, llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >&, llvm::TargetData const*)in libLLVMTransformUtils.a(BuildLibCalls.cpp.o) llvm::EmitFWrite(llvm::Value*, llvm::Value*, llvm::Value*, llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >&, llvm::...
2011 Apr 17
2
[LLVMdev] Error compiling ConstantProp.cpp
I am using llvm-2.6 and the ConstProp.cpp file is http://llvm.org/docs/doxygen/html/ConstantProp_8cpp_source.html and the exact error message is: llvm[0]: Compiling ConstantProp.cpp for Release build (PIC) /home/tarun/Desktop/compiler/LLVM/llvm-2.6/include/llvm/Analysis/ConstantFolding.h: In member function ‘virtual bool<unnamed>::ConstantPropagation::runOnFunction(llvm::Function&)’: