summaryrefslogtreecommitdiff
path: root/lib/VMCore
Commit message (Collapse)AuthorAge
* Added support to have TableGen provide information if an intrinsic (coreMon P Wang2009-02-24
| | | | | | | or target) can be overloaded or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65404 91177308-0d34-0410-b5e6-96231b3b80d8
* Extension of GEP in constant folder was broken (apparently this codeDaniel Dunbar2009-02-24
| | | | | | | | has never been run!). - Sorry, don't know how to make an LLVM test case for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65383 91177308-0d34-0410-b5e6-96231b3b80d8
* add proper asmwriter and asmparser support for anonymous functions.Chris Lattner2009-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64953 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate several more unnecessary intptr_t casts.Dan Gohman2009-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r64301. These uses of "inline" can cause strangeDuncan Sands2009-02-13
| | | | | | | | link-time failures when building with optimization. Just get rid of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64449 91177308-0d34-0410-b5e6-96231b3b80d8
* Add suppport for ConstantExprs of shufflevectors whose result type is not ↵Nate Begeman2009-02-12
| | | | | | | | | equal to the type of the vectors being shuffled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64401 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r64300 and r64301. These were causing the following errors respectively:Bill Wendling2009-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During llvm-gcc bootstrap: Undefined symbols: "llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from: (anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&) in libLLVMipa.a(CallGraphSCCPass.o) "llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from: (anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&) in libLLVMipa.a(CallGraphSCCPass.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1 During an LLVM release build: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td instruction names with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td instruction information with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Building X86.td assembly writer with tblgen /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td llvm[3]: Compiling InstructionCombining.cpp for Release build if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \ then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64311 91177308-0d34-0410-b5e6-96231b3b80d8
* These uses of "inline" can cause strange link-timeDuncan Sands2009-02-11
| | | | | | | | failures when building with optimization. Just get rid of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64301 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print extra spaces in vector and array constants. This makesDan Gohman2009-02-11
| | | | | | | them visually more consistent with vector and array types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64267 91177308-0d34-0410-b5e6-96231b3b80d8
* make sure that BranchInst::getSuccessor() does not assert in cast<>Gabor Greif2009-02-09
| | | | | | | | | even if the underlying operand is NULL. This may happen in debugging context within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll). After this fix I can resubmit the (backed out) r63459: * lib/VMCore/AsmWriter.cpp: use precise accessors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64142 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63812 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-04
| | | | | | | | and llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63786 91177308-0d34-0410-b5e6-96231b3b80d8
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-04
| | | | | | | | | | target directories themselves. This also means that VMCore no longer needs to know about every target's list of intrinsics. Future work will include converting the PowerPC target to this interface as an example implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63765 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the inverse transform x86_fp80 -> i80 (alsoDuncan Sands2009-02-04
| | | | | | | fires during the Ada build). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63731 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3468: a crash when constant folding a bitcast ofDuncan Sands2009-02-04
| | | | | | | | i80 to x86 long double (this was presumably generated by sroa). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63730 91177308-0d34-0410-b5e6-96231b3b80d8
* reject things like: zext <4 x i32> %tmp to i256Chris Lattner2009-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63504 91177308-0d34-0410-b5e6-96231b3b80d8
* back out my previous change, it exposes a latent bug. investigatingGabor Greif2009-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63463 91177308-0d34-0410-b5e6-96231b3b80d8
* use precise accessorsGabor Greif2009-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63459 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63198 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the logic of getting hold of a PHI predecessor block.Gabor Greif2009-01-23
| | | | | | | | | There is now a direct way from value-use-iterator to incoming block in PHINode's API. This way we avoid the iterator->index->iterator trip, and especially the costly getOperandNo() invocation. Additionally there is now an assertion that the iterator really refers to one of the PHI's Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62869 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use host floating point types when emittingDale Johannesen2009-01-21
| | | | | | | | | | | ASCII IR; loading and storing these can change the bits of NaNs on some hosts. Remove or add warnings at a few other places using host floating point; this is a bad thing to do in general. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62712 91177308-0d34-0410-b5e6-96231b3b80d8
* Make special cases (0 inf nan) work for frem.Dale Johannesen2009-01-21
| | | | | | | | | | Besides APFloat, this involved removing code from two places that thought they knew the result of frem(0., x) but were wrong. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62645 91177308-0d34-0410-b5e6-96231b3b80d8
* div/rem by zero and div/rem overflow are both undefined according toChris Lattner2009-01-19
| | | | | | | | langref. Constant fold them to undef instead of trying to preserve the trap. This fixes PR3354. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62534 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify Intrinsic::dbg_declare. Devang Patel2009-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62526 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the private linkage.Rafael Espindola2009-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
* add comment to explain my previous commit, as asked by ChrisNuno Lopes2009-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62272 91177308-0d34-0410-b5e6-96231b3b80d8
* fix crash in the case when some arg is nullNuno Lopes2009-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62236 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new insertAfter method, patch by Tom Jablin!Chris Lattner2009-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62158 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead code from the days llvm had type planes.Rafael Espindola2009-01-12
| | | | | | | | There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62088 91177308-0d34-0410-b5e6-96231b3b80d8
* make tblgen emit the entire Intrinsic::getAttributes method, Chris Lattner2009-01-12
| | | | | | | | not a random piece of it. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62066 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify CallSite helper class to not consult the Instruction'sGabor Greif2009-01-11
| | | | | | | | opcode on each delegation. Instead the information is cached on construction and the cached flag used thereafter. Introduced two predicates: isCall and isInvoke. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62055 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the spiffy new getAlignmentFromAttrs function.Nick Lewycky2009-01-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62039 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61991 91177308-0d34-0410-b5e6-96231b3b80d8
* Use mayBeOverridden here, in anticipation of theDuncan Sands2009-01-08
| | | | | | | day when more linkage types will be handled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61944 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix failure messages in Verifier::PerformTypeCheck. The argument numbersBob Wilson2009-01-08
| | | | | | | | | | | | passed in to this function changed to support multiple return values, leading to some incorrect argument numbers in the failure messages. With this change, the ArgNo values used for return values and parameters are disjoint, and the new IntrinsicParam function translates those ArgNo values to strings that can be used in the messages. This also fixes a few places where PerformTypeCheck did not return false following calls to CheckFailed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61903 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: removed lib/VMCore/DebugInfoBuilder.cpp.Oscar Fuentes2009-01-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61900 91177308-0d34-0410-b5e6-96231b3b80d8
* Assert that VectorType::getTruncatedElementVectorType is not used withBob Wilson2009-01-07
| | | | | | | odd bit-width vector elements. Add a check in the verifier for this also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61899 91177308-0d34-0410-b5e6-96231b3b80d8
* remove DebugInfoBuilder, it has been subsumed by Analysis/DebugInfo.hChris Lattner2009-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61898 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve support for type-generic vector intrinsics by teaching TableGen howBob Wilson2009-01-07
| | | | | | | | | to handle LLVMMatchType intrinsic parameters, and by adding new subclasses of LLVMMatchType to match vector types with integral elements that are either twice as wide or half as wide as the elements of the matched type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61834 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
* another fix to my previous commit:Gabor Greif2009-01-05
| | | | | | | * some picky <g> compilers get insulted by const-incorrectness * respect 80-char limit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61701 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate tabs from my previous commitGabor Greif2009-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61695 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the tagging functions and use PointerIntPair.Gabor Greif2009-01-05
| | | | | | | | | This means that we have to include an additional header. This patch should be functionally equivalent. I cannot outrule any performance degradation, though I do not expect any. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61694 91177308-0d34-0410-b5e6-96231b3b80d8
* tighten up return type checkChris Lattner2009-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61677 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a mechanism to specify attributes in getOrInsertFunction.Nick Lewycky2009-01-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61645 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner2009-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and clean recursive descent parser. This change has a couple of ramifications: 1. The parser code is about 400 lines shorter (in what we maintain, not including what is autogenerated). 2. The code should be significantly faster than the old code because we don't have to work around bison's poor handling of datatypes with ctors/dtors. This also makes the code much more resistant to memory leaks. 3. We now get caret diagnostics from the .ll parser, woo. 4. The actual diagnostics emited from the parser are completely different so a bunch of testcases had to be updated. 5. I now disallow "%ty = type opaque %ty = type i32". There was no good reason to support this, it was just an accident of the old implementation. I have no reason to think that anyone is actually using this. 6. The syntax for sticking a global variable has changed to make it unambiguous. I don't think anyone is depending on this since only clang supports this and it is not solid yet, so I'm not worried about anything breaking. 7. This gets rid of the last use of bison, and along with it the .cvs files. I'll prune this from the makefiles as a subsequent commit. There are a few minor cleanups that can be done after this commit (suggestions welcome!) but this passes dejagnu testing and is ready for its time in the limelight. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61558 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't analyze arguments already marked 'nocapture'.Duncan Sands2008-12-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61532 91177308-0d34-0410-b5e6-96231b3b80d8
* Make stripPointerCasts and getUnderlyingObjectDuncan Sands2008-12-29
| | | | | | | non-recursive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61479 91177308-0d34-0410-b5e6-96231b3b80d8
* select constant exprs should have the same constraints as select instructions,Chris Lattner2008-12-29
| | | | | | | notably, they should support vectors and aggregates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61462 91177308-0d34-0410-b5e6-96231b3b80d8
* move select validation logic into a shared place where the select ctor,Chris Lattner2008-12-29
| | | | | | | verifier, asm parser, etc can share it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61461 91177308-0d34-0410-b5e6-96231b3b80d8