summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/IntrinsicLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* use ArgOperand API and CallSite to access arguments of CallInstGabor Greif2010-06-251-23/+26
| | | | llvm-svn: 106833
* Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!Douglas Gregor2010-05-111-0/+6
| | | | llvm-svn: 103457
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-23/+23
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-23/+23
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-23/+23
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-23/+23
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-23/+23
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-23/+23
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-1/+1
| | | | llvm-svn: 101334
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-2/+2
| | | | llvm-svn: 100709
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-2/+2
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-3/+3
| | | | | | dereference the type pointer. llvm-svn: 92726
* Delete renaming use of dead dbg intrinsics.Devang Patel2010-01-051-4/+0
| | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start llvm-svn: 92672
* Codegen support for the llvm.invariant/lifetime.start/end intrinsics:Duncan Sands2009-11-101-0/+9
| | | | | | just throw them away. llvm-svn: 86678
* I don't see any point in having both eh.selector.i32 and eh.selector.i64,Duncan Sands2009-10-141-4/+2
| | | | | | | | | | | | | so get rid of eh.selector.i64 and rename eh.selector.i32 to eh.selector. Likewise for eh.typeid.for. This aligns us with gcc, which always uses a 32 bit value for the selector on all platforms. My understanding is that the register allocator used to assert if the selector intrinsic size didn't match the pointer size, and this was the reason for introducing the two variants. However my testing shows that this is no longer the case (I fixed some bugs in selector lowering yesterday, and some more today in the fastisel path; these might have caused the original problems). llvm-svn: 84106
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-8/+8
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-7/+8
| | | | | | update all code that this affects. llvm-svn: 79830
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-38/+46
| | | | llvm-svn: 78948
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-3/+3
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-31/+31
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-12/+12
| | | | llvm-svn: 76702
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-39/+44
| | | | llvm-svn: 75703
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* eliminate extra space.Torok Edwin2009-07-141-1/+1
| | | | llvm-svn: 75630
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-3/+4
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* remove llvm.part.set.* and llvm.part.select.*. They have never been Chris Lattner2009-07-121-340/+0
| | | | | | | | | | implemented in codegen, have no frontend to generate them, and are better implemented with pattern matching (like the ppc backend does to generate rlwimi/rlwinm etc). PR4543 llvm-svn: 75430
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+1
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-7/+6
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Push LLVMContext _back_ through IRBuilder.Owen Anderson2009-07-081-2/+2
| | | | llvm-svn: 75040
* Get rid of these cache variables, which are a holdover from the days whenOwen Anderson2009-06-261-41/+28
| | | | | | we had multiple type planes and these lookups were expensive. llvm-svn: 74319
* Now with EVEN FEWER statics!Owen Anderson2009-06-251-28/+0
| | | | llvm-svn: 74143
* Switch to using IRBuilder throughout.Jay Foad2009-05-121-204/+195
| | | | llvm-svn: 71587
* Don't generate redundant casts of constant values when lowering calls toJay Foad2009-05-111-38/+29
| | | | | | memcpy, memmove and memset. llvm-svn: 71427
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Add missing break statements, fixing PR3503.Chris Lattner2009-02-071-8/+11
| | | | llvm-svn: 64040
* As Duncan suggested, add braces for the one-line "else branch".Zhou Sheng2009-01-301-1/+2
| | | | | | Thanks, Duncan. llvm-svn: 63389
* This is to fix the bug in IntrinsicLowering.cpp,Zhou Sheng2009-01-301-1/+2
| | | | | | | | the LowerPartSet(). It didn't handle the situation correctly when the low, high argument values are in reverse order (low > high) with 'Val' type i32 (a corner case). llvm-svn: 63388
* reapply Sanjiv's patch to genericize memcpy/memset/memmove to take anChris Lattner2008-11-211-12/+6
| | | | | | arbitrary integer width for the count. llvm-svn: 59823
* Revert r59802. It was breaking the build of llvm-gcc:Bill Wendling2008-11-211-6/+12
| | | | | | | | | | | | | | | | | | | | | g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic' make[3]: *** [llvm-convert.o] Error 1 make[3]: *** Waiting for unfinished jobs.... rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod make[2]: *** [all-stage1-gcc] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 llvm-svn: 59809
* Make mem[cpy,move,set] intrinsics overloaded.Sanjiv Gupta2008-11-211-12/+6
| | | | llvm-svn: 59802
* More refactoring. Yawn.Dale Johannesen2008-09-221-126/+43
| | | | llvm-svn: 56468
* Refactor FP intrinisic setup. Per review feedback.Dale Johannesen2008-09-221-117/+28
| | | | llvm-svn: 56456
* Add intrinsics for log, log2, log10, exp, exp2.Dale Johannesen2008-09-041-0/+213
| | | | | | No functional change (and no FE change to generate them). llvm-svn: 55753
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-161-78/+78
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-41/+41
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-8/+9
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Implement necessary bits for flt_rounds gcc builtin. Anton Korobeynikov2007-11-151-0/+5
| | | | | | Codegen bits and llvm-gcc support will follow. llvm-svn: 44182
* Teach IntrinsicLowering.cpp about the sin, cos, and pow intrinsics.Dan Gohman2007-10-151-0/+45
| | | | llvm-svn: 43020
* Rewrite sqrt and powi to use anyfloat. By popular demand.Dale Johannesen2007-10-021-29/+28
| | | | llvm-svn: 42537
OpenPOWER on IntegriCloud