summaryrefslogtreecommitdiff
path: root/include/llvm
Commit message (Collapse)AuthorAge
...
* Replaces uses of unsigned for indexes in LiveInterval and VNInfo withLang Hames2009-09-04
| | | | | | | | | a new class, MachineInstrIndex, which hides arithmetic details from most clients. This is a step towards allowing the register allocator to update/insert code during allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81040 91177308-0d34-0410-b5e6-96231b3b80d8
* Include optional subclass flags, such as inbounds, nsw, etc., in theDan Gohman2009-09-04
| | | | | | | | | | | | | | | | | | Constant uniquing tables. This allows distinct ConstantExpr objects with the same operation and different flags. Even though a ConstantExpr "a + b" is either always overflowing or never overflowing (due to being a ConstantExpr), it's still necessary to be able to represent it both with and without overflow flags at the same time within the IR, because the safety of the flag may depend on the context of the use. If the constant really does overflow, it wouldn't ever be safe to use with the flag set, however the use may be in code that is never actually executed. This also makes it possible to merge all the flags tests into a single test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80998 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 80959. It isn't sufficient to solve the full problem. And itDan Gohman2009-09-03
| | | | | | | introduced regressions in the Ocaml bindings tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80969 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVM currently represents floating-point negation as -0.0 - x. FixDan Gohman2009-09-03
| | | | | | | | FastISel to recognize this pattern and emit a floating-point negation using xor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80963 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the API for creating ConstantExprs with the nsw, nuw, inbounds,Dan Gohman2009-09-03
| | | | | | | | | | | | | | | | and exact flags. Because ConstantExprs are uniqued, creating an expression with this flag causes all expressions with the same operands to have the same flag, which may not be safe. Add, sub, mul, and sdiv ConstantExprs are usually folded anyway, so the main interesting flag here is inbounds, and the constant folder already knows how to set the inbounds flag automatically in most cases, so there isn't an urgent need for the API support. This can be reconsidered in the future, but for now just removing these API bits eliminates a source of potential trouble with little downside. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80959 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ImmutableMap/ImmutableSet quicker by only canonicalizing the tree after anTed Kremenek2009-09-03
| | | | | | | | Add or Remove operation complete, and not while building the intermediate tree. This trades a little bit more memory usage for less accesses to the FoldingSet. On a benchmark for the clang static analyzer, this shaves off another 13% of execution time when using field/array sensitivity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80955 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize more opportunities to use SSE min and max instructions,Dan Gohman2009-09-03
| | | | | | | swapping the operands if necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80940 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed the non-target independent AsmToken::Register enum constantKevin Enderby2009-09-03
| | | | | | | | | | | from MCAsmLexer.h in preparation of supporting other targets. Changed the X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking for AsmToken::Percent when parsing in places that used AsmToken::Register. Then changed X86ATTAsmParser::ParseRegister to parse out registers as an AsmToken::Percent followed by an AsmToken::Identifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80929 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman2009-09-03
| | | | | | | | | | that these passes are properly preserved. Fix several transformation passes that claimed to preserve LoopSimplify form but weren't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80926 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getUniqueExitBlocks from LoopBase to Loop, since they depend onDan Gohman2009-09-03
| | | | | | | | LoopSimplify form, which is currently only available on Loops (and not MachineLoops). Also, move the code out of the header file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80923 91177308-0d34-0410-b5e6-96231b3b80d8
* Change PHINode::hasConstantValue to have a DominatorTree argumentDan Gohman2009-09-03
| | | | | | | | | instead of a bool argument, and to do the dominator check itself. This makes it eaiser to use when DominatorTree information is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80920 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove references to expression "handles", which are no longer used.Dan Gohman2009-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80918 91177308-0d34-0410-b5e6-96231b3b80d8
* improve comments.Chris Lattner2009-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80897 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread an MCAsmInfo pointer through the various MC printing APIs, Chris Lattner2009-09-03
| | | | | | | | and fix a few things using << on MCSymbols to use ->print(). No functionality change other than unbreaking my previous patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80890 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the 'cached digest' flag after computing the digest for anTed Kremenek2009-09-03
| | | | | | | | | | | | | | ImutAVLTree. This was accidentally left out, and essentially caused digest caching to be ignored in ImmutableMap and ImmutableSet (this bug was detected from shark traces that showed ComputeDigest was in the hot path in the clang static analyzer). This reduces the running time of the clang static analyzer on an example benchmark by ~32% for both RegionStore (field-sensitivty) and BasicStore (without field-sensitivity). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80877 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a test that ensures the LocalRewriter does not attempt toLang Hames2009-09-03
| | | | | | | | | | | avoid reloads by reusing clobbered registers. This was causing issues in 256.bzip2 when compiled with PIC for a while (starting at r78217), though the problem has since been masked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80872 91177308-0d34-0410-b5e6-96231b3b80d8
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-03
| | | | | | buildbot's stage 2 configure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80871 91177308-0d34-0410-b5e6-96231b3b80d8
* Now Bitcode reader bug is fixed. Reapply 80839.Devang Patel2009-09-03
| | | | | | | | | | Use CallbackVH, instead of WeakVH, to hold MDNode elements. Use FoldingSetNode to unique MDNodes in a context. Use CallbackVH hooks to update context's MDNodeSet appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80868 91177308-0d34-0410-b5e6-96231b3b80d8
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-03
| | | | | | this time. I'll back out if needed... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80858 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 80839 for now. It causes test failures.Devang Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80841 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CallbackVH, instead of WeakVH, to hold MDNode elements. Devang Patel2009-09-02
| | | | | | | | | Use FoldingSetNode to unique MDNodes in a context. Use CallbackVH hooks to update context's MDNodeSet appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80839 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment noting the memory ownership rules.Dan Gohman2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80827 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenience functions for reading in LLVM IR that autodetectDan Gohman2009-09-02
| | | | | | | | and LLVM Assembly and LLVM Bitcode and automatically call the corresponding reader. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80809 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const qualifiers for isBitcodeWrapper, and add new functionsDan Gohman2009-09-02
| | | | | | | | isRawBitcode and isBitcode to allow clients to test whether a given memory buffer holds a bitcode image. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80804 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor common code from ParseAssemblyString and ParseAssemblyFile,Dan Gohman2009-09-02
| | | | | | | to expose a low-level interface for parsing from an existing MemoryBuffer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80803 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const qualifiers to dominates' arguments.Dan Gohman2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80801 91177308-0d34-0410-b5e6-96231b3b80d8
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80749 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Offset from ExternalSybmol MachineOperands, this is unused (and at ↵Daniel Dunbar2009-09-01
| | | | | | least partly unsupported, in X86 encoding at least). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80726 91177308-0d34-0410-b5e6-96231b3b80d8
* OptimalEdgeProfiling: Reading in Profiles.Andreas Neustifter2009-09-01
| | | | | | | This enables LLVM to read the OptimalEdgeProfiles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80715 91177308-0d34-0410-b5e6-96231b3b80d8
* Addedum to r80712, forgot to add files.Andreas Neustifter2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80713 91177308-0d34-0410-b5e6-96231b3b80d8
* OptimalEdgeProfiling: Creation of profiles.Andreas Neustifter2009-09-01
| | | | | | | This adds the instrumentation and runtime part of OptimalEdgeProfiling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80712 91177308-0d34-0410-b5e6-96231b3b80d8
* remove CallGraphNode::replaceCallSite, it is redundant with other APIs.Chris Lattner2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80708 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in a comment.Dan Gohman2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80697 91177308-0d34-0410-b5e6-96231b3b80d8
* Preparation for Optimal Edge Profiling:Andreas Neustifter2009-09-01
| | | | | | | | | | Optimal edge profiling is only possible when blocks with no predecessors get an virtual edge (BB,0) that counts the execution frequencies of this function-exiting blocks. This patch makes the necessary changes before actually enabling optimal edge profiling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80667 91177308-0d34-0410-b5e6-96231b3b80d8
* Preparation for Optimal Edge Profiling:Andreas Neustifter2009-09-01
| | | | | | | | | This adds a pass to verify the current profile against the flow conditions. This is very helpful when later on trying to perserve the profiling information during all passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80666 91177308-0d34-0410-b5e6-96231b3b80d8
* Change CallGraphNode to maintain it's Function as an AssertingVHChris Lattner2009-09-01
| | | | | | | | | | | | | for sanity. This didn't turn up any bugs. Change CallGraphNode to maintain its "callsite" information in the call edges list as a WeakVH instead of as an instruction*. This fixes a broad class of dangling pointer bugs, and makes CallGraph have a number of useful invariants again. This fixes the class of problem indicated by PR4029 and PR3601. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80663 91177308-0d34-0410-b5e6-96231b3b80d8
* Add virtual destructor.Devang Patel2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80660 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Store MCSymbolData value as a pointer (to make MSVC happy).Daniel Dunbar2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80652 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up LSDA name generation and use for SJLJ exception handling. ThisJim Grosbach2009-09-01
| | | | | | | | | | | | makes an eggregious hack somewhat more palatable. Bringing the LSDA forward and making it a GV available for reference would be even better, but is beyond the scope of what I'm looking to solve at this point. Objective C++ code could generate function names that broke the previous scheme. This fixes that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80649 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce DILocation.Devang Patel2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80648 91177308-0d34-0410-b5e6-96231b3b80d8
* Add getDirectory() and getFilename() interface to DIScope.Devang Patel2009-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80647 91177308-0d34-0410-b5e6-96231b3b80d8
* Subprogram is a scope. Derive DISubprogram from DIScope.Devang Patel2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80637 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename DIBlock as DILexicalBlock.Devang Patel2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80633 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive DICompileUnit from DIScope.Devang Patel2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80627 91177308-0d34-0410-b5e6-96231b3b80d8
* Add flag to mark structs for Apple Block "byref" variables; also add code toCaroline Tice2009-08-31
| | | | | | | | modify the type and location debug information for these variables to match the programmer's expectations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80625 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the ValuesAtScope cache to cover all expressions, not justDan Gohman2009-08-31
| | | | | | | | | | | | | | | SCEVUnknowns, as the non-SCEVUnknown cases in the getSCEVAtScope code can also end up repeatedly climing through the same expression trees, which can be unusably slow when the trees are very tall. Also, add a quick check for SCEV pointer equality to the main SCEV comparison routine, as the full comparison code can be expensive in the case of large expression trees. These fix compile-time problems in some pathlogical cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80623 91177308-0d34-0410-b5e6-96231b3b80d8
* restore semantics of operator* (removing a FIXME I had to introduce in r80224)Gabor Greif2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80622 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce DIScope.Devang Patel2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80620 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify isDerivedType() and other predicate interface.Devang Patel2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80602 91177308-0d34-0410-b5e6-96231b3b80d8