summaryrefslogtreecommitdiff
path: root/lib/CodeGen/IntrinsicLowering.cpp
Commit message (Collapse)AuthorAge
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Intrinsic::getDeclaration and friends to take an ArrayRef.Benjamin Kramer2011-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135154 91177308-0d34-0410-b5e6-96231b3b80d8
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-12
| | | | | | StructType::get() and TargetData::getIntPtrType(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\ ne 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134893 into '.': U include/llvm/Target/TargetData.h U include/llvm/DerivedTypes.h U tools/bugpoint/ExtractFunction.cpp U unittests/Support/TypeBuilderTest.cpp U lib/Target/ARM/ARMGlobalMerge.cpp U lib/Target/TargetData.cpp U lib/VMCore/Constants.cpp U lib/VMCore/Type.cpp U lib/VMCore/Core.cpp U lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Instrumentation/ProfilingUtils.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/CodeGen/SjLjEHPrepare.cpp --- Reverse-merging r134888 into '.': G include/llvm/DerivedTypes.h U include/llvm/Support/TypeBuilder.h U include/llvm/Intrinsics.h U unittests/Analysis/ScalarEvolutionTest.cpp U unittests/ExecutionEngine/JIT/JITTest.cpp U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp U unittests/VMCore/PassManagerTest.cpp G unittests/Support/TypeBuilderTest.cpp U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp U lib/VMCore/IRBuilder.cpp G lib/VMCore/Type.cpp U lib/VMCore/Function.cpp G lib/VMCore/Core.cpp U lib/VMCore/Module.cpp U lib/AsmParser/LLParser.cpp U lib/Transforms/Utils/CloneFunction.cpp G lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Utils/InlineFunction.cpp U lib/Transforms/Instrumentation/GCOVProfiling.cpp U lib/Transforms/Scalar/ObjCARC.cpp U lib/Transforms/Scalar/SimplifyLibCalls.cpp U lib/Transforms/Scalar/MemCpyOptimizer.cpp G lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/Transforms/IPO/ArgumentPromotion.cpp U lib/Transforms/InstCombine/InstCombineCompares.cpp U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp U lib/Transforms/InstCombine/InstCombineCalls.cpp U lib/CodeGen/DwarfEHPrepare.cpp U lib/CodeGen/IntrinsicLowering.cpp U lib/Bitcode/Reader/BitcodeReader.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134949 91177308-0d34-0410-b5e6-96231b3b80d8
* De-constify Types in FunctionType::get().Jay Foad2011-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134888 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce "expect" intrinsic instructions.Jakub Staszak2011-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134516 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize inline asm 'rev /bin/bash, ' as a bswap intrinsic call.Evan Cheng2011-01-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123048 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of pop_macro warnings on MSVC.Michael J. Spencer2010-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114750 91177308-0d34-0410-b5e6-96231b3b80d8
* undo 80 column trespassing I causedGabor Greif2010-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109092 91177308-0d34-0410-b5e6-96231b3b80d8
* use CallSite::arg_end instead of CallInst::op_endGabor Greif2010-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107276 91177308-0d34-0410-b5e6-96231b3b80d8
* use ArgOperand API and CallSite to access arguments of CallInstGabor Greif2010-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106833 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!Douglas Gregor2010-05-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103457 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-16
| | | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101434Gabor Greif2010-04-16
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-15
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-15
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-15
| | | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-05
| | | | | | dereference the type pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete renaming use of dead dbg intrinsics.Devang Patel2010-01-05
| | | | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92672 91177308-0d34-0410-b5e6-96231b3b80d8
* Codegen support for the llvm.invariant/lifetime.start/end intrinsics:Duncan Sands2009-11-10
| | | | | | | just throw them away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86678 91177308-0d34-0410-b5e6-96231b3b80d8
* I don't see any point in having both eh.selector.i32 and eh.selector.i64,Duncan Sands2009-10-14
| | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84106 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-06
| | | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-23
| | | | | | | update all code that this affects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-31
| | | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-24
| | | | | | thanks to contexts-on-types. More to come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the Pass+Context magic.Owen Anderson2009-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-14
| | | | | | | | | | 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"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate extra space.Torok Edwin2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75630 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-13
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
* remove llvm.part.set.* and llvm.part.select.*. They have never been Chris Lattner2009-07-12
| | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75430 91177308-0d34-0410-b5e6-96231b3b80d8
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-11
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-11
| | | | | | | and abort()/exit() -> llvm_report_error(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75363 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContext _back_ through IRBuilder.Owen Anderson2009-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75040 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of these cache variables, which are a holdover from the days whenOwen Anderson2009-06-26
| | | | | | | we had multiple type planes and these lookups were expensive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74319 91177308-0d34-0410-b5e6-96231b3b80d8
* Now with EVEN FEWER statics!Owen Anderson2009-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74143 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to using IRBuilder throughout.Jay Foad2009-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71587 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't generate redundant casts of constant values when lowering calls toJay Foad2009-05-11
| | | | | | memcpy, memmove and memset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71427 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-07
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66339 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing break statements, fixing PR3503.Chris Lattner2009-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64040 91177308-0d34-0410-b5e6-96231b3b80d8
* As Duncan suggested, add braces for the one-line "else branch".Zhou Sheng2009-01-30
| | | | | | | Thanks, Duncan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63389 91177308-0d34-0410-b5e6-96231b3b80d8
* This is to fix the bug in IntrinsicLowering.cpp,Zhou Sheng2009-01-30
| | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63388 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply Sanjiv's patch to genericize memcpy/memset/memmove to take anChris Lattner2008-11-21
| | | | | | | arbitrary integer width for the count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59823 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r59802. It was breaking the build of llvm-gcc:Bill Wendling2008-11-21
| | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59809 91177308-0d34-0410-b5e6-96231b3b80d8